What the official Strategy Tester documentation defines
TradingView's Sharpe help page defines SR = (MR − RFR) / SD using monthly account-equity returns. Its Sortino page replaces SD with downside deviation. The annual benchmark is set by the risk_free_rate parameter in the strategy declaration. The official RiskMetrics library's update notes confirm monthly periods are used consistently; older descriptions of switching to daily returns on short histories should not be applied to the current calculation.
| Input | Meaning | Comparison check |
|---|
| Return observation | Account-equity change over a monthly period | Do not substitute each trade's P&L percentage. |
| Sharpe denominator | Dispersion around the mean of all returns | Check population versus sample standard deviation. |
| Sortino denominator | Shortfalls below a target return | Check the target and whether the divisor includes all observations. |
| Risk-free rate | Annual parameter; default 2% | Use a rate in the same period and units as the returns. |
| Annualization | The published ratio formula has no square-root-of-12 multiplier | Label any additional annualization explicitly. |
A reproducible monthly-return example
This synthetic arithmetic example uses four monthly account returns: 2%, −1%, 3%, −2%. Set both the risk-free rate and the downside target to zero. Use population standard deviation and divide downside squared shortfalls by all four months. These are illustrative inputs, not a measured TradingView strategy result. Using a zero benchmark removes rate-conversion ambiguity from the example.
- The annualized row is a separate convention, not an assertion that TradingView displays those numbers. Square-root scaling assumes a return process for which variance scales with time; serial dependence can invalidate it.
- For an independent spreadsheet check, use AVERAGE and STDEV.P for Sharpe. For Sortino, square min(return − target, 0) for every row, average those values, then take the square root.
- For a nonzero benchmark, document the conversion. Simple monthly allocation of 2% is 2% / 12; an effective monthly rate is (1.02)^(1/12) − 1. These are different conventions.
| Calculation | Working | Result |
|---|
| Mean monthly return | (2 − 1 + 3 − 2) / 4 | 0.5% |
| Population standard deviation | sqrt((1.5² + (−1.5)² + 2.5² + (−2.5)²) / 4) | 2.061553% |
| Monthly Sharpe | 0.5 / 2.061553 | 0.242536 |
| Downside deviation, target 0% | sqrt((0² + (−1)² + 0² + (−2)²) / 4) | 1.118034% |
| Monthly Sortino | 0.5 / 1.118034 | 0.447214 |
| Optional conventional annualization | Multiply each monthly ratio by sqrt(12) | Sharpe 0.840168; Sortino 1.549193 |
Why Pineify can report a different Sharpe or Sortino
The current Backtest Deep Report implementation reads the exported P&L percentage for each parsed trade. It uses population standard deviation and scales the trade ratio by sqrt(trades per year), measured from the first entry to the latest exit using 365.25 days per year. Its Sortino denominator uses the root mean square of negative trade returns only. This is a trade-distribution analysis, not a reproduction of TradingView's monthly account-equity statistics.
- With the same four numerical returns treated as four trades spanning exactly one 365.25-day year, and risk-free input 0, Pineify's current formulas give annualized Sharpe 0.485071 and Sortino 0.632456. This is a calculation example, not an uploaded or live-tested report.
- A rolling window, a direction filter or inclusion of open trades changes the sample. Record those choices before comparing results.
| Setting | Pineify's current calculation | Effect on comparison |
|---|
| Return series | Per-trade P&L percentage from the CSV exit row | Different position sizes and overlapping trades do not become a monthly portfolio return series. |
| Risk-free input | Defaults to 0; the entered percentage is subtracted directly from the mean trade return | There is no annual-to-trade conversion in this calculation. Entering TradingView's annual 2% does not reproduce its benchmark. |
| Downside divisor | Number of negative trade returns; target remains zero | Different from a downside formula that divides by all periods or uses a nonzero target. |
| Missing denominator | Returns 0 when the relevant deviation is zero; fewer than two trades also return 0 | Do not interpret these fallback values as evidence of zero risk or a valid risk-adjusted estimate. |
Reconcile a trade CSV without losing the data boundaries
TradingView's current strategy-report documentation describes a Download data as XLSX option. Pineify's importer expects comma-separated CSV text, not an XLSX workbook. In a spreadsheet application, export the trade-list worksheet as CSV; renaming the workbook extension does not convert it. Sign in to Pineify; importing your own data currently requires Advanced or higher. The parser expects trade identifiers and English entry/exit type labels such as Entry long and Exit long, pairs rows by trade ID, and reads P&L from the exit row. Keep timestamps and P&L percentage columns intact. A performance-summary export or a table of monthly equity values is a different input and should not be presented as a supported trade-list format.
- Check parsed trade count, first entry, last exit, direction and open-position treatment against the original report. The parser can default missing numeric fields to zero and missing dates to the import time; it uses the first entry and first exit for each trade ID. Check partial-exit exports and localized labels carefully. A successful import alone does not prove complete data.
- For an independent monthly calculation, first obtain account equity at the same monthly boundaries, including the same treatment of unrealized P&L. Closed trade records alone do not reconstruct every equity observation.
- Align initial capital, currency, sizing, commission, slippage and test dates. Keep a copy of the original export and record the formula convention beside the result.
- Use the monthly spreadsheet calculation to reconcile monthly metrics. Use Pineify's report to inspect the parsed trade distribution; do not expect either calculation to substitute for the other.
Interpret the sample before interpreting the score
Four monthly returns are enough to compute the example above, and they are four observations, not one observation per trade. Hundreds of trades inside those months do not create hundreds of independent monthly returns. The linked Strategy Tester help pages do not set a universal minimum such as 30 or 100 trades, and no Sharpe or Sortino cutoff proves a strategy is ready for live trading.
- One monthly observation has no observed dispersion. Constant returns give a zero Sharpe denominator; no returns below the target give a zero downside denominator. An undefined or extreme result needs investigation.
- The linked Strategy Tester help pages do not specify a universal minimum trade count or all short-history display rules. Do not diagnose a blank ratio using an invented minimum such as 30 or 100 trades.
- A strategy selected from many parameter trials can have an inflated historical ratio. Preserve untouched evaluation data and review drawdown, costs and concentration alongside the ratio.
- Resampling past trades explores assumptions about that sample. It does not establish a genuine edge or guarantee that future market conditions will resemble it.