Trusted by Students Everywhere
Why Choose Us?
0% AI Guarantee

Human-written only.

24/7 Support

Anytime, anywhere.

Plagiarism Free

100% Original.

Expert Tutors

Masters & PhDs.

100% Confidential

Your privacy matters.

On-Time Delivery

Never miss a deadline.

International Growth Rates (10 pts)

Computer Science Dec 05, 2021
  1. International Growth Rates (10 pts). The purpose of this exercise is to examine economic growth rates of major countries in Africa, Europe, and North America. Start by loading countryGDP.xlsx, which reports cross-country Real GDP data in $US, taken from the World Bank.
    1. Start by trimming the data set, such that the starting year contains data across all 9 countries, which should be 1970.
    2. After doing so, compute a growth rate index for each country such that the value in 1970 is 1.0, and it grows cumulatively based on the country’s growth in real GDP.

Hint: after computing the growth rate from year to year use the cumprod() function.

    1. Use the plt.subplot() command to plot three panels of the growth rate index, each corresponding to countries in Africa, Europe, and North America. As a result, each panel should contain 3 lines.
    2. Which 3 countries experienced the largest cumulative growth rates from 1970 through 2019, and what are their growth rates?
  1. Consumer Spending Over Time (15 pts). Here we examine trends that exist in real, quarterly U.S. consumer spending. The main dataset is given in ConsumerSpending.xlsx and we’ll work with data from the U.S. Bureau of Economic Analysis.
    1. What columns do you see in the dataset? Convert the “Date” column to a pandas datetime object as we have done previously in the live session, using pd.to datetime(...).

Plot the time series of total retail sales, with “Date” on the x-axis and “RealPCE” on the y-axis. What do you see? From a basic visual inspection, is there a clear trend and / or seasonality?

    1. Given the evidence for a trend, estimate two possible trends using the statsmodels package. The trends will be based on separately estimating the following regressions:

                                                              RealPCEt        =      α + βt + errort

                                                              RealPCEt        =       α + βt + γt2 + errort

Display the regression results (i.e. use the summary function).

    1. Plot the true RealPCE values against the fitted values of each regression. There should be one that looks much better. Which trend line is it?

2

    1. Using the better trend that you’ve identified above, extract and plot the residual. Using the groupby() method show evidence that there are quarterly, seasonal effects.

Hint: for this exercise it might be useful to add a column indicating which quarter the data pertains to. For a dataframe titled df with a date column that is a pandas datetime object, you can set the new column to be df[“Date”].dt.quarter.

    1. Again using the same groupby() method from above, show evidence that consumer spending has become more seasonal after 1990, relative to the pre-1990 period. One way to do this is to compute quarterly effects in the pre and post1990 periods, and compare their relative volatilities across quarters.
  1. Persistence of Oil Volatility (15 pts). In this exercise, we focus on movements of crude oil prices, by analyzing the monthly volatility of returns in spot West Texas Intermediate (WTI) prices. All data are originally sourced from the US Energy Information Administration (EIA).
    1. Load the dataset given in CrudePrices Monthly.xlsx. The column that is titled “Vol” provides the intra-month volatility of oil returns while “LastSpot” indicates the last price of WTI for that month. “Ret” is the monthly return if one was to hold on to a barrel of oil over the course of the month.
    2. What is the correlation betweeen intra-month volatility and monthly oil returns?
    3. Plot the autocorrelation function (ACF) of crude oil volatility. On average, how correlated is this month’s return volatility with next month’s?
    4. As oil volatility seems to be fairly persistent, we will estimate an autoregressive model to better determine the fit. Fit an autoregressive model with three lags (AR(3)) and display the output of the regression. Which volatility term is most significant in predicting current volatilty?
    5. One issue that commonly arises is that while a model can do a superb job forecasting the data it is fitted to (in this case 1986 – 2019), it might have difficulty forecasting new data in the future (2020 and beyond). How might one test whether the model does a good job with out-of-sample performance? Answer this question in words.

Expert Solution

Archived Solution
Unlocked Solution

You have full access to this solution. To save a copy with all formatting and attachments, use the button below.

Already a member? Sign In
Important Note: This solution is from our archive and has been purchased by others. Submitting it as-is may trigger plagiarism detection. Use it for reference only.

For ready-to-submit work, please order a fresh solution below.

Or get 100% fresh solution
Get Custom Quote
Secure Payment