Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I want to backtest several trading systems on multiple instruments, Stocks listed in the OMXS30 (Swedish index). I want this to be simulated like "real" trading, and therefore I want to limit the positions open at any given time. The most simple case would be testing only one trading system, that maybe generates 100 buy signals per year in total for ALL the 30 stocks and keep ONE position open at most at any given time. So I want something like this:
Iterate through all X open positions to see if any of them should be closed.
Check if we have any of the N available positions to fill, if so: continue
Iterate through all stocks and check if any of the M models generates a buy signal. Continue till all positions are filled or the iteration is completed.
All softwares I tried supported backtesting only with individual results for each stock. I want to do a little bit more of a realistic approach where Time-In-Market and all stocks are taken into account. It would be nice to prioritize the models as well.
Is there any software out there capable of this?
Best Regards,
diamondfish
Can you help answer these questions from other members on NexusFi?
It's possble with NInjaTrader, with a single strategy using multiple instruments.
As the OMX has only 30 instruments, with a good coding methodology the code should not be too ugly, and fast enough.
Some other software should be able to do something similar, I can't say for sure.
I've only used NT very briefly. How would this be set up for let's say a simple moving average strategy? Is there any code examples I could use? How do I backtest? (In NT I've only selected the instruments I want, and got individual results for each of them).
There is already a multi-instruments strategy installed by default, so you can take a look at it.
In few words, it's easy, there is already a lot of examples on futures.io (formerly BMT), and you'll easily find some help.
Of what I can see it's easy to add instruments to compare the active instrument to. But EnterLong() and other exit/entry functions only uses the active instrument, right? The one added to the backtest through the GUI. To perform a multi-instrument backtest as I described, I then need to create 30 backtest strategies? Perform each and everyone on all stocks, and then add all results together for the cumulative backtest. But I won't get any equity chart etc. So to me it doesn't seem that easy
I'm not an elite member on futures.io (formerly BMT), so maybe that's why, but I didn't find any multi-instrument strategies on futures.io (formerly BMT) that helped me with what I want to do. If anyone has any more tips and/or can guide me towards more information, I'm very grateful.