GithubHelp home page GithubHelp logo

zipline's Introduction

Custom bundle for ingesting Quandl CME futures data (https://www.quandl.com/data/CME-Chicago-Mercantile-Exchange-Futures-Data) into zipline (https://www.zipline.io/)

settings.py in bundles directory allows to select contracts for which data is ingested and whether data should be downloaded or read from disk.

Unlike on Quandl, years in futures symbols are encoded as two digits (in line with CME and Quantopian), so symbol for December 2018 S&P500 contract is ESZ18 (rather than ESZ2018 as on Quandl).

Some zipline functions don't work with single character futures root symbols so they have been preceded with underscore, eg. C (corn) becomes _C


Requirements:
-------------

1. set environment variable QUANDL_API_KEY

2. install packages:
- zipline 1.3.0
- quandl
- requests-html
- xlrd

3. in
~/.zipline/extension.py
add:
from bundles.extension import *

4. in
.../site-packages/zipline/utils/run_algo.py
add line 169:
future_daily_reader=bundle_data.equity_daily_bar_reader,
(additional argument passed to DataPortal class)

5. add to PYTHONPATH directory where this code resides
(i.e. parent directory to bundles/)


Usage:
-------------

from CLI:

zipline ingest -b futures



zipline's People

Contributors

t1user avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.