From ad2d0e9253350f3ece26ca25e1ca6efd11a6c1f3 Mon Sep 17 00:00:00 2001 From: fredfortier Date: Thu, 7 Sep 2017 14:26:55 -0400 Subject: [PATCH 1/5] Fixed path issue with obsolete branch --- catalyst/exchange/exchange_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/catalyst/exchange/exchange_utils.py b/catalyst/exchange/exchange_utils.py index 3b559726..5d69e4e8 100644 --- a/catalyst/exchange/exchange_utils.py +++ b/catalyst/exchange/exchange_utils.py @@ -8,8 +8,9 @@ from catalyst.exchange.exchange_errors import ExchangeAuthNotFound, \ ExchangeSymbolsNotFound from catalyst.utils.paths import data_root, ensure_directory +# TODO: move to aws SYMBOLS_URL = 'https://raw.githubusercontent.com/enigmampc/catalyst/' \ - 'exchange-trading/catalyst/exchange/{exchange}/symbols.json' + 'master/catalyst/exchange/{exchange}/symbols.json' def get_exchange_folder(exchange_name, environ=None): From 05a69cfc920638c7c0472b4af1c50f6cbca155df Mon Sep 17 00:00:00 2001 From: Abner Ayala-Acevedo Date: Wed, 20 Sep 2017 10:16:29 -0700 Subject: [PATCH 2/5] Added environment.yml for simpler conda installation Simpler conda installation by using environment.yml requirements. `conda env create -f python2.7-environment.yml` `Linux or Mac: source activate catalyst` `Windows: activate catalyst` --- etc/python2.7-environment.yml | 58 +++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 etc/python2.7-environment.yml diff --git a/etc/python2.7-environment.yml b/etc/python2.7-environment.yml new file mode 100644 index 00000000..557bc656 --- /dev/null +++ b/etc/python2.7-environment.yml @@ -0,0 +1,58 @@ +name: catalyst +channels: +- defaults +dependencies: +- certifi=2016.2.28=py27_0 +- openssl=1.0.2l=0 +- pip=9.0.1=py27_1 +- python=2.7.13=0 +- readline=6.2=2 +- setuptools=36.4.0=py27_0 +- sqlite=3.13.0=0 +- tk=8.5.18=0 +- wheel=0.29.0=py27_0 +- zlib=1.2.11=0 +- pip: + - alembic==0.9.5 + - bcolz==0.12.1 + - bottleneck==1.2.1 + - chardet==3.0.4 + - click==6.7 + - contextlib2==0.5.5 + - cycler==0.10.0 + - cyordereddict==1.0.0 + - cython==0.26.1 + - decorator==4.1.2 + - empyrical==0.2.1 + - enigma-catalyst==0.2.dev2 + - functools32==3.2.3.post2 + - idna==2.6 + - intervaltree==2.1.0 + - logbook==1.1.0 + - lru-dict==1.1.6 + - mako==1.0.7 + - markupsafe==1.0 + - matplotlib==2.0.2 + - multipledispatch==0.4.9 + - networkx==1.11 + - numexpr==2.6.4 + - numpy==1.13.1 + - pandas==0.19.2 + - pandas-datareader==0.5.0 + - patsy==0.4.1 + - pyparsing==2.2.0 + - python-dateutil==2.6.1 + - python-editor==1.0.3 + - pytz==2017.2 + - requests==2.18.4 + - requests-file==1.4.2 + - requests-ftp==0.3.1 + - scipy==0.19.1 + - six==1.11.0 + - sortedcontainers==1.5.7 + - sqlalchemy==1.1.14 + - statsmodels==0.8.0 + - subprocess32==3.2.7 + - tables==3.4.2 + - toolz==0.8.2 + - urllib3==1.22 From 06f48cf15819480e98ebec8bdd3a0ee93f548ae5 Mon Sep 17 00:00:00 2001 From: Abner Ayala-Acevedo Date: Wed, 20 Sep 2017 10:41:42 -0700 Subject: [PATCH 3/5] Update to include python-dev --- etc/python2.7-environment.yml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/etc/python2.7-environment.yml b/etc/python2.7-environment.yml index 557bc656..b31a1585 100644 --- a/etc/python2.7-environment.yml +++ b/etc/python2.7-environment.yml @@ -1,19 +1,30 @@ name: catalyst channels: +- statiskit - defaults dependencies: - certifi=2016.2.28=py27_0 +- coverage=4.4.1=py27_0 +- nose=1.3.7=py27_1 - openssl=1.0.2l=0 +- path.py=10.3.1=py27_0 - pip=9.0.1=py27_1 - python=2.7.13=0 +- pyyaml=3.12=py27_0 - readline=6.2=2 - setuptools=36.4.0=py27_0 +- six=1.10.0=py27_0 - sqlite=3.13.0=0 - tk=8.5.18=0 - wheel=0.29.0=py27_0 +- yaml=0.1.6=0 - zlib=1.2.11=0 +- libdev=1.0.0=py27_0 +- python-dev=1.0.0=py27_0 +- python-scons=3.0.0=py27_0 - pip: - alembic==0.9.5 + - backports.shutil-get-terminal-size==1.0.0 - bcolz==0.12.1 - bottleneck==1.2.1 - chardet==3.0.4 @@ -25,9 +36,14 @@ dependencies: - decorator==4.1.2 - empyrical==0.2.1 - enigma-catalyst==0.2.dev2 + - enum34==1.1.6 - functools32==3.2.3.post2 - idna==2.6 - intervaltree==2.1.0 + - ipdb==0.10.3 + - ipdbplugin==1.4.5 + - ipython==5.5.0 + - ipython-genutils==0.2.0 - logbook==1.1.0 - lru-dict==1.1.6 - mako==1.0.7 @@ -39,7 +55,13 @@ dependencies: - numpy==1.13.1 - pandas==0.19.2 - pandas-datareader==0.5.0 + - pathlib2==2.3.0 - patsy==0.4.1 + - pexpect==4.2.1 + - pickleshare==0.7.4 + - prompt-toolkit==1.0.15 + - ptyprocess==0.5.2 + - pygments==2.2.0 - pyparsing==2.2.0 - python-dateutil==2.6.1 - python-editor==1.0.3 @@ -47,12 +69,16 @@ dependencies: - requests==2.18.4 - requests-file==1.4.2 - requests-ftp==0.3.1 + - scandir==1.5 - scipy==0.19.1 - - six==1.11.0 + - scons==3.0.0a20170821 + - simplegeneric==0.8.1 - sortedcontainers==1.5.7 - sqlalchemy==1.1.14 - statsmodels==0.8.0 - subprocess32==3.2.7 - tables==3.4.2 - toolz==0.8.2 + - traitlets==4.3.2 - urllib3==1.22 + - wcwidth==0.1.7 From 81bd2d84f037fb793ae0747d21a00ecec2bb5902 Mon Sep 17 00:00:00 2001 From: Victor Grau Serrat Date: Wed, 20 Sep 2017 12:47:31 -0600 Subject: [PATCH 4/5] >=0.2.dev2 for catalyst, since we're in active dev and will change periodically --- etc/python2.7-environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/python2.7-environment.yml b/etc/python2.7-environment.yml index b31a1585..34fabcbb 100644 --- a/etc/python2.7-environment.yml +++ b/etc/python2.7-environment.yml @@ -35,7 +35,7 @@ dependencies: - cython==0.26.1 - decorator==4.1.2 - empyrical==0.2.1 - - enigma-catalyst==0.2.dev2 + - enigma-catalyst>=0.2.dev2 - enum34==1.1.6 - functools32==3.2.3.post2 - idna==2.6 From 7359cdc48fcf3fa170f2486bb3075c1c17478b3d Mon Sep 17 00:00:00 2001 From: Victor Grau Serrat Date: Wed, 20 Sep 2017 16:20:57 -0600 Subject: [PATCH 5/5] fix data.history error with tz-aware dataframe --- catalyst/data/resample.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/catalyst/data/resample.py b/catalyst/data/resample.py index 3154e590..dc325c39 100644 --- a/catalyst/data/resample.py +++ b/catalyst/data/resample.py @@ -156,7 +156,10 @@ class DailyHistoryAggregator(object): cache = self._caches[field] = (session, market_open, {}) _, market_open, entries = cache - market_open = market_open.tz_localize('UTC') + try: + market_open = market_open.tz_localize('UTC') + except TypeError: + market_open = market_open.tz_convert('UTC') if dt != market_open: prev_dt = dt_value - self._one_min else: