hwk6 - IEOR E4709 Data Analysis for Financial Engineers...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
IEOR E4709 Data Analysis for Financial Engineers Solution 6 1. First we store the f rst 76 observations. #First, we will create a time series object. logJJhwk - logJJ[1:76,] Next we f tthea ir l inemode l . #fit the airline model with s=4 JJtemphwk - arima.mle(logJJhwk, model=list( list(order=c(0, 1, 1), period=4), list(order=c(0, 1, 1)) ) ) #Model Output JJtemphwk Call: arima.mle(x = logJJhwk, model = list(list(order = c(0, 1, 1), period = 4), list(order = c(0, 1, 1)))) Method: Maximum Likelihood Model #1: Model: 011 Period : 4 Coefficients: MA : 0.3492 Model #2: Coefficients: MA : 0.65589 Variance-Covariance Matrix: ma(1) ma(4) ma(1) 0.008601888 -0.002764281 ma(4) -0.002764281 0.013255396 Optimizer has converged Convergence Type: relative function convergence AIC: -132.56821 Therefore, the f tted model is (1 )(1 ) =(1  )(1 Θ ) with =0 65589 Θ 3492 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Next we shall make a prediction. jjFcsthwk.dates - timeSeq(from="1/1/1979", to="10/1/1980", by="quarters", format="%Y:%Q") jjForecasthwk - arima.forecast (logJJhwk, n=8, model=JJtemphwk$model, future.positions=jjFcsthwk.dates) jjForecasthwk $mean: Positions 1 1979:I 2.585637 1979:II 2.627074 1979:III 2.611076 1979:IV 2.364515 1980:I 2.729193 1980:II 2.770630 1980:III 2.754632 1980:IV 2.508071 $std.err: Positions 1 1979:I 0.09169830 1979:II 0.09697545 1979:III 0.10197989 1979:IV 0.10674998 1980:I 0.14042359 1980:II 0.14977353 1980:III 0.15857313 1980:IV 0.16690945 Finally we make a prediction plot. plot(exp(logJJ[positions(logJJ) = timeDate("1/1/1977"),]), exp(jjForecasthwk$mean), exp(jjForecasthwk$mean+1.96*jjForecasthwk$std.err), exp(jjForecasthwk$mean - 1.96*jjForecasthwk$std.err), plot.args=list(lty=c(1, 4, 3, 3)) )
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/17/2010 for the course IEOR 4709 taught by Professor Stevenkou during the Spring '10 term at Columbia.

Page1 / 6

hwk6 - IEOR E4709 Data Analysis for Financial Engineers...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online