mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-15 11:22:18 +08:00
Merge branch 'develop' of github.com:enigmampc/catalyst into develop
This commit is contained in:
+72
-3
@@ -1,3 +1,72 @@
|
||||
All the documentation for `Catalyst <https://github.com/enigmampc/catalyst>`_
|
||||
can be found in the
|
||||
`documentation website <https://enigmampc.github.io/catalyst>`_.
|
||||
.. image:: https://s3.amazonaws.com/enigmaco-docs/enigma-catalyst.jpg
|
||||
:target: https://enigmampc.github.io/catalyst
|
||||
:align: center
|
||||
:alt: Enigma | Catalyst
|
||||
|
||||
|version tag|
|
||||
|version status|
|
||||
|discord|
|
||||
|twitter|
|
||||
|
||||
|
|
||||
|
||||
Catalyst is an algorithmic trading library for crypto-assets written in Python.
|
||||
It allows trading strategies to be easily expressed and backtested against
|
||||
historical data (with daily and minute resolution), providing analytics and
|
||||
insights regarding a particular strategy's performance. Catalyst also supports
|
||||
live-trading of crypto-assets starting with three exchanges (Bitfinex, Bittrex,
|
||||
and Poloniex) with more being added over time. Catalyst empowers users to share
|
||||
and curate data and build profitable, data-driven investment strategies. Please
|
||||
visit `enigma.co <https://www.enigma.co>`_ to learn more about Catalyst, or
|
||||
refer to the `whitepaper <https://www.enigma.co/enigma_catalyst.pdf>`_ for
|
||||
further technical details.
|
||||
|
||||
Catalyst builds on top of the well-established
|
||||
`Zipline <https://github.com/quantopian/zipline>`_ project. We did our best to
|
||||
minimize structural changes to the general API to maximize compatibility with
|
||||
existing trading algorithms, developer knowledge, and tutorials. Join us on
|
||||
`Discord <https://discord.gg/SJK32GY>`_ where we have a *#catalyst_dev* channel
|
||||
for questions around Catalyst, algorithmic trading and technical support.
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
- Ease of use: Catalyst tries to get out of your way so that you can
|
||||
focus on algorithm development. See
|
||||
`examples of trading strategies <https://github.com/enigmampc/catalyst/tree/master/catalyst/examples>`_
|
||||
provided.
|
||||
- Support for several of the top crypto-exchanges by trading volume:
|
||||
`Bitfinex <https://www.bitfinex.com>`_, `Bittrex <http://www.bittrex.com>`_,
|
||||
and `Poloniex <https://www.poloniex.com>`_.
|
||||
- Secure: You and only you have access to each exchange API keys for your accounts.
|
||||
- Input of historical pricing data of all crypto-assets by exchange,
|
||||
with daily and minute resolution. See
|
||||
`Catalyst Market Coverage Overview <https://www.enigma.co/catalyst/status>`_.
|
||||
- Backtesting and live-trading functionality, with a seamless transition
|
||||
between the two modes.
|
||||
- Output of performance statistics are based on Pandas DataFrames to
|
||||
integrate nicely into the existing PyData eco-system.
|
||||
- Statistic and machine learning libraries like matplotlib, scipy,
|
||||
statsmodels, and sklearn support development, analysis, and
|
||||
visualization of state-of-the-art trading systems.
|
||||
- Addition of Bitcoin price (btc_usdt) as a benchmark for comparing
|
||||
performance across trading algorithms.
|
||||
|
||||
Go to our `Documentation Website <https://enigmampc.github.io/catalyst/>`_.
|
||||
|
||||
|
||||
|
||||
|
||||
.. |version tag| image:: https://img.shields.io/pypi/v/enigma-catalyst.svg
|
||||
:target: https://pypi.python.org/pypi/enigma-catalyst
|
||||
|
||||
.. |version status| image:: https://img.shields.io/pypi/pyversions/enigma-catalyst.svg
|
||||
:target: https://pypi.python.org/pypi/enigma-catalyst
|
||||
|
||||
.. |discord| image:: https://img.shields.io/badge/discord-join%20chat-green.svg
|
||||
:target: https://discordapp.com/invite/SJK32GY
|
||||
|
||||
.. |twitter| image:: https://img.shields.io/twitter/follow/enigmampc.svg?style=social&label=Follow&style=flat-square
|
||||
:target: https://twitter.com/enigmampc
|
||||
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ def handle_data(context, data):
|
||||
|
||||
# get data every 30 minutes
|
||||
minutes = 30
|
||||
|
||||
# get lookback_days of history data: that is 'lookback' number of bins
|
||||
lookback = one_day_in_minutes / minutes * lookback_days
|
||||
if not context.i % minutes and context.universe:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. include:: welcome.rst
|
||||
.. include:: ../../README.rst
|
||||
|
|
||||
|
|
||||
Table of Contents
|
||||
|
||||
+15
-10
@@ -1,8 +1,7 @@
|
||||
Catalyst & Jupyter Notebook
|
||||
===========================
|
||||
|
||||
(Feel free to check out the actual Notebook file
|
||||
`here <https://github.com/enigmampc/catalyst-docs/blob/master/docs/running_catalyst_in_jupyter_notebook.ipynb>`__)
|
||||
(`This is actual Notebook <https://github.com/enigmampc/catalyst/blob/master/catalyst/examples/running_catalyst_in_jupyter_notebook.ipynb>`_ referenced in the text below)
|
||||
|
||||
The `Jupyter Notebook <https://jupyter.org/>`__ is a very powerful
|
||||
browser-based interface to a Python interpreter. As it is already the
|
||||
@@ -33,11 +32,19 @@ the interface through which you will interact with Jupyter Notebook.
|
||||
Running Algorithms
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
To use it you have to write your algorithm in a cell and let
|
||||
``catalyst`` know that it is supposed to run this algorithm. This is
|
||||
done via the ``%%catalyst`` IPython magic command that is available
|
||||
after you import ``catalyst`` from within the Notebook. This magic takes
|
||||
the same arguments as the command line interface. Thus to run the
|
||||
Before running your algorithms inside the Jupyter Notebook, remember to ingest
|
||||
the data from the command line interface (CLI). In the example below, you would
|
||||
need to run first:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
catalyst ingest-exchange -x bitfinex -i btc_usd
|
||||
|
||||
To use Catalyst inside a Jupyter Noebook, you have to write your algorithm in a
|
||||
cell and let the Jupyter know that it is supposed to execute this algorithm with
|
||||
Catalyst. This is done via the ``%%catalyst`` IPython magic command that is
|
||||
available after you import ``catalyst`` from within the Notebook. This magic
|
||||
takes the same arguments as the command line interface. Thus to run the
|
||||
algorithm just supply the same parameters as the CLI but without the -f
|
||||
and -o arguments. We just have to execute the following cell after
|
||||
importing ``catalyst`` to register the magic.
|
||||
@@ -58,7 +65,7 @@ functions.
|
||||
|
||||
.. code:: python
|
||||
|
||||
%%catalyst --start 2015-3-2 --end 2017-6-28 --capital-base 100000 -x bitfinex
|
||||
%%catalyst --start 2015-3-2 --end 2017-6-28 --capital-base 100000 -x bitfinex -c usd
|
||||
|
||||
from catalyst.finance.slippage import VolumeShareSlippage
|
||||
|
||||
@@ -199,8 +206,6 @@ functions.
|
||||
.. figure:: https://i.imgur.com/DS5w47q.png
|
||||
:alt: png
|
||||
|
||||
png
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<div>
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
.. image:: https://s3.amazonaws.com/enigmaco-docs/enigma-catalyst.jpg
|
||||
|
|
||||
Catalyst is an algorithmic trading library for crypto-assets written in Python.
|
||||
It allows trading strategies to be easily expressed and backtested against
|
||||
historical data (with daily and minute resolution), providing analytics and
|
||||
insights regarding a particular strategy's performance. Catalyst also supports
|
||||
live-trading of crypto-assets starting with three exchanges (Bitfinex, Bittrex,
|
||||
and Poloniex) with more being added over time. Catalyst empowers users to share
|
||||
and curate data and build profitable, data-driven investment strategies. Please
|
||||
visit `enigma.co <https://www.enigma.co>`_ to learn more about Catalyst, or
|
||||
refer to the `whitepaper <https://www.enigma.co/enigma_catalyst.pdf>`_ for
|
||||
further technical details.
|
||||
|
||||
Catalyst builds on top of the well-established
|
||||
`Zipline <https://github.com/quantopian/zipline>`_ project. We did our best to
|
||||
minimize structural changes to the general API to maximize compatibility with
|
||||
existing trading algorithms, developer knowledge, and tutorials. Join us on
|
||||
`Discord <https://discord.gg/SJK32GY>`_ where we have a *#catalyst_dev* channel
|
||||
for questions around Catalyst, algorithmic trading and technical support.
|
||||
|
||||
Features
|
||||
========
|
||||
|
||||
- Ease of use: Catalyst tries to get out of your way so that you can
|
||||
focus on algorithm development. See
|
||||
`examples of trading strategies <https://github.com/enigmampc/catalyst/tree/master/catalyst/examples>`_
|
||||
provided.
|
||||
- Support for several of the top crypto-exchanges by trading volume:
|
||||
`Bitfinex <https://www.bitfinex.com>`_, `Bittrex <http://www.bittrex.com>`_,
|
||||
and `Poloniex <https://www.poloniex.com>`_.
|
||||
- Secure: You and only you have access to each exchange API keys for your accounts.
|
||||
- Input of historical pricing data of all crypto-assets by exchange,
|
||||
with daily and minute resolution. See
|
||||
`Catalyst Market Coverage Overview <https://www.enigma.co/catalyst/status>`_.
|
||||
- Backtesting and live-trading functionality, with a seamless transition
|
||||
between the two modes.
|
||||
- Output of performance statistics are based on Pandas DataFrames to
|
||||
integrate nicely into the existing PyData eco-system.
|
||||
- Statistic and machine learning libraries like matplotlib, scipy,
|
||||
statsmodels, and sklearn support development, analysis, and
|
||||
visualization of state-of-the-art trading systems.
|
||||
- Addition of Bitcoin price (btc_usdt) as a benchmark for comparing
|
||||
performance across trading algorithms.
|
||||
Reference in New Issue
Block a user