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.
Don't have an account? Join QuantConnect Today
QuantConnect Community Discussions
QUANTCONNECT COMMUNITY
LEAN is the open-source algorithmic trading engine powering QuantConnect. Founded in 2012 LEAN has been built by a global community of 180+ engineers and powers more than 300+ hedge funds today.
Join QuantConnect's Discord server for real-time support, where a vibrant community of traders and developers awaits to help you with any of your QuantConnect needs.
The Open-Quant League is a quarterly competition between universities and investment clubs for the best-performing strategy. The previous quarter's code is open-sourced, and competitors must adapt to survive.
Trading CFDs with IB on QuantConnect possible? Leverage advantage sought with AAPL CFDs instead of stocks.
Continue ReadingRefer to our Research Guidelines for high quality research posts.
Create an account on QuantConnect for the latest community delivered to your inbox.
Sign Up Today
|
|
|||||||
|
|
||||||||
|
CFD´s on IB
SenseQuant | EnriqueAlvarez | January 2017
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.
QuantConnect™ 2025. All Rights Reserved
Alexandre Catarino
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.
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.
SenseQuant
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?
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.
Stefano Raggi
@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.
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.
Liu Jin
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!
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.
Jack Simonson
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.
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.
Liu Jin
Hi Jack,
Thank you for your answer. Are there any news about making CFDs available for trading on IB?
Also, are there specific problems with handling CFDs on IB? I would be interested in implementing it myself if it's not on your roadmap, so I would like to understand how hard it is and if there are any exceptions/problems to be aware of and for which IB CFDs are not tradable yet.
Thank you!
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.
Jared Broad
There are no plans to implement this with IB in the near future. Please review FXCM/OANDA CFD's for an idea of the difficulty. It should be about 40-80 hours of work.
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!