Practice
Code: Kelly Fraction Function
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
CodingBeginner
Write kelly_fraction(p_win, avg_win, avg_loss) where avg_loss is a positive magnitude.
Return max(0, f*) with f* = p - (q/b) and b = avg_win/avg_loss.
Unsolved
stdout
(no output yet — click Run)