Back

Questions on Lean Algorithmic Trading Engine

I hope you will forgive my apparent laziness in asking a few basic questions about Lean which will save me endless time and effort?

1) I need order output in txt or CSV format: once a system has been run with the day's data each day, I then need the day's orders output so that they can be manually put on at any given brokerage. In other words a text file or CSV saying: Buy X of ABC stock, sell Y of DEF stock.
Does Lean provide for this?

2) I need to trade multi currency instruments with a portfolio base currency of GBP. The daily P&L for back tests should be given in the chosen base currency and the day's orders in actual trading should also be calculated by reference to the base currency.
Does Lean provide for this?

3) De-listed stocks. In back testing, de-listed stocks need to be sold on the day of de-listing if they are still in the portfolio on that data.
Does Lean provide for this?
Update Backtest








Hi Anthony! In general please post questions about LEAN to the open source google group here. Since these are all relevant to QuantConnect as well I'll answer them here for you :)

1) Orders can be downloaded with the Download Trades button on the result tab.
2) Our FX trades are done as currency swaps and converted back to USD (our system base currency). The profit-loss is in the base currency (USD only for now).
3) Yes we automatically handle liquidating delisted symbols.
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.


Thanks Jared.
Actually, thinking about it I may have been dumb all these years about base currencies and currency conversion. I have yet to explore Quantconnect but it is probably perfectly feasible to handle the base currency problem in an entirely different way and out side of the back tester.

I have been thinking about correlation and covariance between different indices. EG S&P 500 and the Nikkei 225.

You really need to convert to a base currency to make any sense out of it. If you are a dollar investor convert the yen price of the yen index to USD every day.

Thus the back tester will merely handling a single currency.

And actually, take the idea of trend following: people normally assess the magnitude of a trend in the native currency. But if I'm a dollar investor, actually I ought to be considering the Nikkei 225 trend in USD terms.

Say I am a GBP investor not a USD investor. If I convert every time series outside of Quantconnect to a single base currency (GBP in this case) and express orders in percentage terms of total portfolio amount, the back tester will neither know or care what my base currency is.
1

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