About this question
Medium · risk_management · Quant Researcher interview question · ewma_beta, dynamic_hedging, market_beta, exponential_weighting, risk_management
Static OLS betas are often too slow to react to market regime shifts. The exponentially weighted moving average (EWMA) beta addresses this by assigning greater weight to recent observations, creating a more responsive risk metric. This is a standard technique in quantitative finance for dynamic delta-hedging and managing market-neutral portfolios. Task Implement the function ewma_beta(asset_returns, market_returns, lam) to calculate the EWMA-weighted beta of an asset's returns relative to marke