Time series forcasting for IOC April 2013
Hi,
I recently tried to do time series forecasting for Indian Oil corporation.Took the data from Yahoo Finance from 2011 to March 29, 2013.I took only past 2 years, as stock market situation would have been pretty different 4-5 years back, so recent data makes more sense.
And this is how the data looks like:
The first graph shows the stock price data against the time. Here Obs are in the same order as time.
The second graph shows the Autocorrelation function(ACF), followed by Partial ACF and then Inverse ACF.
Just by looking at the time series, we can see its not stationary, we can also perform Dickey-Fuller's test and check for the value of
Pr < Rho and Pr < Tau.
It will be >0.005, which means non-stationary.
Lets see how the series looks after differentiating:
The series looks stationary now. You can verify that also from p values of dickey fuller's test which will be <0 .005="" now.="" p="">So we try to estimate the (P,Q) factors now and realise (1,0) fits the best, because of less error and more explanation of variance.
So we have final model ARIMA(1,1,0).
Forecasting with this value, we have values after integration:
T+1 obs: 281.54
T+2 obs: 282.47
T+3 obs: 281.41
Now finally residual check:
0>
It looks pretty random. So we are ok with the model.
Now lets go back and check the actual values:
4 Apr, 2013 283.85
*3 Apr, 2013 290.20
2 Apr, 2013 284.35
1 Apr, 2013 281.20
Considering 3rd April to be a volatility in stock market, our forecasted values are pretty close to the actual value. I will be coming back with stock forecast for more companies and with other kind of forecasting methods. Stay tuned!!
2:13 AM
|
Labels:
arima forecasting,
indian oil corporation,
predictive modeling,
stock price forecast,
time series forecast
|
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment