Hi there, currently I have to OC my i7-4790K to backtest tick data (Dukascopy >9GB) from 2007 to 2014. It takes me approximately 5 minutes per run while my optimization takes at least 10 days. I was so happy when I came across QuantConnect because I thought that I could speed up my back testing using the cloud. Unfortunately, it is not the case since a single run of FXCM data from 2007 to 2015 takes 2778.23 seconds (46 minutes). I don't know the exact tickdata size of FXCM to compare with Dukascopy; hence, it may not be an apple to apple comparison. Attached are my simple backtest and my code.
65 | 09:01:17 : Backtesting Project ID: 42348
66 | 09:01:17 : Successfully sent backtest request for 'Smooth Violet Goat', (Compile Id: 90ba9292d6a71daedf3f7154c8a2c6b6)
67 | 09:01:20 : Backtest ID: 0034ffcbc1bbe9e25f9b6eb1c5820baa successfully sent to cloud.
68 | 10:01:38 : Algorithm Notice: Memory 754Mb Used of Maxiumum 1024Mb. Try not to store data in your algorithm.
69 | 10:01:39 : Algorithm Id:(0034ffcbc1bbe9e25f9b6eb1c5820baa) completed analysis in 2478.23 seconds
70 | 10:01:39 : Your log was successfully created and can be downloaded from: http://data.quantconnect.com/backtests/9052/42348/0034ffcbc1bbe9e25f9b6eb1c5820baa-log.txt
namespace QuantConnect
{
/*
* QuantConnect University: Full Basic Template:
*
* The underlying QCAlgorithm class is full of helper methods which enable you to use QuantConnect.
* We have explained some of these here, but the full algorithm can be found at:
* https://github.com/QuantConnect/QCAlgorithm/blob/master/QuantConnect.Algorithm/QCAlgorithm.cs
*/
public class BasicTemplateAlgorithm : QCAlgorithm
{
//Initialize the data and resolution you require for your strategy:
public override void Initialize()
{
//Start and End Date range for the backtest:
SetStartDate(2007, 4, 1);
SetEndDate(DateTime.Now.Date.AddDays(-1));
//Cash allocation
SetCash(25000);
//Add as many securities as you like. All the data will be passed into the event handler:
AddSecurity(SecurityType.Forex, "EURUSD", Resolution.Tick);
}
//Data Event Handler: New data arrives here. "TradeBars" type is a dictionary of strings so you can access it by symbol.
public void OnData(TradeBars data)
{
// "TradeBars" object holds many "TradeBar" objects: it is a dictionary indexed by the symbol:
//
// e.g. data["MSFT"] data["GOOG"]
if (!Portfolio.HoldStock)
{
int quantity = (int)Math.Floor(Portfolio.Cash / data["EURUSD"].Close);
//Order function places trades: enter the string symbol and the quantity you want:
Order("EURUSD", quantity);
//Debug sends messages to the user console: "Time" is the algorithm time keeper object
Debug("Purchased EURUSD on " + Time.ToShortDateString());
//You can also use log to send longer messages to a file. You are capped to 10kb
//Log("This is a longer message send to log.");
}
}
}
}
Jared Broad
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.
Uncle bob
Uncle bob
Jared Broad
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.
Uncle bob
Uncle bob
Jared Broad
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.
Uncle bob
namespace QuantConnect { /* * QuantConnect University: Full Basic Template: * * The underlying QCAlgorithm class is full of helper methods which enable you to use QuantConnect. * We have explained some of these here, but the full algorithm can be found at: * https://github.com/QuantConnect/QCAlgorithm/blob/master/QuantConnect.Algorithm/QCAlgorithm.cs */ public class BasicTemplateAlgorithm : QCAlgorithm { //Initialize the data and resolution you require for your strategy: public override void Initialize() { SetStartDate(2007, 4, 1); SetEndDate(DateTime.Now.Date.AddDays(-1)); SetCash(25000); AddSecurity(SecurityType.Forex, "EURUSD", Resolution.Tick); } public void OnData(TradeBars data) { if (!Portfolio.HoldStock) { int quantity = (int)Math.Floor(Portfolio.Cash / data["EURUSD"].Close); //Order function places trades: enter the string symbol and the quantity you want: Order("EURUSD", quantity); //Debug sends messages to the user console: "Time" is the algorithm time keeper object Debug("Purchased EURUSD on " + Time.ToShortDateString()); //You can also use log to send longer messages to a file. You are capped to 10kb //Log("This is a longer message send to log."); } } } }
Jared Broad
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.
Uncle bob
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!