FORECAST.TBATS

You are here:

AXCEL.FORECAST.TBATS function Calculates or predicts a future value based on historical data by using Trigonometric seasonality, Box-Cox transformation, ARMA errors, Trend and Seasonal components (TBATS) algorithm as described in De Livera, Hyndman & Snyder (2011). The TBATS model has an automated Box-Cox transform and is a good candidate for complex seasonality.  The predicted value is a continuation of historical values. You can use this function to predict sales, revenue, inventory, or consumer trends.

This function requires the data to be organized as a series of data observed at each point of time with a constant step between the different points such as monthly, weekly, or daily.

Syntax

AXCEL.FORECAST.TBATS(data, frequency, start, forecast, [deployment], [plot])


The AXCEL.FORECAST.TBATS function syntax has the following arguments:

data Required. The historical values, for which you want to forecast. If data has a header, data starts from the second row. Otherwise, the entire vector is considered for the input.

frequency Required. Frequency of your data. 365 for daily, 52 for weekly, 12 for monthly, and 4 for quarterly data. If you do not know the frequency, you can set it as 0. In this case, Axcel automatically identifies the frequency of your data.

start Required. start date of your data in “yyyy-mm-dd” format.

forecast Required. This is the number of periods which we would like to run the forecast.

deployment Optional. You can define a deployment name to deploy your model. After deployment, you can use the deployed function in AXCEL.FORECAST.RUN function. Please note that the deployment name is case sensitive and should include alphabets, numbers, and non-repeating underline. You cannot use underline at the beginning or end of the filename. For instance “abc-123” or “a-b-c-123” are allowed but “abc–123”, “abc-123-“, “-abc-123” or “abc-$123” are not allowed.Depends on your subscription, you can view and restrict access to the deployed model through Axcel web application.

plot Optional. default is FALSE. When it is TRUE, Axcel produces the plot inside sidebar. You can expand the plot and show it in your browser. Please note that no plot is produced when deployment is requested. Here is an example of the plot:

when you type =AXCEL.FORECAST.TBATS in an Excel cell, the IntelliSense guides you through required and optional (shows in [] brackets) inputs:

In the example above, we have:

=AXCEL.FORECAST.TBATS(A1#, 12, “2000-1-1”,6,,TRUE)

This means that our data is located at cell A1 as an array, it is monthly, i.e. frequency is 12, it starts from January 1, 2000 (2000-01-01), we would like to forecast for 6 months, we skip the deployment and request for plots. After running this command we have:

Please note that TBATS function returns dates in Excel format. As a result you may see numbers instead of dates in data_index column. In this case, you need to change the type of column to “Date” from Excel Home menu.

As shown, fitted values and forecasts are reported in the workbook. The first column is the date index, the second column is the actual values used for training of the model, and the next column is the forecast. Axcel also reports the forecast with 80% and 95% confidence to help the process of decision making.

In the console section in the sidebar, model performance, structure, and statistical indicators are reported for validation and transparency in the process. Here is an example:


-------- TIME SERIES Summary --------- 
TBATS(0, {0,0}, 1, {<12,5>})
Call: tbats(y = AirPassengers)
Parameters
 Lambda: 0
 Alpha: 0.7539964
 Beta: 0.03574778
 Damping Parameter: 1
 Gamma-1 Values: 0.003469021
 Gamma-2 Values: 0.005754791
Seed States:
[,1]
[1,] 4.810033172
[2,] -0.008583295
[3,] -0.148378447
[4,] 0.056357573
[5,] -0.009050016
[6,] 0.010821683
[7,] 0.005632253
[8,] 0.027288737
[9,] 0.058710056
[10,] -0.027537728
[11,] -0.032132832
[12,] -0.021334438
attr(,"lambda")
[1] 1.565565e-08
Sigma: 0.03709061
AIC: 1397.015

A template for this function is available here:

Air Passengers TBATS Example

See also: AXCEL.FORECAST.ETS, AXCEL.FORECAST.SPLINE, AXCEL.FORECAST.ARIMA, AXCEL.FORECAST.TSLM, AXCEL.FORECAST.TBATS and AXCEL.FORECAST.RUN