API Reference

Running a Backtest

Algorithm API

The following methods are available for use in the initialize, handle_data, and before_trading_start API functions.

In all listed functions, the self argument is implicitly the currently-executing TradingAlgorithm instance.

Data Object

Scheduling Functions

Orders

Order Cancellation Policies

Assets

Trading Controls

Zipline provides trading controls to help ensure that the algorithm is performing as expected. The functions help protect the algorithm from certian bugs that could cause undesirable behavior when trading with real money.

Simulation Parameters

Commission Models

Slippage Models

Pipeline

For more information, see Pipeline API

Miscellaneous

Pipeline API

Built-in Factors

Pipeline Engine

Data Loaders

Asset Metadata

Trading Calendar API

Data API

Writers

Readers

Bundles

zipline.data.bundles.bundles

The bundles that have been registered as a mapping from bundle name to bundle data. This mapping is immutable and should only be updated through register() or unregister().

Utilities

Caching

Command Line