
An example of time series is the price of a stock on the stock market over time. Time series are used in many applications.

A time-series can also have a name (a string). A time series is a sequence of floating-point decimal numbers (double values). Here is a formal definition of the autocorrelation function:

Similarly, a value of -1 for a lag of k indicates a negative correlation with the values occuring k values before. A value of 1 for a lag of k indicates a positive correlation with values occuring k values before. The autocorrelation function can be viewed as a time series with values in the interval. To generate the correlation function of a time series, we will set a parameter called max_lag, and calculate all values of the autocorrelation function with a lag from 1 to max_lag. Autocorrelation is defined based on the concept of lag. What is the autocorrelation function of a time series?Ĭalculating the autocorrelation function of a time series if useful to check if a time series is stationnary, or just generally to check if data points in a time series are correlated or not correlated with some previous data points occuring with a lag. The file "MainTestAutocorrelationFileToFile.java"in
