Practice
Code: Historical VaR (95%)
Solve step by step: reveal hints only when needed, then check your reasoning against the full walkthrough.
Problem set
Sample Variance by HandAnnualized Sharpe from Daily StatsConvert Covariance to CorrelationInterpret a Z-Score ShockTwo-Asset Portfolio VariancePosition Size from Risk BudgetKelly Fraction ScenarioInterpret Daily VaRTriangular FX Arbitrage CheckSharpe vs Sortino in Allocation ChoiceDice Game Expected ValueBoth Assets Down ProbabilityCoin Flip Stop RuleCard Draw: Ace then KingMonty Hall VariantCode: Rolling Sharpe (63-day)Code: Kelly Fraction FunctionCode: Max DrawdownCode: Historical VaR (95%)Code: Equal-Weight Rebalance Shares
CodingIntermediate
Implement historical_var(returns, alpha=0.95) that returns positive loss VaR using the empirical quantile (no parametric assumptions).
Unsolved
stdout
(no output yet — click Run)