Closed Seriosso closed 3 years ago
Solved: the code should be as follow: goog_montly_return_list=[] for i in range(len(goog_monthly_return)): goog_montly_return_list.append\ ({'month':goog_monthly_return.index[i][1], 'monthly_return': goog_monthly_return.iloc[i]})
Check my solution above.
Hello, Thank you for the resolution. With this I'm closing the issue. In case the issue persists please reopen it.
The code of Seasonality does not work properly. when we copy paste the code an error occurs. I am using the 3.9 version python. I believe the problem is in this section:
goog_monthly_return = goog_data['Adj Close'].pct_change().groupby( [goog_data['Adj Close'].index.year, goog_data['Adj Close'].index.month]).mean()
goog_montly_return_list=[] for i in range(len(goog_monthly_return)): goog_montly_return_list.append\ ({'month':goog_monthly_return.index[i][1], 'monthly_return': goog_monthly_return[i]})