Complete Backtest Using Ingested Zipline Data

  1. Import necessary functions in Python
  2. Set target weights for each ticker
  3. Set rebalance rules, i.e. monthly
  4. Set benchmark, i.e. SPY
  5. Set start and end dates – should match trade dates in zipline ingested files
  6. Create benchmark file
    • Make sure benchmark dates align with trade dates
  7. Run backtest analysis
    • If there are modules to import – %run analysis.ipynb
  8. Save output to csv – results.to_csv(‘result.csv’)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: