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("./DATA/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("./DATA/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
## 2012-04-30 00:15:00 "2012-04-30 00:15:00" "11.929" "12.689" "11.26"
## 2012-04-30 00:30:00 "2012-04-30 00:30:00" "11.879" "12.627" "11.28"
## 2012-04-30 00:45:00 "2012-04-30 00:45:00" "11.828" "12.570" "11.26"
## 2012-04-30 01:00:00 "2012-04-30 01:00:00" "11.779" "12.511" "11.23"
## 2012-04-30 01:15:00 "2012-04-30 01:15:00" "11.730" "12.459" "11.17"
## 2012-04-30 01:30:00 "2012-04-30 01:30:00" "11.682" "12.397" "11.15"
##                     NFY_sol SFY_baro_air NFA_baro_air
## 2012-04-30 00:15:00 " 8.19" " 9.43"      "13.134"    
## 2012-04-30 00:30:00 " 8.18" " 9.25"      "12.925"    
## 2012-04-30 00:45:00 " 8.21" " 9.03"      "12.736"    
## 2012-04-30 01:00:00 " 8.22" " 8.82"      "12.605"    
## 2012-04-30 01:15:00 " 8.23" " 8.60"      "12.455"    
## 2012-04-30 01:30:00 " 8.24" " 8.42"      "12.335"

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
## 2012-04-30 00:15:00  11.929
## 2012-04-30 00:30:00  11.879
## 2012-04-30 00:45:00  11.828
## 2012-04-30 01:00:00  11.779
## 2012-04-30 01:15:00  11.730
## 2012-04-30 01:30:00  11.682
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
## 2012-04-30 00:15:00  12.689
## 2012-04-30 00:30:00  12.627
## 2012-04-30 00:45:00  12.570
## 2012-04-30 01:00:00  12.511
## 2012-04-30 01:15:00  12.459
## 2012-04-30 01:30:00  12.397

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

Dealing first with xtsRUB_sol
Xts Info

cat("\nSummary:\n")
## 
## Summary:
summary(xtsRUB_sol)
##      Index                        RUB_sol      
##  Min.   :2012-04-30 00:15:00   Min.   : 9.489  
##  1st Qu.:2012-05-15 21:11:15   1st Qu.:13.906  
##  Median :2012-05-31 18:07:30   Median :16.043  
##  Mean   :2012-05-31 18:07:30   Mean   :15.956  
##  3rd Qu.:2012-06-16 15:03:45   3rd Qu.:17.971  
##  Max.   :2012-07-02 12:00:00   Max.   :22.439
cat("\nStart:\n")
## 
## Start:
start(xtsRUB_sol)
## [1] "2012-04-30 00:15:00 IST"
cat("\nEnds:\n")
## 
## Ends:
end(xtsRUB_sol)
## [1] "2012-07-02 12:00:00 IST"
cat("\nFreq:\n")
## 
## Freq:
frequency(xtsRUB_sol)
## [1] 0.001111111
cat("\nIndex:\n")
## 
## Index:
head(index(xtsRUB_sol))
## [1] "2012-04-30 00:15:00 IST" "2012-04-30 00:30:00 IST"
## [3] "2012-04-30 00:45:00 IST" "2012-04-30 01:00:00 IST"
## [5] "2012-04-30 01:15:00 IST" "2012-04-30 01:30:00 IST"
cat("\nPeriodicity:\n")
## 
## Periodicity:
periodicity(xtsRUB_sol)
## 15 minute periodicity from 2012-04-30 00:15:00 to 2012-07-02 12:00:00
cat("\nYearly OHLC:\n")
## 
## Yearly OHLC:
to.yearly(xtsRUB_sol)
##            xtsRUB_sol.Open xtsRUB_sol.High xtsRUB_sol.Low xtsRUB_sol.Close
## 2012-07-02          11.929          22.439          9.489            20.55
cat("\nYearly Mean:\n")
## 
## Yearly Mean:
lapply(split(xtsRUB_sol,f="years"),FUN=mean)
## [[1]]
## [1] 15.95573
cat("\nQuarterly OHLC:\n")
## 
## Quarterly OHLC:
head(to.quarterly(xtsRUB_sol))
##         xtsRUB_sol.Open xtsRUB_sol.High xtsRUB_sol.Low xtsRUB_sol.Close
## 2012 Q2          11.929          22.439          9.489           18.997
## 2012 Q3          18.960          21.896         17.883           20.550
cat("\nQuarterly Mean:\n")
## 
## Quarterly Mean:
head(lapply(split(xtsRUB_sol,f="quarters"),FUN=mean))
## [[1]]
## [1] 15.87123
## 
## [[2]]
## [1] 19.42347
cat("\nMonthly OHLC:\n")
## 
## Monthly OHLC:
head(to.monthly(xtsRUB_sol))
##          xtsRUB_sol.Open xtsRUB_sol.High xtsRUB_sol.Low xtsRUB_sol.Close
## Apr 2012          11.929          13.665         10.914           12.589
## May 2012          12.546          18.891          9.489           17.254
## Jun 2012          17.207          22.439         12.995           18.997
## Jul 2012          18.960          21.896         17.883           20.550
cat("\nMonthly Mean:\n")
## 
## Monthly Mean:
head(lapply(split(xtsRUB_sol,f="months"),FUN=mean))
## [[1]]
## [1] 12.27673
## 
## [[2]]
## [1] 14.09251
## 
## [[3]]
## [1] 17.82781
## 
## [[4]]
## [1] 19.42347

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 = -1.9731, Lag order = 0, p-value = 0.5898
## 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(5,1,1)                    
## 
## Coefficients:
##          ar1      ar2     ar3      ar4     ar5      ma1
##       1.9571  -1.0185  0.1645  -0.1499  0.0409  -0.9766
## s.e.  0.0131   0.0282  0.0309   0.0282  0.0130   0.0029
## 
## sigma^2 estimated as 0.0003703:  log likelihood=15431.69
## AIC=-30849.37   AICc=-30849.36   BIC=-30802.37

Forecast Using ARIMA Model

# forecast using
fcData <- forecast(armModel,h=30)
fcData
##         Point Forecast    Lo 80    Hi 80    Lo 95    Hi 95
## 5486401       20.75225 20.72759 20.77691 20.71453 20.78996
## 5487301       20.94708 20.89236 21.00179 20.86340 21.03075
## 5488201       21.13238 21.04270 21.22205 20.99523 21.26953
## 5489101       21.30777 21.17789 21.43764 21.10914 21.50640
## 5490001       21.47257 21.29815 21.64698 21.20582 21.73931
## 5490901       21.62601 21.40354 21.84849 21.28577 21.96626
## 5491801       21.76750 21.49399 22.04101 21.34920 22.18580
## 5492701       21.89651 21.56949 22.22354 21.39637 22.39666
## 5493601       22.01261 21.63006 22.39516 21.42755 22.59767
## 5494501       22.11543 21.67577 22.55508 21.44303 22.78782
## 5495401       22.20469 21.70674 22.70263 21.44315 22.96623
## 5496301       22.28020 21.72316 22.83724 21.42828 23.13212
## 5497201       22.34186 21.72526 22.95846 21.39886 23.28486
## 5498101       22.38964 21.71336 23.06591 21.35537 23.42390
## 5499001       22.42358 21.68783 23.15933 21.29835 23.54882
## 5499901       22.44382 21.64908 23.23857 21.22837 23.65928
## 5500801       22.45057 21.59760 23.30354 21.14607 23.75508
## 5501701       22.44410 21.53393 23.35427 21.05211 23.83609
## 5502601       22.42475 21.45864 23.39087 20.94721 23.90230
## 5503501       22.39294 21.37236 23.41352 20.83210 23.95378
## 5504401       22.34914 21.27577 23.42251 20.70756 23.99072
## 5505301       22.29388 21.16957 23.41818 20.57440 24.01336
## 5506201       22.22773 21.05449 23.40097 20.43342 24.02205
## 5507101       22.15134 20.93131 23.37137 20.28547 24.01721
## 5508001       22.06537 20.80082 23.32993 20.13140 23.99935
## 5508901       21.97055 20.66381 23.27729 19.97206 23.96903
## 5509801       21.86760 20.52110 23.21411 19.80831 23.92690
## 5510701       21.75732 20.37353 23.14112 19.64100 23.87365
## 5511601       21.64050 20.22193 23.05908 19.47098 23.81003
## 5512501       21.51796 20.06711 22.96882 19.29908 23.73685

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.   :2012-04-30 00:15:00   Min.   :10.54  
##  1st Qu.:2012-05-15 21:11:15   1st Qu.:13.30  
##  Median :2012-05-31 18:07:30   Median :15.09  
##  Mean   :2012-05-31 18:07:30   Mean   :14.92  
##  3rd Qu.:2012-06-16 15:03:45   3rd Qu.:16.45  
##  Max.   :2012-07-02 12:00:00   Max.   :19.71
cat("\nStart:\n")
## 
## Start:
start(xtsMFA_sol)
## [1] "2012-04-30 00:15:00 IST"
cat("\nEnds:\n")
## 
## Ends:
end(xtsMFA_sol)
## [1] "2012-07-02 12:00:00 IST"
cat("\nFreq:\n")
## 
## Freq:
frequency(xtsMFA_sol)
## [1] 0.001111111
cat("\nIndex:\n")
## 
## Index:
head(index(xtsMFA_sol))
## [1] "2012-04-30 00:15:00 IST" "2012-04-30 00:30:00 IST"
## [3] "2012-04-30 00:45:00 IST" "2012-04-30 01:00:00 IST"
## [5] "2012-04-30 01:15:00 IST" "2012-04-30 01:30:00 IST"
cat("\nPeriodicity:\n")
## 
## Periodicity:
periodicity(xtsMFA_sol)
## 15 minute periodicity from 2012-04-30 00:15:00 to 2012-07-02 12:00:00
cat("\nYearly OHLC:\n")
## 
## Yearly OHLC:
to.yearly(xtsMFA_sol)
##            xtsMFA_sol.Open xtsMFA_sol.High xtsMFA_sol.Low xtsMFA_sol.Close
## 2012-07-02          12.689          19.709         10.541           17.819
cat("\nYearly Mean:\n")
## 
## Yearly Mean:
lapply(split(xtsMFA_sol,f="years"),FUN=mean)
## [[1]]
## [1] 14.92437
cat("\nQuarterly OHLC:\n")
## 
## Quarterly OHLC:
head(to.quarterly(xtsMFA_sol))
##         xtsMFA_sol.Open xtsMFA_sol.High xtsMFA_sol.Low xtsMFA_sol.Close
## 2012 Q2          12.689          19.709         10.541           16.295
## 2012 Q3          16.252          18.691         15.603           17.819
cat("\nQuarterly Mean:\n")
## 
## Quarterly Mean:
head(lapply(split(xtsMFA_sol,f="quarters"),FUN=mean))
## [[1]]
## [1] 14.87504
## 
## [[2]]
## [1] 16.94893
cat("\nMonthly OHLC:\n")
## 
## Monthly OHLC:
head(to.monthly(xtsMFA_sol))
##          xtsMFA_sol.Open xtsMFA_sol.High xtsMFA_sol.Low xtsMFA_sol.Close
## Apr 2012          12.689          13.855         11.579           12.769
## May 2012          12.701          17.203         10.541           15.834
## Jun 2012          15.796          19.709         13.883           16.295
## Jul 2012          16.252          18.691         15.603           17.819
cat("\nMonthly Mean:\n")
## 
## Monthly Mean:
head(lapply(split(xtsMFA_sol,f="months"),FUN=mean))
## [[1]]
## [1] 12.69096
## 
## [[2]]
## [1] 13.41241
## 
## [[3]]
## [1] 16.45846
## 
## [[4]]
## [1] 16.94893

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.0628, Lag order = 0, p-value = 0.5517
## 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(4,1,4)                    
## 
## Coefficients:
## Warning in sqrt(diag(x$var.coef)): NaNs produced
##          ar1   ar2      ar3      ar4     ma1      ma2    ma3     ma4
##       0.4849  0.77  -0.3667  -0.0081  0.1283  -0.4111  0.264  0.1033
## s.e.     NaN   NaN      NaN      NaN     NaN   0.0508    NaN     NaN
## 
## sigma^2 estimated as 0.0009886:  log likelihood=12441.02
## AIC=-24864.04   AICc=-24864.01   BIC=-24803.6

Forecast Using ARIMA Model

# forecast using
fcData1 <- forecast(armModel1,h=30)
fcData1
##         Point Forecast    Lo 80    Hi 80    Lo 95    Hi 95
## 5486401       17.89289 17.85260 17.93319 17.83127 17.95452
## 5487301       17.96058 17.88409 18.03706 17.84361 18.07754
## 5488201       18.02394 17.90472 18.14316 17.84161 18.20627
## 5489101       18.08394 17.91538 18.25251 17.82614 18.34174
## 5490001       18.13642 17.91226 18.36057 17.79360 18.47923
## 5490901       18.18428 17.90110 18.46746 17.75119 18.61737
## 5491801       18.22538 17.88044 18.57032 17.69784 18.75291
## 5492701       18.26244 17.85475 18.67013 17.63893 18.88594
## 5493601       18.29408 17.82296 18.76519 17.57357 19.01458
## 5494501       18.32250 17.78826 18.85673 17.50545 19.13954
## 5495401       18.34672 17.74976 18.94368 17.43375 19.25969
## 5496301       18.36845 17.70971 19.02718 17.36100 19.37589
## 5497201       18.38696 17.66738 19.10653 17.28646 19.48745
## 5498101       18.40355 17.62437 19.18273 17.21190 19.59520
## 5499001       18.41769 17.58009 19.25529 17.13669 19.69868
## 5499901       18.43036 17.53568 19.32503 17.06207 19.79864
## 5500801       18.44115 17.49067 19.39163 16.98752 19.89478
## 5501701       18.45082 17.44589 19.45575 16.91391 19.98773
## 5502601       18.45906 17.40095 19.51718 16.84081 20.07731
## 5503501       18.46644 17.35645 19.57644 16.76885 20.16404
## 5504401       18.47274 17.31209 19.63339 16.69767 20.24780
## 5505301       18.47837 17.26830 19.68845 16.62772 20.32902
## 5506201       18.48317 17.22483 19.74152 16.55870 20.40764
## 5507101       18.48748 17.18201 19.79294 16.49094 20.48402
## 5508001       18.49114 17.13963 19.84266 16.42418 20.55811
## 5508901       18.49443 17.09792 19.89093 16.35865 20.63020
## 5509801       18.49723 17.05672 19.93773 16.29417 20.70029
## 5510701       18.49973 17.01620 19.98327 16.23087 20.76860
## 5511601       18.50187 16.97623 20.02752 16.16860 20.83514
## 5512501       18.50378 16.93692 20.07065 16.10746 20.90010

Plot Forecast Using ARIMA Model

autoplot(fcData1)

Observation
The difference in the colours shows the forecasted value.

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

                                       END OF ASSIGNMENT