Value at Risk calculator: a historical trade-return threshold

Inspect the 95% historical VaR threshold from imported trade PnL percentages. Check signs, discrete quantile selection, holding periods, and account-risk limits.

Calculate Value at Risk From Your Trades

What Is Value at Risk?

Value at Risk identifies a quantile of a loss distribution at a specified confidence level and holding period. It is not the largest possible loss. A historical estimate uses observed outcomes; a parametric estimate uses an assumed distribution. Neither method guarantees the next period’s loss.

Pineify’s report uses a return-sign convention: its VaR95 is a selected low percentile of imported trade PnL percentages. A displayed −2% is a historical trade-return threshold, not a promise that account equity will lose at most 2%. The report currently calculates VaR95 and CVaR95, not a 99% pair.

Formula

Current historical estimator: Input = all imported per-trade PnL percentages Sort input ascending: r[0], r[1], …, r[N−1] k = floor(0.05 × N) VaR95 = r[k] (zero-based indexing) CVaR95 = average of all r <= VaR95 For N=100, k=5 selects the sixth-lowest observation. For N=20, k=1 selects the second-lowest observation. No interpolation is used. Ties can place more observations at the threshold. Some references report positive loss magnitudes instead of negative return thresholds. Match the sign convention and estimator before comparing tools.

How to Read This Number

A threshold describes a location in the supplied distribution, not the severity of every outcome beyond it. Read CVaR and individual tail trades alongside it. A small historical VaR can coexist with much larger losses outside the selected quantile or outside the historical sample.

The observation unit here is one trade, whose duration and size can vary. It is not a one-day account return. Do not interpret a 95% label as a verified future success rate or an exactly 5% breach frequency in a finite sample with ties.

To reproduce the result, verify the percentage column, count the selected trades, sort all returns, and identify the zero-based floor index. Keep losing, winning, and breakeven trades in the input. Compare the same strategy version, period, trade inclusion settings, and return definition.

What Counts as Good?

RangeValueWhat It Means
Negative thresholdVaR95 < 0%The selected historical return is a loss in trade-percentage units. Its magnitude is not an account-risk limit.
Non-negative thresholdVaR95 >= 0%The selected observation is not a loss. Worse observations can still exist, and future losses remain possible.
Different estimatorsNo universal cutoffA percentile selected without interpolation can differ from another tool. Match the method before treating the difference as an error.

How Pineify Calculates Value at Risk

Pineify reads the exit row’s pnlPercent field, sorts the selected trade returns, and applies the index rule above. It does not derive VaR from gross cash PnL or reconstruct a daily marked-to-market portfolio distribution. Missing or unparseable percentage fields currently default to zero, so validate the CSV before trusting the threshold. The calculation does not fit a normal distribution. That avoids a normal-model assumption, but it still depends on the relevance and completeness of the historical sample. It does not estimate unseen crisis events or adjust for dependence between trades. No automatic 99% metric or the previously described fixed-count warning is implemented in this engine. Backtest Report analyzes a compatible trade-list CSV; it does not rerun strategy rules on market data. Parsing and metrics are local, while optional AI analysis sends a derived report summary to the analysis API.

Review Your Value at Risk

Upload your TradingView backtest CSV and get Value at Risk (VaR) alongside other return and risk metrics. Check the input assumptions before comparing results.

Analyze Your Backtest Now

Frequently Asked Questions

Everything you need to know about this metric