Financial Engineering Assignment 3 Solution - Cornell University

Verified

Added on  2023/06/03

|6
|848
|168
Homework Assignment
AI Summary
This document presents a comprehensive solution to a finance assignment, focusing on statistical methods and data analysis within the context of financial engineering. The solution addresses problems from the textbook "Statistics and Data Analysis for Financial Engineering with R examples" by Ruppert and Matteson. The assignment covers several key areas, including the calculation of the Maximum Likelihood Estimate (MLE) and confidence intervals, analysis of time series data for stationarity using the Augmented Dickey-Fuller test, and the interpretation of autocorrelation functions (ACF). The solution includes the R code used for the calculations and analysis, along with the results and interpretations. The problems tackled involve assessing the stationarity of economic time series like GDP, Treasury rates, and inflation, and understanding the correlation between financial time series. The document aims to provide a clear and concise explanation of the concepts and methods applied, making it a valuable resource for students studying financial engineering and data analysis.
Document Page
Running head: SOLUTION TO QUESTIONS 1
Solution to Questions
Name
Institution
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
SOLUTION TO QUESTIONS 2
Solution to Question
Chapter 7: Problem 2
The maximum profile likelihood estimate for v is equal to the overall MLE (Ruppert,
2011). Therefore, to obtain the MLE of v, find the maximum value of the profile likelihood
using the following code
MLE= max(loglik_profile)
MLE
[1] 539.18
The MLE = 539.18
For the confidence interval the following codes were used
sigma= sqrt(var(loglik_profile))
# the z= score for 90% is 1.645 (conventional value)
error=1.645*(sigma/sqrt(n))
a= MLE- error
b= MLE+ error
Confidence_interval=c(a, b)
Confidence_interval
The interval is (539.1065, 539.2521)
Document Page
SOLUTION TO QUESTIONS 3
Chapter 12: Problem 1
Figure (a)
Figure (b)
(a) None of the three times series plots show clear signs of being mean-reverting. The
plot of the log of GDP is clearly non-stationary and the Treasury rate and inflation
rate may also be non-stationary. In the ACF plots we see slow nearly linear decays,
especially for log(GDP) which also suggests that none of the series are stationary.
(b) The Dickey-Fuller test operate under the following hypothesis
H0: The unit roots of time series are nonstationary
Document Page
SOLUTION TO QUESTIONS 4
Ha: The series are stationary.
The codes below and the results shows ADF tests results for TbGdpPi data
> adf.test(TbGdpPi[,1])
Augmented Dickey-Fuller Test
data: TbGdpPi[, 1]
Dickey-Fuller = -2.5622, Lag order = 6, p-value = 0.3395
alternative hypothesis: stationary
> adf.test(TbGdpPi[,2])
Augmented Dickey-Fuller Test
data: TbGdpPi[, 2]
Dickey-Fuller = -1.3474, Lag order = 6, p-value = 0.8502
alternative hypothesis: stationary
> adf.test(TbGdpPi[,3])
Augmented Dickey-Fuller Test
data: TbGdpPi[, 3]
Dickey-Fuller = -3.1444, Lag order = 6, p-value = 0.09794
alternative hypothesis: stationary
From the results all the p-values are greater than 0.05, therefore, fail to reject the null
hypothesis and conclude that at 95% significance level the three series are
nonstationary. The conclusions for the ADF test corroborate the conclusions from the
plots in (a) above that all three series are non-stationary.
Exercise 1 (a)
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
SOLUTION TO QUESTIONS 5
Figure (c) Figure (d)
(a) The lags in figure (c) and (d) represents correlation between each series value and the
preceding value (Chatfield, 2016). However, for (c) the lags are expressed the time
values are hidden inside of the time series while for (d) the numeric represents the
values as row indices. The lags do not differ in the two figures because they represent
the same series (crsp).
(b) The outputs below show the lags
> acf(crsp, plot = FALSE)
Autocorrelations of series ‘crsp’, by lag
0.00000 0.00274 0.00548 0.00822 0.01096 0.01370 0.01644
1.000 0.085 -0.007 -0.011 -0.008 -0.017 -0.020
0.01918 0.02192 0.02466 0.02740 0.03014 0.03288 0.03562
-0.059 -0.024 0.025 0.026 -0.003 0.035 0.032
0.03836 0.04110 0.04384 0.04658 0.04932 0.05205 0.05479
0.034 -0.016 -0.060 -0.032 0.021 0.027 0.007
0.05753 0.06027 0.06301 0.06575 0.06849 0.07123 0.07397
0.007 -0.017 0.016 0.006 -0.038 -0.007 0.046
0.07671 0.07945 0.08219 0.08493 0.08767 0.09041 0.09315
0.007 -0.010 0.007 -0.014 0.009 0.039 -0.041
The autocorrelation among the crsp returns for lag 0.0000 and 0.00274 are insignificant while
the rest are significant implying that the ones that are significant are not by chance but based
on p-value = 0.05.
Document Page
SOLUTION TO QUESTIONS 6
Also, for the numeric lags the R-code is as follows
> acf(as.numeric(crsp), plot = FALSE)
Autocorrelations of series ‘as.numeric(crsp)’, by lag
0 1 2 3 4 5 6 7
1.000 0.085 -0.007 -0.011 -0.008 -0.017 -0.020 -0.059
8 9 10 11 12 13 14 15
-0.024 0.025 0.026 -0.003 0.035 0.032 0.034 -0.016
16 17 18 19 20 21 22 23
-0.060 -0.032 0.021 0.027 0.007 0.007 -0.017 0.016
24 25 26 27 28 29 30 31
0.006 -0.038 -0.007 0.046 0.007 -0.010 0.007 -0.014
32 33 34
0.009 0.039 -0.041
The autocorrelation among the crsp returns for lag 0 and 1 are insignificant while the rest are
significant implying that the ones that are significant are not by chance but based on p-value
= 0.05.
References
Chatfield, C. (2016). The analysis of time series: an introduction. CRC press.
Ruppert, D. (2011). Statistics and data analysis for financial engineering (Vol. 13). New
York: Springer.
chevron_up_icon
1 out of 6
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]