BLD: tested stats with multiple assets

This commit is contained in:
fredfortier
2017-12-07 22:14:49 -05:00
parent 6147df5c6c
commit 2e7aabd973
4 changed files with 57 additions and 38 deletions
+1 -1
View File
@@ -96,13 +96,13 @@ def handle_data(context, data):
# Now that we've collected all current data for this frame, we use
# the record() method to save it. This data will be available as
# a parameter of the analyze() function for further analysis.
record(
volume=(context.market, current['volume']),
price_change=(context.market, price_change),
rsi=(context.market, rsi[-1]),
cash=cash
)
# We are trying to avoid over-trading by limiting our trades to
# one per day.
if context.traded_today: