P(sample in profit)
What does simulating a strategy tell you, and what can it not tell you?
The short answerA simulation tells you the distribution of outcomes implied by a model you wrote down, to a precision you can state and control. That is a genuinely useful thing and it is a narrow thing. It answers questions of the form if the world were exactly like this, how often would that happen — and it answers them with an error bar that shrinks as you add paths.
It cannot tell you whether the world is exactly like that. Every simulated number carries a precision, which is arithmetic and is cheap to improve, and an accuracy, which is a property of the assumptions and is not improved by computation at all. In the worked example on this page, going from 20,000 paths to 100,000 moves this seed's estimate by 0.31 percentage points, and moves the quantity it is estimating by nothing whatsoever. Admitting that the win rate was itself estimated, from 200 past trades rather than known, moves that quantity by 8.41.
Those two numbers are the article. Everything below either derives one of them or shows you where the second kind of error comes from.
A simulation is a machine for taking your assumptions seriously to many decimal places; it has no opinion whatsoever about whether they are true.
Two conventions before the arithmetic. First, every number on this page is illustrative: it is produced by a stated model with stated inputs, and it is a measurement of that model, not of any trading programme, any firm or any real account. Second, everything here that can be derived is derived, and the working is shown, so the claims can be checked with a calculator rather than believed.
- 01What does a simulation actually compute?
- 02How wide is a single sample?
- 03The laboratory
- 04How many paths before a number means anything?
- 05Which inputs survive a sample of this size?
- 06Backtest or simulation?
- 07What does independence assume?
- 08What can a simulation never know?
- 09Questions traders ask
- 10Method, seed and limits
What does a trading simulation actually compute?
The objectIt computes an integral by counting. You specify a random process; the machine draws from it many times; the share of draws with some property estimates the probability of that property. Nothing about the market enters at any point. The market entered when you chose the process.
Here is the process this page uses, stated completely so that nothing is hidden in it. Each trade is one draw. With probability p it returns R units of risk; otherwise it returns −1 unit. One unit of risk is a fixed number of dollars, set as a percentage of the starting balance and never rescaled. Trades are drawn independently. The account has no floor, no target and no barrier of any kind: it simply runs for N trades and stops.
Expectancy is an input here, not a lesson: the question of why win rate alone sorts nothing is settled elsewhere and is not re-argued here (expectancy versus win rate). What matters for simulation methodology is the second line of that block. The variance of a single trade is (R+1)²p(1−p), and it is largest exactly where the expectancy is most uncertain.
Now the part that most simulation writing skips. For this process the answer does not need to be simulated at all. The total after N trades depends only on the number of wins W, because every win is worth the same and every loss is worth the same:
At p = 0.40, R = 1.8 and N = 200 trades, a profitable sample needs W >= 72 wins out of 200, and the exact probability of that is 89.06%. No paths were run to obtain that figure; it is a sum of 129 binomial terms.
This is the strongest thing that can be said for a simulator: on a model whose answer is already known, it should reproduce that answer to within its own stated error. A Monte Carlo that cannot pass an exam it can be graded on has no claim on your belief when it is answering something you cannot check.
That is how this page is organised. The laboratory below runs the simulation and the closed form side by side, so that every claim about precision can be checked against a truth rather than against a second guess.
| p | Win rate. The probability a single trade is a winner. |
| R | Reward to risk. A win returns R units; a loss returns 1 unit. |
| N | Number of trades in one simulated sample. |
| W | Number of winners in that sample. Binomial(N, p). |
| S | Total outcome in units of risk. S = W(R+1) − N. |
| M | Number of simulated samples, or paths. |
| n | Number of past trades the inputs were estimated from. |
Risking a fixed fraction of current equity makes outcomes multiplicative, so the sum-of-independent-draws algebra above stops applying and the closed form disappears. The model here fixes risk in dollars precisely so that an exact answer exists to grade the simulator against. Clause 07 states what that choice costs.
How wide is a single sample of trades?
The spreadWider than almost anyone expects, and the width has a formula. Independent draws add their variances, so the standard deviation of the total grows with the square root of the number of trades while the mean grows linearly:
Read the last line slowly. With a real, positive, unambiguous edge of 0.12 units per trade, the standard deviation of a 200-trade result is four fifths of its own average. The exact quantiles of that distribution — computed from the binomial, not approximated — are:
| Percentile of the 200-trade total | Units of risk | At 1% risk per trade |
|---|---|---|
| 5th | −6.80 | −6.8% |
| 25th | +10.00 | +10.0% |
| 50th — the median | +24.00 | +24.0% |
| 75th | +38.00 | +38.0% |
| 95th | +54.80 | +54.8% |
Illustrative · exact binomial quantiles for the stated model
Two traders running the identical strategy, with identical inputs, identical discipline and identical execution, can finish 200 trades 61.6 percentage points of capital apart and still both be inside the ordinary middle ninety per cent of what the model produces. Neither did anything differently. The only difference is the draw.
One equity curve is one draw. It is a single observation from a distribution whose width, in this example, is four fifths of its own mean — which is why comparing two records that differ by thirty per cent tells you almost nothing about which process is better.
One convention note, because it points the wrong way on a page about risk. Those are quantiles under the standard convention, and the binomial is discrete, so the mass at a boundary is not exactly five per cent. The share of samples finishing at or below −6.80 units is 6.39% — about one in 15.6, not one in 20. The 5% quantile lands on a value that straddles 4.75% and 6.39%, and rounding it to "one in twenty" understates how often the bad case arrives.
The same arithmetic answers a question worth asking before any evaluation of a record: how long does it take for a genuine edge to become visible? Take the 5th percentile as the unlucky-but-not-freakish case and ask when it clears break-even. There are two defensible answers, and the distance between them is the lesson.
The first crossing is at 333 trades. The first point from which it stays above break-even is 368. In between, the 5th percentile falls back under water on 19 of the 35 intervening trade counts. The first crossing is a lattice accident; only the second is an answer that does not move.
A quantile of a discrete distribution moves in steps while the trade count moves one at a time, so the fifth-percentile total does not rise smoothly to meet break-even. It grinds down a unit per trade and jumps 2.8 units whenever the quantile advances a win, which means it crosses zero and drops back below it repeatedly before it settles. Any question of the form when does this first exceed that, asked of a discrete quantity, has this shape.
Now the part that matters, and it runs opposite to the way this comparison is usually told. The normal approximation to the same question gives 354. That is past the first crossing, and it is 14 trades short of the point where the exact answer stops changing its mind. Measured against the stable question, the closed-form shortcut is not conservative — it is optimistic, and it asks for fewer trades than the honest answer requires. A shortcut that lands between a lucky lattice point and the settled value will read as agreement with whichever one you happened to compute first.
How many trades your own record needs before it estimates anything is the subject of what a trade journal can prove; the arithmetic here is what makes that question answerable.
| 25 | mean +3.0 · sd 6.9 · profitable 72.7% |
| 50 | mean +6.0 · sd 9.7 · profitable 76.3% |
| 100 | mean +12.0 · sd 13.7 · profitable 82.1% |
| 200 | mean +24.0 · sd 19.4 · profitable 89.1% |
| 400 | mean +48.0 · sd 27.4 · profitable 96.4% |
| 1000 | mean +120.0 · sd 43.4 · profitable 99.7% |
Units of risk. Exact binomial values at p = 0.40, R = 1.8. Across this range the number of trades rises forty-fold; the mean rises forty-fold with it and the spread rises just over six-fold. That gap is the whole reason sample size resolves anything at all — and its slowness is why it resolves so little, so late.
No floor, no daily limit, no target and no barrier: the account cannot be stopped out of the sample. That is deliberate. A barrier turns a question about a sum into a question about a path, and path questions are the subject of the trailing floor and of ruin.
What does the distribution look like, and does the simulator agree with the truth?
The laboratorySet the model on the left. The exact figures update the instant a control moves, because they are closed-form. The simulated figures stream in as paths are drawn, so you can watch the estimate arrive rather than being handed it.
The generator is mulberry32, seeded deterministically — the same generator the product's engine uses, so the stream behind a figure here is the stream the product would draw. At the default seed 4417 with 20,000 paths, the simulation returns 89.38% against an exact 89.06%: a gap of 1.5 standard errors, which is exactly the kind of disagreement a correct simulator should produce most of the time.
Every control is an assumption. The instrument will compute any of them to four significant figures; none of that computation makes the assumption true. That gap is the subject of clauses 07 and 08.
P(sample in profit)
same quantity
of the estimate
simulated minus exact
drawn so far
Needs: an integer seed between 1 and 999,999,999
The wine cell is the binding one: the standard error is what bounds the claim you are entitled to make from this run. Everything to its left is only as meaningful as it is wide.
| Quantile of the total | Units | Capital |
|---|---|---|
| 95th | — | — |
| 75th | — | — |
| Median | — | — |
| 25th | — | — |
| 5th | — | — |
| Mean / sd | — | — |
Illustrative · exact binomial quantiles
Two simulated checks are printed under the instrument, and both are worth more than they look. The first is the share of simulated paths that finish inside the shaded outer band: it should be close to ninety per cent, and it is. That confirms the bands and the sampler are describing the same distribution.
The second is the share of paths that touch below the lower edge at some point along the way. At the defaults it is about 26% — five times the five per cent that finish there. Nothing is wrong. A cone assembled from the quantile at each trade index is a stack of separate snapshots, and a path only has to dip under one of them once.
A fan chart answers where will the total be at trade k. It does not answer will the total ever go below this line, and the two answers differ by a factor of five in this example. Every rule written as at any time is the second kind of question.
This is the first genuinely useful thing simulation does that algebra here does not: the marginal quantiles have a closed form and the path-wise statistic does not. Simulate what you cannot integrate; check what you can.
Dragging risk per trade rescales the vertical axis and leaves P(sample in profit) untouched. In this model risk is a fixed number of dollars, so it multiplies every outcome by a constant and cannot change the sign of the total. That is a property of the model, not of trading — and it is exactly the property that fails the moment size is a fraction of current equity. See how to size a position.
How many simulated paths before a number means anything?
PrecisionEnough that the interval around it is smaller than the decision it is supposed to support — and that quantity has an exact formula, so it never has to be guessed. Each path either ends in profit or does not, so the count of profitable paths is itself a binomial draw and the estimate carries the standard error of a proportion:
The rate is the whole story and it is unkind. The error falls as one over the square root of the number of paths, so quadrupling the work halves the error. Getting one more correct digit costs a hundred times the computation.
| Paths M | Standard error | 95% interval half-width |
|---|---|---|
| 1,000 | 0.99 pp | 1.94 pp |
| 5,000 | 0.44 pp | 0.87 pp |
| 20,000 | 0.22 pp | 0.43 pp |
| 100,000 | 0.10 pp | 0.19 pp |
| 1,000,000 | 0.03 pp | 0.06 pp |
Illustrative · computed at an estimate of 89%, in percentage points
Two consequences follow immediately, and both are checkable in the instrument above. The first: at 20,000 paths a reported 89.4% is honestly 89% give or take half a point. The final digit is not a measurement, it is a rendering artefact of the print format. The second: to claim half a point either way you need about 15,000 paths when the answer sits near 89%, and about 38,416 when it sits near 50%, which is the worst case because p(1−p) is largest there.
Quadrupling the paths halves the error. There is no number of paths at which the model becomes right — the standard error describes the arithmetic's agreement with itself, and nothing else.
Press New seed in the rail above and watch the estimate move. The typical size of that jump is the standard error — not a metaphor for it. The instrument keeps a running spread across every seed you have tried and prints it beside the predicted value, so the formula can be verified rather than accepted.
The formula uses the estimate in place of the unknown true probability, which is the standard practice and is slightly optimistic when the estimate is near 0 or 1. At the values on this page the difference is smaller than the last printed digit.
| Seeds tried | 1 |
| Spread across seeds | — |
| Predicted standard error | — |
| Paths for ±0.5 pp | — |
Illustrative · mulberry32, seeded
Which inputs can a sample of this size actually tell apart?
The forward questionFewer than you would like, and the boundary is drawable. Note first which question this is. It is the forward one: what a sample of a given length could resolve, asked before any of those trades exist. Its mirror image — what a record you already have has actually established — runs on different information and belongs to what a trade journal can prove. This clause prices the evidence a sample of length N is capable of carrying, whatever it turns out to say.
The surface below gives, for every pair of win rate and reward-to-risk, the exact probability that a sample of the chosen length ends in profit. The wine line is the break-even ridge, the algebraic locus p = 1/(1+R) — the only thing on the figure that is not a probability. The point is not the ridge. It is the fog around it: on the ridge a profitable sample is about a coin toss, which is what break-even means, and that coin toss does not fall away quickly. At two-to-one reward-to-risk over 200 trades:
| True edge per trade | Win rate | Sample ends in profit |
|---|---|---|
| −0.10 units, a real leak | 30.0% | 15.8% |
| −0.04 units | 32.0% | 35.0% |
| 0.00 — break-even | 33.3% | 50.7% |
| +0.05 units | 35.0% | 69.6% |
| +0.11 units | 37.0% | 86.4% |
Illustrative · exact binomial, N = 200, R = 2
A process that genuinely loses four hundredths of a unit per trade still shows a profit in about one 200-trade sample in three; one that genuinely makes five hundredths shows a loss in about three in ten. At 50 trades those become 43% and 39% — nearly the same evidence from opposite processes. Drag the sample length under the figure to watch the fog thin.
Two hundred trades cannot separate a small real edge from a small real leak. That is not a statement about traders or about strategies; it is a statement about what two hundred draws are capable of resolving, and it is the same arithmetic that governs the size of a clinical trial.
This clause fixes the process and asks which samples it produces. The retrospective question fixes the sample and asks which processes could have produced it. One is a distribution over outcomes given parameters; the other is an interval over parameters given outcomes. They share a binomial and they are not convenient inverses of each other.
Every cell is the same computation applied to a different assumption. The figure sorts nothing and prefers nothing: it prices how visible a given edge is in a given number of trades. Two cells with the same value can have opposite true expectancies, which is precisely the reason the ridge is drawn on top of it.
Illustrative · exact binomial tail per cell
What is the difference between a backtest and a simulation?
Two instrumentsA backtest is one realised path through one history. A simulation is many synthetic paths through an assumed process. The difference is not that one is real and one is not. It is that each has exactly one of the two things you need, and neither has both.
| Property | Backtest | Simulation |
|---|---|---|
| Sample size | One | As many as you pay for |
| Order and dependence between trades | Real, and unknown to you | Assumed, and written down |
| Regimes covered | Only the ones that occurred | Only the ones you modelled |
| Sensitive to selection | Severely — rules were chosen after seeing the path | Not by that route |
| Precision is measurable | No | Yes — clause 04 |
| Can be wrong about | Whether the past repeats | Whether the model is the process |
One line of that table needs a hand-off rather than an argument. A backtest is exposed to selection: the rules were chosen after the path was visible, so part of what the curve measures is the choosing. How large that inflation is, and how a fitted result decays out of sample, is a subject in its own right and belongs to why your backtest lied. The only thing needed here is the boundary: a simulation of a specified model cannot be inflated that way, because nothing was selected after seeing the output. It pays for that immunity with a different exposure — the model was still chosen by a person, and that person chose it after looking at a record.
A simulation also need not be parametric: it can be fed from a real trade list rather than an assumed distribution, which trades an assumed marginal for a real one and a real ordering for none at all. What a record can establish about itself is what a trade journal can prove.
A backtest has one sample and real dependence. A simulation has many samples and assumed dependence. The interesting failures live in the gap, and no amount of either instrument closes it.
The tension is structural, not technical. Real dependence between trades is only available from a path that actually happened, and there is exactly one of those. Many samples are only available by generating them, and generating them requires stating how trades relate to each other.
Every method in between spends some of one to buy some of the other. That is the whole design space, and nothing in it escapes the trade.
What is assumed when trades are drawn independently, and where does it break?
The assumptionIndependence assumes that each trade is drawn from the same distribution regardless of everything that came before it. It is what allows variances to be added, which is what makes the square-root-of-N law in clause 02 true, which is what every number on this page rests on. It breaks in three ways, and each has a direction and a size.
One · Trades that are correlated with each other
If outcomes are positively correlated — the same instrument, the same session, the same driver — then the variance of the sum contains cross terms that independence throws away:
A modest correlation of 0.2 between consecutive trade outcomes widens the true distribution by twenty-two per cent, and an independent simulation reports the narrower one. The direction reverses if the correlation is negative, so the sign is an empirical question about a specific record rather than a general law. It is also measurable from that record, which is the point: this is the one break you can actually test.
Note what kind of correlation this is. It is serial — one strategy's trades correlated with their own past. The other kind, several positions open at the same time moving together, breaks the same addition of variances for a different reason and is the subject of when five positions are one position.
Two · Inputs that were estimated, not known
This is the largest of the three and the most consistently ignored. The win rate typed into a simulator is not a constant; it is an estimate from some finite number of past trades, with its own standard error. Holding it fixed while sampling forward asserts a precision that the record does not contain.
The correction is exact. Write n for the number of trades the win rate was estimated from and N for the number simulated forward. Conditioning on the estimate and applying the decomposition of variance:
The second term carries N², not N. Sampling error inside the simulation grows with the number of trades; uncertainty about the parameter grows with its square, because a wrong win rate is wrong in the same direction on every single trade. Beyond a certain horizon it dominates everything else, and no quantity of paths touches it.
| Estimated from n trades | Simulating N | Variance | Spread |
|---|---|---|---|
| 1,000 | 200 | ×1.20 | ×1.10 |
| 500 | 200 | ×1.40 | ×1.18 |
| 200 | 200 | ×2.00 | ×1.41 |
| 60 | 200 | ×4.32 | ×2.08 |
| 200 | 1,000 | ×6.00 | ×2.45 |
Illustrative · exact, from 1 + (N−1)/n
Simulating as many trades forward as you observed backward doubles the variance. That is the highlighted row, and it is the most common situation there is. The mean is untouched — parameter uncertainty is a pure widening — which is why it hides so well behind a headline number that looks stable.
The checkbox in the laboratory switches this on. Each path draws a candidate win rate once, from the normal approximation to the sampling distribution of the estimate, and then trades at that value for the whole sample. At the defaults the measured spread of outcomes goes from 19.35 to 27.34 units against a predicted 27.40 — the law holds to within a quarter of a per cent — and the headline probability falls from 89.06% to 80.65%.
At twenty thousand paths the estimate is uncertain by 0.22 points, and a hundred thousand paths would cut that to 0.10. Admitting where the win rate came from moves the answer itself by 8.41 — nearly forty times the precision all that computation was buying, at no computational cost at all.
Three · Sizing that depends on the account
If risk is a fraction of current equity, the size of trade k depends on the outcomes of trades 1 to k−1. Outcomes stop adding and start multiplying, the square-root law no longer applies, and the distribution of the final balance becomes right-skewed, so its median falls below its mean and the average path stops describing the typical one. The methods and their formulas are the subject of how to size a position; what matters here is that it is a dependency, and the model on this page sets it to zero by fixing risk in dollars.
Of the three, only the second has a sign that cannot be argued with: a variance added to a variance can only widen the distribution, never narrow it. Correlation can go either way depending on the record, and sizing feedback changes the shape rather than only the width.
A win rate that shifts between regimes is the same mathematics with a larger variance on p. The inflation above is therefore a floor: it is what you owe even if the true win rate never changes and your only problem is that you had to measure it.
The inflation factor assumes the reward-to-risk ratio is known exactly and only the win rate was estimated. In a real record both are estimated, and the second uncertainty adds to the first rather than offsetting it. The factor is therefore a lower bound on the correction, not the whole of it.
Drawing the win rate from the normal approximation to its sampling distribution and drawing it from a Beta posterior with a flat prior give almost the same answer here: at 200 observed trades and an estimate of 0.40 the two standard deviations are 0.0346 and 0.0344. The choice does not move any figure on this page.
The normal draw is clipped to the open interval between 0.001 and 0.999 so that no path receives an impossible win rate. At the widths used here the clipped mass is far below one in a million and does not move the printed digits.
What can a simulation never know?
The limitsSix things, none of which improves with computation. This list is the honest other half of the answer, and it is longer than the half that sells software.
One · Whether the model is the process
The standard error in clause 04 is the uncertainty of an estimate given the model. There is no error bar on the sentence trades are independent, and there is no experiment inside the simulation that could produce one. Every figure on this page is conditional on a model, and the conditional is where all the risk lives.
Two · The shape of a tail it was not given
The model here has exactly two outcomes per trade. It is mechanically incapable of producing a loss of four units: a gap through a stop, a halt, a limit move, a fill far from the intended price. Those events are not rare in the model — they have probability zero, because they are not in the sample space. The simulated tail is therefore thinner than reality by precisely the amount that was excluded, and the exclusion is invisible in the output. A distribution cannot report what it was never allowed to contain. The same silence covers the ordinary, non-catastrophic version: spread, commission and slippage are absent from a two-outcome model unless they were subtracted from R before it was typed in, and what they actually cost is the subject of execution friction.
Three · What a person does near a limit
Inputs are estimated from trades that were actually taken. Near a threshold, after a losing run, or when a number on a screen goes red, people take different trades: they cut size, hold longer, skip setups, or double. That makes the win rate a function of the account state, which is a dependency the model sets to zero — and the same record used to estimate the parameters is contaminated by exactly this effect, so it cannot cleanly measure it either.
Four · The next regime
Parameters are estimated backwards and applied forwards. That is not a flaw to be corrected; it is the only thing anyone can do. It is a flaw to forget, and clause 07 gives the minimum size of the forgetting: the correction for having measured a constant, before any allowance for it not being constant.
Five · A path-wise question it was asked as a snapshot
The instrument in clause 03 measures both: 5% of paths finish below the fifth-percentile line and about 26% touch below it on the way. Any rule that reads at any time — a floor, a daily limit, a maximum drawdown — is the second kind. Reading it off a cone of marginal quantiles understates it, in this example by a factor of five. The mechanics of a floor that moves are the subject of the trailing drawdown, and what the resulting breach probability depends on is the subject of ruin. The methodological point here is only that the two questions are not the same question and one figure cannot serve both.
Six · That it has converged to the right thing
This is the subtlest and the most dangerous. A convergence plot shows an estimator settling down. It says nothing whatsoever about what the estimator is settling onto. A biased estimator converges beautifully — smoothly, with a shrinking interval, onto the wrong number. The only reason the figure in clause 04 can make a stronger claim is that the target is independently known. Where the target is not known, a stable estimate and a correct one are indistinguishable from the inside.
Every item on this list is a statement about the model, and computation touches none of them. The paths are the cheap part; they were always the cheap part.
What survives all six is still worth having: a simulation converts an argument about beliefs into an argument about assumptions, each of which can be named, written down, varied and disputed. That is a genuine upgrade over an intuition, and it is a smaller one than a four-decimal readout implies.
Change the seed. If the answer moves, that is sampling error and more paths fix it. Change an assumption. If the answer moves further than the seed ever did, no quantity of paths was ever going to be the constraint.
Questions with no closed form and a real answer: path-wise events, barriers, interacting rules, order-dependent sizing. Where a closed form exists, the simulation's job is to be graded by it — which is the arrangement on this page.
Questions traders ask about simulation
Answers, self-containedWhat does a Monte Carlo simulation of a trading strategy actually compute?
It computes the distribution of outcomes implied by a model you wrote down. It samples that model many times and reports the shape of the results. It does not forecast the market; it integrates your assumptions numerically. If the model is a fixed win rate, a fixed reward-to-risk ratio and a fixed dollar risk per trade, the exact distribution is a binomial and can be written down without simulating at all.
How many simulated paths are enough?
Enough that the interval is narrower than the decision. For a probability estimated from M independent paths the standard error is sqrt( p(1−p)/M ), so quadrupling the paths halves the error. A 95% interval of half a point either way needs about 15,000 paths when the answer is near 89% and about 38,416 in the worst case near 50%. Extra paths shrink sampling error only; they do nothing at all to model error.
What is the difference between a backtest and a simulation?
A backtest is one realised path through one history: the dependence between trades is real, but the sample size is one. A simulation is many synthetic paths through an assumed process: the sample size is as large as you like, but the dependence is whatever you assumed. Neither has both. A backtest can be inflated by selection during development; a simulation of a specified model cannot be inflated that way, and can be wrong about its assumptions instead.
What is being assumed when trades are sampled independently?
That each trade outcome is drawn from the same distribution regardless of what happened before it. Three things break it: positive serial correlation between trades, which widens the true spread by sqrt( (1+rho)/(1−rho) ); parameters estimated from a finite record, which inflates the variance by exactly 1 + (N−1)/n when N trades are simulated from n observed ones; and position sizing that depends on current equity, which makes outcomes multiplicative rather than additive.
Why does a simulated result change when the seed changes?
Because a different seed draws a different finite sample. The typical size of that movement is the standard error. Re-seeding repeatedly and measuring the spread of the answers reproduces the standard-error formula empirically, which is the cheapest available check that a simulator is reporting its own precision honestly. The instrument in clause 03 keeps that running comparison.
Can a simulation tell whether a strategy will work?
No. It can say what a stated model implies, with a stated precision. It cannot know whether the model matches the process, what the next regime looks like, how a person behaves near a limit, or what a gap through a stop costs. Error bars price the arithmetic, not the assumptions: there is no confidence interval on the sentence trades are independent.
Does the median line of a fan chart describe a path anyone actually takes?
No. A fan built from the quantile at each trade index is a set of marginal snapshots, not a set of paths, and no single path traces the median. In the worked example 5% of paths finish below the fifth-percentile line but about 26% touch below it at some point. Any question phrased as at any time is a path-wise question and has to be simulated path-wise.
A simulation is an argument written in a form that can be checked. Its precision is arithmetic and cheap; its accuracy is an assumption and is not.
The instrument in clause 03 is deliberately minimal — one strategy, no barriers, no rules. The full engine, with floors, daily limits and targets, is the simulator.
Method, seed, and the limits of this article
What this does not sayEverything above is arithmetic applied to a stated model. Arithmetic has a narrow warrant and it is worth marking its edges precisely.
- Every number on this page is illustrative. Each is a measurement of the model described in clause 01, at inputs the reader can change. None is a measurement of any trading programme, any firm, or any real account, and none should be read as one.
- No population statistic about traders appears anywhere on this page — no share who succeed, no share who do not — because no defensible first-party data for such a figure exists. Every probability here is a property of a model, not an observation of people.
- The model is deliberately small: two outcomes per trade, fixed dollar risk, independent draws, no floor, no target, no costs. Clauses 07 and 08 enumerate what that smallness excludes, which is the honest way to use a model this simple.
- The exact figures are exact for that model. The binomial closed form is not an approximation and does not depend on the simulator being correct; it is what the simulator is checked against.
- Nothing here is a recommendation about how to trade, what to run, or what to conclude about a particular record. Clause 05 in particular is a statement about what a sample of a given length can resolve, not an instruction about anything.
What the arithmetic does establish, and establishes firmly: the outcome of N independent fixed-risk trades is a linear function of a binomial count, so its exact distribution is available; the standard error of a simulated probability is sqrt( p(1−p)/M ) and falls as one over the square root of the paths; estimating the win rate from n trades inflates the variance of an N-trade forecast by exactly 1 + (N−1)/n; and a cone of marginal quantiles is not a statement about paths. Those are not estimates. They follow from the definitions, and they hold for every account the definitions describe.
Reproducing every figure
| Component | Specification |
|---|---|
| Generator | mulberry32, a 32-bit counter-based PRNG; the same generator used by the product's engine |
| Default seed | 4417 |
| Default model | p = 0.40 · R = 1.8 · risk 1.00% of the starting balance · N = 200 · M = 20,000 |
| Exact reference | Binomial tail, computed by a normalised recurrence from the mode — no logarithms, no approximation |
| Estimated-parameter mode | Win rate drawn once per path from the normal approximation to its sampling distribution; the exact reference then uses an 81-node Riemann quadrature over ±4 standard deviations |
| Cone bands | Exact binomial quantiles at every trade index in the fixed-parameter mode; normal quantiles with the derived variance inflation in the estimated mode, as labelled under the figure |
| Normal draws | Polar rejection method on the same stream: two uniforms on (−1, 1), discarded unless they land inside the unit disc, then scaled by sqrt(−2 · ln s / s) |
| Egress | None. No network request of any kind is made by this page |
That table is short because the model is small; the same disclosure at study scale is on this site already, in the worked comparison of drawdown-floor mechanics, which names its engine and version, its generator and seed, its path count per cell, and the re-seeding protocol that holds the random stream identical across cells.
A disclosed defect in the generator
mulberry32 has a 32-bit state, so its sequence repeats after about four billion draws, and its author has since noted that it never emits about a third of all 32-bit values and recommends a different generator for serious work. Both facts are true of the generator on this page and neither is hidden.
Neither moves any figure here, and the reason is the arrangement itself rather than an assurance. A run of 20,000 paths at 200 trades draws four million values, a thousandth of the period; and every simulated figure on this page is printed next to the exact value it estimates, so a generator defect large enough to matter would show up as a persistent gap in units of the standard error. Across the configurations checked before publication the gap ranged from 0.2 to 2.2 standard errors with no consistent sign — which is what a sound sampler looks like, and is a stronger statement than any claim about the generator would have been.
A simulator that prints its disagreement with a known answer does not need you to trust its random number generator. That is the entire argument for building it this way.
Sources
Almost nothing here needs a citation, because almost everything is derived in view and can be checked with a calculator. The external items — the mulberry32 generator, its authorship and its documented defect, and a standard reference for the confidence interval of a proportion — are listed with URLs and retrieval dates in trading-simulation-explained.references.md beside this file. The decomposition of variance in clause 07 is a textbook identity, and it is applied in view rather than invoked, so it is derived above rather than cited.
Every probability on this page is either a closed-form value or a simulated estimate printed beside the closed-form value it is estimating. Where the two disagree, the gap is printed in units of the standard error, so a reader can see whether the disagreement is ordinary.
No firm's rules, programmes or account data were used, and none are cited, because none are needed to establish an estimator's behaviour.
Published 27 July 2026. Corrections to the arithmetic are welcome and will be applied to the article rather than appended to it.
Clause 07. It contains the only correction on this page that is exact, free to apply, one-directional, and almost universally omitted.