Which Monte Carlo Lab settings would run my strategy hundreds of times?
Author: 4scott
Creation Date: 8/2/2011 4:45 PM
profile picture

4scott

#1
The strategy I have developed often produces more alerts than my position size allows. As I understand it, in its backtesting WL randomly picks the symbols (stocks) that will be included in a particular run. If I run the strategy many times, the selected stocks will of course vary. The outcome in profit/loss etc. will also vary as a result.

I could sit there and run the strategy hundreds of times to get an idea of the most likely profit in, say, a year. But having the Monte Carlo feature do it for me would of course be much easier.

I can't see anything in the settings that would simply run my strategy, or simulate running the strategy, hundreds of times. There are all kinds of fancy options, but I just want to run the same simple strategy over and over again and then have the results compiled.

What, if any, Monte Carlo settings would allow me to do this?
profile picture

Cone

#2
CODE:
Please log in to see this code.
That's correct as long as you do not assign Position.Priority. Find Priority in the QuickRef (F11).

CODE:
Please log in to see this code.
MC-Lab doesn't re-run the strategy. Rather, apart from the ability to scramble the equity curve, generally the operation is to take all of the raw trades (even the ones that have been rejected), scrambles them so that any trade can land on any date, and then it re-creates the simulation. The fancy options allow you inject more randomness into the trades themselves or to constrain the dates that the trades land on. For more insight, I've recently gone through all the options in a very detailed discussion with another use right here.

The option that you're looking for (I think) is the ability to produce new backtest results by randomly picking from the different trades on the same date. This was discussed in that link on 7/5/2011 10:29 AM. Basically, since this option wouldn't be of any use for backtests that didn't have many rejected trades, it wasn't conceived in the MC-Lab design. Nonetheless, we're looking into incorporating it now.
profile picture

4scott

#3
Thanks, Cone. Until the MC code is modified, I may try doing it by exporting the raw data to a spreadsheet, and then programming the spreadsheet. If, for a simple example, my system allowed 5 buys per day, and if the raw list produced, say, 12 buy alerts on some days, the spreadsheet would randomly pick 5 from that list of 12. Running it many times would create various profit/loss results.

The hardest part (for me) would be to create an Excel routine that compiles each run's data into one final significant report. Hard meaning although it's complicated I think I could do it. But since I'm not doing this as a game or challenge...but as a means of improving on investments, having WL's MC do it for me would really be neat.

profile picture

Cone

#4
Like I said, we're going to look into it. In the meantime give MC-Lab a try using Trade Scramble and Maintain Date Clustering. Give it at least 500 runs, preferrable more.

Pay attention to the mean, but also the outliers (the best and worst cases). In my experience, a trade scramble even with date clustering tends to smooth the equity curve too much. It makes sense why this is the result, and for that reason I'm also interested to see the distribution results of the "less-random scramble" method presented in MC-Lab.
profile picture

4scott

#5
I just gave it 1000 runs with the two settings you suggested, and as before the results in "Probabilities"* are much higher than what is typically reported in "Performance" when I run the strategy in a Wealth-Lab portfolio situation. In other words, it is not at all what would happen if my strategy were simply run many times in WL with the results compiled into percentage probabilities.

*by results in "Probabilities" I mean if I look to see what is likely to happen 90% of the time. The percentage is way too high. I am not going to get a 75% profit 90% of the time.
profile picture

4scott

#6
As for outliers, the worst case is 64%.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).