From 01473e51468c3a43fe6a308aedb32755183d6b18 Mon Sep 17 00:00:00 2001 From: Victor Grau Serrat Date: Mon, 28 Aug 2017 13:15:31 -0600 Subject: [PATCH] Fixes 1000 scaling price issue --- catalyst/data/bundles/poloniex.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/catalyst/data/bundles/poloniex.py b/catalyst/data/bundles/poloniex.py index 5e1ddd36..4dcdf7bc 100644 --- a/catalyst/data/bundles/poloniex.py +++ b/catalyst/data/bundles/poloniex.py @@ -102,7 +102,10 @@ class PoloniexBundle(BaseCryptoPricingBundle): ) raw.set_index('date', inplace=True) - scale = 1 + # BcolzDailyBarReader introduces a 1/1000 factor in the way pricing is stored + # on disk, which we compensate here to get the right pricing amounts + # ref: data/us_equity_pricing.py + scale = 1000 raw.loc[:, 'open'] /= scale raw.loc[:, 'high'] /= scale raw.loc[:, 'low'] /= scale