‘Monte Carlo & Mersenne Twister’
Day Trading Simulation PDF FREE Trading PDF
Here’s another ‘FREE Trading Spreadsheet that you might find useful;
A ‘Monte Carlo Expectancy Simulator.’ Several years ago I stumbled across a simple ‘Excel Monte Carlo Trading Simulator’ on a trading forum. I decided to create my own version that was a little bit more indepth in statistical feedback, yet based on the “KISS” mentality; “Keep It Simple Stupid.”
A key word & concept to take notice of here is the word ‘Expectancy.’ This type of ‘Spreadsheet Trading Calculator’ does hold some value in depicting possible ‘probable’ outcomes that are derived from some of your entered trading metrics; namely;
User Defined Trading Metrics
- Win Rate
- Average Risk % Per Trade as a function of account equity
- Average Return for the amount of Risk Taken
- Commissions/Slippage incurred per round trip
1st of all, this ‘FREE Monte Carlo Trading Spreadsheet’ isn’t ground-breaking in anyway, although the ‘Horizontal Frequency Distribution Graph’ I’ve managed to incorporate (Thank you again Teylyn) in this Excel Trading Spreadsheet isn’t something I’ve seen anywhere else; well, not depicted or formatted this way at least.
There are some very good shareware ‘Trading Simulators’ available & most trading software platforms incorporate some kind of trading simulation functionality for backtesting & forward test modelling to evaluate your prospective & current trading systems with many ways to adjust parameters to optimise & vary performance results. Here’s just 1 link to an off the shelf trading simulator; namely the ‘Zen Monte Carlo Simulator’ by a rather clever man by the name of Volker Butzlaff.
As a note, one nice feature of this software is the (data scrambling) functionality concerning the generation of synthetic price data on basis of original historical data (EOD, Intraday etc.) Worth taking a look.
Van Tharp & ‘R’ Multiples.
It’s almost impossible to speak about trading in relation to risk & position sizing without mentioning the demigod in this field; probably the leading expert in position sizing & money management; namely Dr.Van Tharp Ph.D. His very useful concept of R, R-Multiples & Trade Expectancy. I don’t feel the need; nor am I trying to reinvent the wheel here; so here’s a link to Dr. Van Tharp’s explanation of what ‘Expectancy’ is.
I’d rather lead you here than just repeat or paraphrase his explanation.
Although Van Tharp speaks in terms of;
- ‘R’ (Basically £’s at risk per trade.)
- ‘R Multiples’(A great way to evaluate your trade’s performance in relation to your initial risk.)
- ‘Expectancy’ (Your trading system’s “Mean Or Average R-Multiple Generated.”)
“Expectancy Tells You The Net Profit Or Loss That You Can Expect Over A Large Number Of Single Unit-Trades.”
Dr. Van Tharp; (page 135 – Trade Your Way To Financial Freedom).
I would like to point out that my ‘Monte Carlo Trading Simulator’ generates results using a constant ‘R’ for all trades.
- All winning trades are derived from a consistent risk % per trade that never varies.
- All Losses are also derived from the same % of initial risk.
- A key determining factor for every trade is that it is based on your systems ‘PAYOFF RATIO’ (Simply your systems AVERAGE profit per trade divided by your systems AVERAGE loss per trade) It also takes into account all the
‘User Defined Trading Metrics’ mentioned earlier.
So, this doesn’t show the random variations in returns that a real life trading scenario would. So the significance of ‘R’ as an evaluation metric or KPI to compare the performance of 1 trade against another is really non-applicable here.
‘R’ & Multiples or ‘R’ are extremely important; their true value being in quantifying, evaluating & ultimately being able to compare each of your trades against one another. This then leads onto ‘R-Multiples’ telling you the efficiency of your system; pen ultimately the ‘Expectancy’ of your system over ‘x’ amount of trades.
Just to add; Maybe The Holy Grail of Trading is using ‘R’ to;
“Keep Your Losses To 1R As Often As Possible
& Your Profitable Trades High Multiples Of R.”
Why I Created These Trading Simulator Spreadsheets?
The reason I created this trading spreadsheet?
Really it was to aid traders via immersive interaction; induce & cultivate a mindset that’s geared NOT towards a winning & losing mentality, but one that nurtures & promotes a state of mind that’s founded within the concept of positive expectancies. So; thinking & trading in terms of risk reward ratios, trading with objectivity; seeking a positive expectancy as an end result; one must trade whilst holding in the mind’s eye a larger/ bigger picture of trading success. Trading success cannot be obtained trading from a constant macro perspective.
It’s trading from multiple perspectives that encompass thinking in terms of PROFITABILITY. I suspect some of you, if not all of you were expecting me to say “You Must Trade In Terms Of Probabilities.” You seek a ‘Positive Expectancy’ that within a ‘basket’ of trades over ‘x’ amount of time you are a net winner. You trade for PROFITABILITY over the long run, which means trading to predetermined objectives that envision a positive expectancy.
“SUPER TRADING IS NOT ABOUT PROBABILITY; IT’S ABOUT PROFITABILITY!”
Trading is about having a profitable system; a trading system that has a positive expectancy over the long run.
Having a high win rate usually is associated with small profits (& usually large losses).
The best trading systems are quite often a little over break even on win rate %.
Seek positive expectancy in your trading system.
Trade for profitability defined & aligned by your objectives.
Probability does play a role within actualized trading; but its governor is PROFITABILITY!
Day Trading Simulator Gallery
(Random.ORG Spreadsheet UPDATED 13/07/2017, now working again.
FIX – Coding changed in VBA in how the spreadsheet requests data via HTTP Server request).
Trading Simulator Features
There are 3 different versions to download.
The only variable being in how the random numbers are generated.
The ‘Monte Carlo’ version uses the Excel inbuilt ‘RAND()’ function.
The ‘Mersenne Twister’ version is using a FREE excel Add-in via RiskAMP.com,(Thanks again Duncan Werner for responding to my request for a fully working Excel 64bit 2010 version). Basically this still a pseudorandom number generator “That has been designed specifically to rectify many of the flaws found in older algorithms,” (Namely Monte Carlo) at least that is what Wikipedia states, so it must be true! 🙂
Finally; the ‘Random.ORG’ version. A very nifty import utility (courtesy of Norie; Excel Coding GURU) that allows the import of Random.ORG random numbers.
“The Randomness Comes From Atmospheric Noise, Which For Many Purposes Is Better Than The Pseudo-Random Number Algorithms Typically Used In Computer Programs.”
(Taken From Random.org’s website).
A few features worth mentioning that I’ve managed to integrate within all 3 of these Trading ‘Expectancy’ Simulators.
- A frequency Distribution Graph, that I haven’t seen elsewhere depicted this way in excel format. (Thanks again Teyln).
- A ‘Statistical Probability’ of Consecutive WINS & LOSSES table-with a custom user input.
- Drawdown Recovery (%).
- Most Consecutive Wins & Losses (Numerical & £’s amount).
- Largest Losing Streak Results (£’s).
- Largest Losing Trade (£’s) & its cell reference-location within the 500 random trading simulation.
- Lowest Equity Low (£’s).
- Total Wins & Total Losses (Numerical & £’s).
- Average Trade Win & Loss In (£’s) & as a (%).
- Peak Gain (£’s).
As mentioned before; there is nothing groundbreaking here; & you can view ALL the code within ALL these FREE Trading Spreadsheets. I purposely haven’t password protected any part of these trading excel spreadsheets. This might aid/push some of you to try & ‘tweak’ or create your own versions; BE CREATIVE!
“To Live A Creative Life, We Must Lose Our Fear Of Being Wrong.”
(Joseph Chilton Pearce)
Why Use A Simulator?
In Malcolm Gladwell’s book ‘Outliers’ Gladwell submits that it takes 10,000 hours of commitment to become highly successful in any endeavour.
K. Anders Ericsson in his book ‘The Road To Excellence,’ estimates a figure of 10 years. Why is this important, & what has this got to do with Trading Simulation?
The above points towards mastery within the ‘conscious competence learning matrix model.’
To Super Trade, one must achieve a level of thought/behaviour that is congruent with ‘Unconscious Competence’ (although the STD ‘Conscious Competence’ learning model is well known as a 4 box matrix model, I ask you to consider, & I’m in agreement with integrating a 5th element, a feedback loop. Image: “Will Tayor’s – Competency Matrix.” courtesy of: Businessballs.com
I mention competence as this is the partner; & an essential ingredient to Super Trade. Partner to what you might question?
“Objectively, Super Trading Seems To Be A Behaviour SKILL,Trading In A State Of Unconscious Competence. The Irony Is That Super Trading Is 100% Psychological!”
If Super Trading IS 100% psychological, how does psychology play its part when using a trading simulator?
- Can you handle PSYCHOLOGICALLY the trading simulator’s projected drawdown figure?
- Can you handle PSYCHOLOGICALLY the strings/clusters of losses over time?
- Can you handle PSYCHOLOGICALLY a moderate (example: 50%) Win Rate; knowing you are wrong 50% of the time?
- Are you PSYCHOLOGICALLY disciplined to consistently stick to a pre-determined Risk allocation %, even after a string of losses?
- Can you PSYCHOLOGICALLY adhere to your system in different market conditions?
The Take Aways
OK. What can you take away from this post & my “Day Trading Expectancy Simulator Spreadsheets?”
Pareto gave us the 80/20 Rule. So; ‘Pareto Style,’ what can I give you in a nutshell that will give you the most bang for your buck regarding these Trading Simulation Spreadsheets?
3 Words; OBJECTIVES, RISK, FREQUENCY
- ALLWAYS Trade with Pre-determined OBJECTIVES. Thus try seeking parameters within these ‘Expectancy’ Simulators that will match & be congruent with your trading OBJECTIVES.
- UNDERSTAND Position sizing; your allocation of RISK in £’s per trade to meet your OBJECTIVES. It’s Critical.
- FREQUENCY. Be aware that having a desired (£) amount to attain whilst integrating correct position sizing can only be achieved if you have enough trades to meet your desired (£) outcome. The FREQUENCY of your trades plays a huge role in how quickly you can obtain your desired outcome. Look for a strategy (Or combine strategies) that generate enough buy/sell signals that will realize your goals over time.
#Side Note: Something I’d like to mention as it does crop up a lot, namely ‘Gamblers Fallacy.’ A common ‘Belief’ is that after a string of losing trades, your odds of winning on the next trade seems more probable, a regression to the mean; so you should increase your position size on the next trade. (MARTINGALE).
Larry Williams states: “After You Have Had 3 Or 4 Losing Trades In A Row, The Probability Of The Next Trade Being Not Only A Winner But A Substantial Winner Is Way In Your Favour.”
The implication here is that the probability of winning each trade is somehow influenced by the result of the previous trades. Not true for coin tossing & most other random events. Coins have no memory of what side came up last. Each toss is totally independent of the previous one.
Proponents of ‘Martingale Strategies argue that in real trading, each trade isn’t independent of the previous trade.
Example: If you trade a breakout system, maybe after several failures success is more likely. The problem is, We Don’t Know in advance which trial will benefit from increased size. So increasing position size could leave you with a large loss; especially if you are increasing your risk per trade as your account is reducing in (£) value.
Whilst you can conceptualize where Larry is coming from with his ‘Winning Probability’ idea, Martingale strategies are potentially very dangerous if used consistently as a longer term position sizing strategy.
I’m not talking here amount ‘Averaging’ in on a trade incrementally. What Larry is saying is; if you lose say 4 times in a row, your 5th trade is way in your favour to be a winner.” POTENTIALLY VERY DANGEROUS, IF NOT DISASTROUS. Please; don’t fall foul to this methodology.
#Some info adapted from Larry Sander’s website; http://www.tradelabstrategies.com
#Recent Event 2012: Trader Bruno Iksil – $2bn Loss; J.P. Morgan,
a ‘Martingale Strategy’ surely?
#Also Note: My trading simulator spreadsheets have an integral ‘Statistical Probability Win/Loss Calculator, so you can see statistically how many winners or losers in a row you can expect over the 500 random simulated trades, or a user defined number of trades, taking into account your win rate.
This is important because if you have a system with a win rate that is little over break even, you could potentially expect to have a large number of losses in a row, (which my expectancy calculator would depict). If you were using a Martingale strategy as your account equity decreased, this could be catastrophic. The words “Margin Call” comes to mind!
‘Martingale’ Strategies For Trading Are Dangerous-They Just Don’t Work.
‘Anti-Martingale’ Strategies Are NOT Dangerous & Do Work –IF Implemented Correctly!
“Anti-Martingale Strategies, Which Call For larger Risk During A Winning Streak, Do Work – both In The Gambling Arena & In The Investment Arena.”
Page 285 – Trade Your Way To Financial Freedom. – Dr.Van Tharp, PhD.
“Envision in your mind’s eye an artist; one of the greats.
He’s standing in front of his easel that’s gently cradling his canvas; his vision.
He’s totally engaged; in a ‘FLOW’ state; nurturing his creative process.
His brush commands his right hand; an extension of his mind.
His palette is awash with his unique concept of colours that await in his left.
His canvas; his vision requires depth to convey greater clarity; to crystallize his perspective.
He chooses a colour from his subjective palette to instigate change; small light strokes enhance his landscape.”
A Trading Simulator is but 1 colour in your palette of trading tools that can be accessed at any time to enhance & illuminate your ideal canvas.
This 1 ‘colouring’ tool might seem at 1st glance to play a small part in your ‘artwork;’ but importantly it can ‘Change Your Perspective’ in how you view your future outcomes.
Used wisely, a trading simulator helps paint a different picture that can instigate a new positive belief; & We Trade Our Beliefs!
Finally; I leave you with a quote by Richard Bandler (Co-NLP creator)
“The way we lead our lives is a direct result of how we view the future.
It’s only through having a perspective that you get to do things differently.”
Assimilate your trading with a mind-set that has a clear pre-determined ‘OBJECTIVE;’ integrate a trading system with a ‘POSITIVE EXPECTANCY.’ Control your ‘RISK,’ & ensure ‘FREQUENCY ‘is your friend; but most importantly;
Learn In Time To Master Thy Self!
“The one certainty we know about the markets; It’s their uncertainty!”
“I wish you well in your journey & in your trading.”
Copyright © – DayTradingLife.com – 2017 – All Rights Reserved.