About this question

Exponentially Weighted Quantile

Medium · statistical_analysis · Quant Researcher interview question · exponential_weighting, quantile_estimation, risk_measurement, weighted_statistics, ewma

Standard quantile estimators treat all observations equally, but in financial time series the most recent data is typically more informative. Exponentially weighted quantiles assign decaying weights to older observations, making the estimator more responsive to regime changes while retaining the full sample for stability. Task Implement ewm_quantile(data: list, span: float, q: float) that computes the q-th quantile of data using exponentially decaying weights. Algorithm: 1. Assign weight w_i =