General improvements

This commit is contained in:
Conner Fromknecht
2017-07-01 18:26:57 -07:00
parent db9ab0075b
commit 2d26758fba
16 changed files with 291 additions and 40 deletions
+7 -6
View File
@@ -300,12 +300,13 @@ def ensure_crypto_benchmark_data(symbol, first_date, last_date, now,
day_data.volume.sum(), # sum of all volumes
)
# scale to allow trading 100-ths of a coin
daily_bars.loc[:, 'open'] /= 100.0
daily_bars.loc[:, 'high'] /= 100.0
daily_bars.loc[:, 'low'] /= 100.0
daily_bars.loc[:, 'close'] /= 100.0
daily_bars.loc[:, 'volume'] *= 100.0
# scale to allow trading 10-ths of a coin
scale = 10.0
daily_bars.loc[:, 'open'] /= scale
daily_bars.loc[:, 'high'] /= scale
daily_bars.loc[:, 'low'] /= scale
daily_bars.loc[:, 'close'] /= scale
daily_bars.loc[:, 'volume'] *= scale
return daily_bars