Back

I am new to QuantConnect - Question about Slice

I just joined QuantConnect and was wondering where I could find more details on the Slice object? In general, what is the easiest way to find documentation on any object or type in the API?
Update Backtest








The public docs can be found here. If you're comfortable with reading source code, you can see the Slice object here. The Slice object is a newer feature and hasn't made it's way into the docs yet, but we're currently in the process of making the docs current and much better!

My opinion on the Slice object:
The Slice object is great because it holds all of your data for a given moment in time. This allows trade bar, ticks, and custom data to all be handled within the same method: OnData(slice).
Even going further, it also allows for other various events to be received in your OnData(Slice) method, such as Dividends, Splits, and Delistings.
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.


Just to add some information:

There seem to be two different documentations for LEAN (the engine that does the backtesting&Live-Trading):

The more complete version is located here. You can find Slice object here.

There also is a more moderate documentation, you can browse it in the "Help" section (on the very left side, under "My Projects"). This one is rather old, the OnData method is not even listed (OnTick has a reference to it tho).

Since LEAN is in developement right now, the documentation might be lagging behind, especially the one in the help section.

The newer LEAN documentation might include some objects that are not yet available in the QuantConnect online platform, eg Universe selection.

IMO, if you want to understand what you can do in LEAN, it is neccessary to take a stroll through the sourcecode of LEAN anyways. The documentation is just kind of a short version for reference and understanding the structure a little better.

You can always follow the development on github.
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