Hi all,

I am trying to utilize the AskPrice and BidPrice to determine the spread of an Equity.

I am trying to declare it as follows, but I am encountering the following error: 

AttributeError : 'TradeStrategyTest' object has no attribute 'Equity' at Initialize self.AskPrice = self.Equity("SPY").AskPrice

 def Initialize(self):
       self.SetStartDate(2017,1, 1)  #Set Start Date
       self.SetEndDate(2017,7,31)    #Set End Date
       self.SetCash(10000)           #Set Strategy Cash
       self.AddEquity("SPY", Resolution.Minute)
       
       self.AskPrice = self.Equity("SPY").AskPrice
       self.BidPrice = self.Equity("SPY").BidPrice
       self.Spread = (self.AskPrice - self.BidPrice)

Any help would be greatly appreciated.