Compare commits

..
10 Commits
6 changed files with 14 additions and 40 deletions
+2 -2
View File
@@ -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 quantopian/catalyst . # docker build -t enigmampc/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 quantopian/catalyst # docker run -v /path/to/your/notebooks:/projects -v ~/.catalyst:/root/.catalyst -p 8888:8888/tcp --name catalyst -it enigmampc/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
View File
@@ -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 quantopian/catalystdev -f Dockerfile-dev . # docker build -t enigmampc/catalystdev -f Dockerfile-dev .
# #
# Note: the dev build requires a quantopian/catalyst image, which you can build as follows: # Note: the dev build requires a enigmampc/catalyst image, which you can build as follows:
# #
# docker build -t quantopian/catalyst -f Dockerfile . # docker build -t enigmampc/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 quantopian/catalystdev # docker run -v /path/to/your/notebooks:/projects -v ~/.catalyst:/root/.catalyst -p 8888:8888/tcp --name catalystdev -it enigmampc/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 quantopian/catalyst FROM enigmampc/catalyst
WORKDIR /catalyst WORKDIR /catalyst
+1 -3
View File
@@ -24,8 +24,7 @@ AUTO_INGEST = False
AUTH_SERVER = 'https://data.enigma.co' AUTH_SERVER = 'https://data.enigma.co'
# TODO: switch to mainnet ETH_REMOTE_NODE = 'https://mainnet.infura.io'
ETH_REMOTE_NODE = 'https://rinkeby.infura.io/'
MARKETPLACE_CONTRACT = 'https://raw.githubusercontent.com/enigmampc/' \ MARKETPLACE_CONTRACT = 'https://raw.githubusercontent.com/enigmampc/' \
'catalyst/master/catalyst/marketplace/' \ 'catalyst/master/catalyst/marketplace/' \
@@ -35,7 +34,6 @@ MARKETPLACE_CONTRACT_ABI = 'https://raw.githubusercontent.com/enigmampc/' \
'catalyst/master/catalyst/marketplace/' \ 'catalyst/master/catalyst/marketplace/' \
'contract_marketplace_abi.json' 'contract_marketplace_abi.json'
# TODO: switch to mainnet
ENIGMA_CONTRACT = 'https://raw.githubusercontent.com/enigmampc/' \ ENIGMA_CONTRACT = 'https://raw.githubusercontent.com/enigmampc/' \
'catalyst/master/catalyst/marketplace/' \ 'catalyst/master/catalyst/marketplace/' \
'contract_enigma_address.txt' 'contract_enigma_address.txt'
+4 -19
View File
@@ -1,5 +1,4 @@
import abc import abc
import datetime
import numpy as np import numpy as np
import pandas as pd import pandas as pd
@@ -301,34 +300,20 @@ class DataPortalExchangeBacktest(DataPortalExchangeBase):
) )
adj_bar_count = candle_size * bar_count adj_bar_count = candle_size * bar_count
if data_frequency == "minute": if data_frequency == 'minute' and adj_data_frequency == 'daily':
# for minute frequency always request data until the end_dt = end_dt.floor('1D')
# 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=last_dt_for_series, end_dt=end_dt,
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(last_dt_for_series, adj_bar_count, start_dt = get_start_dt(end_dt, adj_bar_count, adj_data_frequency)
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,
+1 -9
View File
@@ -2,14 +2,6 @@
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
@@ -22,7 +14,7 @@ Build
Bug Fixes Bug Fixes
~~~~~~~~~ ~~~~~~~~~
- fixes in storing and loading the state :issue:`214`, - Added arguments to the ``reduce`` function in tha Asset class :issue:`214`,
:issue:`287` :issue:`287`
Version 0.5.6 Version 0.5.6
+1 -2
View File
@@ -5,7 +5,6 @@ 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
@@ -40,7 +39,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.0 - matplotlib==2.1.2
- multipledispatch==0.4.9 - multipledispatch==0.4.9
- networkx==2.0 - networkx==2.0
- numexpr==2.6.4 - numexpr==2.6.4