- ago
I have been doing a number of Monte Carlo simulations recently and noticed that there is a "significant" (~20%) difference between the positions reported in "Backtest Results -> Metrics Report" and "Backtest Results -> Monte Carlo -> Simulations". At least for strategies which generate a fair number of NSF positions.

For example, if I backtest a strategy as follows;


I get the the following in "Backtest Results => Metrics Report".

Note the "Position Count" and "NSF Position Count"

If I then go to the "Monte Carlo -> Simulations" tab and click Start, I see the following results.

You will see a ~20% decrease in the number of positions during simulation. You will notice that the total number (Positions + NSF Positions) match between the metrics report and the simulations.

Assuming that the Metrics Report has a better idea of the truth. I conclude the Simulations are under-reporting the number of positions taken. Given the relative "sameness" of the Equity Curve and the Equity panel under Monte Carlo, I'm left wondering if the Simulations might be pruning the results under certain circumstances on a day by day basis.

Anyway - FWIW
-sifty

0
105
6 Replies

Reply

Bookmark

Sort
- ago
#1
and another thing....
I discovered this using position sizer "Max Risk % Limited to % of Equity" and confirmed with position sizer Max Equity % and Max Risk %.
0
Cone8
 ( 5.57% )
- ago
#2
You said you switched to Max Risk % sizing for the Monte Carlo simulations (I don't know what Max Equity % is). Max Risk % makes all the difference in the world. The 500 or 600 "missing" Positions just moved over to the NSF column.
0
- ago
#3
Apologies for not being clearer in my description. The screen shots above were all with the "Percent of Equity" position sizer, 10% positions, maximum of 10 total open positions. The same position sizer was used for both the baseline backtest and the Monte Carlo simulation. "Same Date Scramble" was selected as the Method. I choose this to more easily show how either the Metrics Report or the Monte Carlo Simulations are incorrect. The strategy used in the backtest has a minimum hold time of 2 bars and a maximum hold time of 3 bars. So between the position sizer parameters and the strategy, there is not a lot of variability there. A 1000 run simulation showed a variance of 44 positions across the sample. A back of the envelope calculation says I am coming up on 15k total Monte Carlo runs, it has often puzzled me from time to time how many of the Baseline Equity Curves plot *above* the Best Simulation in the Equity Panel. I did not have an answer until last week when I discovered the difference in the number of positions taken by the simulation. There is something going on in there... Let me know if I can provide additional information.
-sifty
0
Cone8
 ( 5.57% )
- ago
#4
Thanks for the info. Looking into it.
0
- ago
#5
I had a chance to poke at this a little more this weekend. The first thing I noticed is that the "Max Open Pos:" and "Max Open Short:" Strategy settings don't appear to carry over to the Monte Carlo simulations. I first backtested the strategy with Percent of Equity = 0.5 and all the Max Opens = 0. Percent of Equity = 0.5 was used to generate the minimum number of NSFs.

Here is the Strategy Settings I used


and the results from this backtest.


Note the Position Count and NSF Position Count. I then ran a 1000 run Monte Carlo simulation, results displayed below.


Note the Positions and NSF, while not exact they are very close. I also displayed the Position Size configurator to show that the configuration carried over from the Strategy Settings. I then went back to Strategy Settings and set the Max Open Pos: = 10. The screen below shows the configuration.


Then ran the backtest again with the following results.


Note that the Position Count decreased and the NSF Position Count increased accordingly. I then ran another 1000 run Monte Carlo Simulation, results displayed below.


You can see that the simulation was configured properly for Max Open Pos: = 10 from Strategy Settings. But it had no effect on the Positions and NSF for this simulation run. I would have expected a significant drop in Positions.

I'm gonna keep poking at it, will post if I find additional info. But thought you might want the tidbit on Max Open's not being applied in the simulator.

0
Glitch8
 ( 10.10% )
- ago
#6
Thanks, appreciate the info! We have this in the list to work on, but I believe the Basic Run should carry over any position size settings. Basic Run have a more lengthy run time, but it performs complete backtests instead of simulations based on the baseline backtest result.
0

Reply

Bookmark

Sort