Problem Definition
In the xtsdata (csv file) there are 5 columns.
The aim is to use the columns (RUB_sol and MFA_sol) and predict 30 data points each for the two columns.

Data Location
The data is available as a csv file named xtsdata.csv

Data Description
The data consists of 5 columns.
[,1] time15
[,2] RUB_sol
[,3] MFA_sol
[,4] NFA_sol
[,5] NFY_sol
[,6] SFY_baro_air
[,7] NFA_baro_air

Steps to be followed
Auto Regressive Integrated Moving Average
- Visualize Time Series
- Check Stationarity
- Plot ACF / PACF Charts
- Build ARIMA Model
- Make Forecast

Setup

Load Libs

library(tidyr)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
#library(ggplot2)
#library(corrgram)
#library(gridExtra)
#library(Deducer)
#library(caret)
library(lubridate)
## 
## Attaching package: 'lubridate'
## The following object is masked from 'package:base':
## 
##     date
library(tseries) 
library(xts)
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
## 
## Attaching package: 'xts'
## The following objects are masked from 'package:dplyr':
## 
##     first, last
library(forecast)
library(quantmod)
## Loading required package: TTR
## Version 0.4-0 included new data defaults. See ?getSymbols.
library(devtools)
#install_github('sinhrks/ggfortify')
library(ggfortify)
## Loading required package: ggplot2
## 
## Attaching package: 'ggfortify'
## The following object is masked from 'package:forecast':
## 
##     gglagplot

Read Data

dfrData <- read.csv("/Users/Charu/Desktop/Machine Learning/xtsdata.csv", header=T, stringsAsFactors=F)
head(dfrData)
##           time15 RUB_sol MFA_sol NFA_sol NFY_sol SFY_baro_air NFA_baro_air
## 1 4/30/2012 0:15  11.929  12.689   11.26    8.19         9.43       13.134
## 2 4/30/2012 0:30  11.879  12.627   11.28    8.18         9.25       12.925
## 3 4/30/2012 0:45  11.828  12.570   11.26    8.21         9.03       12.736
## 4 4/30/2012 1:00  11.779  12.511   11.23    8.22         8.82       12.605
## 5 4/30/2012 1:15  11.730  12.459   11.17    8.23         8.60       12.455
## 6 4/30/2012 1:30  11.682  12.397   11.15    8.24         8.42       12.335

Create Extensible Time Series From a csv

dfrData <- read.csv("/Users/Charu/Desktop/Machine Learning/xtsdata.csv", header=T, stringsAsFactors=F)
names(dfrData)
## [1] "time15"       "RUB_sol"      "MFA_sol"      "NFA_sol"     
## [5] "NFY_sol"      "SFY_baro_air" "NFA_baro_air"
## This is done to prevent date being read as a string. xts needs it to be a date object.
dfrData$time15 <- as.POSIXlt(dfrData$time15,format="%m/%d/%Y %H:%M") 
xtsData <- xts(dfrData, order.by=dfrData$time15)
head(xtsData)
##                     time15                RUB_sol  MFA_sol  NFA_sol
## 0012-05-01 00:00:00 "0012-05-01 00:00:00" "12.546" "12.701" "11.66"
## 0012-05-01 00:15:00 "0012-05-01 00:15:00" "12.500" "12.623" "11.65"
## 0012-05-01 00:30:00 "0012-05-01 00:30:00" "12.453" "12.556" "11.62"
## 0012-05-01 00:45:00 "0012-05-01 00:45:00" "12.404" "12.484" "11.54"
## 0012-05-01 01:00:00 "0012-05-01 01:00:00" "12.354" "12.411" "11.51"
## 0012-05-01 01:15:00 "0012-05-01 01:15:00" "12.304" "12.336" "11.47"
##                     NFY_sol SFY_baro_air NFA_baro_air
## 0012-05-01 00:00:00 " 8.61" "12.39"      "15.802"    
## 0012-05-01 00:15:00 " 8.61" "12.11"      "15.479"    
## 0012-05-01 00:30:00 " 8.63" "11.90"      "15.243"    
## 0012-05-01 00:45:00 " 8.64" "11.81"      "14.925"    
## 0012-05-01 01:00:00 " 8.64" "11.65"      "14.615"    
## 0012-05-01 01:15:00 " 8.65" "11.44"      "14.394"

Creating two separate Extensible Time Series for the two columns “RUB_sol”, “MFA_sol”
- Creating Extensible Time Series for RUB_sol

xtsRUB_sol <-xts(dfrData$RUB_sol,order.by =dfrData$time15)
names(xtsRUB_sol)[1] <-paste("RUB_sol")
class(xtsRUB_sol)
## [1] "xts" "zoo"
head(xtsRUB_sol)
##                     RUB_sol
## 0012-05-01 00:00:00  12.546
## 0012-05-01 00:15:00  12.500
## 0012-05-01 00:30:00  12.453
## 0012-05-01 00:45:00  12.404
## 0012-05-01 01:00:00  12.354
## 0012-05-01 01:15:00  12.304
xtsMFA_sol <-xts(dfrData$MFA_sol,order.by =dfrData$time15)
names(xtsMFA_sol)[1] <-paste("MFA_sol")
class(xtsMFA_sol)
## [1] "xts" "zoo"
head(xtsMFA_sol)
##                     MFA_sol
## 0012-05-01 00:00:00  12.701
## 0012-05-01 00:15:00  12.623
## 0012-05-01 00:30:00  12.556
## 0012-05-01 00:45:00  12.484
## 0012-05-01 01:00:00  12.411
## 0012-05-01 01:15:00  12.336

————————————————–PART-1-(xtsRUB_SOL)———————————————–

Dealing first with xtsRUB_sol
Xts Info

cat("\nSummary:\n")
## 
## Summary:
summary(xtsRUB_sol)
##      Index                        RUB_sol      
##  Min.   :0012-05-01 00:00:00   Min.   : 9.489  
##  1st Qu.:0012-06-04 20:56:15   1st Qu.:13.906  
##  Median :2012-05-18 05:52:30   Median :16.043  
##  Mean   :1208-12-08 13:33:07   Mean   :15.956  
##  3rd Qu.:2012-06-15 02:48:45   3rd Qu.:17.971  
##  Max.   :2012-06-30 23:45:00   Max.   :22.439
cat("\nStart:\n")
## 
## Start:
start(xtsRUB_sol)
## [1] "0012-05-01 LMT"
cat("\nEnds:\n")
## 
## Ends:
end(xtsRUB_sol)
## [1] "2012-06-30 23:45:00 IST"
cat("\nFreq:\n")
## 
## Freq:
frequency(xtsRUB_sol)
## [1] 0.001111111
cat("\nIndex:\n")
## 
## Index:
head(index(xtsRUB_sol))
## [1] "0012-05-01 00:00:00 LMT" "0012-05-01 00:15:00 LMT"
## [3] "0012-05-01 00:30:00 LMT" "0012-05-01 00:45:00 LMT"
## [5] "0012-05-01 01:00:00 LMT" "0012-05-01 01:15:00 LMT"
cat("\nPeriodicity:\n")
## 
## Periodicity:
periodicity(xtsRUB_sol)
## 15 minute periodicity from 0012-05-01 to 2012-06-30 23:45:00
cat("\nYearly OHLC:\n")
## 
## Yearly OHLC:
to.yearly(xtsRUB_sol)
##            xtsRUB_sol.Open xtsRUB_sol.High xtsRUB_sol.Low xtsRUB_sol.Close
## 0012-07-02          12.546          21.896          9.489           20.550
## 2012-06-30          11.929          22.439         10.914           18.997
cat("\nYearly Mean:\n")
## 
## Yearly Mean:
lapply(split(xtsRUB_sol,f="years"),FUN=mean)
## [[1]]
## [1] 14.88357
## 
## [[2]]
## [1] 16.67569
cat("\nQuarterly OHLC:\n")
## 
## Quarterly OHLC:
head(to.quarterly(xtsRUB_sol))
##         xtsRUB_sol.Open xtsRUB_sol.High xtsRUB_sol.Low xtsRUB_sol.Close
## 12 Q2            12.546          20.316          9.489           17.709
## 12 Q3            18.960          21.896         17.883           20.550
## 2012 Q2          11.929          22.439         10.914           18.997
cat("\nQuarterly Mean:\n")
## 
## Quarterly Mean:
head(lapply(split(xtsRUB_sol,f="quarters"),FUN=mean))
## [[1]]
## [1] 14.59785
## 
## [[2]]
## [1] 19.42347
## 
## [[3]]
## [1] 16.67569
cat("\nMonthly OHLC:\n")
## 
## Monthly OHLC:
head(to.monthly(xtsRUB_sol))
##          xtsRUB_sol.Open xtsRUB_sol.High xtsRUB_sol.Low xtsRUB_sol.Close
## May 0012          12.546          16.302          9.489           14.644
## Jun 0012          17.207          20.316         12.995           17.709
## Jul 0012          18.960          21.896         17.883           20.550
## Apr 2012          11.929          13.665         10.914           12.589
## May 2012          14.590          18.891         11.196           17.254
## Jun 2012          17.664          22.439         15.015           18.997
cat("\nMonthly Mean:\n")
## 
## Monthly Mean:
head(lapply(split(xtsRUB_sol,f="months"),FUN=mean))
## [[1]]
## [1] 12.54333
## 
## [[2]]
## [1] 16.65238
## 
## [[3]]
## [1] 19.42347
## 
## [[4]]
## [1] 12.27673
## 
## [[5]]
## [1] 15.07094
## 
## [[6]]
## [1] 18.61144

Plot xts

autoplot(xtsRUB_sol, ts.colour='blue') +
    labs(title="Times Series Plot") +
    labs(x="Date and Month") +
    labs(y="RUB_sol")

Observation
The graph depicts the fluctuations present in the data.
There are no trends visible as such in this time series plot.
This is not a stationary series.

Decompose xts

# decompose data
#decompose(xtsRUB_sol)

Plot Decomposed xts

# plot decomposed data
#autoplot(stl(xtsRUB_sol, s.window = 'periodic'), ts.colour = 'blue')
## TREND LINE can be plotted by finding the mean of every year then plotting it.

Observation
An error is received on trying to decompose the xts and when one tries to plot it.
The data will decompose only if there is seasonality in the data.
Presence of the error indicates the data has no seasonality.

ADF Test

# Augmented Dickey-Fuller Test
adf.test(xtsRUB_sol, alternative="stationary", k=0)
## 
##  Augmented Dickey-Fuller Test
## 
## data:  xtsRUB_sol
## Dickey-Fuller = -2.6446, Lag order = 0, p-value = 0.3053
## alternative hypothesis: stationary

Observation
Ideally, P-value should be less than 0.05.
Small p-values suggest the data is stationary.
However, here the p value is greater than 0.05.
This implies the data is not stationary.

Plot ACF- Auto Correlation Function

# Auto Correlation Function
autoplot(acf(xtsRUB_sol, plot = FALSE))

Observation
This plot should be greater than zero.
This displays the ACF graph as mentioned by ARIMA with values above the zero line.

Plot PACF- Partial Auto Correlation Function

#acf(diff(log(xtsD1)))
autoplot(pacf(xtsRUB_sol, plot = FALSE))

Observation
This plot should be below zero.
This displays the ACF graph as mentioned by ARIMA with values below the zero line.

ARIMA
ARIMA (Auto Regressive Integrated Moving Averages)
- ARIMA Models Provide Another Approach To Time Series Forecasting
- ARIMA Models Are, In Theory, The Most General Class Of Models For Forecasting A Time Series.
- Arima Models Aim To Describe The Autocorrelations In The Data
- Pre Requisite Of ARIMA Is That The Time Series Needs To Be Stationary.
- A Stationary Series Has No Trend, Its Variations Around Its Mean Have A Constant Amplitude, And It Wiggles In A Consistent Fashion,
I.E., Its Short-term Random Time Patterns Always Look The Same In A Statistical Sense
- This is a modeling approach that can be used to calculate the probability of future value lying between two specified limits

THE MAIN ASSUMPTION IN ARIMA TECHNIQUES IS THAT THE DATA MUST BE STATIONARY

Unless Time Series Is Stationary, An ARIMA Model Can Not Be Built

Conclusion from the tests:
ADF, ACF and PACF were used to check if the data was stationery.

Observations were:
- ADF indicated a p value greater than 0.05 (ideally should be less than 0.05)
- ACF and PACF behaved like the expected graphs for ARIMA.

Ideally, ADF is the main criteria to decide whether the data is stationary or not. ACF and PACF act as a support.
In reality if ADF is greater than 0.05 then ARIMA should be avoided.
However, for assignment for practice we are proceeding with ARIMA.

Make ARIMA Model

# get arima model (find best model)
armModel <- auto.arima(xtsRUB_sol)
armModel
## Series: xtsRUB_sol 
## ARIMA(2,1,2)                    
## 
## Coefficients:
##          ar1      ar2      ma1     ma2
##       1.9622  -0.9674  -1.8216  0.8262
## s.e.  0.0044   0.0044   0.0095  0.0095
## 
## sigma^2 estimated as 0.01681:  log likelihood=3803.81
## AIC=-7597.62   AICc=-7597.61   BIC=-7564.05

Forecast Using ARIMA Model

# forecast using
fcData <- forecast(armModel,h=30)
fcData
##         Point Forecast    Lo 80    Hi 80    Lo 95    Hi 95
## 5486401       18.96365 18.79748 19.12982 18.70952 19.21779
## 5487301       18.93310 18.68103 19.18517 18.54760 19.31861
## 5488201       18.90541 18.57609 19.23473 18.40176 19.40906
## 5489101       18.88063 18.47708 19.28419 18.26345 19.49782
## 5490001       18.85880 18.38226 19.33533 18.13000 19.58759
## 5490901       18.83993 18.29103 19.38883 18.00046 19.67940
## 5491801       18.82403 18.20318 19.44487 17.87452 19.77353
## 5492701       18.81108 18.11870 19.50345 17.75218 19.86998
## 5493601       18.80105 18.03767 19.56443 17.63355 19.96855
## 5494501       18.79390 17.96019 19.62761 17.51885 20.06895
## 5495401       18.78958 17.88641 19.69275 17.40830 20.17086
## 5496301       18.78801 17.81644 19.75959 17.30212 20.27391
## 5497201       18.78912 17.75039 19.82784 17.20052 20.37771
## 5498101       18.79280 17.68836 19.89724 17.10370 20.48190
## 5499001       18.79896 17.63041 19.96751 17.01182 20.58610
## 5499901       18.80749 17.57661 20.03836 16.92503 20.68995
## 5500801       18.81826 17.52698 20.10953 16.84342 20.79309
## 5501701       18.83114 17.48153 20.18075 16.76709 20.89519
## 5502601       18.84600 17.44023 20.25176 16.69606 20.99593
## 5503501       18.86269 17.40305 20.32234 16.63036 21.09503
## 5504401       18.88108 17.36992 20.39224 16.56997 21.19219
## 5505301       18.90100 17.34077 20.46124 16.51483 21.28718
## 5506201       18.92231 17.31547 20.52915 16.46486 21.37976
## 5507101       18.94485 17.29392 20.59578 16.41997 21.46973
## 5508001       18.96846 17.27597 20.66095 16.38002 21.55690
## 5508901       18.99299 17.26147 20.72451 16.34485 21.64112
## 5509801       19.01827 17.25023 20.78630 16.31429 21.72225
## 5510701       19.04415 17.24209 20.84621 16.28813 21.80017
## 5511601       19.07048 17.23683 20.90412 16.26616 21.87480
## 5512501       19.09710 17.23426 20.95994 16.24813 21.94606

Plot Forecast Using ARIMA Model

autoplot(fcData)

Observation
The difference in the colours shows the forecasted value.

————————————————–PART-2-(MFA_SOL)—————————————————

Dealing with xtsMFA_sol
Xts Info

cat("\nSummary:\n")
## 
## Summary:
summary(xtsMFA_sol)
##      Index                        MFA_sol     
##  Min.   :0012-05-01 00:00:00   Min.   :10.54  
##  1st Qu.:0012-06-04 20:56:15   1st Qu.:13.30  
##  Median :2012-05-18 05:52:30   Median :15.09  
##  Mean   :1208-12-08 13:33:07   Mean   :14.92  
##  3rd Qu.:2012-06-15 02:48:45   3rd Qu.:16.45  
##  Max.   :2012-06-30 23:45:00   Max.   :19.71
cat("\nStart:\n")
## 
## Start:
start(xtsMFA_sol)
## [1] "0012-05-01 LMT"
cat("\nEnds:\n")
## 
## Ends:
end(xtsMFA_sol)
## [1] "2012-06-30 23:45:00 IST"
cat("\nFreq:\n")
## 
## Freq:
frequency(xtsMFA_sol)
## [1] 0.001111111
cat("\nIndex:\n")
## 
## Index:
head(index(xtsMFA_sol))
## [1] "0012-05-01 00:00:00 LMT" "0012-05-01 00:15:00 LMT"
## [3] "0012-05-01 00:30:00 LMT" "0012-05-01 00:45:00 LMT"
## [5] "0012-05-01 01:00:00 LMT" "0012-05-01 01:15:00 LMT"
cat("\nPeriodicity:\n")
## 
## Periodicity:
periodicity(xtsMFA_sol)
## 15 minute periodicity from 0012-05-01 to 2012-06-30 23:45:00
cat("\nYearly OHLC:\n")
## 
## Yearly OHLC:
to.yearly(xtsMFA_sol)
##            xtsMFA_sol.Open xtsMFA_sol.High xtsMFA_sol.Low xtsMFA_sol.Close
## 0012-07-02          12.701          18.994         10.541           17.819
## 2012-06-30          12.689          19.709         10.905           16.295
cat("\nYearly Mean:\n")
## 
## Yearly Mean:
lapply(split(xtsMFA_sol,f="years"),FUN=mean)
## [[1]]
## [1] 14.39801
## 
## [[2]]
## [1] 15.27782
cat("\nQuarterly OHLC:\n")
## 
## Quarterly OHLC:
head(to.quarterly(xtsMFA_sol))
##         xtsMFA_sol.Open xtsMFA_sol.High xtsMFA_sol.Low xtsMFA_sol.Close
## 12 Q2            12.701          18.994         10.541           15.999
## 12 Q3            16.252          18.691         15.603           17.819
## 2012 Q2          12.689          19.709         10.905           16.295
cat("\nQuarterly Mean:\n")
## 
## Quarterly Mean:
head(lapply(split(xtsMFA_sol,f="quarters"),FUN=mean))
## [[1]]
## [1] 14.23747
## 
## [[2]]
## [1] 16.94893
## 
## [[3]]
## [1] 15.27782
cat("\nMonthly OHLC:\n")
## 
## Monthly OHLC:
head(to.monthly(xtsMFA_sol))
##          xtsMFA_sol.Open xtsMFA_sol.High xtsMFA_sol.Low xtsMFA_sol.Close
## May 0012          12.701          15.455         10.541           14.301
## Jun 0012          15.796          18.994         13.883           15.999
## Jul 0012          16.252          18.691         15.603           17.819
## Apr 2012          12.689          13.855         11.579           12.769
## May 2012          14.237          17.203         10.905           15.834
## Jun 2012          15.976          19.709         14.689           16.295
cat("\nMonthly Mean:\n")
## 
## Monthly Mean:
head(lapply(split(xtsMFA_sol,f="months"),FUN=mean))
## [[1]]
## [1] 12.53395
## 
## [[2]]
## [1] 15.94099
## 
## [[3]]
## [1] 16.94893
## 
## [[4]]
## [1] 12.69096
## 
## [[5]]
## [1] 13.96723
## 
## [[6]]
## [1] 16.80344

Plot xts

autoplot(xtsMFA_sol, ts.colour='blue') +
    labs(title="Times Series Plot") +
    labs(x="Date and Month") +
    labs(y="MFA_sol")

Observation
The graph depicts the fluctuations present in the data.
There are no trends visible as such in this time series plot.
This is not a stationary series.

Decompose xts

# decompose data
#decompose(xtsMFA_sol)

Plot Decomposed xts

# plot decomposed data
#autoplot(stl(xtsMFA_sol, s.window = 'periodic'), ts.colour = 'blue')

Observation
An error is received on trying to decompose the xts and when one tries to plot it.
The data will decompose only if there is seasonality in the data.
Presence of the error indicates the data has no seasonality.

ADF Test

# Augmented Dickey-Fuller Test
adf.test(xtsMFA_sol, alternative="stationary", k=0)
## 
##  Augmented Dickey-Fuller Test
## 
## data:  xtsMFA_sol
## Dickey-Fuller = -2.2283, Lag order = 0, p-value = 0.4817
## alternative hypothesis: stationary

Observation
Ideally, P-value should be less than 0.05.
Small p-values suggest the data is stationary.
However, here the p value is greater than 0.05.
This implies the data is not stationary.

Plot ACF

# Auto Correlation Function
autoplot(acf(xtsMFA_sol, plot = FALSE))

Observation This plot should be greater than zero. This displays the ACF graph as mentioned by ARIMA with values above the zero line.

Plot PACF

#acf(diff(log(xtsD1)))
autoplot(pacf(xtsMFA_sol, plot = FALSE))

Observation
This plot should be below zero.
This displays the ACF graph as mentioned by ARIMA with values below the zero line.

ARIMA
ARIMA (Auto Regressive Integrated Moving Averages)
- ARIMA Models Provide Another Approach To Time Series Forecasting
- ARIMA Models Are, In Theory, The Most General Class Of Models For Forecasting A Time Series.
- Arima Models Aim To Describe The Autocorrelations In The Data
- Pre Requisite Of ARIMA Is That The Time Series Needs To Be Stationary.
- A Stationary Series Has No Trend, Its Variations Around Its Mean Have A Constant Amplitude, And It Wiggles In A Consistent Fashion,
I.E., Its Short-term Random Time Patterns Always Look The Same In A Statistical Sense
- This is a modeling approach that can be used to calculate the probability of future value lying between two specified limits

THE MAIN ASSUMPTION IN ARIMA TECHNIQUES IS THAT THE DATA MUST BE STATIONARY

Unless Time Series Is Stationary, An ARIMA Model Can Not Be Built

Conclusion from the tests:
ADF, ACF and PACF were used to check if the data was stationery.

Observations were:
- ADF indicated a p value greater than 0.05 (ideally should be less than 0.05)
- ACF and PACF behaved like the expected graphs for ARIMA.

Ideally, ADF is the main criteria to decide whether the data is stationary or not. ACF and PACF act as a support. In reality if ADF is greater than 0.05 then ARIMA should be avoided.
However, for this assignment for practice we are proceeding with ARIMA.

Make ARIMA Model

# get arima model (find best model)
armModel1 <- auto.arima(xtsMFA_sol)
armModel1
## Series: xtsMFA_sol 
## ARIMA(1,1,2)                    
## 
## Coefficients:
##          ar1      ma1     ma2
##       0.9011  -0.6753  0.0340
## s.e.  0.0097   0.0160  0.0143
## 
## sigma^2 estimated as 0.007172:  log likelihood=6400
## AIC=-12791.99   AICc=-12791.99   BIC=-12765.13

Forecast Using ARIMA Model

# forecast using
fcData1 <- forecast(armModel1,h=30)
fcData1
##         Point Forecast    Lo 80    Hi 80    Lo 95    Hi 95
## 5486401       16.26398 16.15544 16.37251 16.09799 16.42996
## 5487301       16.23610 16.06441 16.40779 15.97352 16.49867
## 5488201       16.21098 15.97711 16.44485 15.85330 16.56865
## 5489101       16.18834 15.89199 16.48470 15.73510 16.64158
## 5490001       16.16794 15.80876 16.52713 15.61862 16.71727
## 5490901       16.14957 15.72743 16.57171 15.50396 16.79518
## 5491801       16.13301 15.64801 16.61800 15.39127 16.87474
## 5492701       16.11809 15.57057 16.66560 15.28073 16.95544
## 5493601       16.10464 15.49511 16.71418 15.17244 17.03684
## 5494501       16.09253 15.42163 16.76342 15.06648 17.11857
## 5495401       16.08161 15.35012 16.81310 14.96289 17.20032
## 5496301       16.07177 15.28055 16.86299 14.86170 17.28184
## 5497201       16.06291 15.21288 16.91294 14.76290 17.36292
## 5498101       16.05492 15.14705 16.96280 14.66645 17.44339
## 5499001       16.04773 15.08301 17.01244 14.57232 17.52313
## 5499901       16.04124 15.02070 17.06178 14.48046 17.60202
## 5500801       16.03540 14.96006 17.11074 14.39081 17.67999
## 5501701       16.03013 14.90102 17.15925 14.30331 17.75696
## 5502601       16.02539 14.84352 17.20726 14.21788 17.83290
## 5503501       16.02112 14.78750 17.25473 14.13446 17.90777
## 5504401       16.01726 14.73289 17.30164 14.05299 17.98154
## 5505301       16.01379 14.67964 17.34795 13.97338 18.05421
## 5506201       16.01067 14.62767 17.39366 13.89556 18.12577
## 5507101       16.00785 14.57695 17.43875 13.81948 18.19622
## 5508001       16.00531 14.52741 17.48321 13.74505 18.26557
## 5508901       16.00302 14.47899 17.52705 13.67222 18.33382
## 5509801       16.00096 14.43166 17.57026 13.60092 18.40100
## 5510701       15.99910 14.38536 17.61285 13.53109 18.46712
## 5511601       15.99743 14.34004 17.65482 13.46267 18.53219
## 5512501       15.99592 14.29566 17.69618 13.39560 18.59625

Plot Forecast Using ARIMA Model

autoplot(fcData1)

Observation
The difference in the colours shows the forecasted value.

—————————–xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx——————————————-

                END OF ASSIGNMENT