Use min_periods=1 if you want to let the first 252 days data have an expanding window Roll_Max = SPY_Dat['Adj Close'].rolling(window, min_periods=1).max() ...
確定! 回上一頁