Sortino ratio (μ - target)/σ_down is invariant under uniform scaling of mean, target, and downside semi-deviation.
ℝ → ℝ → ℝ → ℝ
Sortino ratio (μ - target) / σ_down. Inputs are the mean, the target return, and the downside semi-deviation.
Standard quant performance metrics beyond the basic Sharpe ratio:
S = (μ - target) / σ_down, with σ_down the downside semi-deviation. Like Sharpe but penalises only downside variation.T = (μ - r_f) / β, with β = Cov(R, R_m) / Var(R_m) the systematic risk. The market-model analogue of Sharpe.IR = (μ_p - μ_b) / σ_active, with σ_active the tracking error (std-dev of R_p − R_b). Measures active management skill.trackingErrorSq := σ_p² − 2·cov + σ_b² — the Var(R_p − R_b) expansion in terms of the input moments, tied to the variance of the active return by trackingErrorSq_eq_variance_sub.Sortino, Treynor, and IR are all instances of (a − b)/d. Their scale-invariance lemmas are one-line consequences of the algebraic master diff_div_scale_invariant in Choice.Performance.Ratios. (The same master also handles the Sharpe scale invariance — proving that the master is load-bearing across all four ratios in the library.)
The last two are realised ratios: they aggregate a return path over a finite period set rather than combining summary moments.
(∑ r⁺) / (∑ r⁻), total gains over total losses (Schwager). Written with Mathlib's positive/negative parts r⁺ = max r 0, r⁻ = max (-r) 0, so posPart_sub_negPart supplies the decomposition ∑ r⁺ − ∑ r⁻ = ∑ r that turns "ratio ≥ 1" into "the period was profitable".(∑_{up} p) / (∑_{up} b), portfolio gains over benchmark gains on the up-market periods (Morningstar).Both are quotients, and in Lean x / 0 = 0; the nonnegativity and homogeneity statements below therefore need no nonvanishing side condition — the degenerate no-loss / flat-benchmark case is covered by the same statement. The one place a hypothesis is genuinely load-bearing is one_le_gainToPain_iff, where 0 < ∑ r⁻ is what makes the quotient comparable to 1 at all.
sortinoRatio: (μ − target) / σ_down, with σ_down the downside semi-deviation.treynorRatio: (μ − r_f) / β.informationRatio: (μ_p − μ_b) / σ_active, with σ_active the tracking error.trackingErrorSq: σ_p² − 2·cov + σ_b².gainToPain: over a finite period set, the total of the positive parts of the returns over the total of the negative parts.upCapture: over the up-market periods, the portfolio gains ∑ p over the benchmark gains ∑ b.sortinoRatio_scale_invariant, sortinoRatio_translation.treynorRatio_scale_invariant, treynorRatio_eq_sharpeRatio_mul (Treynor is Sharpe rescaled by σ / β) and treynorRatio_eq_of_jensenAlpha_eq_zero (on the security market line every asset has the market's Treynor ratio).informationRatio_scale_invariant.trackingErrorSq_self, trackingErrorSq_ge_diff_sq, trackingErrorSq_eq_variance_sub.gainToPain_nonneg, one_le_gainToPain_iff.upCapture_smul.Sortino ratio, Treynor ratio, information ratio, tracking error, gain-to-pain ratio, upside capture, performance attribution, MSC 91G10, JEL G11
Above: what it imports. Below: what imports it.
Sortino ratio (μ - target)/σ_down is invariant under uniform scaling of mean, target, and downside semi-deviation.
Sortino ratio is invariant under additive shift of both mean and target by the same amount.
Treynor ratio (μ - r_f)/β is invariant under uniform scaling of mean, risk-free rate, and beta.
Information ratio (μ_p - μ_b)/σ_active is invariant under uniform scaling.
When the benchmark equals the portfolio (σ_p = σ_b and cov = σ_p²), the tracking-error² vanishes.
Under the Cauchy-Schwarz bound cov ≤ σ_p·σ_b, the tracking-error² ≥ (σ_p - σ_b)².
The gain-to-pain ratio, total gains over total losses on a finite period set, is nonnegative — unconditionally.
The upside-capture ratio is homogeneous of degree one in the portfolio leg — unconditionally.
ℝ → ℝ → ℝ → ℝ
Sortino ratio (μ - target) / σ_down. Inputs are the mean, the target return, and the downside semi-deviation.
∀ {c : ℝ}, c ≠ 0 → ∀ (μ target σ_down : ℝ), sortinoRatio (c * μ) (c * target) (c * σ_down) = sortinoRatio μ target σ_downSortino is invariant under uniform rescaling. One-line consequence of diff_div_scale_invariant.
∀ (μ target σ_down shift : ℝ), sortinoRatio (μ + shift) (target + shift) σ_down = sortinoRatio μ target σ_down
Sortino is translation-invariant in the additive shift of both mean and target.
ℝ → ℝ → ℝ → ℝ
Treynor ratio (μ - r_f) / β, with β the systematic-risk coefficient.
∀ {c : ℝ}, c ≠ 0 → ∀ (μ r_f β : ℝ), treynorRatio (c * μ) (c * r_f) (c * β) = treynorRatio μ r_f βTreynor is invariant under uniform rescaling. One-line consequence of diff_div_scale_invariant.
∀ {σ β : ℝ}, σ ≠ 0 → β ≠ 0 → ∀ (μ r_f : ℝ), treynorRatio μ r_f β = sharpeRatio μ r_f σ * (σ / β)Treynor is Sharpe rescaled: for a nonzero beta and a nonzero volatility σ, T = S · σ / β, with S = sharpeRatio μ r_f σ. With β = Cov(R, R_m) / Var(R_m) (MathFin.beta) and σ = √Var(R) the factor σ / β is σ_m / ρ, the market volatility over the correlation.
∀ {eR rf β eRm : ℝ}, jensenAlpha eR rf β eRm = 0 → β ≠ 0 → treynorRatio eR rf β = eRm - rfOn the security market line every asset has the market's Treynor ratio: if Jensen's alpha vanishes (MathFin.jensenAlpha) and the beta is nonzero, the Treynor ratio of the asset is the market risk premium E[R_m] − r_f.
ℝ → ℝ → ℝ → ℝ
Information ratio (μ_p - μ_b) / σ_active, with σ_active the tracking error.
∀ {c : ℝ}, c ≠ 0 → ∀ (μ_p μ_b σ_active : ℝ), informationRatio (c * μ_p) (c * μ_b) (c * σ_active) = informationRatio μ_p μ_b σ_activeInformation ratio is invariant under uniform rescaling. One-line consequence of diff_div_scale_invariant.
ℝ → ℝ → ℝ → ℝ
Tracking error squared, defined as σ_p² − 2·cov + σ_b² — the familiar expansion of Var(R_p − R_b) in terms of the input moments. Its inputs are bare reals; trackingErrorSq_eq_variance_sub ties it to the variance of the active return.
∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {P : Measure Ω} [IsFiniteMeasure P] {R_p R_b : Ω → ℝ}, MemLp R_p 2 P → MemLp R_b 2 P → trackingErrorSq (√(variance R_p P)) (√(variance R_b P)) (covariance R_p R_b P) = variance (fun ω => R_p ω - R_b ω) PTracking error squared is the variance of the active return: for square-integrable returns R_p, R_b of a portfolio and its benchmark, with σ_p = √Var(R_p), σ_b = √Var(R_b) and cov = Cov(R_p, R_b), trackingErrorSq σ_p σ_b cov = Var(R_p − R_b). The tracking error σ_active of informationRatio is the square root of this.
∀ (σ_p : ℝ), trackingErrorSq σ_p σ_p (σ_p ^ 2) = 0
Self-benchmark vanishing: when the benchmark equals the portfolio (σ_p = σ_b and cov = σ_p²), the tracking error vanishes.
∀ (σ_p σ_b cov : ℝ), cov ≤ σ_p * σ_b → (σ_p - σ_b) ^ 2 ≤ trackingErrorSq σ_p σ_b cov
Tracking error non-negativity when cov ≤ σ_p · σ_b (Cauchy-Schwarz bound): σ_active² ≥ (σ_p - σ_b)².
{ι : Type u_1} → Finset ι → (ι → ℝ) → ℝGain-to-pain ratio over a finite period set s with returns r: total gains ∑ r⁺ over total losses ∑ r⁻ (Schwager).
∀ {ι : Type u_1} (s : Finset ι) (r : ι → ℝ), 0 ≤ gainToPain s rGain-to-pain is nonnegative: both legs are sums of positive/negative parts. Unconditionally — with no losses the denominator is 0 and the ratio is 0, which the statement already covers.
∀ {ι : Type u_1} (s : Finset ι) (r : ι → ℝ), 0 < ∑ i ∈ s, (r i)⁻ → (1 ≤ gainToPain s r ↔ 0 ≤ ∑ i ∈ s, r i)Gain-to-pain exceeds one exactly on a profitable period set: since r⁺ - r⁻ = r summand-wise, ∑ r⁺ ≥ ∑ r⁻ says precisely ∑ r ≥ 0. Here the positive-pain hypothesis is load-bearing — it is what makes the quotient comparable to 1.
{ι : Type u_1} → Finset ι → (ι → ℝ) → (ι → ℝ) → ℝUpside-capture ratio over the up-market periods up: portfolio gains ∑ p over benchmark gains ∑ b (Morningstar).
∀ {ι : Type u_1} (up : Finset ι) (p b : ι → ℝ) (c : ℝ), upCapture up (c • p) b = c * upCapture up p bUpside capture is homogeneous of degree one in the portfolio leg: the scalar factors out of the numerator sum, and mul_div_assoc carries it past the benchmark leg with no nonvanishing condition.