Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH/BUG: Make emission_rate configurable in run_algorithm #2080

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ENV PROJECT_DIR=/projects \
RUN mkdir ${PROJECT_DIR} \
&& apt-get -y update \
&& apt-get -y install libfreetype6-dev libpng-dev libopenblas-dev liblapack-dev gfortran \
&& curl -L https://downloads.sourceforge.net/project/ta-lib/ta-lib/0.4.0/ta-lib-0.4.0-src.tar.gz | tar xvz
&& curl -L https://kent.dl.sourceforge.net/project/ta-lib/ta-lib/0.4.0/ta-lib-0.4.0-src.tar.gz | tar xvz

#
# build and install zipline from source. install TA-Lib after to ensure
Expand Down
6 changes: 6 additions & 0 deletions zipline/utils/run_algo.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def _run(handle_data,
algotext,
defines,
data_frequency,
emission_rate,
capital_base,
data,
bundle,
Expand Down Expand Up @@ -170,6 +171,7 @@ def choose_loader(column):
end=end,
capital_base=capital_base,
data_frequency=data_frequency,
emission_rate=emission_rate,
trading_calendar=trading_calendar,
),
**{
Expand Down Expand Up @@ -255,6 +257,7 @@ def run_algorithm(start,
before_trading_start=None,
analyze=None,
data_frequency='daily',
emission_rate='daily',
data=None,
bundle=None,
bundle_timestamp=None,
Expand Down Expand Up @@ -290,6 +293,8 @@ def run_algorithm(start,
performance data.
data_frequency : {'daily', 'minute'}, optional
The data frequency to run the algorithm at.
emission_rate : {'daily', 'minute'}, optional
The emission rate to run the algorithm at.
data : pd.DataFrame, pd.Panel, or DataPortal, optional
The ohlcv data to run the backtest with.
This argument is mutually exclusive with:
Expand Down Expand Up @@ -358,6 +363,7 @@ def run_algorithm(start,
algotext=None,
defines=(),
data_frequency=data_frequency,
emission_rate=emission_rate,
capital_base=capital_base,
data=data,
bundle=bundle,
Expand Down