Quantopian 2: The Universe Removed

In Quantopian 1, your tradeable universe was a set of securities that your algorithm defined and considered each day. The tradeable universe was defined by your pipeline output, get_fundamentals, explicitly listing securities by hand, etc. All securities in your tradeable universe were added to the data object, and it was common practice to iterate through data to check your tradeable securities. The number of securities you could add to data was quite limited.

Quantopian 2 removes the concept of the tradeable universe and makes pricing and volume data available for all securities at all times. The data object is no longer an iterable containing your securities; it is now an object containing several API functions including current(), history(), can_trade(), and is_stale().

Since you can no longer iterate over the implicitly defined tradeable universe, you should now be keeping an explicit reference to any security that you want to trade. The most common ways to do this will be to maintain lists of securities that you might want to trade in the context object (e.g. context.longs, context.pipeline_assets).

While the limits of a tradeable universe have been removed, there are still practical limits on the computations that can be done in each minute.

Get Started on Quantopian