Refactored the data portal to use the exchange bundles

This commit is contained in:
fredfortier
2017-10-08 01:13:47 -04:00
parent 0cc9d839d0
commit 3335ae0ea9
6 changed files with 247 additions and 253 deletions
+3 -3
View File
@@ -14,9 +14,10 @@ class ExchangeBundleTestCase:
start = pd.to_datetime('2017-09-01', utc=True)
end = pd.Timestamp.utcnow()
exchange_bundle = ExchangeBundle(exchange_name)
log.info('ingesting exchange bundle {}'.format(exchange_name))
exchange_bundle = ExchangeBundle(
exchange_name=exchange_name,
exchange_bundle.ingest(
data_frequency='minute',
include_symbols='neo_btc',
exclude_symbols=None,
@@ -24,5 +25,4 @@ class ExchangeBundleTestCase:
end=end,
show_progress=True
)
exchange_bundle.ingest()
pass
+3 -1
View File
@@ -90,6 +90,8 @@ class ExchangeDataPortalTestCase:
'1m',
'close',
'minute')
log.info('found history window: {}'.format(data))
pass
def test_get_spot_value_backtest(self):
@@ -102,5 +104,5 @@ class ExchangeDataPortalTestCase:
date = pd.to_datetime('2017-09-10', utc=True)
value = self.data_portal_backtest.get_spot_value(
assets, 'close', date, 'minute')
log.info('found spot value {}'.format(value))
pass