Hey All
I'm about to go live on IB but I was hoping to clear these doubts with your help:
- IB account base currency VS Quantconnect algo: My IB account base currency is GBP but most of the funds are held in USD. Do I need to convert all the funds to USD or change my base currency to USD before connecting my algo to IB. Or QC can handle this configuration as is?
- Controlling Allocation: Say I have 10K USD in IB and I allocate to 5 equities using this method:
self.SetHoldings([PortfolioTarget(self.first, 0.10), PortfolioTarget(self.second, 0.10), PortfolioTarget(self.third, 0.10), PortfolioTarget(self.fourth, 0.10), PortfolioTarget(self.fifth, 0.10)])
Does this mean only 5K of the funds will be allocated?, which is what I'm trying to do.
Look forward to your replies
Cheers
V
Mia Alissi
Hi Varun,
Regarding your first question, QuantConnect's LEAN engine, which powers the trading algorithms, handles currency conversions automatically. If you are trading US equities, you do not need to worry about changing the currency to USD; LEAN takes care of it source. However, as of January 2020, it was only possible to use USD as the account currency for live trading with Interactive Brokers source.
For your second question, the
SetHoldings
method sets the target percentage of your portfolio to hold a particular security. If you set 0.10 for each of the five equities, it means you are targeting to allocate 10% of your total portfolio value to each equity. So, if you have 10K USD in your account, it would aim to allocate 1K USD to each equity, not 5K. Here is the code you provided for reference:Please note that during live trading with supported brokerage paper/demo accounts, statements like
SetCash
are ignored. Those statements are exclusive to backtesting, except forSetCash
in QC paper trading. During live trading with brokerages, your account value will be used as your initial cash balance source.I hope this helps! Let me know if you have any other questions.
Best,
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.
Varun uppal
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!