Backtesting guide

Deflated and Probabilistic Sharpe Ratios

The Deflated Sharpe Ratio (DSR) evaluates a selected strategy against a Sharpe benchmark raised for multiple trials. The Probabilistic Sharpe Ratio (PSR) evaluates one strategy against a benchmark chosen in advance. Both account for sampling uncertainty and non-normal returns; only DSR incorporates the search that selected the winner.

Read the practical guide

Key Takeaways

  • PSR addresses uncertainty around one Sharpe estimate; DSR also adjusts its benchmark for selection.
  • Use non-annualized Sharpe, observation count, skewness, and ordinary kurtosis from the same return series.
  • DSR also needs trial Sharpe dispersion and a defensible number of independent trials.
  • Without the trial history, report the missing evidence rather than inventing a DSR.

PSR versus DSR: which question are you answering?

A Sharpe estimate of 0.12 per observation is a return-to-volatility ratio. PSR and DSR turn that estimate into conditional statistical evidence. A high PSR against zero can coexist with a much lower DSR when the strategy was selected from many alternatives.

PSR versus DSR: which question are you answering?
MethodBenchmarkAdditional evidenceWhat remains unresolved
PSRA declared Sharpe hurdle, such as zeroSample length and return momentsSelection from other strategies
DSRExpected maximum Sharpe under the no-skill trial modelTrial dispersion and independent trial countMissing trials, invalid inputs, and future performance

Calculate PSR using one return convention

Let s be the non-annualized sample Sharpe, T the number of return observations, g3 their skewness, and g4 their ordinary kurtosis. For a benchmark b in the same units, the estimated standard error is SE = sqrt((1 - g3 × s + (g4 - 1) × s² / 4) / (T - 1)). Then PSR(b) = Φ((s - b) / SE), where Φ is the standard normal cumulative distribution function.

  • Construct excess returns using an explicitly chosen risk-free or reference return at the observation frequency, then estimate their mean, standard deviation, skewness, and kurtosis consistently.
  • Ordinary kurtosis is 3 for normal returns. If a library returns excess kurtosis, add 3 before using this formula.
  • Use non-annualized s and b. An annualized dashboard Sharpe cannot be inserted beside daily moments and a daily observation count.
  • Require T > 1, positive return standard deviation, finite moments, and a positive standard-error term. A constant return series has no valid Sharpe estimate.

Replace the benchmark to calculate DSR

For the zero-mean null model in the DSR paper, let σtrial be the standard deviation of non-annualized Sharpe estimates across the trial family and N the number of independent trials. The expected maximum is approximated by bDSR = σtrial × [(1 - γ) × Φ⁻¹(1 - 1/N) + γ × Φ⁻¹(1 - 1/(N × e))]. Here γ = 0.5772156649 is the Euler-Mascheroni constant, e = 2.7182818285, and Φ⁻¹ is the standard normal quantile function. DSR = PSR(bDSR).

  • σtrial measures dispersion across trial Sharpe estimates. It is not the selected strategy return volatility or its Sharpe standard error.
  • This expected-maximum approximation models the distribution of trial Sharpe estimates as normal. It does not require the selected strategy returns to have zero skewness and normal kurtosis.
  • The expression requires N > 1 and is an approximation, particularly for small N. For a prespecified single strategy with no selection, use PSR against the declared benchmark instead.

Worked example: one strategy, three evidence readings

Assume 252 daily excess-return observations, non-annualized s = 0.12, skewness g3 = -0.5, and ordinary kurtosis g4 = 5. For the hypothetical trial families, assume σtrial = 0.04 and independent trials. These are illustrative inputs, not measured Pineify or TradingView results. SE = sqrt((1 + 0.06 + 0.0144) / 251) = 0.06542536.

Worked example: one strategy, three evidence readings
Assumed evaluationBenchmark b(s - b) / SEResult
PSR against zero01.834296.67%
DSR, N = 200.076028320.672174.92%
DSR, N = 1000.101224120.287061.29%
  • For N = 20, Φ⁻¹(0.95) = 1.64485 and Φ⁻¹(1 - 1/(20 × e)) = 2.08811. Multiplying their weighted sum by 0.04 gives bDSR = 0.07602832.
  • At a prespecified 95% threshold, PSR against zero clears the hurdle in this example, while both DSR scenarios fall below it. That threshold is a decision rule, not a guarantee of investment quality.
  • Keeping all other inputs fixed but assuming normal moments (g3 = 0, g4 = 3) raises PSR against zero to 97.09%. Replacing observed moments with normal values changes the answer.
  • The two DSR rows are sensitivity scenarios. They do not justify choosing the smaller trial count because it produces a higher probability.

Keep a trial ledger before selecting the winner

The saved winning strategy cannot reconstruct its own selection history. Keep every evaluated candidate that influenced the decision, including discarded parameters, filters, instruments, timeframes, and sample windows. A run that fails before producing returns belongs in the audit log with its reason; it cannot supply a fabricated Sharpe value.

Keep a trial ledger before selecting the winner
RecordMinimum fieldsPurpose
Candidate identityRun ID, code revision, parameters, symbol, timeframe, datesReconstruct the search family
Comparable resultsReturn frequency, reference return, costs, Sharpe, return-series locationEstimate dispersion without changing conventions
Selection processTimestamp, selection metric, retained or discarded status, failuresPreserve unsuccessful research choices
Dependence estimateRaw candidate count M, aligned returns, method, effective N, sensitivity rangeDistinguish many similar variants from independent trials
Selected-series inputsT, s, skewness, ordinary kurtosis, missing-data policyReproduce the PSR standard error

Treat trial correlation and return dependence separately

Correlation across candidate strategies concerns the effective trial count N. Serial dependence within the selected return series concerns the uncertainty of its Sharpe estimate. Reducing N for correlated variants does not solve serial dependence, overlapping trades, or stale prices in the selected series.

  • Store the raw candidate count M as well as the estimated N. Document the correlation or clustering method and alignment period; similar parameter settings alone do not quantify dependence.
  • The DSR paper discusses average-correlation approximations and their limits: correlation measures only linear dependence, and a large candidate set with short history can produce unstable estimates.
  • If the trial ledger is incomplete, label DSR unavailable. A sensitivity table with explicitly assumed trial counts can show the consequences, but it is not an estimated correction for the actual search.
  • Short samples make skewness and kurtosis unstable. Strong serial dependence, nonstationarity, infinite moments, or inconsistent sampling can invalidate a naive normal-approximation probability.

Audit a TradingView export before using its Sharpe

A TradingView List of Trades CSV contains trade records; those rows are not automatically a daily marked-to-market return series. Pineify Backtest Deep Report parses the trade export and reports trade-based return and risk metrics. Its current Sharpe calculation uses per-trade percentage returns and an annualization factor based on trades per year. It is therefore not the daily s used in the example above.

  • Use the report to inspect trades, P&L, drawdown, and standard Sharpe. Its distribution calculation reports excess kurtosis; add 3 only when using that value with the same trade-return series in a PSR formula. Retain the original export and document costs and capital assumptions.
  • For a daily PSR or DSR study, prepare a consistently sampled equity-return series, including the intended treatment of open positions and inactive periods. Do not substitute closed-trade percentages without redefining the analysis.
  • Compute PSR and DSR separately from the disclosed inputs and trial ledger. Backtest Deep Report has no built-in PSR, DSR, or effective-trial estimator.
  • The Pine Script AI Coding Agent can help draft a custom return or statistics script when that is needed. Review and validate its output; it cannot recover unrecorded trials or establish independence from the winning script.

Related Pineify workflow

Inspect the backtest inputs before a separate PSR or DSR calculation

Import a TradingView trade CSV into Backtest Deep Report to review the selected strategy trade records and risk metrics. Keep the trial ledger and consistently sampled returns alongside that report.

Backtest Deep Report

Inspect trade records, P&L, drawdown, and standard Sharpe from the CSV.

Review the selected backtest
Pine Script AI Coding Agent

Draft a custom return or statistics script for review when the research needs one.

Prepare a custom script

Boundary: Pineify does not provide a built-in PSR or DSR calculation. A report or generated script cannot reconstruct missing trials or validate the statistical assumptions for you.

This page is educational and does not provide investment advice. Backtests are hypothetical, depend on their data and assumptions, and do not guarantee future results. Trading can result in substantial loss.

Frequently Asked Questions