SPY default security benchmark

- Setting SPY as the default security benchmark
- The security benchmark subscription will be added at `UniverseSelection`
as an internal subscription. Using its own dedicated Security instance
which doesn't live in the algorithms.Securities collection.
- Reducing algorithms exposure to internal subscriptions
- `TimeSliceFactory` will prioritize higher resolution bars, when same
symbol is present twice (for non-internal subscriptionst)
- Adding regression test `CustomUniverseWithBenchmarkRegressionAlgorithm`
This commit is contained in:
Martin Molinero
2019-07-24 18:49:19 -03:00
parent a5724976e2
commit 0d6d66cd09
19 changed files with 388 additions and 126 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ class CustomBenchmarkAlgorithm(QCAlgorithm):
# Find more symbols here: http://quantconnect.com/data
self.AddEquity("SPY", Resolution.Second)
self.SetBenchmark("SPY")
self.SetBenchmark(Symbol.Create("AAPL", SecurityType.Equity, Market.USA))
def OnData(self, data):
'''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.'''