@@ -44,7 +44,7 @@ class CapmAlphaRankingUniverseSelectionModel(UniverseSelectionModel):
4444 benchmark = "SPY"
4545
4646 # Symbols of Dow 30 companies.
47- symbols = [Symbol .create (x , SecurityType .EQUITY , Market .USA )
47+ _symbols = [Symbol .create (x , SecurityType .EQUITY , Market .USA )
4848 for x in ["AAPL" , "AXP" , "BA" , "CAT" , "CSCO" , "CVX" , "DD" , "DIS" , "GE" , "GS" ,
4949 "HD" , "IBM" , "INTC" , "JPM" , "KO" , "MCD" , "MMM" , "MRK" , "MSFT" ,
5050 "NKE" ,"PFE" , "PG" , "TRV" , "UNH" , "UTX" , "V" , "VZ" , "WMT" , "XOM" ]]
@@ -60,8 +60,7 @@ def create_universes(self, algorithm):
6060 algorithm .date_rules .month_start (self .benchmark ),
6161 algorithm .time_rules .after_market_open (self .benchmark ),
6262 lambda datetime : self .select_pair (algorithm , datetime ),
63- algorithm .universe_settings ,
64- algorithm .security_initializer )]
63+ algorithm .universe_settings )]
6564
6665 def select_pair (self , algorithm , date ):
6766 '''Selects the pair (two stocks) with the highest alpha'''
@@ -95,7 +94,7 @@ def roc_updated(s, item):
9594
9695 rate_of_change .updated += roc_updated
9796
98- history = history .close .reset_index (level = 0 , drop = True ).iteritems ()
97+ history = history .close .reset_index (level = 0 , drop = True ).items ()
9998
10099 for time , value in history :
101100 rate_of_change .update (time , value )
0 commit comments