Westonci.ca is your go-to source for answers, with a community ready to provide accurate and timely information. Discover a wealth of knowledge from experts across different disciplines on our comprehensive Q&A platform. Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A platform.

f.use the daily returns from c. to calculate rolling annual returns for the three stocks, the portfolio and djia the following two ways •use a for loop to perform the task by looping through 252 daily data points each time and saving the results into a new variable •use the rolling function with a time window of 252 days (e.g., variable.rolling().mean() with da being the data) •are the results the same from the two steps?