I'm feeding raw data into my algorithm by making sure to set DataNormalizationMode.Raw in all my calls to AddEquity. 

However, in a separate part of my algorithm, I am trying to calculate the 6-month returns of these equities like so:

def Rebalance(self): # specify symbols as a list so that a DataFrame is returned bars = self.History(['SPY', 'VEU', 'TLT', 'IJH', 'IJR'], TimeSpan.FromDays(127)) # get the return of each symbol over the period (127 days) # first, group the data by symbol gb = bars.groupby(bars.index.get_level_values(0)) # then, divide the final close price by the first close price and subtract 1.0 to get the 6-month return returns = gb.last()['close'].div(gb.first()['close']) - 1.0

 

Since I am inputting raw data into my algorithm, won't History() return raw price data?  If this is the case, then woudn't some of my return calculations be way off in the case of a split or reverse split? 

Is it possible for me to specify that I'd like to use adjusted prices in a call to History()?   Alternatively, is there a beter way to calculate the 6-month return by creating a custom indicator?