About this question
Easy · risk_management · Quant Researcher interview question · risk-management, var, percentile, numpy, quantile
Historical Value-at-Risk (VaR) is a foundational risk metric used across trading desks and risk management frameworks to bound expected losses at a given confidence level. Unlike parametric approaches that assume normality, historical VaR preserves the empirical distribution of returns and captures fat tails and skew directly from observed data. Task Implement the function solution(returns: listfloat, confidence: float) -> float to calculate the historical Value-at-Risk (VaR). The function shou