Time series forecasting analysis is one of the most important components of quantitative finance. R software gives a lot of time series and forecasting packages to support time series analysis. There are sufficient packages in R to convert the equally spaced and unequally spaced series in time series. Also, there are sufficient packages in R to build forecasting models such as autoregressive integrated moving average and generalized autoregressive conditional heteroscedasticity. In this chapter, we are going to give brief flavors of converting any series into time series and forecasting models.
In this chapter, we are going to cover the following topics:
A time series is the sequence of data usually collected at regular intervals. There are a lot of domains where information is stored in time series form and needs to be analyzed for future planning.
For example, in the financial domain, we have the daily/monthly data available for unemployment, GDP, daily exchange rates, share prices, and so on. So all the investors or the people working in financial institutions need to plan their future strategy and so they want to analyze the time series data. Thus time series play a crucial role in the financial domain.
Time series data is very unpredictable in nature and to understand the data we need to decompose the time series data into various components, as given here:
In some of the techniques of forecasting, the time series is assumed to be stationary. The stationarity is required because for forecasting we are assuming the mean and variance to be static as that will be required for future forecasting analysis. If the series is nonstationary then we difference it to first make it stationary and then proceed further.