About this question

EWMA Pearson Correlation

Easy · risk_management · Quant Researcher interview question · ewma, correlation, exponential_weighting, risk_metrics, risk_management

Exponentially Weighted Moving Average (EWMA) correlation is a dynamic risk measure that assigns greater weight to more recent observations. This approach allows correlation estimates to adapt smoothly to new information, avoiding the abrupt jumps associated with simple rolling-window correlations. It is a standard building block for RiskMetrics-style dynamic correlation matrices used in portfolio hedging and risk management. Task Implement the function ewma_correlation(x, y, lam) that computes