Formulas · 39 reference pages
Formulas
The math the tools run, written out. Each page gives the equation, defines every variable, walks a worked example with real numbers, and lists the common variations you will see in papers and codebases. No derivation hand-waving, no sales copy.
Risk & portfolio construction
25 formulas-
Annualized Volatility Formula
The annualized volatility formula scales per-period return standard deviation by the square root of periods per year. Root-time scaling explained.
4 VARIABLES
-
Beta Formula
The beta formula: covariance of asset and market returns over market variance. The CAPM regression slope measuring systematic risk, with an example.
4 VARIABLES
-
Calmar Ratio Formula
The Calmar ratio formula: annualized return divided by maximum drawdown over the period. A drawdown-based risk-adjusted return with a worked example.
4 VARIABLES
-
CAPM Formula
The CAPM formula: expected return equals the risk-free rate plus beta times the market risk premium. The basis for pricing systematic risk.
4 VARIABLES
-
Correlation Formula
The Pearson correlation formula: covariance of two return series over the product of their standard deviations. The key diversification input.
4 VARIABLES
-
CVaR / Expected Shortfall Formula
The CVaR formula: the average loss in the worst tail beyond VaR. Expected shortfall, a coherent risk measure favored by Basel, with a worked example.
4 VARIABLES
-
Downside Deviation Formula
The downside deviation formula: root mean square of returns below a target, over total observations. The risk term inside the Sortino ratio.
4 VARIABLES
-
Fractional Kelly Formula
The fractional Kelly formula stakes a fixed multiple of full Kelly to cut volatility for a small growth cost. Why half-Kelly is popular.
4 VARIABLES
-
Historical VaR Formula
The historical VaR formula: the empirical quantile of past returns at a confidence level. A distribution-free Value-at-Risk method, with an example.
4 VARIABLES
-
Information Ratio Formula
The information ratio formula: active return over a benchmark divided by tracking error. Measures the consistency of excess return, with an example.
5 VARIABLES
-
Jensen's Alpha Formula
Jensen's alpha formula: realized return minus the CAPM-expected return given beta. The excess return a manager earns beyond market risk.
5 VARIABLES
-
Kelly Criterion Formula
The Kelly criterion formula: the bet fraction maximizing long-run log growth from win probability and payoff odds. The optimal sizing rule.
4 VARIABLES
-
Kurtosis Formula
The kurtosis formula: the fourth standardized moment of returns. Measures tail heaviness, with excess kurtosis relative to the normal, and an example.
4 VARIABLES
-
M-Squared (M2) Formula
The M-squared formula: the return a portfolio earns if levered to market volatility. Modigliani risk-adjusted performance in return units.
4 VARIABLES
-
Maximum Drawdown Formula
The maximum drawdown formula: the largest peak-to-trough decline in an equity curve. The worst loss from a prior high, with a worked example.
4 VARIABLES
-
Omega Ratio Formula
The Omega ratio formula: probability-weighted gains above a threshold over losses below it. Uses the whole return distribution, with a worked example.
4 VARIABLES
-
Parametric VaR Formula
The parametric VaR formula: Value-at-Risk from the mean, volatility, and a normal z-score. The variance-covariance method, with a worked example.
4 VARIABLES
-
R-Squared Formula
The R-squared formula: the share of a portfolio's return variance explained by its benchmark. The squared correlation behind beta and alpha.
4 VARIABLES
-
Sharpe Ratio Formula
The Sharpe ratio formula: excess return over the risk-free rate divided by return volatility, then annualized. Every variable defined, with a worked example.
4 VARIABLES
-
Skewness Formula
The skewness formula: the third standardized moment of returns. Measures asymmetry, the tilt toward large gains or losses, with a worked example.
4 VARIABLES
-
Sortino Ratio Formula
The Sortino ratio formula: excess return over a target divided by downside deviation, so only harmful volatility is penalized. With a worked example.
5 VARIABLES
-
Sterling Ratio Formula
The Sterling ratio formula: annualized return over average annual drawdown plus a 10% penalty. A stricter drawdown-adjusted return, with an example.
4 VARIABLES
-
Tracking Error Formula
The tracking error formula: the standard deviation of a portfolio's active return versus its benchmark. How tightly a fund tracks its index.
4 VARIABLES
-
Treynor Ratio Formula
The Treynor ratio formula: excess return over the risk-free rate divided by beta. Reward per unit of systematic market risk, with a worked example.
3 VARIABLES
-
Ulcer Index Formula
The Ulcer Index formula: the root mean square of percentage drawdowns from running highs. Measures depth and duration of losses, with an example.
4 VARIABLES
Backtesting & validation
10 formulas-
CAGR Formula
The CAGR formula: the constant annual rate growing a beginning value to an ending value over n years. The true geometric return, with a worked example.
3 VARIABLES
-
Deflated Sharpe Ratio Formula
The deflated Sharpe ratio formula: the probability a strategy's Sharpe is real after correcting for the number of trials, return skew, kurtosis, and sample length.
7 VARIABLES
-
Expectancy Formula
The expectancy formula: win rate times average win minus loss rate times average loss. The expected profit per trade in R-multiples, with an example.
5 VARIABLES
-
Fundamental Law of Active Management Formula
The fundamental law of active management: information ratio equals information coefficient times the square root of breadth. With an example.
4 VARIABLES
-
Gain-to-Pain Ratio Formula
The gain-to-pain ratio formula: sum of returns over the absolute sum of losing periods. A robust Schwager measure of return per unit of pain.
3 VARIABLES
-
Information Coefficient Formula
The information coefficient formula: correlation between forecast and realized returns. How to measure quant forecasting skill, with a worked example.
4 VARIABLES
-
Probabilistic Sharpe Ratio Formula
The probabilistic Sharpe ratio formula: the chance a true Sharpe beats a benchmark, adjusting for skew, kurtosis, and sample length, with an example.
6 VARIABLES
-
Probability of Backtest Overfitting (PBO) Formula
The PBO formula: the probability the best in-sample strategy lands below median out-of-sample, via combinatorial cross-validation. With an example.
4 VARIABLES
-
Profit Factor Formula
The profit factor formula: gross profit divided by gross loss. A single number summarizing a strategy's edge, what values mean, with a worked example.
4 VARIABLES
-
Win Rate Formula
The win rate formula: winning trades divided by total trades. Why win rate alone is meaningless without the payoff ratio, with a breakeven example.
4 VARIABLES
AI in markets
3 formulas-
Cost Per 1K Tokens Formula
The cost-per-1K-tokens formula: input tokens times input price plus output tokens times output price. Why output dominates LLM cost, with an example.
4 VARIABLES
-
Cost Per Validated Trade Formula
The cost-per-validated-trade formula: total LLM spend over trades that pass validation. The real unit economics of an AI trading agent.
4 VARIABLES
-
Prompt Cache Break-Even Formula
The prompt-cache break-even formula: how many reuses of a cached prefix repay its write premium. When caching pays off for LLM workloads.
4 VARIABLES
General
1 formulasWhere these get computed