NexusFi: Find Your Edge


Home Menu

 





Multi Instrument / Portfolio Strategy Backtesting Problem


Discussion in NinjaTrader

Updated
    1. trending_up 3,597 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

Multi Instrument / Portfolio Strategy Backtesting Problem

  #1 (permalink)
 wuileng 
Kuala Lumpur + Malaysia
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: ES
Posts: 26 since Aug 2012
Thanks Given: 13
Thanks Received: 9

Hi,

I'm currently looking at a few stock rotation strategies which involve many instruments and am having some problems with backtesting. So far, NT support has not been any help, and I'm not sure if there are any better ways to approach this.
OnBarUpdate is not fired in Multi Instrument [AUTOLINK]Backtest[/AUTOLINK]. - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

Basically, I'd like to take the current Russell 1000 and backtest my rotation/portfolio strategy on a large chunk of 2000-2015. However, NT does not call OnBarUpdate() until there is data for all added instruments, even if code has been put in to avoid out of bounds errors.

What this means is any stock which has IPO'd or has been spun-off since 2000 has to be manually removed from the list of added instruments before the strategy will run at all, or if I leave all the instruments there, I end up with a really really short backtest. Removing the instrument from the strategy is simple enough, but finding a list of instruments I need to remove is more of a pain.

Does anyone know of any solutions/workarounds or is NT just not the right tool to be using for this?

Thanks in advance!

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Cheap historycal L1 data for stocks
Stocks and ETFs
NexusFi Journal Challenge - May 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
How to apply profiles
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
What is Markets Chat (markets.chat) real-time trading ro …
72 thanks
Spoo-nalysis ES e-mini futures S&P 500
55 thanks
Just another trading journal: PA, Wyckoff & Trends
29 thanks
Bigger Wins or Fewer Losses?
24 thanks
The Program
16 thanks
  #2 (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,103

In order to have a valid backtest, you will need to remove the instruments with incomplete data sets anyhow.

I do not think that there is a short cut for the problem.

Also NinjaTrader may not be the best tool for running portfolio backtests on a large number of instruments.

I would wait for NinjaTrader 8 and then see whether portfolio backtesting has been simplified.

Reply With Quote
Thanked by:
  #3 (permalink)
 emini_Holy_Grail 
Dallas,TX
 
Experience: Intermediate
Platform: NinjaTrader, OpenQuant
Broker: Zaner/Zen Fire
Trading: ES,6E,6B,GC,CL
Posts: 597 since Nov 2009
Thanks Given: 176
Thanks Received: 126



wuileng View Post
Hi,

I'm currently looking at a few stock rotation strategies which involve many instruments and am having some problems with backtesting. So far, NT support has not been any help, and I'm not sure if there are any better ways to approach this.
OnBarUpdate is not fired in Multi Instrument [AUTOLINK]Backtest[/AUTOLINK]. - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

Basically, I'd like to take the current Russell 1000 and backtest my rotation/portfolio strategy on a large chunk of 2000-2015. However, NT does not call OnBarUpdate() until there is data for all added instruments, even if code has been put in to avoid out of bounds errors.

What this means is any stock which has IPO'd or has been spun-off since 2000 has to be manually removed from the list of added instruments before the strategy will run at all, or if I leave all the instruments there, I end up with a really really short backtest. Removing the instrument from the strategy is simple enough, but finding a list of instruments I need to remove is more of a pain.

Does anyone know of any solutions/workarounds or is NT just not the right tool to be using for this?

Thanks in advance!

I use NT and Multicharts which has a great portfolio backtester, is called Portfolio trader
you can create your instrument list and run test with strategies

Reply With Quote
Thanked by:




Last Updated on July 4, 2015


© 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