Skip to main content

Zipline extension to provide bundles of data from Norgate Data into the Zipline algorithmic trading library

Project description

Project description

Creates an interface between Norgate data and Zipline, the pythonic algorithmic trading library, to create bundles.

This is currently in alpha stage testing to selected users of Norgate Data.

Currently, equities are supported. Futures data support is coming very soon.

Installation

pip install zipline-norgatedata

or, if you prefer to use conda:

conda install -c norgatedata zipline-norgatedata

Requirements

  • Python 3.5 (3.6 and 3.7 will be supported when Zipline supports them)
  • Zipline 1.3
  • Microsoft Windows
  • Active Norgate Data subscription

Usage

Add the following lines at the top of your extension.py file:

from pandas import Timestamp
from norgatedata import StockPriceAdjustmentType
from zipline_norgatedata import register_norgatedata_equities_bundle,register_norgatedata_futures_bundle

Then create as many bundles as you desire. These bundles will use one or more watchlists from your Norgate Data installation.

Here are some examples:

bundlename = 'norgatedata-sp500-backtest'
watchlists = ['S&P 500 Current & Past']
stock_price_adjustment_setting = StockPriceAdjustmentType.TOTALRETURN
start_session = Timestamp("1990-01-01",tz='utc') # Start date of data ingestion - NOTE: zipline cannot handle dates prior to 1990
end_session = Timestamp.now(tz='utc')
calendar_name = 'NYSE'
register_norgatedata_equities_bundle(bundlename,stock_price_adjustment_setting,watchlists,start_session,end_session,calendar_name)


bundlename = 'norgatedata-russell3000-backtest'
watchlists = ['Russell 3000 Current & Past']
stock_price_adjustment_setting = StockPriceAdjustmentType.TOTALRETURN
start_session = Timestamp("1990-01-01",tz='utc') # Start date of data ingestion - NOTE: zipline cannot handle dates prior to 1990
end_session = Timestamp.now(tz='utc')
calendar_name = 'NYSE'
register_norgatedata_equities_bundle(bundlename,stock_price_adjustment_setting,watchlists,start_session,end_session,calendar_name)

Ingest data

To ingest data from one of the bundles you've defined in extension.py. For example:

zipline ingest -b norgatedata-sp500-backtest
zipline ingest -b norgatedata-russell3000-backtest

Support

Norgate Data support

Project details


Release history Release notifications | RSS feed

This version

0.0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zipline_norgatedata-0.0.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file zipline_norgatedata-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: zipline_norgatedata-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.14.2 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.5.6

File hashes

Hashes for zipline_norgatedata-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5e7528f7a2445cfc97ed1f8360a351d43670ff2c975ec4c936966f1f21c75144
MD5 c44d85975fa180482220100732014b6c
BLAKE2b-256 e152040828d57ce2ba353d132a969c7f4d8a6bd52a10eab917900d025cf3ef7e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page