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

Not supported yet.

Miscellaneous

Asset Metadata

Trading Calendar API

Data API

Utilities

Caching

Command Line