Category
Risk
Difficulty
Advanced
Used in
Risk managementEA evaluation

Value at risk

Value at risk (VaR) is a modelled estimate of the worst loss over a set horizon at a stated confidence level. A 95% one-day VaR of 2% means the account should lose more than 2% on about one trading day in twenty — and it says nothing about how much more.

also: VaR, value-at-risk

Updated · Reviewed

In plain English

A sentence of the form: on a normal day we do not expect to lose more than this much, and we hold this much confidence in that. The part people forget is the days that are not normal — the figure says nothing at all about those.

Why it matters

Maximum drawdown tells you what already happened; value at risk tries to describe a typical bad day before it arrives. For an unattended EA that helps — if you understand its two failure modes: too cautious on ordinary days, too small on the day that mattered.

  • It turns position size into arithmetic. Halving the lot size halves the VaR, so a limit written as a percentage of the account converts directly into a lot size.
  • The MT5 Strategy Tester never prints it. The report lists drawdown, profit factor, recovery factor and Sharpe ratio but no VaR, so the figure has to come from the deals list. You choose the horizon, the day basis and the method, and each choice moves the number.
  • Its blind spot is why drawdown belongs next to it: VaR is a threshold, not a worst case, and says nothing about the losses beyond it. On the 24 records published here, on an active-day basis, the worst day ran a median 1.59 times the parametric 95% VaR, and 4.18 times on the busiest EA.

How it is calculated

VaR = z × σ × √t × Account value
z
The normal-distribution multiplier for the confidence level — 1.645 at 95%, 2.326 at 99%. Raising the confidence raises the figure; it does not make the estimate safer.
σ (sigma)
The standard deviation of returns over one period, usually one day, from the same account the figure describes. Which days count — every weekday, or only days a trade closed — changes σ two-fold or more for a low-frequency EA.
√t
The square-root-of-time scaling that converts a one-period figure to a t-period one. It assumes each period is independent of the last, which trending markets routinely violate.
Account value
The balance the percentage applies to. VaR comes quoted either as money or as a percentage of this figure — mixing the two is the most common reading error.

This is the parametric form, which assumes returns follow a normal distribution. Historical VaR replays the actual returns and inherits whatever the sample contained; Monte Carlo VaR simulates from an assumed distribution and inherits whatever that assumption gets wrong. FX returns have fat tails, so every version understates the extremes.

What counts as high or low

  • under 1% (1-day, 95%) Conservative for an unattended EA — one bad day does not force a decision
  • 1–2% Reasonable for a retail account running a single strategy
  • 2–5% Aggressive. A cluster of bad days inside one week becomes a serious decline
  • over 5% One day in twenty should exceed this — fix position sizing, not strategy

Read it together with

No single number describes a strategy. These metrics change how this one should be read.

Example

An EA runs on a $10,000 account whose daily returns have a standard deviation of 1.2%. What does a bad-but-not-extraordinary day cost at 95% confidence?

Account value
$10,000
Daily standard deviation (σ)
1.2%
Confidence level
95%
z = 1.645
1-day VaR
$197 (1.97%)

The figure stays silent on whether the day that breaches it costs $250 or $2,500.

Calculation 1.645 × 1.2% × √1 × 10,000 = 197.4

Result 95% one-day VaR of about $197 — and one day in twenty should be worse

How to interpret it

Read VaR as one input to a position-sizing decision, never as a safety guarantee. Four things must travel with it or nobody can check it: horizon, confidence level, method, and which days went into the series.

Range What it means
Quoted without a horizon or confidence level Uninterpretable. A one-day 95% figure and a ten-day 99% figure differ by more than four times for the same account.
Historical VaR on every weekday, for a low-frequency EA Often zero, and therefore empty. Seven of the 24 records published here trade on so few days that this figure comes out as exactly 0.
Historical VaR on active days, over several years The most defensible retail version: it replays what the strategy did on the days it traded, not what a formula assumes.
  • Ask what happens beyond the threshold. Expected shortfall — the average loss on the days that breach VaR — is the follow-up question. On the published records it ran a median 1.22 times the historical 95% VaR, and 2.17 times on the busiest EA.
  • Fewer breaches than promised is not reassurance. The published records breached their parametric 95% VaR on a median 1.61% of active days, against the 5% the model promises, and still produced worst days far beyond it. The distribution is peaked in the middle and heavy in the tail; a normal curve can express neither.

mt5depot EA pages publish observed maximum drawdown from the tester report rather than a modelled VaR, because a buyer can re-derive that figure from the published trade ledger. Every measured figure on this page comes from those same 24 ledgers (EXP-VAR-DAILY-001), closed-trade basis.

Common mistakes

Reading VaR as the maximum possible loss

It is the opposite: the threshold that the worst 5% of days should exceed. The 2015 Swiss franc revaluation was that kind of day, and no confidence level built from prior years would have made it predictable.

Assuming a normal distribution for FX returns

They do not follow one. On the published records, five of the 24 EAs saw a single day beyond three times their parametric 95% VaR. That is close to five standard deviations, which a normal model calls impossible inside a few thousand trading days.

Comparing VaR figures computed at different confidence levels or day bases

A 99% figure is roughly 1.4 times the 95% figure with nothing else changed. Switching from every weekday to active days changes it far more: the same EA reads 0.369% on one basis and 0.812% on the other. Two VaRs are comparable only when horizon, confidence, method and day basis all match.

Using VaR on a strategy that never closes losing positions

The model reads realised returns. A strategy that averages down produces a placid series and a small VaR while carrying an open loss the figure cannot see — and a closed-trade ledger has the same blindness for any EA.

Treating a one-day VaR as a drawdown estimate

Drawdown accumulates across days; VaR describes one. On the published records the worst single day was a median 0.38 of the tester's balance drawdown, and on none of the 24 EAs was it the whole drawdown.

In depth

Computing a one-day VaR from an MT5 tester report

The Strategy Tester report has no VaR line, so the figure comes from the deals list. The basis below matches this site’s published records: closed-trade profit by calendar date, as a share of the deposit.

  1. Run the backtest, open the Backtest tab and export the report from its context menu (Report → HTML or Open XML).
  2. Sum the profit of every closing deal by closing date, swap and commission included. Each date with at least one close is an active day.
  3. Divide each daily total by the deposit. Decide whether the other weekdays enter as zeros — and write that choice next to the result.
  4. Parametric: 1.645 × the standard deviation of the series. Historical: the 5th percentile of the sorted series. Report both, with the day count.

What 24 published ledgers show

Measure (closed-trade basis, % of deposit)Median across 24 EAsRange or count
Weekdays on which a trade closed19%3.11% to 96.28%
Historical 95% VaR on every weekday equals 07 of 24 EAs
Parametric 95% VaR on active days1.435%
Historical 95% VaR on active days0.955%
Worst single day2.544%up to 11.494%
Worst day ÷ parametric 95% VaR1.59×0.69× to 4.18×
Active days breaching the parametric 95% VaR1.61%289 breaches vs 484 promised, over 9,681 days
Expected shortfall ÷ historical 95% VaR1.22×up to 2.17×

Both failure modes sit in one table: the breach rate says the normal model is too cautious on ordinary days, the worst-day multiple says it is too small on the day that matters. A higher confidence level fixes neither — both errors come from the shape of the distribution, not from z.

How to run a backtest in MT5 explains which of the report’s two drawdown figures to believe, and reading an MT5 backtest report covers the rest of the report. Turning a trough into a deposit is the job of risk management for EA traders. The expert advisor definition covers what an EA can and cannot see while it runs.

Frequently asked questions

What is a good VaR for a trading account?
For an unattended EA, a one-day 95% VaR under about 1% of the balance is conservative and 1–2% is reasonable. Above 5%, one day in twenty should be worse than that — a position-sizing problem, not a strategy problem.
What is the difference between VaR and maximum drawdown?
VaR is modelled and forward-looking: an estimate of the loss threshold for a given horizon and confidence. Maximum drawdown is observed and backward-looking: the deepest peak-to-trough decline that actually happened. Neither replaces the other.
Does the MT5 Strategy Tester report show value at risk?
No. The tester report prints balance and equity drawdown, profit factor, recovery factor, Sharpe ratio and expected payoff, but no VaR line. Export the report from the Backtest tab, sum the deal profits by closing date, divide by the deposit, and take 1.645 times the standard deviation of those daily figures — or their 5th percentile directly.
Why does my EA's historical VaR come out as zero?
Because a low percentile of a series dominated by zero days is zero. When losing days make up less than 5% of all weekdays, the 5th-percentile day is a zero day; seven of the 24 EAs published here hit exactly this. Compute the figure on active days instead, and say so.
What is conditional value at risk (CVaR) or expected shortfall?
The average loss on the days that breach the VaR threshold — the question VaR refuses to answer. On the published records it ran a median 1.22 times the historical 95% VaR, and 2.17 times on the EA that trades most often.