Implement first version of manual strategy

This commit is contained in:
2020-10-27 19:57:46 -04:00
parent 1798e9569e
commit 4679910374
5 changed files with 56 additions and 112 deletions

View File

@@ -25,10 +25,8 @@ class BenchmarkStrategy:
orders["Symbol"] = symbol
orders["Order"] = ""
orders["Shares"] = 0
orders.iloc[0] = [symbol, "BUY", 1000]
orders.iloc[-1] = [symbol, "SELL", 1000]
orders = orders[orders["Shares"] != 0]
orders.iloc[-1] = [symbol, "SELL", -1000]
if self.verbose:
print(type(orders)) # it better be a DataFrame!