Zaitun Time Series Online Documentation
Zaitun Time Series is designed for ease of use for statistical analysis, series modeling and forecasting of time series data.
Zaitun Time Series provides several statistics and neural networks models, and graphical tools that will make your work on time series analysis easier.
Zaitun Time Series was originally developed by the “Time Series” team as the final project of their four years diploma degrees in Sekolah Tinggi Ilmu Statistik Jakarta, Indonesia. Now, the developer team in zaitunsoftware.com is continuing the development of Zaitun Time Series.
Zaitun Time Series is a freeware. It can be used for any purpose, including commercial use.
Installation Guide
System Requirements
Zaitun Time Series installation is very simple and only takes a few minutes. To install Zaitun Time Series:





Working with Data
Zaitun Time Series represents time series data with the data point frequency (annual, monthly, weekly, daily, etc) ranging from start date to end date.
To create a new time series data project:

You can also open a project file saved in your media disk.
To open a saved project:

A Zaitun Time Series variable is a series of data points constituting one time series data collection. For example, the recorded (annual, monthly, weekly, daily) time series values of the Indonesian Exchange Rate. A time series data project can contain more than one variable.
To add a new variable into current project:

The Zaitun Time Series group represents a collection of several time series variables. A group can contain two or more series variables. A time series data project can contain more than one group.
To add a new group into current project:

You can edit the name or description of a variable/group. To edit a variable/group:


You can duplicate a variable/group. A duplicated variable/group has the same value as its source. To duplicate a variable/group:


You can also delete a variable/group you have created. To delete a variable/group:


Zaitun Time Series provides three ways to view a variable, spreadsheet view, graphic view, and statistics view. Viewing a variable is very simple. Double click the variable you wish to view. Zaitun Time Series will switch the main pane to the Variable View and view the selected variable.

You can also view a variable by manually switching the main pane to the Variable View Pane and clicking Add Pane button on the top left side of the Variable Pane. Select Variable dialog appears. Select the variable you want to view and then click OK. Zaitun Time Series will add a new pane on the Variable Pane to view the variable.


The default view is the spreadsheet view. To change the current view of a variable click on the Variable View Combo Box on the top of the Variable View pane. You can switch to graphic view or statistics view.

Spreadsheet View shows variable values on a grid, it makes it easy for you to input or edit variable values by pressing numeric keys directly from keyboard. You can also paste values from an external program like Excel by right clicking the grid and selecting Paste menu.

Graphic View shows variable values on a line chart. It makes it easy for you to analyze graphically the components of time series data of a variable. You will soon know whether the variable contains trend, cyclic, seasonal and irregular component.

Statistics View shows simple descriptive statistics of a variable making it easy for you to analyze statistical properties of a variable.

Zaitun Time Series provides two ways to view a group, spreadsheet view and graphic view. Viewing a group is not so different from viewing a variable. Just by double clicking the group you want to view, Zaitun Time Series will switch the main pane to Variable View and viewing the selected group.


Zaitun Time Series provides several transformation types that can be applied to a variable. They are differencing, seasonal differencing, logarithm, and square root. To transform a variable

Zaitun Time Series provides a facility to export the data created by Zaitun Time Series to another format. There are 2 formats available, CSV file and Excel File. Zaitun Time Series will export all of variables in the current project into a new CSV or Excel File, but it will not export the group data and the result data.
To export the current Zaitun Time Series project into a CSV file:

To export the current Zaitun Time Series project into an Excel file:

Zaitun Time Series provides a facility to import the data created by another software in a specified format. Zaitun Time Series provides a tool to import the data from CSV file (.csv) and Excel file (.xls).
Zaitun Time Series only accept numeric fields, both in the Excel format and the CSV format. Please do not include non numeric fields (e.g. “Nov 2007”) in your CSV and Excel file which will be imported to Zaitun Time Series, except the first line/row which will be the list of variable name of the data.
To import a CSV file into the current Zaitun Time Series project:


To import an Excel file into the current Zaitun Time Series project:


Zaitun Time Series provides a facility to help the user to view their stock market data easily with spreadsheet view and graphic view with a candlestick graph which helps the user to analyze the movement of their stock market data esily.
A Stock market data in Zaitun Time Series consists of five variables, they are Open Variable, High Variable, Low Variable, Close Variable, and Volume Variable.
Open Variable is a variable which shows a value of shares at the stock market opening, Close Variable is a variable which shows a value of shares at the stock market closing, High Variable is a variable which shows the highest value of shares at certain period at the stock market, Low Variable is a variable which shows the lowest value of shares at certain period at stock market, Volume Variable is a variable which shows the volume of transactions in a particular period
The feature of add stock market data in Zaitun Time Series is only available on project with Daily5, Weekly, and Monthly frequency.
To add a new stock market data in the current Zaitun Time Series project:

Zaitun Time Series provides two ways to view a stock market data, spreadsheet view and graphic view. Viewing a stock market data is very simple like viewing a variable. Double click the stock data you wish to view on Project View or by clicking Add Pane button on the top of Variable Pane. Zaitun Time Series will view the selected stock data.

The Spreadsheet View is the default view and you can show the Graphic View by clicking the Grapic button on the top of the Variable View.

Zaitun Time Series has a feature to import a live stock market data from online stock data provider such as Yahoo Finance. This feature is very useful especially for people who have an intensive interaction with the stock market in order to analyze the market or trade the market. They can easily import the stock market data from online data provider to Zaitun Time Series and then choose the right method available in Zaitun Time Series to make a prediction of the next movement of the stock market data. The result of prediction helps them to decide whether to buy or sell the market or do nothing.
To import a live stock market data in the current Zaitun Time Series project:



Trend Analysis
Linear trend is a simple function described as a straight line along several points of time series value in time series graph. Linear trend has a common pattern:
Tt = a + b.Yt
Where
Tt = Trend value of period t
a = Constant of trend value at base period
b = Coefficient of trend line direction
Yt = an independent variable, represents time variable, usually assumed to have integer value
1,2,3,... as in the sequence of time series data.
There are several methods that can be used to find the linear trend equation of a time series. Most commonly used is least squares method. This method finds the coefficient values of the trend equation (a and b) by minimizing mean of squared error (MSE). The formula is:


In several cases, linear trend is not suitable for time series data. These cases occur when a time series has a different gradient between the beginning phase of the data and the next phase. For these cases, it is better to use nonlinear trend than linear trend.
There are several nonlinear trends, they are:
Tt = aby
Tt = a + bYt + cYt2
Tt = a + bYt + cYtt2 + dYt3
The most suitable trend is a one with the smallest error, that is the smallest difference between actual data and estimated data from trend value. The common rule used to find the best trend is by choosing a trend with the smallest standard error value and having the biggest R-square value.
Zaitun Time provides a feature to analyze trend component of a time series. There are several trend types available e.g. linear, quadratic, cubic, and exponential. To make a trend analysis of a time series variable:





The result views of trend analysis in Zaitun Time Series are grouped into two categories, tables and graphics. See the details below:


Moving Average Analysis
There are several methods which can be used to smooth time series data by moving averages. They are the Single Moving Average and the Double Moving Average methods. Both of them use several past data points to forecast the future.
Single Moving Average method uses the last t periods to create a forecast. The new average value is calculated by removing the oldest value and replacing it with the newest value. This method is suitable for stationary data and for data which does not contain trend or seasonal components.
Let us have N points of data and use T observations to calculate the average value, notated as MA(T). It is described as:
| Y1 Y2 ………………. YT | YT+1 ……………. Y |
| Initialization group | Testing group |
| Time | Moving Average | Forecast |
| T | Y = ![]() |
![]() |
| T+1 | Y = ![]() |
![]() |
| T+2 | Y = ![]() |
![]() |
| ….. |
This method is based on the calculation of the second moving average. The second moving average is calculated from the average of first moving average, notated by MA (T x T), means MA (T) period from MA (T) period. This method can be used to forecast data with a linear trend component.
The procedure to calculate double moving average is:

, where 
The forecasting value for m period ahead is an – where it is the adjusted average value for period n – added by the value of multiplication between m and trend component bn.
Zaitun Time provides a feature to perform moving average analysis of a time series. Single moving average and double moving average are available. To perform the moving average analysis on a time series variable:





The result views of moving average analysis in Zaitun Time Series are grouped into two categories, they are tables and graphics. The details of them are described here:



Exponential Smoothing Analysis
Exponential smoothing is particular type of moving average technique applied to time series data, used to produce smoothed data for presentation, or to make forecasts. The Exponential smoothing method weights past observations by exponentially decreasing weights to forecast future values.
There are some categories of this method:
Single Exponential Smoothing is a procedure that repeats enumeration continually by using the newest data. This method can be used if the data is not significantly influenced by trend and seasonal factor.
To smooth the data with single exponential smoothing requires a parameter called the smoothing constant (
). Each data point is given a certain weighting,
for the newest data, (1-
) for older data and etc. The value of
must be between 0 and 1. The following is the equation of smoothed value:

By doing a simple substitution, the equation above can be written as:


Forecasting with single exponential smoothing can be done by substituting this equation:

The equation above also can be written in the following way:

where
is the forecasting error for n period. From this equation, we can see that the forecasting resulted with this method is the last forecasted value added with an adjustment for error in the last forecasted value.

Practically, to calculate the smoothing statistic at the first observation
, we can use the equation
. Then it is substituted into the smoothing statistic equation to calculate
, and the smoothing process is continued until we get
value. To calculate the equation above, a starting value
is needed.
can be calculated from the average of several observations. The first several observations can be chosen to determine
.
This smoothing method can be used for data which contains linear trend. This method is often called as Brown’s one-parameter linear method.
The following equations are used in double exponential smoothing with Browns method:
Single smoothing statistic equation:

Double smoothing statistic equation:


The procedure to calculate forecasting m forward period with double exponential smoothing with Brown method can be calculated from this equation:

This equation is similar to linear trend method, where:



The smoothing statistic equation above can be solved if the estimation value for
is defined. Starting value
is defined as:


We can use linear trend model constant calculated with the least squares estimation method to estimate the coefficient of
,
and
.
This method is similar to Browns method, but Holts Method uses different parameters than the one used in original series to smooth the trend value.
The prediction of exponential smoothing can be obtained by using two smoothing constants (with values between 0 and 1) and three equations as follows:
( 1 )
( 2 )
( 3 )
Equation (1) calculates smoothing value
from the trend of the previous period
added by the last smoothing value
. Equation (2) calculates trend value
from
,
, and
. Finally, equation (3) (forward prediction) is obtained from trend,
, multiplied with the amount of next period forecasted, m, and added to basic value
.
and 
There are two parameters needed to estimate exponential smoothing with Holts method, the smoothing value
and the trend
. To find these parameters, the least squares method is used. The estimation value for
is the intercept value of linear estimation, while
is the slope value.
If a time series is stationary, the moving average method or single exponential smoothing can be used to analyze it. If a time series data has a trend component, then double exponential smoothing with Holts method can be used. However, if the time series data contains a seasonal component, then the Triple Exponential Smoothing (Winters) method can be used to handle it.
This method is based on three smoothing equations, Stationary Component, Trend and Seasonal. Both Seasonal component and Trend can be additive or multiplicative.
The whole smoothing equation

Trend smoothing

Seasonal smoothing

Forecasted value

The whole smoothing equation

Trend smoothing

Seasonal smoothing

Forecasted value

Where l is seasonal length (for example, amount of month, or quartile in a year), T is trend component, S is seasonal adjustment factor, and
is forecasted value for m next period.
,
and 
The starting values for
and
can be obtained from regression equations which have actual variables as dependent variables and time variables as independent variables. This equation constant is a starting value estimation for
and slope of regression coefficient is a starting value estimation for the trend component
. Whereas the starting value for the seasonal component
is calculated by using dummy-variable regression on detrended data (without trend).
Zaitun Time performs exponential smoothing analysis of time series data, including single exponential smoothing, double exponential smoothing Brown, double exponential smoothing (Holts), and triple exponential smoothing (Winters). To perform exponential smoothing analysis on a time series variable:






The result views of exponential smoothing analysis in Zaitun Time Series are grouped into two categories, tables and graphics. The details of them are described here:


Decomposition Analysis
Decomposition method tries to separate a time series data into several components. Decomposition method is often used not only in yielding forecast, but also in yielding information about time series component i.e. trend, cycle, seasonal, and irregular component. There are two relation types among those components, they are multiplicative and additive. Multiplicative type assumes if data value grows up then seasonal pattern will grow up too. While additive type assumes that data value resides in a constant wide at the middle of trend.
In the decomposition method, every cycle of data is assumed to be part of a trend. The decomposition method equations :
Multiplicative type:

Additive type:

The Seasonal Index value is calculated by using a ratio to moving average method.
Zaitun Time performs decomposition analysis on a time series data. To perform decomposition analysis on a time series variable:





The result views of decomposition analysis in Zaitun Time Series are grouped into two categories, they are tables and graphics. The details of them are described here:


Linear Regression estimates the coefficients of the linear equation, involving one or more independent variables, that best predict the value of the dependent variable. For example, we can try to predict weekly ice cream consumption (the dependent variable) from independent (predictor) variables such as ice cream price, weekly temperature, and average weekly family income. After developing the model, this method can forecast the value of the dependent variable for the given test values of independent variables.
In practice, regression model with one predictor is rarely used in research. Frequently, many researchers use more than one predictor. The general purpose of multiple linear regression is to learn more about the relationship between several independent or predictor variables and a dependent or criterion variable. Formally, the model for multiple linear regression, given n observations, is:

Where:
= Dependent variable
= Independent variable (predictor)
= Regression parameter
= Error
= number of parameter
= number of observation
We can also denote the multiple linear regression in matrix form as below:

Where:

Using Ordinary Least Square (OLS) method we can compute estimator of parameters (
) by equation:

estimator of Y by equation:

and vector of residual:

Before analyzing the regression model, we have to test of significance of the regression coefficients simultaneously and partially.
Testing Simultaneously (Overall Test)

| Source of Variation | Sum Squares | Degree of Freedom | Mean Squares | Fobs |
| Regression | SSR | p-1 | MSR=SSR/(p-1) | MSR/MSE |
| Error | SSE | n-p | MSE=SSE/(n-p) | |
| Total | SST | n-1 |
Where:


if
is rejected means that there is at least one of predictor has linear relationship with dependent variable.
Testing Partially (Partial Test)

where
if
or
is rejected means that there is an effect of independent variable to dependent variable.
We can compute confidence interval of regression coefficients of
using equation:
For measuring proportionate reduction of total variation in Y associated with the use of set of X variables, we can use the coefficient of determination (R2) that is defined as follows:
where 
The correlation coefficient (R) describe of degree of the linear relationship between independent variables and dependent variable, is defined as square root of R2:
where 
Usually by adding more of predictor can increase the value of R2. On other hand, it can be more complicated in interpretation of the relation. So, we can use the adjusted R2:

Diagnosing of the Model Assumption
). If plot look like random pattern near of ei=0 so this assumption is accepted.
). If plot look like random pattern near of ei=0 so this assumption is accepted.For example, we can try to analyze multiple linear regression of weekly ice cream consumption as a dependent variable and ice cream price, weekly temperature, and average weekly family income as independent variables. To analyze linear regression of that time series data with Zaitun Time Series:





The result views of Linear Regression Analysis in Zaitun Time Series are:



,
, statistic t, significance, confidence interval of
, VIF, z-order correlation, and partial correlation.



Correlogram
Correlogram or Autocorrelation Function (ACF) is a graphic of autocorrelation values from several time intervals in time series data. ACF explains how big the successive data correlation in a time series data. ACF can be used to determine whether a time series data is stationary or not.
ACF represents comparison between covariant on lag k and its variant. ACF formulated as follows:

Where :
: ACF coefficient in lag k
: The number of observations (the amount of observed period)
: Observation in t period
: Mean
: Observation in t-k period
ACF (
) has value started from -1 to 1. If ACF value on every lag is 0, hence the data is stationary. As a rough rule, lag length needed to analyze is one third or a quarter of the number of observations of a time series data.
Also, to determine whether a time series data is stationary or not, you can use the statistical test based on standard error (se). By following the normal distribution standard, the interval with signification equal to 95 % for
with the sample number equal to
is
or

If ACF coefficient value is in interval with signification equal to 95%, then null hypothetic
that shows ACF value (
) equal to 0 can not be rejected. It means that the data is stationary.
Besides that, to know whether time series data is stationary or not, Q statistical test which follows Chi Square distribution can be used. Q statistical value formulated below:

Where:
: Number of the tested lag
: Q statistical value in lag m
: The number of samples
: ACF coefficient in lag k
If the Q statistical value is smaller than Q value obtained from chi squares
table in certain significant level, then null hypothetic
which shows that ACF value (
) equal to 0 can not be rejected. It shows that the data is stationary.
Zaitun Time displays the autocorrelation function (ACF) values and graphic of a time series. To display corellogram of a time series variable:



The result views of correlogram in Zaitun Time Series are:


Neural Network Analysis
Artificial Neural Networks or often called Neural Networks is a computation technique which has made significant progress in recent times. Neural networks have proven their capability of handling various problems in a number of scientific disciplines. Neural networks have a powerful ability called universal approximation, they can approximate all multivariate continue functions to every level of accuracy including for non-linear functions.
The ability of neural networks in universal approximation has been used by some researchers to forecast time series data in various kinds of data. The researches show that Neural Networks have a satisfactory performance in forecasting time series data.
Neural networks mechanisms imitate biological neural network mechanisms. Like biological neural networks, neural networks consists of neurons which are connected to each other and operate in parallel. The information processing mechanism in every neuron is adopted from the biological neuron.
Neurons in a neural network are grouped into several layers. Every layer can have one or more neurons. There are three layers in neural network architecture; they are the input layer, the output layer, and the hidden layer.
The function of the input layer is for data entry, data processing takes place in the hidden middle layer and the output layer functions as the data output result. The following illustration shows the architecture of neural networks.

Information processing in every neuron is done by summing the multiplication result of connection weights with input data. The result is transferred to the next neuron through the activation function. There are several kinds of activation functions, i.e. linear, semi linear, sigmoid, bipolar sigmoid and hyperbolic tangent.
In time series data forecasting, the input value for the input layer can be variable data of previous period (lagged variable) or the other variable used to help forecasting, can be qualitative or quantitative.
To forecast one variable (univariate), the input data for the input layer and output data in the output layer is similar to the autoregressive model AR(p). On certain point of t, forecasted data
calculated by using
observation
from n previous point
, where n shows the number of neuron inputs in a neural network.
Zaitun Time provides neural network modeling of time series data. To perform neural network modeling on a time series variable:





The result views of neural network modeling in Zaitun Time Series are grouped into two categories, tables and graphics. The details of them are described here:



Abraham, Bovas et al. 1983. Statistical Methods for Forecasting. Canada: John Wiley & Sons.
Crone, Sven F. 2004. Stepwise Selection of Artificial Neural Networks Models for Time Series Prediction. Department of Management Science, Lancaster University Management School, Lancaster, UK.
Du, K.-L. and M.N.S. Swamy. 2006. Neural Network in Softcomputing Framework. London: Springer.
Drossu, Radu, Zoran Obradovic. 1995. Efficient Design of Neural Network for Time Series Prediction. School of Electrical Engineering and Computer Science, Washington State University, Washington, USA.
Enders, Walters. 2004. Applied Econometric Time Series. New York: John
Wiley Sons,Inc.
Gujarati, Damodar N. 2003. Basic Econometric, fourth edition. New York:
McGraw-Hill.
Hamilton, James D. 1994. Time Series Analysis. New Jersey: Princeton
University Press.
Hanke, John E. and Reitsch, Arthur G. 1986. Business Forecasting. United Stated of America: Prentice-Hall Inc.
Montgomery, Douglas C. 1990. Forecasting and Time Series Analysis. McGraw-Hill Inc.
Prechelt¸ Lutz. 1998. Automatic Early Stopping Using Cross Validation: Quantifying the Criteria. Fakultat fur Informatik, Universitat Karlshure, Karlshure, Germany.
Sarle, S Waren. 2002. Neural Network FAQ.
Zhang, Guoqiang, B. Eddy Patuwo, and Michael Y. Hu. 1998. Forecasting with Artificial Neural Networks: The State of The Art. International Journal of Forecasting. Graduate School of Management, Kent State University, Ohio, USA.