"Best Practice" to backtest a dynamic portfolio strategy?

Questions about MultiCharts .NET and user contributed studies.
novaleaf
Posts: 49
Joined: 17 Apr 2014
Has thanked: 9 times
Been thanked: 4 times

"Best Practice" to backtest a dynamic portfolio strategy?

Postby novaleaf » 20 Apr 2015

Hello,

I am trying to put together my first "real" backtest, and would appreciate some help on figuring out how to design the system:

For each day, I have about 100 ASCII files containing minute-bar data for stocks deemed "interesting" by an external process (SEC filing data/etc). This selection changes for each day (so for 1 year, I have about 26,000 files). I can load these into the QuoteManager via ASCII import.

For each security, I should be able to use standard MAVG style indicators to determine if I wish to buy and sell each.

How to best backtest this? I am thinking I should use the Portfolio Trader system, but can I somehow dynamically modify my instrument listing based on the backtest date?

Thank you.

User avatar
ABC
Posts: 626
Joined: 16 Dec 2006
Has thanked: 119 times
Been thanked: 355 times
Contact:

Re: "Best Practice" to backtest a dynamic portfolio strategy

Postby ABC » 21 Apr 2015

novaleaf,

what about simply excluding symbols from your code calculations depending on the date?
So for example you have a list of 1000 symbols in the Portfolio Trader and each day your code would read a list of symbols to use for that particular day. If a symbol is not in this list you would stop further code computations after the initial "if currentsymbol is contained within the list" check.

Regards,
ABC

novaleaf
Posts: 49
Joined: 17 Apr 2014
Has thanked: 9 times
Been thanked: 4 times

Re: "Best Practice" to backtest a dynamic portfolio strategy

Postby novaleaf » 21 Apr 2015

Hi ABC,

Thank you so much for the suggestion! I'm a bit worried that loading up 25k unused securities might have a performance hit... However I can't figure out a better approach in my stabs at the documentation, so I will try your approach.

I will write back informing if it turns out to be (in)feasible!


Return to “MultiCharts .NET”