I've just built myself a Monte Carlo simulator and found it useful in giving me some idea of what I might expect from my trading. The simulator will run approx 500 runs of 200 trades with the inputs you enter - starting equity, win rate (number between 0 and 1 - so 0.4 is a 40% win rate, 0.6 a 60% win rate etc), Average stop as % of equity with a +/- adjustment, Average size of winning trades as a multiple of stop size and a margin of error for the size of winners (multiply these figures by 100 before entering them - so if your average winner is twice the size of your stop enter 200 and if the standard deviation is 0.75 then enter 75). There's a small box and chart on Sheet 1 that allows one to enter a mean and a standard deviation to give you some idea of what sort of standard deviation might best reflect your results - just put in the mean and SD and hit f9 a few times and the chart will show you roughly what to expect.
The simulator requires a macro to run and FF wont let me post a macro enabled spread sheet so the file attached doesnt have the macro. To get the macro to run you'll need to turn on the developer tab in Excel - see here (http://www.addintools.com/documents/...loper-tab.html). Once that's enabled go to the developer tab, click on macros, in the macro name box type monte then click create. This will open a VBA editor delete the couple of bits of code already there and paste in the code below. Click save and close the editor window.
Sub monte()
Dim dest As Worksheet
Dim i As Long
Dim destcell As Range
Set dest = Sheets("Target Sheet")
Application.Calculation = xlCalculationManual
For i = 2 To 500
Application.Calculate
Set destcell = dest.Cells(i, 1)
destcell.Cells(1, 1) = Range("B204")
destcell.Cells(1, 4) = Range("j6")
destcell.Cells(1, 5) = Range("k6")
destcell.Cells(1, 6) = Range("E3")
'...
destcell.Cells(1, 10) = Range("X3")
Next i
Application.Calculation = xlCalculationAutomatic
End Sub
Then on Sheet1 put in your starting figures and click the macros on the developer tab, select monte and click run.
On the 'Target Sheet' are the results of the simulations - the Max, Min and average results for those runs, the max min and average draw down and the maximum numbers of consecutive losers/winners.
What this thing doesn't do is give you an equity curve for any particular set of trades. It also doesn't account for withdrawals from your account or the possibility of non normal distribution of results (i.e results outside of those calculated are entirely possible).
The thing I've found it most useful for is preparing me for drawdowns and for losing runs - even with quite high win rates the variance in trading is huge and its easy to lose faith in what one is doing when the reality is those losses are simply a normal part of what we all do.
Hope this is of some help.
B.
The simulator requires a macro to run and FF wont let me post a macro enabled spread sheet so the file attached doesnt have the macro. To get the macro to run you'll need to turn on the developer tab in Excel - see here (http://www.addintools.com/documents/...loper-tab.html). Once that's enabled go to the developer tab, click on macros, in the macro name box type monte then click create. This will open a VBA editor delete the couple of bits of code already there and paste in the code below. Click save and close the editor window.
Sub monte()
Dim dest As Worksheet
Dim i As Long
Dim destcell As Range
Set dest = Sheets("Target Sheet")
Application.Calculation = xlCalculationManual
For i = 2 To 500
Application.Calculate
Set destcell = dest.Cells(i, 1)
destcell.Cells(1, 1) = Range("B204")
destcell.Cells(1, 4) = Range("j6")
destcell.Cells(1, 5) = Range("k6")
destcell.Cells(1, 6) = Range("E3")
'...
destcell.Cells(1, 10) = Range("X3")
Next i
Application.Calculation = xlCalculationAutomatic
End Sub
Then on Sheet1 put in your starting figures and click the macros on the developer tab, select monte and click run.
On the 'Target Sheet' are the results of the simulations - the Max, Min and average results for those runs, the max min and average draw down and the maximum numbers of consecutive losers/winners.
What this thing doesn't do is give you an equity curve for any particular set of trades. It also doesn't account for withdrawals from your account or the possibility of non normal distribution of results (i.e results outside of those calculated are entirely possible).
The thing I've found it most useful for is preparing me for drawdowns and for losing runs - even with quite high win rates the variance in trading is huge and its easy to lose faith in what one is doing when the reality is those losses are simply a normal part of what we all do.
Hope this is of some help.
B.
Attached File(s)
Montecarlo simulator.xlsx
83 KB
|
710 downloads
|
Uploaded Mar 14, 2016 10:11am