NexusFi: Find Your Edge


Home Menu

 





Ninja Trader Monte Carlo


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 4 posts (15 thanks)
    2. looks_two Xeno with 3 posts (2 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 tigertrader with 1 posts (1 thanks)
    1. trending_up 4,400 views
    2. thumb_up 18 thanks given
    3. group 3 followers
    1. forum 8 posts
    2. attach_file 0 attachments




 
Search this Thread

Ninja Trader Monte Carlo

  #1 (permalink)
 Xeno 
UK
 
Experience: Intermediate
Platform: Ninja
Broker: Mirus/Zen
Trading: Futures - bonds, currencies, index
Posts: 288 since Oct 2010
Thanks Given: 70
Thanks Received: 274

Have a look at the description of Ninja's Monte Carlo here (from around post 8):

Understanding Monte Carlo - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

Does anyone think this method tells you anything useful about your backtest?

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Increase in trading performance by 75%
The Elite Circle
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
27 thanks
Diary of a simple price action trader
26 thanks
Tao te Trade: way of the WLD
23 thanks
My NQ Trading Journal
14 thanks
HumbleTraders next chapter
9 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102



Xeno View Post
Have a look at the description of Ninja's Monte Carlo here (from around post 8):

Understanding Monte Carlo - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

Does anyone think this method tells you anything useful about your backtest?


If you have limited data available a Monte Carlo Simulation (fancy word) can be used to increase the reliability of your backtest.

This is what the Monte-Carlo-Simulation does: Let us assume that your backtest includes 200 trades. Then the Monte-Carlo-Simulation will pick 200 trades out of the sample at random (this means that typically some trades will be picked several times and some not at all) and then repeats the exercise N times. This will result in N different equity curves, which will give you an indication of the robustness of your backtest.

Advantages:

If your strategy is curve-fitted, it is likely that it will not pass the Monte-Carlo-Simulation very well, as some of the N equity curves will not include the (probably few large) trades that the strategy has been fitted to. So it is a simple, but effective tool to avoid curve-fitting.

Disadvantage:

If your trades are positively or negatively correlated - this could be the case if you use pyramiding and each of the consecutive trades is counted as a separate trade - the Monte-Carlo-Simulation should not be used. It is a tool that only can be used if the outcome of a trade is independent from the outcome of the prior trade(s).

There is an excellent - and quite simple to understand - book on backtesting, which includes the use of Monte-Carlo-Simulation to avoid curve fitting:

https://www.amazon.com/Trading-Systems-Optimisation-Portfolio-Construction/dp/1905641796/ref=sr_1_1?ie=UTF8&s=books&qid=1302615076&sr=8-1

Reply With Quote
  #4 (permalink)
 
tigertrader's Avatar
 tigertrader 
Philly, Pa
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader
Trading: ES, ZB
Posts: 6,482 since Jul 2010
Thanks Given: 6,662
Thanks Received: 36,258


Fat Tails View Post

There is an excellent - and quite simple to understand - book on backtesting, which includes the use of Monte-Carlo-Simulation to avoid curve fitting:

Amazon.com: Trading Systems: A New Approach to System Optimisation and Portfolio Construction (9781905641796): Emilio Tomasini, Urban Jaekle: Books

I would like to spend about a month in your library....

Follow me on Twitter Reply With Quote
Thanked by:
  #5 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


tigertrader View Post
I would like to spend about a month in your library....

It is all real printed books. In earlier times, when I left home, I took some food with me. This is no longer necessary, as I am already carrying some weight around. Also food is available everywhere. But there is a real risk that you starve from boredom, when not at home. A good book is the best insurance. Currently reading

Amazon.com: Predictably Irrational, Revised and Expanded Edition: The Hidden Forces That Shape Our Decisions (9780061353246): Dan Ariely: Books

It is a fun read. But has nothing to do with Monte-Carlo Simulation. Sorry for being off-topic.


Reply With Quote
  #6 (permalink)
 Xeno 
UK
 
Experience: Intermediate
Platform: Ninja
Broker: Mirus/Zen
Trading: Futures - bonds, currencies, index
Posts: 288 since Oct 2010
Thanks Given: 70
Thanks Received: 274

OK, thanks for the replies. If I have a 1000 trade backtest which is curve fitted, and a 1000 trade backtest which isn't. Let's say for the sake of argument, that they have identical result profiles, and let's say each trade's P&L is the same absolute amount. Monte Carlo is going to give pretty much identical results between them right?

If I have a profitable strategy with 30% success because it hangs on to the few big wins very well, Monte Carlo is going to be all over the place right?

I guess I'm asking if there is a class of performance types for which Monte Carlo will tell you useful info, otherwise it's not so useful?

Started this thread Reply With Quote
Thanked by:
  #7 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Xeno View Post
OK, thanks for the replies. If I have a 1000 trade backtest which is curve fitted, and a 1000 trade backtest which isn't. Let's say for the sake of argument, that they have identical result profiles, and let's say each trade's P&L is the same absolute amount. Monte Carlo is going to give pretty much identical results between them right?

If there are no outliers in terms of P&L, it is difficult to do curve fitting, you will need a lot of parameters.



Xeno View Post
If I have a profitable strategy with 30% success because it hangs on to the few big wins very well, Monte Carlo is going to be all over the place right?

I guess I'm asking if there is a class of performance types for which Monte Carlo will tell you useful info, otherwise it's not so useful?

The 30% success rate is not yet the problem, but let us assume that you do not have 1000 trades, but just 100. And let us further assume that the 30 profitable trades are dispersed and that a few of them make up for more than half of all profits, which could be the equivalent of the net profits. Then a Monte-Carlo-Simulation may well pick a combination of trades which is not profitable at all. The dispersion of the equity curves will show that the strategy is not robust, but that the P&L has relied on a few good trades, which may well have been random.

Reply With Quote
  #8 (permalink)
 Xeno 
UK
 
Experience: Intermediate
Platform: Ninja
Broker: Mirus/Zen
Trading: Futures - bonds, currencies, index
Posts: 288 since Oct 2010
Thanks Given: 70
Thanks Received: 274

Thanks. I see what you mean. I can see its use in that case.

I tend to scan through my trades anyway, since you get a better feel for what's going on, and I suppose I've always been wary of a few big trades in testing.

Started this thread Reply With Quote
Thanked by:
  #9 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Xeno View Post
Thanks. I see what you mean. I can see its use in that case.

I tend to scan through my trades anyway, since you get a better feel for what's going on, and I suppose I've always been wary of a few big trades in testing.


The main point of Monte-Carlo-Simulation:

You get more information out of your sample without increasing sample size, so you can actually save part of the sample for the walk-forward-analysis.

What Monte-Carlo can not do:

If your entire sample has been collected in a trending market, and your real trading hits a range bound market, you may suffer from a losing streak, even if the sample size exceeded 1,000. And obviously Monte-Carlo could not predict this, but would have indicated robustness. So choosing the right sample period is not only a question of sample size and curve fitting, but also a question of common sense.

Reply With Quote




Last Updated on April 12, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts