Skip to main content
aifinhub

Worked example

Running the shipped sharpe-vs-sortino-calculator engine on the input below produces exactly this output. Continuous integration recomputes it against the engine bundle on every build, so these numbers cannot drift from the code.

Input

{
  "tool": "sharpe-vs-sortino-calculator",
  "rf_annual": 0.04,
  "returns": [
    0.01,
    0.02,
    -0.005,
    0.015,
    -0.01
  ]
}

Output

{
  "sharpe": 7.164735033314715,
  "sortino": 18.19845953236851,
  "calmar": 147.19999999999823,
  "omega": 2.906735751295337,
  "meanAnn": 1.472,
  "volAnn": 0.2054507240191672,
  "downsideDevAnn": 0.08088596715462877,
  "maxDrawdown": 0.01000000000000012,
  "count": 5
}

Frequently asked questions

What does the Sharpe vs Sortino Calculator methodology page document?
Formulas and references for Sharpe, Sortino, Calmar, and Omega ratios as computed by the AI Fin Hub Sharpe vs Sortino Calculator. It states the formulas, assumptions, data sources, limitations, and reproducibility steps behind the Sharpe vs Sortino Calculator, in the Finance category.
When was the Sharpe vs Sortino Calculator methodology last reviewed?
This methodology was last reviewed on 2026-05-08. The matching tool is at https://aifinhub.io/sharpe-vs-sortino-calculator/.
Are the Sharpe vs Sortino Calculator numbers reproducible?
Yes. This page embeds a worked example whose output is the verbatim result of running the shipped sharpe-vs-sortino-calculator engine on a fixed input; the embedded JSON is recomputed and diffed against the engine in CI, so the numbers cannot drift from the code.

Methodology · Tool · Last updated 2026-05-08

How Sharpe vs Sortino Calculator works

Formulas behind the four ratios reported by the Sharpe vs Sortino Calculator.

Formulas

excess_t = r_t − rf_daily                       (rf_daily = rf_annual / 252)
mean     = (1/n)  · Σ excess_t
σ        = √( (1/(n−1)) · Σ (excess_t − mean)² )
σ_d      = √( (1/n) · Σ_{t : r_t < rf_daily} (r_t − rf_daily)² )

Sharpe   = (mean / σ)   · √252
Sortino  = (mean / σ_d) · √252
Calmar   = mean_ann / max_drawdown
Omega(τ) = Σ max(r − τ, 0) / Σ max(τ − r, 0)

Conventions

  • Annualization factor 252 (US trading days). For monthly inputs use 12; for weekly use 52. Tool currently assumes daily.
  • Downside deviation uses the full-N divisor (Bacon 2008 §11), not the count of below-target observations.
  • Max drawdown is computed from the equity curve formed by cumulating (1 + r_t).

When Sortino exceeds Sharpe materially

If σ_d < σ, Sortino > Sharpe — i.e. the strategy's volatility is dominated by upside moves, not losses. Sortino rewards that asymmetry. The tool's "opinion" line surfaces this when the gap exceeds 40%.

References

  • Sharpe, W. F. (1966). "Mutual fund performance." Journal of Business 39(1), part 2: 119–138. DOI: 10.1086/294846.
  • Sortino, F. A., Price, L. N. (1994). "Performance measurement in a downside risk framework." Journal of Investing 3(3): 59–64. DOI: 10.3905/joi.3.3.59.
  • Young, T. W. (1991). "Calmar ratio: A smoother tool." Futures Magazine, October.
  • Keating, C., Shadwick, W. F. (2002). "A universal performance measure." Journal of Performance Measurement 6(3): 59–84.
  • Bacon, C. R. (2008). Practical Portfolio Performance Measurement and Attribution, 2nd ed., Wiley. ISBN: 978-0-470-05928-9.

Limitations

  • Ratios assume i.i.d. returns. Serial correlation deflates the SE on every estimate.
  • Calmar uses realised max drawdown — heavily path-dependent on a single sample.
  • Omega's threshold τ is set to the daily risk-free rate; conventions vary.

External resources