Hi,
I'm testing an intraday strategy in the portfolio backtester, using the 500 symbols of the S&P500, for the period 2009-2012.
The portfolio backtester takes a long time (more than an hour) to load all this data (from my local database), and the actual backest takes only a few seconds, because there are only 40 days satisfying my entry criteria.
I was wondering if there is a way to tell the backtester (via powerlanguage, I assume) to load and run only the specific days I need, to save a lot of time.
Thanks a lot
Andreas
Portfolio backtester to load intraday data of specific days [SOLVED]
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Portfolio backtester to load intraday data of specific d
Hello moses,
If you know which particular dates you need you can create a condition based on those dates and put is as head condition for the whole script.
Do you load tick data? When you said "from my local database", did you mean from MultiCharts database? What is the data source in QuoteManager for the loaded symbols?
If you know which particular dates you need you can create a condition based on those dates and put is as head condition for the whole script.
Do you load tick data? When you said "from my local database", did you mean from MultiCharts database? What is the data source in QuoteManager for the loaded symbols?
Re: Portfolio backtester to load intraday data of specific d
Thanks for the fast reply Andrew.
I do know the specific dates, but even if I put them in the script, it seems to me that the portfolio backtester still loads ALL the data in the range that you have to put in the program's tab.
So, if for example I need to test the dates 1st Jan 2009, 1st Jan 2010 and 1st Jan 2011:
a. I will include these specific days in the script, so that's ok.
b. but I will also need to provide a date range in the portfolio backtester itself, which should be 1/1/09 - 1-1-11. When I do this, the program will start loading the whole 2 years of data before it even goes to the script to see my 3 dates.
If what I note above is correct, then this solution doesn't work, it seems.
(I load minute data (not tick data), and yes, I mean the Multicharts database (I wanted to mean that the delay doesn't come from the internet).
Thank you
Andreas
I do know the specific dates, but even if I put them in the script, it seems to me that the portfolio backtester still loads ALL the data in the range that you have to put in the program's tab.
So, if for example I need to test the dates 1st Jan 2009, 1st Jan 2010 and 1st Jan 2011:
a. I will include these specific days in the script, so that's ok.
b. but I will also need to provide a date range in the portfolio backtester itself, which should be 1/1/09 - 1-1-11. When I do this, the program will start loading the whole 2 years of data before it even goes to the script to see my 3 dates.
If what I note above is correct, then this solution doesn't work, it seems.
(I load minute data (not tick data), and yes, I mean the Multicharts database (I wanted to mean that the delay doesn't come from the internet).
Thank you
Andreas
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Portfolio backtester to load intraday data of specific d [SOLVED]
Right, it will load all data. You can export only particular dates from QuoteManager and import them back to an artificial symbol as a sort of workaround. If the Download Data Before Backtesting is not checked in Portfolio Backtester, it will calculate your strategy only on available dates that would be the ones you exported.