mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-26 13:18:31 +08:00
Refactored the data portal to use the exchange bundles
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user