Merge remote-tracking branch 'origin/concurrent-exchanges' into concurrent-exchanges

This commit is contained in:
fredfortier
2017-10-18 16:41:37 -04:00
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -454,7 +454,7 @@ def live(ctx,
@click.option(
'-f',
'--data-frequency',
type=click.Choice({'daily', 'minute', 'daily,minute'}),
type=click.Choice({'daily', 'minute', 'daily,minute', 'minute,daily'}),
default='daily',
show_default=True,
help='The data frequency of the desired OHLCV bars.',
+4 -3
View File
@@ -409,7 +409,7 @@ class ExchangeBundle:
periods = []
dt = sessions[0]
while dt <= sessions[-1]:
period = '{}-{}'.format(dt.year, dt.month) \
period = '{}-{:02d}'.format(dt.year, dt.month) \
if data_frequency == 'minute' else '{}'.format(dt.year)
if period not in periods:
@@ -520,5 +520,6 @@ class ExchangeBundle:
assets = self.get_assets(include_symbols, exclude_symbols)
start_dt, end_dt = get_adj_dates(start, end, assets, data_frequency)
self.ingest_assets(assets, start_dt, end_dt, data_frequency,
show_progress)
for frequency in data_frequency.split(','):
self.ingest_assets(assets, start_dt, end_dt, frequency,
show_progress)