MathFin
Map / Statistics / MathFin.Choice.Performance.RatiosExtended

Extended performance ratios: Sortino, Treynor, Information, gain-to-pain, upside capture

MathFin.Choice.Performance.RatiosExtendedMSC 91G10JEL G11 source

Standard quant performance metrics beyond the basic Sharpe ratio:

  • Sortino ratio S = (μ - target) / σ_down, with σ_down the downside semi-deviation. Like Sharpe but penalises only downside variation.
  • Treynor ratio T = (μ - r_f) / β, with β = Cov(R, R_m) / Var(R_m) the systematic risk. The market-model analogue of Sharpe.
  • Information ratio IR = (μ_p - μ_b) / σ_active, with σ_active the tracking error (std-dev of R_p − R_b). Measures active management skill.
  • Tracking error squared 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.

  • Gain-to-pain ratio (∑ 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".
  • Upside-capture ratio (∑_{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.

Main definitions

  • 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.

Main results

  • 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.

References

Tags

Sortino ratio, Treynor ratio, information ratio, tracking error, gain-to-pain ratio, upside capture, performance attribution, MSC 91G10, JEL G11

Import neighbourhood

Above: what it imports. Below: what imports it.

Corpus entries

mf-sortino-scale-invariant · portfolio_and_performance.json · full statement
Sortino Ratio Scale Invariance

Sortino ratio (μ - target)/σ_down is invariant under uniform scaling of mean, target, and downside semi-deviation.

mf-sortino-translation · portfolio_and_performance.json · full statement
Sortino Ratio Translation Invariance

Sortino ratio is invariant under additive shift of both mean and target by the same amount.

mf-treynor-scale-invariant · portfolio_and_performance.json · full statement
Treynor Ratio Scale Invariance

Treynor ratio (μ - r_f)/β is invariant under uniform scaling of mean, risk-free rate, and beta.

mf-information-ratio-scale-invariant · portfolio_and_performance.json · full statement
Information Ratio Scale Invariance

Information ratio (μ_p - μ_b)/σ_active is invariant under uniform scaling.

mf-tracking-error-self · portfolio_and_performance.json · full statement
Tracking Error Vanishes for Self-Benchmark

When the benchmark equals the portfolio (σ_p = σ_b and cov = σ_p²), the tracking-error² vanishes.

mf-tracking-error-cauchy-bound · portfolio_and_performance.json · full statement
Tracking Error Lower Bound from Cauchy-Schwarz

Under the Cauchy-Schwarz bound cov ≤ σ_p·σ_b, the tracking-error² ≥ (σ_p - σ_b)².

mf-performance-gain_to_pain · portfolio_and_performance.json · full statement
Gain-to-Pain Ratio is Nonnegative

The gain-to-pain ratio, total gains over total losses on a finite period set, is nonnegative — unconditionally.

mf-performance-upside_capture · portfolio_and_performance.json · full statement
Add the upside-capture ratio and prove homogeneity in the portfolio return

The upside-capture ratio is homogeneous of degree one in the portfolio leg — unconditionally.

Declarations 18

defMathFin.sortinoRatiosource
ℝ → ℝ → ℝ → ℝ

Sortino ratio (μ - target) / σ_down. Inputs are the mean, the target return, and the downside semi-deviation.

theoremMathFin.sortinoRatio_scale_invariantsource
∀ {c : ℝ}, c ≠ 0 → ∀ (μ target σ_down : ℝ), sortinoRatio (c * μ) (c * target) (c * σ_down) = sortinoRatio μ target σ_down

Sortino is invariant under uniform rescaling. One-line consequence of diff_div_scale_invariant.

theoremMathFin.sortinoRatio_translationsource
∀ (μ target σ_down shift : ℝ), sortinoRatio (μ + shift) (target + shift) σ_down = sortinoRatio μ target σ_down

Sortino is translation-invariant in the additive shift of both mean and target.

defMathFin.treynorRatiosource
ℝ → ℝ → ℝ → ℝ

Treynor ratio (μ - r_f) / β, with β the systematic-risk coefficient.

theoremMathFin.treynorRatio_scale_invariantsource
∀ {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.

theoremMathFin.treynorRatio_eq_sharpeRatio_mulsource
∀ {σ β : ℝ}, σ ≠ 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.

theoremMathFin.treynorRatio_eq_of_jensenAlpha_eq_zerosource
∀ {eR rf β eRm : ℝ}, jensenAlpha eR rf β eRm = 0 → β ≠ 0 → treynorRatio eR rf β = eRm - rf

On 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.

defMathFin.informationRatiosource
ℝ → ℝ → ℝ → ℝ

Information ratio (μ_p - μ_b) / σ_active, with σ_active the tracking error.

theoremMathFin.informationRatio_scale_invariantsource
∀ {c : ℝ}, c ≠ 0 → ∀ (μ_p μ_b σ_active : ℝ), informationRatio (c * μ_p) (c * μ_b) (c * σ_active) = informationRatio μ_p μ_b σ_active

Information ratio is invariant under uniform rescaling. One-line consequence of diff_div_scale_invariant.

defMathFin.trackingErrorSqsource
ℝ → ℝ → ℝ → ℝ

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.

theoremMathFin.trackingErrorSq_eq_variance_subsource
∀ {Ω : 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 ω) P

Tracking 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.

theoremMathFin.trackingErrorSq_selfsource
∀ (σ_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.

theoremMathFin.trackingErrorSq_ge_diff_sqsource
∀ (σ_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)².

defMathFin.gainToPainsource
{ι : 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).

theoremMathFin.gainToPain_nonnegsource
∀ {ι : Type u_1} (s : Finset ι) (r : ι → ℝ), 0 ≤ gainToPain s r

Gain-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.

theoremMathFin.one_le_gainToPain_iffsource
∀ {ι : 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.

defMathFin.upCapturesource
{ι : Type u_1} → Finset ι → (ι → ℝ) → (ι → ℝ) → ℝ

Upside-capture ratio over the up-market periods up: portfolio gains ∑ p over benchmark gains ∑ b (Morningstar).

used by 1: upCapture_smul
theoremMathFin.upCapture_smulsource
∀ {ι : Type u_1} (up : Finset ι) (p b : ι → ℝ) (c : ℝ), upCapture up (c • p) b = c * upCapture up p b

Upside 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.