Risk & Performance Metrics
Every metric in TradePilot explained — with formulas, descriptions, and live calculations using AAPL sample data.
Daily Returns
Percentage change in price from one period to the next. The fundamental building block of all other metrics.
R_t = (P_t - P_{t-1}) / P_{t-1}Where P_t is the price at time t. Also called simple returns or arithmetic returns.
Annualized Returns
Compound returns scaled to a one-year period for standardized comparison across different time horizons.
R_annual = (∏(1 + R_t))^(252/N) - 1
Where N is the number of periods and 252 is trading days per year. Uses geometric (compound) growth.
Annualized Volatility
Standard deviation of returns, scaled to annual frequency. The most common measure of total risk.
σ_annual = std(R) × √252
Volatility scales with the square root of time (assuming i.i.d. returns).
Semideviation
Standard deviation of only negative returns. Measures downside risk, ignoring upside volatility.
σ_down = std(R | R < 0)
Only considers returns below zero. Investors care more about downside risk than upside "risk".
Sharpe Ratio
Excess return per unit of total risk. The gold standard for risk-adjusted performance measurement.
SR = (R_p - R_f) / σ_p
Where R_p = annualized portfolio return, R_f = risk-free rate, σ_p = annualized portfolio volatility.
Sortino Ratio
Excess return per unit of downside risk. A more nuanced alternative to the Sharpe ratio.
Sortino = (R_p - R_f) / σ_down
Uses semideviation (downside volatility) instead of total volatility in the denominator.
Historic VaR
The loss threshold at a given confidence level based on historical return distribution.
VaR_α = -Percentile(R, α)
At 5% level: "There is a 5% chance that daily losses will exceed this value." Non-parametric — uses actual return data.
Gaussian VaR
Parametric VaR assuming returns follow a normal distribution.
VaR = -(μ + z_α × σ)
Where z_α is the z-score for the confidence level (e.g., -1.645 for 5%). Assumes normality of returns.
Cornish-Fisher VaR
Modified VaR that adjusts for skewness and kurtosis in the return distribution.
z_cf = z + (z²-1)S/6 + (z³-3z)(K-3)/24 - (2z³-5z)S²/36
Adjusts the Gaussian z-score using observed skewness (S) and kurtosis (K). Then VaR = -(μ + z_cf × σ).
Conditional VaR (CVaR)
Expected loss given that losses exceed VaR. Also called Expected Shortfall — answers "how bad is it when things go bad?"
CVaR = -E[R | R ≤ -VaR]
Average of all returns that fall below the VaR threshold. Always ≥ VaR.
Maximum Drawdown
The largest peak-to-trough decline in portfolio value. Measures the worst-case loss from a historical high.
MDD = min((V_t - V_peak) / V_peak)
Where V_peak is the running maximum value up to time t. Expressed as a negative percentage.
Skewness
Measures asymmetry of the return distribution. Negative skew means more frequent large losses.
S = E[(R - μ)³] / σ³
Third standardized moment. S < 0 = left-skewed (fat left tail), S > 0 = right-skewed, S = 0 = symmetric.
Kurtosis
Measures tail heaviness of the distribution. Higher kurtosis means more extreme events than a normal distribution.
K = E[(R - μ)⁴] / σ⁴
Fourth standardized moment. K = 3 for normal distribution (mesokurtic). K > 3 = fat tails (leptokurtic).
Alpha
Excess return of the portfolio over the risk-free rate. Measures absolute value added by active management.
α = R_p - R_f
Simple excess return. In CAPM: α = R_p - [R_f + β(R_m - R_f)] but TradePilot uses the simpler definition.
Momentum
Price difference over a lookback window. Used both as a metric and a ranking/selection criterion.
M(i, t) = P(i, today) - P(i, today - t)
Simple price-level momentum over t periods. Not returns-based — uses raw price difference.