Question: Please solve it by using Rstudio 2. The file AAPL-EPS.csv contains quarterly diluted earnings per share (EPS) for Apple Inc. from March 2005 until September

 Please solve it by using Rstudio 2. The file AAPL-EPS.csv contains

Please solve it by using Rstudio

2. The file AAPL-EPS.csv contains quarterly diluted earnings per share (EPS) for Apple Inc. from March 2005 until September 2020. (Source: www.macrotrends.net/stocks/charts/AAPL/apple/eps-earnings-per-share-diluted) In this question, we introduce the zoo package which is useful when working with time se- ries of irregular frequencies or aggregating high frequency data into a lower frequency (e.g., aggregating daily data into monthly means). (a) Read the data into R and create a zoo object called eps for the diluted EPS data. Instructions for working with zoo objects are given below: Load the zoo library using the command library (zoo). If you do not have this package installed, type install.packages ('zoo'). . Use the command zoo (x, as.Date (dat $Date)) to create a zoo object. Plot the diluted EPS data and comment on what you observe. Would an additive or multiplicative model be most appropriate? Explain. (b) Often earnings per share data is given as the sum of the last 4 quarters, called the rolling 4 quarters EPS. This tends to standardize the data across industries and minimize the impact of earnings for the quarter which corresponds to a company's fiscal year end, while still giving quarterly data. Use the function rollsum() to create a time series of the last 4 quarters EPS for this dataset. Plot this new time series and compare it to the quarterly EPS plot. Would a multiplicative or an additive model be most appropriate for the rolling 4 quarters EPS dataset based on the plot? In particular, address the following points: Is the rolling 4 quarters series stationary? Is there seasonal variation? If so, would an additive or multiplicative model be suitable? Justify your answers. (c) Another way to standardize quarterly EPS data is to annualize it by calendar year. This is sometimes done to compare companies with different fiscal year ends. The function aggregate () works well for such a purpose. The arguments for this function should be specified so that 'xcorresponds to the EPS time series, 'by' should correspond to the year, 'FUN=sum' tells the function to sum each group's data. One way to extract the year from a date is to use the year() function from the 'lubridate' package. Plot the resulting series. Should 2020 be included? 2. The file AAPL-EPS.csv contains quarterly diluted earnings per share (EPS) for Apple Inc. from March 2005 until September 2020. (Source: www.macrotrends.net/stocks/charts/AAPL/apple/eps-earnings-per-share-diluted) In this question, we introduce the zoo package which is useful when working with time se- ries of irregular frequencies or aggregating high frequency data into a lower frequency (e.g., aggregating daily data into monthly means). (a) Read the data into R and create a zoo object called eps for the diluted EPS data. Instructions for working with zoo objects are given below: Load the zoo library using the command library (zoo). If you do not have this package installed, type install.packages ('zoo'). . Use the command zoo (x, as.Date (dat $Date)) to create a zoo object. Plot the diluted EPS data and comment on what you observe. Would an additive or multiplicative model be most appropriate? Explain. (b) Often earnings per share data is given as the sum of the last 4 quarters, called the rolling 4 quarters EPS. This tends to standardize the data across industries and minimize the impact of earnings for the quarter which corresponds to a company's fiscal year end, while still giving quarterly data. Use the function rollsum() to create a time series of the last 4 quarters EPS for this dataset. Plot this new time series and compare it to the quarterly EPS plot. Would a multiplicative or an additive model be most appropriate for the rolling 4 quarters EPS dataset based on the plot? In particular, address the following points: Is the rolling 4 quarters series stationary? Is there seasonal variation? If so, would an additive or multiplicative model be suitable? Justify your answers. (c) Another way to standardize quarterly EPS data is to annualize it by calendar year. This is sometimes done to compare companies with different fiscal year ends. The function aggregate () works well for such a purpose. The arguments for this function should be specified so that 'xcorresponds to the EPS time series, 'by' should correspond to the year, 'FUN=sum' tells the function to sum each group's data. One way to extract the year from a date is to use the year() function from the 'lubridate' package. Plot the resulting series. Should 2020 be included

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!