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:
@@ -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.'''
|
||||
|
||||
Reference in New Issue
Block a user