Back

CFD´s on IB

Is it possible to select and trade CFD´s, instead of normal stocks, with an IB trading account connected to QuantConnect?

For example I want sometimes to trade AAPL CFD´s contracts, to get advantage of the levarage, instead of normal stocks.

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.


QuantConnect supports CFDs.
If there is any other restriction, it would be at the brokerage side.

IB has a restriction on CFD trading:

All clients (excluding residents of the US, Canada, Hong Kong, Israel and Australia) enjoy electronic access to IB CFDs, OTC products that let you trade the difference between the current and future price of a share, an index or a currency-pair.

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.


Ok, but how should I code the selection of a CFD opposite to the stock. I mean, if I want to trade AAPL CFD, when I send an order (i.e. Order("AAPL",  100); ) how do I make the difference between sending a CFD or Stock order?

0

@EnriqueAlvarez,
although the CFD security type is implemented in the LEAN engine, CFD trading is currently only supported with Oanda and FXCM.
The IB brokerage implementation does not support CFD trading for now.
Equities and FX are supported now, Futures and Options will be supported very soon.

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.


Hi Stefano,

I would also be interested in trading CFDs on IB. Do you know if there is any plan to add support for this? It would be totally fine having to perform the backtest on the real underlying security, but I would need to send the order in live mode on the CFD instead that on the underlying.
If there is no support/no plan to add such support, isn't there a possibility in QC to send an order using some "raw" security identifier retrieved directly from the broker?
Thanks!

1

Hi Liu,

We hope to enable CFD trading via Interactive Brokers sometime in the future but we can't provide a timeline right now. Additionally, it is not possible to send orders in the manner you are referring to. We don't enable direct interaction like that with the brokerage, and so anything that lies out of the scope of LEAN is not possible in an algorithm.

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.


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