Hi,
I would like to import some data for ICE futures, which are not supported by QC at the moment. I read how to import data on lean website , but I it is no clear to me how to load the data into a future object, in particular how can the multiplier be set ?
I looked at the future class source code , but I dont see any attribute for the multiplier, so it is not clear how QC is accessing this information, which is required to properly back-test future strategies. According to this link there was no support for custom data import, apparently not just for futures. Is the situation changed? This question is general, not just for futures.
Thanks
JC
Johnny Cash
After digging a bit in the class documentation, I found this , so it a property inherited from the security class.
The addfuture constructor is not taking this property object as an argument. I checked some codes importing custom data using future objects, but they did not set the contractmultiplier, so I am quite confused.
In this library strategy code for example, data is imported using adddata, and the contract multiplier is not set anywhere. How can this data be used to backtest a future strategy if the multiplier is unknown to QC? Adddata returns a security object, so it should be possible to set it, but it is not done.
Note that I am not interested in quandl data, I have my own local custum csv data files , I have a general question about how to properly import future data, setting correctly the contractmultipler property inherited from the security class, which I think QC uses to correctly compute P&L.
PS
By the way, the quandl data import implementation is not compatible with SCF data, which is using tables, a data format/call different from the one assumed by the quandldata class, which is using https://www.quandl.com/api/v3/datasets/{config.Symbol.Value}.csv?order=asc&api_key={_authCode}.
I do not really care about this, since I use other local data, but I just mention it here, since SCF is the only updated futures data on quandl, after wiki has been discontinued, and it includes several markets not served by QC, but available with different brokers interfaced with QC.
Varad Kabade
Hi Johnny,
Please go through the following thread as a starting point for the above implementation. We also recommend going through the following docs on importing custom data.
Best,
Varad Kabade
Johnny Cash
Hi,
this is not what I am asking. I know how to import custumdata.
The question is how to do it for futures, in particular how to trade using margins and leverage.
Does the margin model allow to set these properties for imported futures data?
You have an example of an algorithm using imported futures data and trading correctly on margins?
Thanks
Louis Szeto
Hi Johnny
You may have a look on the way LEAN add Futures.
That way you can run the future just like the ones already in QC's support in local backtest.
Best
Louis
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.
Johnny Cash
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!