Quantitative Metrics
MesoMetrics is Deltaray's performance-analysis library used by MesoSim. It calculates the quantitative statistics in backtest results, portfolio analysis, and tearsheets from NAV, benchmark prices, and exposure history.
Use this reference to understand what each metric measures and how it is calculated. The percentage-return formulas below assume a strictly positive NAV series. Currency-PnL and drawdown metrics use their stated definitions and denominators.
Inputs and notation
| Symbol | Meaning |
|---|---|
| V₀, VT | Initial and terminal NAV |
| Vᵢ | NAV at the end of interval i; Vᵢ₋₁ is NAV at its start |
| C | Funded initial capital |
| n | Number of usable return or daily-PnL observations |
| M | Number of NAV observations in the full drawdown path |
| P | Annualization factor: 252 for index/equity options; 365 for legacy crypto options |
| D, Y | Elapsed calendar days and years, with Y = D / 365.2425 |
| F, A | Annual effective risk-free rate and minimum acceptable return (MAR) |
| fᵢ, mᵢ | Risk-free rate and MAR converted to interval i |
| bᵢ | Benchmark return over the same interval as rᵢ |
| Φ | Standard normal cumulative distribution function |
Returns are decimals: 0.10 means 10%. Return and probability results are displayed as percentages. Ratios are dimensionless unless another unit is stated.
The interval year fraction ΔYᵢ uses actual elapsed time divided by 365.2425 days. Risk-free rate and MAR are distinct inputs; their library defaults are both zero.
Daily estimators omit intervals with missing scheduled observations. Partial opening or closing intervals carry partial-coverage information. Benchmark relationships use exactly matched interval starts and ends. Monthly and yearly summaries use complete calendar periods unless noted below.
Returns and risk
Cumulative Return
Total percentage change between the initial and terminal NAV. Requires two endpoints.
CAGR
Compound annual growth rate using elapsed calendar time. Requires at least 30 calendar days and positive NAV throughout the path.
Annualized Volatility
Sample standard deviation of usable daily returns, annualized. Requires at least two returns.
Sharpe
Annualized mean excess return divided by its sample standard deviation. Requires at least two observations and nonzero excess-return variation.
Sortino
Uses risk-free-adjusted return in the numerator and downside deviations below MAR in the denominator. All n usable observations enter the downside average, including zero downside for returns at or above MAR.
Omega
Ratio of gains above MAR to shortfalls below MAR. Requires at least one usable return.
Probabilistic Sharpe Ratio
Probability estimate for exceeding a specified nonannualized Sharpe benchmark S₀, which defaults to zero. Sₒᵦₛ = mean(a) / s(a); γ₃ is adjusted sample skewness of excess returns, and γ₄ is their adjusted Pearson kurtosis (excess kurtosis + 3). Requires at least four returns and a positive variance term.
This PSR calculation uses an IID approximation and is not annualized. It differs from the stationary-bootstrap positive-mean-return test in StatSim. For the methodology, see Bailey and López de Prado’s The Sharpe Ratio Efficient Frontier.
Return distribution and tail risk
For the following moment formulas, μₖ is the central moment with divisor n. The displayed Skew and Excess Kurtosis use raw returns; PSR applies the same moment estimators to excess returns.
Skew
Bias-corrected Fisher–Pearson sample skewness. Requires at least three returns with nonzero variance.
Excess Kurtosis
Bias-corrected Fisher excess kurtosis. A normal distribution has excess kurtosis zero. Requires at least four returns with nonzero variance.
Empirical quantiles Q use Type 7 interpolation. For sorted values x₍₁₎ through x₍ₙ₎ and quantile level q:
At the endpoints, Q₀ and Q₁ are the sample minimum and maximum; when h is an integer, use x₍ₕ₎.
Historical Daily VaR 95%
The 95th percentile of signed daily losses, −r. A negative value is possible when the observed outcomes are all gains. Requires one return; fewer than 20 observations are marked as a small sample.
Historical Daily Expected Shortfall 95%
Average of the worst 5% of signed-loss mass. Sort losses ℓ = −r from largest to smallest; u = 0.05n, k = floor(u), and w = u − k. The boundary observation receives fractional weight w; when w = 0, omit that term. Requires one return; fewer than 20 are marked as a small sample.
Tail Ratio
Absolute upper-tail return divided by absolute lower-tail return. Requires at least 20 returns.
Outlier Win Ratio
99th-percentile return divided by the mean strictly positive return. Requires at least 100 returns and a positive observation.
Outlier Loss Ratio
Absolute 1st-percentile return divided by the absolute mean strictly negative return. Requires at least 100 returns and a negative observation.
Drawdowns and recovery
Let Hⱼ be the running high-water mark, dⱼ the peak-relative drawdown, and dⱼᶜ the drawdown relative to funded initial capital. Drawdowns are zero or negative.
Max Drawdown from Peak
Deepest drawdown as a fraction of the running peak.
Max Drawdown on Initial Capital
Deepest peak-to-trough currency decline divided by funded initial capital. Initial capital is this metric’s fixed denominator by definition.
A drawdown episode begins at a peak and ends when NAV recovers that peak. Let eⱼ be episode j’s deepest peak-relative drawdown and τⱼ its elapsed calendar days. An unrecovered episode ends at the report’s terminal timestamp for duration measurement. Let E be the number of episodes.
Average Drawdown
Arithmetic mean of episode trough depths. This averages episodes, rather than every underwater observation; requires at least one episode.
Longest Drawdown Days
Longest peak-to-recovery duration, including an open episode through the report end. Returns zero when no drawdown episode exists.
Average Drawdown Days
Mean calendar duration of the episodes. Requires at least one episode.
Recovery Factor
Net currency PnL divided by the absolute maximum currency drawdown.
Calmar
CAGR divided by the absolute maximum peak-relative drawdown. Inherits the CAGR history requirement.
Ulcer Index
Root mean square of peak-relative drawdowns over the full NAV path, including zero-drawdown observations. Uses divisor M.
Ulcer Performance Index
Annual excess CAGR divided by the Ulcer Index.
Daily PnL and exposure
These metrics use daily NAV changes, including changes in open-position value. Win Days, Payoff Ratio, and Profit Factor here are not closed-trade statistics. Let W contain days with pᵢ > 0 and L contain days with pᵢ < 0; vertical bars around a set denote its count.
Win Days
Fraction of nonzero daily-PnL observations that are positive. Zero-PnL days are excluded from the denominator.
Max Consecutive Winning Days
Longest run of strictly positive daily PnL. A zero or negative value ends a winning streak.
Max Consecutive Losing Days
Longest run of strictly negative daily PnL. A zero or positive value ends a losing streak.
Payoff Ratio
Average winning-day PnL divided by the absolute average losing-day PnL.
Profit Factor
Gross positive daily PnL divided by absolute gross negative daily PnL. For Payoff Ratio and Profit Factor, gains-only samples are unbounded; losses-only samples give zero; all-zero samples are unavailable.
Common Sense Ratio
Currency-PnL Profit Factor multiplied by normalized-return Tail Ratio. This is a mixed-domain heuristic because its components use different input domains. It is available only when both component metrics are available.
Kelly Sizing Multiple
Nonnegative capital multiple maximizing empirical log growth, subject to 1 + f pᵢ/C > 0 for every observed day. C is the explicit sizing base. For an interior optimum, the derivative below is zero.
A nonpositive mean normalized PnL gives 0x; an all-nonnegative sample with a gain has an unbounded optimum. This is a historical sizing statistic, not a prescription for live leverage.
CPC Index
Product of Profit Factor, the Win Days fraction, and Payoff Ratio.
Time in Market
Iⱼ is 1 when invested during exposure segment j and 0 otherwise. Integrates actual invested time, including nights, weekends, and holidays. Requires the initial exposure state and complete state-change history.
Calendar and horizon performance
For a calendar period or selected window B, compound the included simple returns. Each move belongs to the calendar period containing its interval end. Missing periods are not inserted as zero returns.
Realized Geometric Mean Daily
Usable daily returns compounded into an average period return. K is the number of included periods; requires at least one.
Realized Geometric Mean Monthly
Complete calendar-month returns compounded into an average period return. K is the number of included periods; requires at least one.
Realized Geometric Mean Yearly
Complete calendar-year returns compounded into an average period return. K is the number of included periods; requires at least one.
MTD
Return from the available beginning of the current calendar month through the report end.
YTD
Return from the available beginning of the current calendar year through the report end.
3M
Return over the trailing three calendar months.
6M
Return over the trailing six calendar months.
1Y
Return over the trailing calendar year.
MTD and YTD retain partial-period coverage information. Trailing 3M, 6M, and 1Y require complete scheduled coverage. When a calendar boundary is not a trading observation, the window uses the interval spanning that boundary.
3Y (annualized)
Geometrically annualized return over a complete trailing 3-calendar-year window.
5Y (annualized)
Geometrically annualized return over a complete trailing 5-calendar-year window.
10Y (annualized)
Geometrically annualized return over a complete trailing 10-calendar-year window.
Best Day
Largest return among usable daily returns.
Worst Day
Smallest return among usable daily returns.
Best Month
Largest return among complete monthly returns.
Worst Month
Smallest return among complete monthly returns.
Best Year
Largest return among complete yearly returns.
Worst Year
Smallest return among complete yearly returns.
Average Up Month
Mean of strictly positive complete monthly returns. Requires at least one such month.
Average Down Month
Mean of strictly negative complete monthly returns. Requires at least one such month.
Win Month
Positive complete months divided by nonzero complete months. Flat periods are excluded.
Win Quarter
Positive complete quarters divided by nonzero complete quarters. Flat periods are excluded.
Win Year
Positive complete years divided by nonzero complete years. Flat periods are excluded.
Gain/Pain (1M)
Sum of all complete monthly returns divided by the absolute sum of negative complete monthly returns. The numerator includes both gains and losses.
Benchmark comparisons
Use exactly paired strategy and benchmark return intervals. Let yᵢ = rᵢ and xᵢ = bᵢ. MesoMetrics fits ordinary least squares with an intercept to raw returns, not risk-free-adjusted returns. The following sums run over the n matched pairs.
Beta
Sensitivity to benchmark returns. Requires at least two matched pairs and a nonconstant benchmark.
Alpha
Annualized regression intercept. The auxiliary per-period intercept is c. Alpha is displayed as a raw annual fraction: 0.03 means 3% annual alpha; beta remains a dimensionless coefficient.
Let residuals εᵢ = yᵢ − c − βxᵢ, and SSE = ∑ εᵢ².
R²
Fraction of strategy-return variation explained by the fitted benchmark regression. Requires nonconstant strategy returns.
Correlation
Pearson correlation of the exact-paired raw returns. Both series must have nonzero variation.
For regression standard errors, use residual variance σ̂² = SSE/(n − 2), requiring at least three matched pairs.
Alpha Standard Error
Standard error of annualized alpha. The per-period intercept standard error is SE(c) = SE(α)/P.
Beta Standard Error
Standard error of the regression slope.
Information Ratio
Annualized mean active return divided by tracking error, using the same exact-paired intervals. Requires at least two pairs and nonzero variation in active returns.