Render verification-log formulas as KaTeX math

Convert the clearly-set-off formulas on the verification log to KaTeX: the
Sharpe excess-std and sqrt-P annualization, both Sterling forms (abs-bars via
\lvert/\rvert to keep the corrections table intact), the confirmed-as-law
identities (Sharpe-as-t-stat, recovery asymmetry, MCPT p-value, PF<->win-rate
identity, CPCV path count) and the MinBTL closed form. Threshold bands and
prose left as-is; all 12 spans parse-validated and confirmed rendering through
Gitea's gfm pipeline.
2026-06-15 17:32:43 +02:00
parent 86e5511be7
commit 8d3a4eb6c9
+7 -7
@@ -23,11 +23,11 @@ do not hard-code them as pass/fail gates without revisiting the primary source.
| # | Claim (as first drafted) | Correction applied | Sources |
|---|---|---|---|
| 1 | Sharpe denominator = total std `std(r)` | Denominator is std of the **excess** return `std(rr_f)`; equals `std(r)` only when `r_f` is constant over the window (e.g. `r_f=0` in frictionless P&L accounting). Numerator (excess return) and `sqrt(P)` annualization confirmed; annualization is a convention (square-root-of-time, iid-only), not part of the core definition. | [Wikipedia: Sharpe ratio](https://en.wikipedia.org/wiki/Sharpe_ratio), [CFI](https://corporatefinanceinstitute.com/resources/career-map/sell-side/risk-management/sharpe-ratio-definition-formula/), [QuantInsti](https://blog.quantinsti.com/sharpe-ratio-applications-algorithmic-trading/) |
| 1 | Sharpe denominator = total std $\operatorname{std}(r)$ | Denominator is std of the **excess** return $\operatorname{std}(r-r_f)$; equals $\operatorname{std}(r)$ only when `r_f` is constant over the window (e.g. `r_f=0` in frictionless P&L accounting). Numerator (excess return) and $\sqrt{P}$ annualization confirmed; annualization is a convention (square-root-of-time, iid-only), not part of the core definition. | [Wikipedia: Sharpe ratio](https://en.wikipedia.org/wiki/Sharpe_ratio), [CFI](https://corporatefinanceinstitute.com/resources/career-map/sell-side/risk-management/sharpe-ratio-definition-formula/), [QuantInsti](https://blog.quantinsti.com/sharpe-ratio-applications-algorithmic-trading/) |
| 2 | Sortino grading: 00.5 weak, 0.51 acceptable; "good" bar `>2` | No 0.5 split — `01` is **one** sub-optimal band. The "good" bar is `>1` (not `>2`); `>2` very good, `>3` excellent. Divisor of downside deviation is total N. All bands are conventions tied to the chosen MAR. | [optiml](https://optiml.co.uk/guides/invest/ratios/sortino.html), [fe.training](https://www.fe.training/free-resources/portfolio-management/sortino-ratio-formula-how-to-calculate-it-in-excel/), [portfolioslab](https://portfolioslab.com/tools/sortino-ratio) |
| 3 | Calmar grading: `>2` excellent | `>2` alone is **not** excellent — reserve "excellent" for `>3`; `0.51.0` is "weak" not "acceptable". Common scheme `<1` poor / `13` acc-good / `>3` excellent. No authoritative source defines any numeric band — all convention. | [FinanceStrategists](https://www.financestrategists.com/wealth-management/financial-ratios/calmar-ratio/), [Quantt](https://www.quantt.co.uk/resources/calmar-ratio-explained), [NumberAnalytics](https://www.numberanalytics.com/blog/ultimate-guide-calmar-ratio-capital-markets) |
| 4 | Calmar vs MAR differ "only in window" | They differ in **two** ways: window (trailing 36mo vs inception) **and** numerator (Calmar = average annual rate of return; MAR = compound/CAGR). | [Wikipedia: Calmar ratio](https://en.wikipedia.org/wiki/Calmar_ratio), [SuperMoney: MAR](https://www.supermoney.com/encyclopedia/mar-ratio), [QuantifiedStrategies](https://www.quantifiedstrategies.com/mar-ratio/) |
| 5 | Sterling = `CompoundROR / (avgMaxDD + 10%)` | Canonical form **subtracts** 10% **inside** an absolute value: `CompoundROR / |avgAnnualMaxDD 10%|`. The 10% ≈ the ~1981 T-bill rate (also guards a zero-DD divide-by-zero), not purely arbitrary. Modern variants often drop the 10% entirely (collapsing toward Calmar). | [Wikipedia: Sterling ratio](https://en.wikipedia.org/wiki/Sterling_ratio), [RCM Alternatives](https://www.rcmalternatives.com/2014/03/the-sterling-ratio-explained/) |
| 5 | Sterling = $\mathrm{CompoundROR}/(\mathrm{avgMaxDD}+10\%)$ | Canonical form **subtracts** 10% **inside** an absolute value: $\mathrm{CompoundROR}/\lvert\mathrm{avgAnnualMaxDD}-10\%\rvert$. The 10% ≈ the ~1981 T-bill rate (also guards a zero-DD divide-by-zero), not purely arbitrary. Modern variants often drop the 10% entirely (collapsing toward Calmar). | [Wikipedia: Sterling ratio](https://en.wikipedia.org/wiki/Sterling_ratio), [RCM Alternatives](https://www.rcmalternatives.com/2014/03/the-sterling-ratio-explained/) |
| 6 | Pain Index / Pain Ratio both at Bacon 2008 p.91 | Pain **Index** is Bacon 2008 **p.89**, Pain **Ratio** p.91. `n` in the Pain Index = total return observations over the whole series, **not** the count of drawdown episodes (else it silently becomes Average Drawdown). | [PerformanceAnalytics: PainIndex](https://rdrr.io/cran/PerformanceAnalytics/man/PainIndex.html), [PainRatio](https://rdrr.io/cran/PerformanceAnalytics/man/PainRatio.html) |
| 7 | Pain Index listed among metrics that "ignore time" | The Pain Index **embeds** duration (it is the time-average of the underwater curve) — it belongs in the *remedy* list, not the critique list. The metrics that ignore time/non-worst episodes are Calmar/MaxDD only. | [PerformanceAnalytics](https://rdrr.io/rforge/PerformanceAnalytics/man/PainIndex.html), [Wikipedia: Drawdown](https://en.wikipedia.org/wiki/Drawdown_(economics)) |
| 8 | Profit-factor targets: day-trade `>1.5`, swing `≥1.3` | Ordering is **backwards**: swing targets are **higher** (~1.52.5+) than day-trading (~1.32.0), because fewer trades demand more edge per trade. Bands: `<1` losing / `1.01.2` breakeven / `1.21.5` realistic / `1.52.0` good / `2.03.0` exceptional-but-scrutinize / `>3` overfit. Needs ~200+ trades; live degrades PF ~1020%. | [TradeZella](https://www.tradezella.com/blog/profit-factor), [CrossTrade](https://crosstrade.io/learn/performance-metrics/profit-factor), [QuantifiedStrategies](https://www.quantifiedstrategies.com/profit-factor/) |
@@ -36,14 +36,14 @@ do not hard-code them as pass/fail gates without revisiting the primary source.
## Confirmed as law / exact (used as-is)
Annualization (mean×P, std/ratio×√P; P=252/52/12), Sharpe-as-t-stat
(`t = SR·√T`), PSR / DSR / E[max SR_N], PBO via CSCV, Omega, Burke, Information &
Treynor ratio formulas, recovery asymmetry `d/(1d)`, Ulcer Index & UPI, Recovery
($t = \mathrm{SR}\cdot\sqrt{T}$), PSR / DSR / E[max SR_N], PBO via CSCV, Omega, Burke, Information &
Treynor ratio formulas, recovery asymmetry $d/(1-d)$, Ulcer Index & UPI, Recovery
Factor formula, Magdon-Ismail E[MaxDD] three-regime asymptotics, VaR/ES
multipliers & the Basel traffic-light, tail ratio (95/5), excess kurtosis,
downside-deviation divisor (total N), risk-of-ruin closed form, Kelly / optimal-f,
gain-to-pain, common-sense ratio, MCPT p-value `(z+1)/(N+1)` (the `+1` appears in
gain-to-pain, common-sense ratio, MCPT p-value $(z+1)/(N+1)$ (the `+1` appears in
**both** numerator and denominator), the profit-factor↔win-rate identity
`PF=(p·R)/(1p)`, CPCV path count `φ=(k/N)·C(N,k)`.
$\mathrm{PF}=(p\cdot R)/(1-p)$, CPCV path count $\varphi=(k/N)\cdot C(N,k)$.
## Confirmed as convention (flagged [C]; verify primary source before hard-coding)
@@ -57,5 +57,5 @@ practitioner rules-of-thumb that vary by source and regime.
- Verify the **Harvey-Liu-Zhu** required-t and the **live-vs-backtest haircut**
figures against their primary papers before any code hard-codes them.
- Confirm the **MinBTL** closed form `≤ 2·ln(N)/E[max]²` against the
- Confirm the **MinBTL** closed form $\le 2\cdot\ln(N)/\operatorname{E}[\max]^2$ against the
Bailey-Borwein-López de Prado-Zhu paper (the agent flagged the constant).