Back

Any limitation on time duration for bacttest?

I have set backtest period to 2010 to 2019.  Backtest stops after around 2012.  Data resolution is Hour.  Broker OandA.

Following is part of my initialize routine, 

 

self.symbols = ["EURUSD", "EURGBP", "GBPUSD"]
self.ShortPairs = ["EURUSD", "EURGBP", "GBPUSD"]
# self.symbols = ["EURUSD"]
# self.ShortPairs = ["EURUSD"]
PairsCount30 = len(self.symbols)

self.SetStartDate(2010, 12, 3) #Set Start Date
self.SetEndDate(2019, 12, 6) #Set End Date
self.SetCash(PairsCount30 * 10000) #Set Strategy Cash
self.fxPairs = {}

 

what am I missing?  

 

Thanks.

Update Backtest







0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


What resolution are you using? I once tried running a bactest at Minute resolution over several years. It ran overnight and stopped about 24 hours later.

1

Hey there! The limit is 12 hours; minute resolution runs fine for up to about 5000 symbols depending on the amount of RAM and programming language (and algorithm!). Please post an algorithm example to debug any issues you see. 

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Quote from Docs :

Because of vendor limitations free users are capped to 10kb of logs per backtest, with a maximum of 3Mb per day. 

Could this be an issue with mycase?  Since, it is my firrst algo and I am new to QC, I log extensively.  My downloaded backtest log txt file size is more than 4 Mb

I am running backtest with Hour resolutuon and 3 currency pairs.

 

1


What will happen if I get disconnected after starting very long running backtest?  Does it continue to run? If yes, how do I get back to that periously running backtest?

0

Backtests run if the browser is open or closed
0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


how do I get back to that periously running backtest?

Any idea, what could be resons for stopped backtest?  I had set end date to dec-2019.

0

Another Sample of stopped backtest..  This time, there were three currency pairs and time period was 3-dec-2018 to 26-dec-2019

Log::

2018-12-03 00:00:00 :Launching analysis for d05f25dad857b411845ca0565a5fef80 with LEAN Engine v2.4.0.0.70352019-06-11 04:00:00 :Algorithm StoppedYou currently have a:maximum of 10kb of log data per backtest, and 3072kb total max per day.Please upgrade your account and contact us to request more allocation here: https://www.quantconnect.com/contact
0


Even after waiting for more than 24 hours and not using self.LOG() even once, when I ran that same backtest. with the same settings, it stopped after approximately 6 months time period.

Just noticed that all the times, backtest stopped just before number of orders approched 10000.  Every time, it stopped when number of orders became between 9950 and 9999.  I tried setting my algo parameters(in such a way that generate less number of orders) and number of currency pairs between 1 and 21 and period from 2004 to 2019.  For all permutations and combinations, it never crossed 10000 for number of orders.  It went upto 9998 once but never crossed 10000.

Less numer of currency pairs, more the time period it ran for.

Is there a glass ceiling of maximum 10000 orders per backtest?

      
0

Yes this is shown in the logs normally. Free accounts are capped at 10k

orders.
1

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed