Addresses Peer-Review

- Standarizes basic template algorithms for options and futures
- Fix typo
This commit is contained in:
AlexCatarino
2020-02-12 22:28:22 +00:00
parent 17d8ac1811
commit f6d7e5fcd7
17 changed files with 41 additions and 37 deletions
@@ -40,14 +40,14 @@ class BasicTemplateFuturesAlgorithm(QCAlgorithm):
self.contractSymbol = None
# Subscribe and set our expiry filter for the futures chain
futureES = self.AddFuture(Futures.Indices.SP500EMini)
futureGC = self.AddFuture(Futures.Metals.Gold)
futureSP500 = self.AddFuture(Futures.Indices.SP500EMini)
futureGold = self.AddFuture(Futures.Metals.Gold)
# set our expiry filter for this futures chain
# SetFilter method accepts timedelta objects or integer for days.
# The following statements yeild the same filtering criteria
futureES.SetFilter(0, 182)
futureGC.SetFilter(timedelta(0), timedelta(182))
# The following statements yield the same filtering criteria
futureSP500.SetFilter(timedelta(0), timedelta(182))
futureGold.SetFilter(0, 182)
benchmark = self.AddEquity("SPY");
self.SetBenchmark(benchmark.Symbol);