Hi,
I have a bold plan to create a workaround (and fork) for Lean to support my EUR account with IBKR (Disclaimer: I am a C# coder) as long as the internationalization feature is not finished. I have a subaccount with IBKR that is EUR only. The goal is really to just support the use case: "IBKR, EUR account, trade equities available via IBKR (which includes non-US ones)". My fork would ignore other Brokerages for now.
On first glance, just search&replacing "USD" with "EUR", plus a few adaptions should be possible. With QuantConnect.Market.Add("eur", 30) I can add the euro exchanges and e voila ( I guess its not THAT simple ;))
My question is a general one: I assume the complexity of the internationalization feature comes mainly from handling multiple currencies in a single account, support multiple brokers, etc. am I correct? Maybe you can give me a little heads up before I jump into the deep end and find out about the massive other issue(s) that prevent this from becoming reality.
Thx (& also for open sourcing this gem of a software)
Jared Broad
It should just be SetAccountCurrency("EUR") but Stefano Raggi can comment more here. We don't officially support it yet due to the risks in live trading but it is built into LEAN.Â
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
IB EUR accounts should already be supported in live trading, if the IB base currency is EUR, LEAN automatically sets the AccountCurrency to EUR:
https://github.com/QuantConnect/Lean/blob/master/Engine/Setup/BrokerageSetupHandler.cs#L206
To trade US equities, there should be no other LEAN changes required.
For non-US equities, these changes would be required:
- add new markets to Market.cs
- add entries to the symbol properties database
- add entries to the market hours database
As an example/reference, you can have a look at this open PR which adds a few Indian markets (with a new brokerage implementation):
https://github.com/QuantConnect/Lean/pull/4873
Amit Arora
So after making the above changes for non-US equities and options, what does one do? Is lean desktop still supported? Would I be able to use this for backtesting on lean desktop? Or will it be helpful for live paper trading and live trading only? Also, do you recommend we check these changes in to the GitHub repository?Â
Amit Arora
Follow up question. Just looking at the quant connect pricing tiers it seems the trading firm tier has the following:
Â
LEAN Version Control
Use custom versions of LEAN in the QuantConnect web IDE.
Does it mean, that with the trading firm pricing tier, it may be possible to make above changes for non US equities and options and use THAT version of lean with lean CLI / and local data to backtest strategies on nonUS equities Â
Alexandre Catarino
Hi Amit Arora ,
Would you please check out Lean CLI for local development? It includes a GUI that has replaced Lean Desktop.
Once you made the changes in your local copy of Lean, you will use the command:
> lean build
to create a new image with the changes that will be used for backtesting, research, and live trading.
On the question about the Lean version control:
QuantConnect creates a branch in Lean repository, and will accept the pull requests to that branch. This branch will be available on the Algorithm Lab for your organization with the Trading Firm tier.
However, since QuantConnect doesn't have non-US Equity and Options, it will not serve your purposes.
Please contact support@quantconnect.com if you have further questions.
David
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!