mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-11 11:16:15 +08:00
This patch lays the groundwork for a compute engine designed to facilitate construction of factor-based universe screening and portfolio allocation. It contains: A new module, `zipline.modelling`, containing entities that can be used to express computations as dependency graphs. Each node in such a graph is an instance of the base `Term` class, defined in `zipline.modelling.term`. Dependency graphs are executed by instances of `FFCEngine`, defined in `zipline.modelling.engine`. A new module, `zipline.data.ffc`, containing loaders and dataset definitions for inputs to the modelling API. New `TradingAlgorithm` api methods: `add_factor`, and `add_filter`. These methods can only be called from `initialize`, and are used to inform the algorithm that each day it should compute the given terms. Computed factor results are made available through a new attribute of the `data` object in `before_trading_start` and `handle_data`. Computed filter results control which assets are available in the factor matrix on each day.
46 lines
2.2 KiB
YAML
46 lines
2.2 KiB
YAML
language: python
|
|
matrix:
|
|
include:
|
|
- python: 2.7
|
|
env:
|
|
- PANDAS_VERSION=0.16.0
|
|
- NUMPY_VERSION=1.9.2
|
|
- python: 3.3
|
|
env:
|
|
- PANDAS_VERSION=0.16.0
|
|
- NUMPY_VERSION=1.9.2
|
|
before_install:
|
|
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-3.7.0-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-3.7.0-Linux-x86_64.sh -O miniconda.sh; fi
|
|
- chmod +x miniconda.sh
|
|
- ./miniconda.sh -b
|
|
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then export PATH=/home/travis/miniconda/bin:$PATH; else export PATH=/home/travis/miniconda3/bin:$PATH; fi
|
|
- sudo apt-get install gfortran
|
|
install:
|
|
- conda create -n testenv --yes pip python=$TRAVIS_PYTHON_VERSION
|
|
- source activate testenv
|
|
- conda install --yes -c https://conda.binstar.org/Quantopian numpy=$NUMPY_VERSION pandas=$PANDAS_VERSION scipy matplotlib Cython patsy statsmodels tornado pyparsing xlrd mock pytz requests six dateutil ta-lib logbook
|
|
- grep bottleneck== etc/requirements.txt | xargs pip install
|
|
- grep cyordereddict== etc/requirements.txt | xargs pip install
|
|
- grep contextlib2== etc/requirements.txt | xargs pip install
|
|
- grep click== etc/requirements.txt | xargs pip install
|
|
- grep networkx== etc/requirements.txt | xargs pip install
|
|
- grep numexpr== etc/requirements.txt | xargs pip install
|
|
- grep bcolz== etc/requirements.txt | xargs pip install
|
|
- grep pyflakes== etc/requirements_dev.txt | xargs pip install
|
|
- grep pep8== etc/requirements_dev.txt | xargs pip install
|
|
- grep mccabe== etc/requirements_dev.txt | xargs pip install
|
|
- grep flake8== etc/requirements_dev.txt | xargs pip install
|
|
- grep nose== etc/requirements_dev.txt | xargs pip install --upgrade --force-reinstall
|
|
- grep nose-parameterized== etc/requirements_dev.txt | xargs pip install
|
|
- grep nose-ignore-docstring== etc/requirements_dev.txt | xargs pip install
|
|
- grep testfixtures== etc/requirements_dev.txt | xargs pip install
|
|
- pip install coveralls
|
|
- pip install nose-timer
|
|
- python setup.py build_ext --inplace
|
|
before_script:
|
|
- "flake8 zipline tests"
|
|
script:
|
|
- nosetests --with-timer --exclude=^test_examples --with-coverage --cover-package=zipline
|
|
after_success:
|
|
- coveralls
|