mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-01 12:20:21 +08:00
DOC: updated release notes
This commit is contained in:
+235
-104
@@ -13,8 +13,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -41,28 +39,21 @@
|
||||
|
||||
<body class="wy-body-for-nav" role="document">
|
||||
|
||||
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search">
|
||||
|
||||
<div class="wy-side-nav-search">
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home"> Catalyst
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home"> Catalyst
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
@@ -71,89 +62,235 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="install.html">Install</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="beginner-tutorial.html">Catalyst Beginner Tutorial</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="live-trading.html">Live Trading</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="features.html">Features</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="example-algos.html">Example Algorithms</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="utilities.html">Utilities</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="videos.html">Videos</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="resources.html">Resources</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="development-guidelines.html">Development Guidelines</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="releases.html">Release Notes</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="install.html">Install</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="install.html#installing-with-conda">Installing with <code class="docutils literal"><span class="pre">conda</span></code></a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="install.html#troubleshooting-conda-install">Troubleshooting <code class="docutils literal"><span class="pre">conda</span></code> Install</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="install.html#installing-with-pip">Installing with <code class="docutils literal"><span class="pre">pip</span></code></a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="install.html#troubleshooting-pip-install">Troubleshooting <code class="docutils literal"><span class="pre">pip</span></code> Install</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="install.html#installing-with-pipenv">Installing with <code class="docutils literal"><span class="pre">pipenv</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="install.html#gnu-linux-requirements">GNU/Linux Requirements</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="install.html#amazon-linux-ami-notes">Amazon Linux AMI Notes</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="install.html#macos-requirements">MacOS Requirements</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="install.html#macos-virtualenv-conda-matplotlib">MacOS + virtualenv/conda + matplotlib</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="install.html#windows-requirements">Windows Requirements</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="install.html#updating-catalyst">Updating Catalyst</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="install.html#getting-help">Getting Help</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="beginner-tutorial.html">Catalyst Beginner Tutorial</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="beginner-tutorial.html#basics">Basics</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="beginner-tutorial.html#my-first-algorithm">My first algorithm</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="beginner-tutorial.html#ingesting-data">Ingesting data</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="beginner-tutorial.html#running-the-algorithm">Running the algorithm</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="beginner-tutorial.html#command-line-interface">Command line interface</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="beginner-tutorial.html#access-to-previous-prices-using-history">Access to previous prices using <code class="docutils literal"><span class="pre">history</span></code></a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="beginner-tutorial.html#working-example-dual-moving-average-cross-over">Working example: Dual Moving Average Cross-Over</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="beginner-tutorial.html#jupyter-notebook">Jupyter Notebook</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="beginner-tutorial.html#install">Install</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="beginner-tutorial.html#running-algorithms">Running Algorithms</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="beginner-tutorial.html#next-steps">Next steps</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="live-trading.html">Live Trading</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="live-trading.html#supported-exchanges">Supported Exchanges</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="live-trading.html#paper-trading-vs-live-trading-modes">Paper Trading vs Live Trading modes</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="live-trading.html#authentication">Authentication</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="live-trading.html#currency-symbols">Currency Symbols</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="live-trading.html#trading-an-algorithm">Trading an Algorithm</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="features.html">Features</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="features.html#current-functionality">Current Functionality</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="features.html#upcoming-features">Upcoming features</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="features.html#naming-convention">Naming Convention</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="example-algos.html">Example Algorithms</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="example-algos.html#overview">Overview</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="example-algos.html#buy-btc-simple-algorithm">Buy BTC Simple Algorithm</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="example-algos.html#buy-and-hodl-algorithm">Buy and Hodl Algorithm</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="example-algos.html#dual-moving-average-crossover">Dual Moving Average Crossover</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="example-algos.html#mean-reversion-algorithm">Mean Reversion Algorithm</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="example-algos.html#simple-universe">Simple Universe</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="example-algos.html#portfolio-optimization">Portfolio Optimization</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="utilities.html">Utilities</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="utilities.html#output-to-csv-file">Output to CSV file</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="utilities.html#extracting-market-data">Extracting market data</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="videos.html">Videos</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="videos.html#installation-macos">Installation: MacOS</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="videos.html#installation-windows">Installation: Windows</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="videos.html#backtesting-a-strategy">Backtesting a Strategy</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="videos.html#live-trading-a-strategy">Live Trading a Strategy</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="resources.html">Resources</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="resources.html#related-3rd-party-apis">Related 3rd Party APIs</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="development-guidelines.html">Development Guidelines</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="development-guidelines.html#creating-a-development-environment">Creating a Development Environment</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="development-guidelines.html#git-branching-structure">Git Branching Structure</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="development-guidelines.html#contributing-to-the-docs">Contributing to the Docs</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="development-guidelines.html#commit-messages">Commit messages</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="development-guidelines.html#formatting-docstrings">Formatting Docstrings</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="releases.html">Release Notes</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-5-1">Version 0.5.1</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#bug-fixes">Bug Fixes</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#build">Build</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-4-7">Version 0.4.7</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id1">Bug Fixes</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id2">Build</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-4-6">Version 0.4.6</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id3">Bug Fixes</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id4">Build</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-4-5">Version 0.4.5</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id5">Bug Fixes</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-4-4">Version 0.4.4</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id6">Bug Fixes</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-4-3">Version 0.4.3</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id7">Bug Fixes</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-4-2">Version 0.4.2</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id8">Bug Fixes</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id9">Build</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-4-0">Version 0.4.0</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id10">Bug Fixes</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id11">Build</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#version-0-3-10">Version 0.3.10</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id12">Bug Fixes</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-3-9">Version 0.3.9</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id13">Bug Fixes</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id14">Build</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-3-8">Version 0.3.8</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id15">Bug Fixes</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-3-7">Version 0.3.7</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id16">Bug Fixes</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id17">Build</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-3-6">Version 0.3.6</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id18">Bug Fixes</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-3-5">Version 0.3.5</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id19">Bug Fixes</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-3-4">Version 0.3.4</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id20">Bug Fixes</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id21">Build</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#documentation">Documentation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-3-3">Version 0.3.3</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id23">Bug Fixes</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id24">Build</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-3-2">Version 0.3.2</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id25">Bug Fixes</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id26">Build</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-3-1">Version 0.3.1</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="releases.html#id27">Bug Fixes</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-3">Version 0.3</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-2-dev5">Version 0.2.dev5</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-2-dev4">Version 0.2.dev4</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-2-dev3">Version 0.2.dev3</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-2-dev2">Version 0.2.dev2</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-2-dev1">Version 0.2.dev1</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-1-dev9">Version 0.1.dev9</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-1-dev8">Version 0.1.dev8</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-1-dev7">Version 0.1.dev7</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="releases.html#version-0-1-dev6">Version 0.1.dev6</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
|
||||
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="index.html">Catalyst</a>
|
||||
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="index.html">Catalyst</a>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li>Data Bundles</li>
|
||||
|
||||
|
||||
<li><a href="index.html">Docs</a> »</li>
|
||||
|
||||
<li>Data Bundles</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
|
||||
|
||||
|
||||
<a href="_sources/bundles.txt" rel="nofollow"> View page source</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="data-bundles">
|
||||
<span id="id1"></span><h1>Data Bundles<a class="headerlink" href="#data-bundles" title="Permalink to this headline">¶</a></h1>
|
||||
@@ -165,12 +302,12 @@ backtests and store the data for future runs.</p>
|
||||
<p>Zipline comes with a few bundles by default as well as the ability to register
|
||||
new bundles. To see which bundles we have have available, we may run the
|
||||
<code class="docutils literal"><span class="pre">bundles</span></code> command, for example:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ zipline bundles
|
||||
my-custom-bundle <span class="m">2016</span>-05-05 <span class="m">20</span>:35:19.809398
|
||||
my-custom-bundle <span class="m">2016</span>-05-05 <span class="m">20</span>:34:53.654082
|
||||
my-custom-bundle <span class="m">2016</span>-05-05 <span class="m">20</span>:34:48.401767
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>zipline bundles
|
||||
my-custom-bundle 2016-05-05 20:35:19.809398
|
||||
my-custom-bundle 2016-05-05 20:34:53.654082
|
||||
my-custom-bundle 2016-05-05 20:34:48.401767
|
||||
quandl <no ingestions>
|
||||
quantopian-quandl <span class="m">2016</span>-05-05 <span class="m">20</span>:06:40.894956
|
||||
quantopian-quandl 2016-05-05 20:06:40.894956
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The output here shows that there are 3 bundles available:</p>
|
||||
@@ -193,7 +330,7 @@ standard location that zipline can find. By default the location where ingested
|
||||
data will be written is <code class="docutils literal"><span class="pre">$ZIPLINE_ROOT/data/<bundle></span></code> where by default
|
||||
<code class="docutils literal"><span class="pre">ZIPLINE_ROOT=~/.zipline</span></code>. The ingestion step may take some time as it could
|
||||
involve downloading and processing a lot of data. This can be run with:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ zipline ingest <span class="o">[</span>-b <bundle><span class="o">]</span>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>zipline ingest <span class="o">[</span>-b <bundle><span class="o">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>where <code class="docutils literal"><span class="pre"><bundle></span></code> is the name of the bundle to ingest, defaulting to
|
||||
@@ -212,17 +349,17 @@ we can list all of the ingestions with the <a class="reference internal" href="#
|
||||
command: <code class="docutils literal"><span class="pre">clean</span></code>, which will clear data bundles based on some time
|
||||
constraints.</p>
|
||||
<p>For example:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span><span class="c1"># clean everything older than <date></span>
|
||||
$ zipline clean <span class="o">[</span>-b <bundle><span class="o">]</span> --before <date>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span class="c"># clean everything older than <date></span>
|
||||
<span class="nv">$ </span>zipline clean <span class="o">[</span>-b <bundle><span class="o">]</span> --before <date>
|
||||
|
||||
<span class="c1"># clean everything newer than <date></span>
|
||||
$ zipline clean <span class="o">[</span>-b <bundle><span class="o">]</span> --after <date>
|
||||
<span class="c"># clean everything newer than <date></span>
|
||||
<span class="nv">$ </span>zipline clean <span class="o">[</span>-b <bundle><span class="o">]</span> --after <date>
|
||||
|
||||
<span class="c1"># keep everything in the range of [before, after] and delete the rest</span>
|
||||
$ zipline clean <span class="o">[</span>-b <bundle><span class="o">]</span> --before <date> --after <after>
|
||||
<span class="c"># keep everything in the range of [before, after] and delete the rest</span>
|
||||
<span class="nv">$ </span>zipline clean <span class="o">[</span>-b <bundle><span class="o">]</span> --before <date> --after <after>
|
||||
|
||||
<span class="c1"># clean all but the last <int> runs</span>
|
||||
$ zipline clean <span class="o">[</span>-b <bundle><span class="o">]</span> --keep-last <int>
|
||||
<span class="c"># clean all but the last <int> runs</span>
|
||||
<span class="nv">$ </span>zipline clean <span class="o">[</span>-b <bundle><span class="o">]</span> --keep-last <int>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -231,7 +368,7 @@ $ zipline clean <span class="o">[</span>-b <bundle><span class="o">]</span
|
||||
<p>Now that the data has been ingested we can use it to run backtests with the
|
||||
<code class="docutils literal"><span class="pre">run</span></code> command. The bundle to use can be specified with the <code class="docutils literal"><span class="pre">--bundle</span></code> option
|
||||
like:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ zipline run --bundle <bundle> --algofile algo.py ...
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>zipline run --bundle <bundle> --algofile algo.py ...
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>We may also specify the date to use to look up the bundle data with the
|
||||
@@ -253,7 +390,7 @@ includes daily pricing data, splits, cash dividends, and asset metadata. To
|
||||
ingest the <code class="docutils literal"><span class="pre">quandl</span></code> data bundle we recommend creating an account on quandl.com
|
||||
to get an API key to be able to make more API requests per day. Once we have an
|
||||
API key we may run:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nv">QUANDL_API_KEY</span><span class="o">=</span><api-key> zipline ingest -b quandl
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ QUANDL_API_KEY</span><span class="o">=</span><api-key> zipline ingest -b quandl
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>though we may still run <code class="docutils literal"><span class="pre">ingest</span></code> as an anonymous quandl user (with no API
|
||||
@@ -284,23 +421,23 @@ cache the data for a set of equities from yahoo. The yahoo bundles include daily
|
||||
pricing data along with splits, cash dividends, and inferred asset metadata. To
|
||||
create a bundle from a set of equities, add the following to your
|
||||
<code class="docutils literal"><span class="pre">~/.zipline/extensions.py</span></code> file:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">zipline.data.bundles</span> <span class="kn">import</span> <span class="n">register</span><span class="p">,</span> <span class="n">yahoo_equities</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">zipline.data.bundles</span> <span class="kn">import</span> <span class="n">register</span><span class="p">,</span> <span class="n">yahoo_equities</span>
|
||||
|
||||
<span class="c1"># these are the tickers you would like data for</span>
|
||||
<span class="c"># these are the tickers you would like data for</span>
|
||||
<span class="n">equities</span> <span class="o">=</span> <span class="p">{</span>
|
||||
<span class="s1">'AAPL'</span><span class="p">,</span>
|
||||
<span class="s1">'MSFT'</span><span class="p">,</span>
|
||||
<span class="s1">'GOOG'</span><span class="p">,</span>
|
||||
<span class="s">'AAPL'</span><span class="p">,</span>
|
||||
<span class="s">'MSFT'</span><span class="p">,</span>
|
||||
<span class="s">'GOOG'</span><span class="p">,</span>
|
||||
<span class="p">}</span>
|
||||
<span class="n">register</span><span class="p">(</span>
|
||||
<span class="s1">'my-yahoo-equities-bundle'</span><span class="p">,</span> <span class="c1"># name this whatever you like</span>
|
||||
<span class="s">'my-yahoo-equities-bundle'</span><span class="p">,</span> <span class="c"># name this whatever you like</span>
|
||||
<span class="n">yahoo_equities</span><span class="p">(</span><span class="n">equities</span><span class="p">),</span>
|
||||
<span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This may now be used like:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ zipline ingest -b my-yahoo-equities-bundle
|
||||
$ zipline run -f algo.py --bundle my-yahoo-equities-bundle
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>zipline ingest -b my-yahoo-equities-bundle
|
||||
<span class="nv">$ </span>zipline run -f algo.py --bundle my-yahoo-equities-bundle
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>More than one yahoo equities bundle may be registered as long as they use
|
||||
@@ -320,7 +457,7 @@ writers that will write the data to the correct location transactionally. If an
|
||||
ingestion fails part way through the bundle will not be written in an incomplete
|
||||
state.</p>
|
||||
<p>The signature of the ingest function should be:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">ingest</span><span class="p">(</span><span class="n">environ</span><span class="p">,</span>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="n">ingest</span><span class="p">(</span><span class="n">environ</span><span class="p">,</span>
|
||||
<span class="n">asset_db_writer</span><span class="p">,</span>
|
||||
<span class="n">minute_bar_writer</span><span class="p">,</span>
|
||||
<span class="n">daily_bar_writer</span><span class="p">,</span>
|
||||
@@ -456,10 +593,6 @@ bundle uses this to directly untar the bundle into the <code class="docutils lit
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="articleComments">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
@@ -469,10 +602,9 @@ bundle uses this to directly untar the bundle into the <code class="docutils lit
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
© Copyright 2018, Enigma MPC, Inc..
|
||||
|
||||
</p>
|
||||
</div>
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||
|
||||
</footer>
|
||||
|
||||
@@ -493,8 +625,7 @@ bundle uses this to directly untar the bundle into the <code class="docutils lit
|
||||
VERSION:'0.4',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: true,
|
||||
SOURCELINK_SUFFIX: ''
|
||||
HAS_SOURCE: true
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user