mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-22 12:40:30 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2fbb6f5134 | ||
|
|
af7b211035 | ||
|
|
4eaec97614 |
+2
-2
@@ -1,11 +1,11 @@
|
|||||||
#
|
#
|
||||||
# Dockerfile for an image with the currently checked out version of catalyst installed. To build:
|
# Dockerfile for an image with the currently checked out version of catalyst installed. To build:
|
||||||
#
|
#
|
||||||
# docker build -t enigmampc/catalyst .
|
# docker build -t quantopian/catalyst .
|
||||||
#
|
#
|
||||||
# To run the container:
|
# To run the container:
|
||||||
#
|
#
|
||||||
# docker run -v /path/to/your/notebooks:/projects -v ~/.catalyst:/root/.catalyst -p 8888:8888/tcp --name catalyst -it enigmampc/catalyst
|
# docker run -v /path/to/your/notebooks:/projects -v ~/.catalyst:/root/.catalyst -p 8888:8888/tcp --name catalyst -it quantopian/catalyst
|
||||||
#
|
#
|
||||||
# To access Jupyter when running docker locally (you may need to add NAT rules):
|
# To access Jupyter when running docker locally (you may need to add NAT rules):
|
||||||
#
|
#
|
||||||
|
|||||||
+5
-5
@@ -1,15 +1,15 @@
|
|||||||
#
|
#
|
||||||
# Dockerfile for an image with the currently checked out version of catalyst installed. To build:
|
# Dockerfile for an image with the currently checked out version of catalyst installed. To build:
|
||||||
#
|
#
|
||||||
# docker build -t enigmampc/catalystdev -f Dockerfile-dev .
|
# docker build -t quantopian/catalystdev -f Dockerfile-dev .
|
||||||
#
|
#
|
||||||
# Note: the dev build requires a enigmampc/catalyst image, which you can build as follows:
|
# Note: the dev build requires a quantopian/catalyst image, which you can build as follows:
|
||||||
#
|
#
|
||||||
# docker build -t enigmampc/catalyst -f Dockerfile .
|
# docker build -t quantopian/catalyst -f Dockerfile .
|
||||||
#
|
#
|
||||||
# To run the container:
|
# To run the container:
|
||||||
#
|
#
|
||||||
# docker run -v /path/to/your/notebooks:/projects -v ~/.catalyst:/root/.catalyst -p 8888:8888/tcp --name catalystdev -it enigmampc/catalystdev
|
# docker run -v /path/to/your/notebooks:/projects -v ~/.catalyst:/root/.catalyst -p 8888:8888/tcp --name catalystdev -it quantopian/catalystdev
|
||||||
#
|
#
|
||||||
# To access Jupyter when running docker locally (you may need to add NAT rules):
|
# To access Jupyter when running docker locally (you may need to add NAT rules):
|
||||||
#
|
#
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
#
|
#
|
||||||
# docker exec -it catalystdev catalyst run -f /projects/my_algo.py --start 2015-1-1 --end 2016-1-1 /projects/result.pickle
|
# docker exec -it catalystdev catalyst run -f /projects/my_algo.py --start 2015-1-1 --end 2016-1-1 /projects/result.pickle
|
||||||
#
|
#
|
||||||
FROM enigmampc/catalyst
|
FROM quantopian/catalyst
|
||||||
|
|
||||||
WORKDIR /catalyst
|
WORKDIR /catalyst
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import abc
|
import abc
|
||||||
|
import datetime
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
@@ -300,20 +301,34 @@ class DataPortalExchangeBacktest(DataPortalExchangeBase):
|
|||||||
)
|
)
|
||||||
adj_bar_count = candle_size * bar_count
|
adj_bar_count = candle_size * bar_count
|
||||||
|
|
||||||
if data_frequency == 'minute' and adj_data_frequency == 'daily':
|
if data_frequency == "minute":
|
||||||
end_dt = end_dt.floor('1D')
|
# for minute frequency always request data until the
|
||||||
|
# current minute (do not include the current minute)
|
||||||
|
last_dt_for_series = end_dt - datetime.timedelta(minutes=1)
|
||||||
|
|
||||||
|
# read the minute bundles for daily frequency to
|
||||||
|
# support last partial candle
|
||||||
|
# TODO: optimize this by applying this logic only for the last day
|
||||||
|
if adj_data_frequency == 'daily':
|
||||||
|
adj_data_frequency = 'minute'
|
||||||
|
adj_bar_count = adj_bar_count * 1440
|
||||||
|
|
||||||
|
else: # data_frequency == "daily":
|
||||||
|
last_dt_for_series = end_dt
|
||||||
|
|
||||||
series = bundle.get_history_window_series_and_load(
|
series = bundle.get_history_window_series_and_load(
|
||||||
assets=assets,
|
assets=assets,
|
||||||
end_dt=end_dt,
|
end_dt=last_dt_for_series,
|
||||||
bar_count=adj_bar_count,
|
bar_count=adj_bar_count,
|
||||||
field=field,
|
field=field,
|
||||||
data_frequency=adj_data_frequency,
|
data_frequency=adj_data_frequency,
|
||||||
algo_end_dt=self._last_available_session,
|
algo_end_dt=self._last_available_session,
|
||||||
)
|
)
|
||||||
|
|
||||||
start_dt = get_start_dt(end_dt, adj_bar_count, adj_data_frequency)
|
start_dt = get_start_dt(last_dt_for_series, adj_bar_count,
|
||||||
|
adj_data_frequency, False)
|
||||||
df = resample_history_df(pd.DataFrame(series), freq, field, start_dt)
|
df = resample_history_df(pd.DataFrame(series), freq, field, start_dt)
|
||||||
|
|
||||||
return df
|
return df
|
||||||
|
|
||||||
def get_exchange_spot_value(self,
|
def get_exchange_spot_value(self,
|
||||||
|
|||||||
@@ -2,6 +2,14 @@
|
|||||||
Release Notes
|
Release Notes
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
Version 0.5.8
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
**Release Date**: 2018-03-29
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
~~~~~~~~~
|
||||||
|
- Fix Data Marketplace release on mainnet
|
||||||
|
|
||||||
Version 0.5.7
|
Version 0.5.7
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
**Release Date**: 2018-03-29
|
**Release Date**: 2018-03-29
|
||||||
@@ -14,7 +22,7 @@ Build
|
|||||||
|
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
- Added arguments to the ``reduce`` function in tha Asset class :issue:`214`,
|
- fixes in storing and loading the state :issue:`214`,
|
||||||
:issue:`287`
|
:issue:`287`
|
||||||
|
|
||||||
Version 0.5.6
|
Version 0.5.6
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ channels:
|
|||||||
dependencies:
|
dependencies:
|
||||||
- certifi=2016.2.28=py27_0
|
- certifi=2016.2.28=py27_0
|
||||||
- mkl=2017.0.3
|
- mkl=2017.0.3
|
||||||
|
- matplotlib=2.1.2=py36_0
|
||||||
- numpy=1.13.1=py27_0
|
- numpy=1.13.1=py27_0
|
||||||
- openssl=1.0.2l
|
- openssl=1.0.2l
|
||||||
- pip=9.0.1=py27_1
|
- pip=9.0.1=py27_1
|
||||||
@@ -39,7 +40,7 @@ dependencies:
|
|||||||
- lru-dict==1.1.6
|
- lru-dict==1.1.6
|
||||||
- mako==1.0.7
|
- mako==1.0.7
|
||||||
- markupsafe==1.0
|
- markupsafe==1.0
|
||||||
- matplotlib==2.1.2
|
- matplotlib==2.1.0
|
||||||
- multipledispatch==0.4.9
|
- multipledispatch==0.4.9
|
||||||
- networkx==2.0
|
- networkx==2.0
|
||||||
- numexpr==2.6.4
|
- numexpr==2.6.4
|
||||||
|
|||||||
Reference in New Issue
Block a user