Statistics and time-series analytics API

Seasonal Autoregressive Integrated Moving Average (SARIMA) Model. More...

Functions

int __stdcall NDK_SARIMA_GOF (double *pData, size_t nSize, double mean, double sigma, WORD nIntegral, double *phis, size_t p, double *thetas, size_t q, WORD nSIntegral, WORD nSPeriod, double *sPhis, size_t sP, double *sThetas, size_t sQ, GOODNESS_OF_FIT_FUNC retType, double *retVal)
 Computes the goodness of fit measure (e.g., log-likelihood function (LLF), AIC, etc.) of the estimated ARIMA model.
 
int __stdcall NDK_SARIMA_PARAM (double *pData, size_t nSize, double *mean, double *sigma, WORD nIntegral, double *phis, size_t p, double *thetas, size_t q, WORD nSIntegral, WORD nSPeriod, double *sPhis, size_t sP, double *sThetas, size_t sQ, MODEL_RETVAL_FUNC retType, size_t maxIter)
 Returns the quick guess, optimal (calibrated) or std. errors of the values of model's parameters.
 
int __stdcall NDK_SARIMA_SIM (double mean, double sigma, WORD nIntegral, double *phis, size_t p, double *thetas, size_t q, WORD nSIntegral, WORD nSPeriod, double *sPhis, size_t sP, double *sThetas, size_t sQ, double *pData, size_t nSize, size_t nSeed, double *retVal, size_t nStep)
 Returns the quick guess, optimal (calibrated) or std. errors of the values of model's parameters.
 
int __stdcall NDK_SARIMA_FORE (double *pData, size_t nSize, double mean, double sigma, WORD nIntegral, double *phis, size_t p, double *thetas, size_t q, WORD nSIntegral, WORD nSPeriod, double *sPhis, size_t sP, double *sThetas, size_t sQ, size_t nStep, FORECAST_RETVAL_FUNC retType, double alpha, double *retVal)
 Returns the quick guess, optimal (calibrated) or std. errors of the values of model's parameters.
 
int __stdcall NDK_SARIMA_FITTED (double *pData, size_t nSize, double mean, double sigma, WORD nIntegral, double *phis, size_t p, double *thetas, size_t q, WORD nSIntegral, WORD nSPeriod, double *sPhis, size_t sP, double *sThetas, size_t sQ, FIT_RETVAL_FUNC retType)
 Returns the quick guess, optimal (calibrated) or std. errors of the values of model's parameters.
 
int __stdcall NDK_SARIMA_VALIDATE (double mean, double sigma, WORD nIntegral, double *phis, size_t p, double *thetas, size_t q, WORD nSIntegral, WORD nSPeriod, double *sPhis, size_t sP, double *sThetas, size_t sQ)
 Examines the model's parameters for stability constraints (e.g. stationarity, invertibility, causality, etc.).
 

Detailed Description

The SARIMA model is an extension of the ARIMA model, often used when we suspect a model may have a seasonal effect.

By definition, the seasonal auto-regressive integrated moving average - SARIMA(p, d, q)(P, D, Q)s - process is a multiplicative of two ARMA processes of the differenced time series.

\[(1-\sum_{i=1}^p {\phi_i L^i})(1-\sum_{j=1}^P {\Phi_j L^{j \times s}})(1-L)^d (1-L^s)^D x_t = (1+\sum_{i=1}^q {\theta_i L^i})(1+\sum_{j=1}^Q {\Theta_j L^{j \times s}}) a_t\]

\[y_t = (1-L)^d (1-L^s)^D \]

Where:

Assuming \(y_t\) follows a stationary process with a long run mean of \(\mu\), then taking the expectation from both sides, we can express \(\phi_o\) as follows:

\[\phi_o = (1-\phi_1-\phi_2-\cdots-\phi_p)(1-\Phi_1-\Phi_2-\cdots-\Phi_P)\]

Thus, the SARIMA(p, d, q)(P, D, Q)s process can now be expressed as:

\[(1-\sum_{i=1}^p {\phi_i L^i})(1-\sum_{j=1}^P {\Phi_j L^{j \times s}}) (y_t -\mu) = (1+\sum_{i=1}^q {\theta_i L^i})(1+\sum_{j=1}^Q {\Theta_j L^{j \times s}}) a_t\]

\[z_t=y_t-\mu \]

\[(1-\sum_{i=1}^p {\phi_i L^i})(1-\sum_{j=1}^P {\Phi_j L^{j \times s}}) z_t = (1+\sum_{i=1}^q {\theta_i L^i})(1+\sum_{j=1}^Q {\Theta_j L^{j \times s}}) a_t\]

In sum, \(z_t\) is the differenced signal after we subtract its long-run average.

Remarks
  1. The time series is homogeneous or equally spaced.
  2. The time series may include missing values (e.g. NaN) at either end.
  3. For the input argument - ( \( [\phi] \)) (parameters of the non-seasonal AR component):
    • The input argument is optional and can be omitted, so no non-seasonal AR component is included.
    • The order of the parameters starts with the lowest lag.
    • One or more parameters may have missing values (i.e., NaN).
    • The order of the last lagged variable (i.e., \( \phi_p \)) with non-zero coefficient solely determines the order of the AR component model in the array with a numeric value (vs. missing or error).
  4. For the input argument - ( \( [\theta] \)) (parameters of the non-seasonal MA component)::
    • The input argument is optional and can be omitted, so no non-seasonal MA component is included.
    • The order of the parameters starts with the lowest lag.
    • One or more values in the input argument can be missing (i.e., NaN).
    • The order of the last lagged variable (i.e., \( \theta_q \)) with non-zero coefficient solely determines the order of the MA component model in the array with a numeric value (vs. missing or error).
  5. For the input argument - ( \( [\Phi] \)) (parameters of the seasonal AR component):
    • The input argument is optional and can be omitted, so no seasonal AR component is included.
    • The order of the parameters starts with the lowest lag.
    • One or more parameters may have missing values (i.e., NaN).
    • The order of the last lagged variable (i.e., \( \Phi_P \)) with non-zero coefficient solely determines the order of the seasonal AR component model in the array with a numeric value (vs. missing or error).
  6. For the input argument - ( \( [\Theta] \)) (parameters of the seasonal MA component)::
    • The input argument is optional and can be omitted, so no seasonal MA component is included.
    • The order of the parameters starts with the lowest lag.
    • One or more values in the input argument can be missing (i.e., NaN).
    • The order of the last lagged variable (i.e., \( \Theta_Q \)) with non-zero coefficient solely determines the order of the MA component model in the array with a numeric value (vs. missing or error).
  7. The non-seasonal integration order - \( d \)- is optional and can be omitted, in which case d is assumed to be zero.
  8. The seasonal integration order - \( D \)- is optional and can be omitted, in which case sD is assumed to be zero.
  9. The season length - \( s \) - is optional and can be omitted, in which case s is assumed to be zero (i.e. plain ARIMA).
  10. The long-run mean (i.e., \( \mu \)) can take any value or be omitted, in which a zero value is assumed.
  11. The residuals/innovations standard deviation ( \( \sigma \)) must be greater than zero.
  12. The variance of the shocks is constant or time-invariant.
Note
In principle, you can have fewer parameters than the order of the component. Consider the following SARIMA(0,1,1) (0,1,1)12 process:

\[(1-L)(1-L^{12})x_t-\mu = (1+\theta L)(1+\Theta L^{12})a_t \]

This is the AIRLINE model, a special case of the SARIMA model.
Related Links
References

Function Documentation

◆ NDK_SARIMA_FITTED()

int __stdcall NDK_SARIMA_FITTED ( double * pData,
size_t nSize,
double mean,
double sigma,
WORD nIntegral,
double * phis,
size_t p,
double * thetas,
size_t q,
WORD nSIntegral,
WORD nSPeriod,
double * sPhis,
size_t sP,
double * sThetas,
size_t sQ,
FIT_RETVAL_FUNC retType )

Returns the in-sample model fitted values of the conditional mean, volatility or residuals.

Parameters
[in,out]pData(Required) a univariate time series data.
[in]nSize(Required) the number of observations in pData.
[in]mean(Optional) the ARMA model mean, i.e., \(\mu \).
[in]sigma(Required) the standard deviation of the model's residuals/innovations (i.e., \(\sigma \))..
[in]nIntegral(Required) the non-seasonal difference order (i.e., \( d \)).
[in]phis(Optional) the parameters of the AR(p) component model (starting with the lowest lag), i.e., \( [\phi] \).
[in]p(Optional) the number of elements in phis (order of AR component, i.e., \( p \)).
[in]thetas(Optional) the parameters of the MA(q) component model (starting with the lowest lag), i.e., \( [\theta] \).
[in]q(Optional) the number of elements in thetas (order of MA component, i.e., \( q \)).
[in]nSIntegral(Optional) the seasonal difference (i.e., \( D \)).
[in]nSPeriod(Optional) the number of observations per one period (e.g. 12=Annual, 4=Quarter), i.e., \( s \).
[in]sPhis(Optional) the parameters of of the seasonal AR component , i.e., \( [\Phi] \).
[in]sP(Optional) the order of the seasonal AR component, i.e., \( P \).
[in]sThetas(Optional) the parameters of the seasonal MA component, i.e., \( [\Theta] \).
[in]sQ(Optional) the order of the seasonal MA component, i.e., \( Q \).
[in]retType(Required) a switch to select the desired output type (see FIT_RETVAL_FUNC).
Value Output Type
1 Fitted conditional mean
2 Fitted conditional volatility or standard deviation
3 Raw residuals (actual - fitted mean)
4 Standardized residuals - (actual - fitted mean)/fitted volatility.
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_INVALID_ARGfailed (see remarks)
NDK_LOW_LICENSE_ARG_LIMITfailed (see remarks)
NDK_FAILEDfailed
Remarks
  1. The underlying model is described here.
  2. The time series is homogeneous or equally spaced.
  3. The data sample may include one or more observation with missing values (i.e., NaN) at either end (not intermediary).
  4. the function returns an array of one simulation path starting from the end of the input data.
  5. The function removes any observations with missing values from the dataset before calculating.
  6. If the value of the nSize is zero, the function will fail and return NDK_INVALID_ARG.
  7. If the value of the retVal argument is NULL, the function will fails and return NDK_INVALID_ARG.
  8. In lite-license mode (e.g., expired license key), the size of the input data set is limited to a maximum of 25. If this limit is exceeded, the function will fail and return NDK_LOW_LICENSE_ARG_LIMIT.
Requirements
Requirement Value
Target Platform Windows
Header SFSDK.h (include Windows.h)
Library SFSDK.lib
DLL SFSDK.dll
SFLUC.dll
SFLOG.dll
Since
v1.63
See also

◆ NDK_SARIMA_FORE()

int __stdcall NDK_SARIMA_FORE ( double * pData,
size_t nSize,
double mean,
double sigma,
WORD nIntegral,
double * phis,
size_t p,
double * thetas,
size_t q,
WORD nSIntegral,
WORD nSPeriod,
double * sPhis,
size_t sP,
double * sThetas,
size_t sQ,
size_t nStep,
FORECAST_RETVAL_FUNC retType,
double alpha,
double * retVal )

Calculates the out-of-sample forecast statistics.

Parameters
[in]pData(Required) is the univariate time series data.
[in]nSize(Required) iis the number of observations in pData.
[in]mean(Optional) the ARMA model mean, i.e., \(\mu \).
[in]sigma(Required) the standard deviation of the model's residuals/innovations (i.e., \(\sigma \))..
[in]nIntegral(Required) the non-seasonal difference order (i.e., \( d \)).
[in]phis(Optional) the parameters of the AR(p) component model (starting with the lowest lag), i.e., \( [\phi] \).
[in]p(Optional) the number of elements in phis (order of AR component, i.e., \( p \)).
[in]thetas(Optional) the parameters of the MA(q) component model (starting with the lowest lag), i.e., \( [\theta] \).
[in]q(Optional) the number of elements in thetas (order of MA component, i.e., \( q \)).
[in]nSIntegral(Optional) the seasonal difference (i.e., \( D \)).
[in]nSPeriod(Optional) the number of observations per one period (e.g. 12=Annual, 4=Quarter), i.e., \( s \).
[in]sPhis(Optional) the parameters of of the seasonal AR component , i.e., \( [\Phi] \).
[in]sP(Optional) the order of the seasonal AR component, i.e., \( P \).
[in]sThetas(Optional) the parameters of the seasonal MA component, i.e., \( [\Theta] \).
[in]sQ(Optional) the order of the seasonal MA component, i.e., \( Q \).
[in]nStep(Required) is the forecast time/horizon (expressed in terms of steps beyond end of the time series).
[in]retType(Required) is a switch to select the type of value returned. (see FORECAST_RETVAL_FUNC).
Value Return
1 Mean Value (default)
2 Forecast standard error (aka local volatility)
2 Volatility term structure.
3 Lower limit of the forecast confidence interval.
4 Upper limit of the forecast confidence interval.
[in]alpha(Required) is the statistical significance level. If missing, a default of 5% is assumed.
[out]retVal(Required) is the calculated forecast value.
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_INVALID_ARGfailed (see remarks)
NDK_LOW_LICENSE_ARG_LIMITfailed (see remarks)
NDK_FAILEDfailed
Remarks
  1. The underlying model is described here.
  2. The time series is homogeneous or equally spaced.
  3. The data sample may include one or more observation with missing values (i.e., NaN) at either end (not intermediary).
  4. the function returns an array of one simulation path starting from the end of the input data.
  5. The function removes any observations with missing values from the dataset before calculating.
  6. If the value of the nSize is zero, the function will fail and return NDK_INVALID_ARG.
  7. If the value of the retVal argument is NULL, the function will fails and return NDK_INVALID_ARG.
  8. In lite-license mode (e.g., expired license key), the size of the input data set is limited to a maximum of 25. If this limit is exceeded, the function will fail and return NDK_LOW_LICENSE_ARG_LIMIT.
Requirements
Requirement Value
Target Platform Windows
Header SFSDK.h (include Windows.h)
Library SFSDK.lib
DLL SFSDK.dll
SFLUC.dll
SFLOG.dll
Since
v1.63
See also

◆ NDK_SARIMA_GOF()

int __stdcall NDK_SARIMA_GOF ( double * pData,
size_t nSize,
double mean,
double sigma,
WORD nIntegral,
double * phis,
size_t p,
double * thetas,
size_t q,
WORD nSIntegral,
WORD nSPeriod,
double * sPhis,
size_t sP,
double * sThetas,
size_t sQ,
GOODNESS_OF_FIT_FUNC retType,
double * retVal )

Computes the log-likelihood (LLF), Akaike Information Criterion (AIC) or other goodness of fit functions of the ARMA model.

Parameters
[in]pData(Required) is the univariate time series data.
[in]nSize(Required) iis the number of observations in pData.
[in]mean(Optional) the ARMA model mean, i.e., \(\mu \).
[in]sigma(Required) the standard deviation of the model's residuals/innovations (i.e., \(\sigma \))..
[in]nIntegral(Required) the non-seasonal difference order (i.e., \( d \)).
[in]phis(Optional) the parameters of the AR(p) component model (starting with the lowest lag), i.e., \( [\phi] \).
[in]p(Optional) the number of elements in phis (order of AR component, i.e., \( p \)).
[in]thetas(Optional) the parameters of the MA(q) component model (starting with the lowest lag), i.e., \( [\theta] \).
[in]q(Optional) the number of elements in thetas (order of MA component, i.e., \( q \)).
[in]nSIntegral(Optional) the seasonal difference (i.e., \( D \)).
[in]nSPeriod(Optional) the number of observations per one period (e.g. 12=Annual, 4=Quarter), i.e., \( s \).
[in]sPhis(Optional) the parameters of of the seasonal AR component , i.e., \( [\Phi] \).
[in]sP(Optional) the order of the seasonal AR component, i.e., \( P \).
[in]sThetas(Optional) the parameters of the seasonal MA component, i.e., \( [\Theta] \).
[in]sQ(Optional) the order of the seasonal MA component, i.e., \( Q \).
[in]retType(Required) a switch to select a fitness measure ( see GOODNESS_OF_FIT_FUNC).
Value Return
1 Log-likelihood goodness of fit measure (LLF)
2 Akaike information criterion goodness of fit measure (AIC)
3 Bayesian or Schwartz information criterion goodness of fit measure (BIC)
4 Hannan-Quinn information criterion goodness of fit measure. (HQC)
5 R-squared goodness of fit measure (R^2)
6 Adjusted R-squared goodness of fit measure (Adj. R^2)
[out]retVal(Required) is a pointer to a variable to hold the calculated GOF statistics.
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_INVALID_ARGfailed (see remarks)
NDK_LOW_LICENSE_ARG_LIMITfailed (see remarks)
NDK_FAILEDfailed
Remarks
  1. The underlying model is described here.
  2. The time series is homogeneous or equally spaced.
  3. The data sample may include one or more observation with missing values (i.e., NaN) at either end (not intermediary).
  4. The function removes any observations with missing values from the dataset before calculating.
  5. If the value of the nSize is zero, the function will fail and return NDK_INVALID_ARG.
  6. If the value of the retVal argument is NULL, the function will fails and return NDK_INVALID_ARG.
  7. The maximum likelihood estimation (MLE) is a statistical method for fitting a model to the data and provides estimates for the model's parameters.
  8. In lite-license mode (e.g., expired license key), the size of the input data set is limited to a maximum of 25. If this limit is exceeded, the function will fail and return NDK_LOW_LICENSE_ARG_LIMIT.
Requirements
Requirement Value
Target Platform Windows
Header SFSDK.h (include Windows.h)
Library SFSDK.lib
DLL SFSDK.dll
SFLUC.dll
SFLOG.dll
Since
v1.63
See also

◆ NDK_SARIMA_PARAM()

int __stdcall NDK_SARIMA_PARAM ( double * pData,
size_t nSize,
double * mean,
double * sigma,
WORD nIntegral,
double * phis,
size_t p,
double * thetas,
size_t q,
WORD nSIntegral,
WORD nSPeriod,
double * sPhis,
size_t sP,
double * sThetas,
size_t sQ,
MODEL_RETVAL_FUNC retType,
size_t maxIter )

Returns the initial (non-optimal), optimal or standard errors of the model's parameters.

Parameters
[in,out]pData(Required) is the univariate time series data (a one dimensional array).
[in]nSize(Required) is the number of observations in pData.
[in,out]mean(Optional) the ARMA model mean, i.e., \(\mu \).
[in,out]sigma(Required) the standard deviation of the model's residuals/innovations (i.e., \(\sigma \))..
[in]nIntegral(Required) the non-seasonal difference order (i.e., \( d \)).
[in,out]phis(Optional) the parameters of the AR(p) component model (starting with the lowest lag), i.e., \( [\phi] \).
[in]p(Optional) the number of elements in phis (order of AR component, i.e., \( p \)).
[in,out]thetas(Optional) the parameters of the MA(q) component model (starting with the lowest lag), i.e., \( [\theta] \).
[in]q(Optional) the number of elements in thetas (order of MA component, i.e., \( q \)).
[in]nSIntegral(Optional) the seasonal difference (i.e., \( D \)).
[in]nSPeriod(Optional) the number of observations per one period (e.g. 12=Annual, 4=Quarter), i.e., \( s \).
[in,out]sPhis(Optional) the parameters of of the seasonal AR component , i.e., \( [\Phi] \).
[in]sP(Optional) the order of the seasonal AR component, i.e., \( P \).
[in,out]sThetas(Optional) the parameters of the seasonal MA component, i.e., \( [\Theta] \).
[in]sQ(Optional) the order of the seasonal MA component, i.e., \( Q \).
[in]retType(Required) is a switch to select the type of value returned: 1= Quick Guess, 2=Calibrated, 3= Std. Errors ( see MODEL_RETVAL_FUNC).
Value Type
1 Quick guess (non-optimal) of parameters values
2 Run a calibration process to find optimal values for the model's parameters
3 Compute the standard error of the parameters' values
[in]maxIter(Required) is the maximum number of iterations used to calibrate the model. If missing or less than 100, the default maximum of 100 is assumed.
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_INVALID_ARGfailed (see remarks)
NDK_LOW_LICENSE_ARG_LIMITfailed (see remarks)
NDK_FAILEDfailed
Remarks
  1. The underlying model is described here.
  1. The time series is homogeneous or equally spaced.
  2. The data sample may include one or more observation with missing values (i.e., NaN) at either end (not intermediary).
  3. The function removes any observations with missing values from the dataset before calculating.
  4. If the value of the nSize is zero, the function will fail and return NDK_INVALID_ARG.
  5. If the value of the retVal argument is NULL, the function will fails and return NDK_INVALID_ARG.
  6. The maximum likelihood estimation (MLE) is a statistical method for fitting a model to the data and provides estimates for the model's parameters.
  7. In lite-license mode (e.g., expired license key), the size of the input data set is limited to a maximum of 25. If this limit is exceeded, the function will fail and return NDK_LOW_LICENSE_ARG_LIMIT.
Requirements
Requirement Value
Target Platform Windows
Header SFSDK.h (include Windows.h)
Library SFSDK.lib
DLL SFSDK.dll
SFLUC.dll
SFLOG.dll
Since
v1.63
See also

◆ NDK_SARIMA_SIM()

int __stdcall NDK_SARIMA_SIM ( double mean,
double sigma,
WORD nIntegral,
double * phis,
size_t p,
double * thetas,
size_t q,
WORD nSIntegral,
WORD nSPeriod,
double * sPhis,
size_t sP,
double * sThetas,
size_t sQ,
double * pData,
size_t nSize,
size_t nSeed,
double * retVal,
size_t nStep )

Returns the initial (non-optimal), optimal or standard errors of the model's parameters.

Parameters
[in]mean(Optional) the ARMA model mean, i.e., \(\mu \).
[in]sigma(Required) the standard deviation of the model's residuals/innovations (i.e., \(\sigma \))..
[in]nIntegral(Required) the non-seasonal difference order (i.e., \( d \)).
[in]phis(Optional) the parameters of the AR(p) component model (starting with the lowest lag), i.e., \( [\phi] \).
[in]p(Optional) the number of elements in phis (order of AR component, i.e., \( p \)).
[in]thetas(Optional) the parameters of the MA(q) component model (starting with the lowest lag), i.e., \( [\theta] \).
[in]q(Optional) the number of elements in thetas (order of MA component, i.e., \( q \)).
[in]nSIntegral(Optional) the seasonal difference (i.e., \( D \)).
[in]nSPeriod(Optional) the number of observations per one period (e.g. 12=Annual, 4=Quarter), i.e., \( s \).
[in]sPhis(Optional) the parameters of of the seasonal AR component , i.e., \( [\Phi] \).
[in]sP(Optional) the order of the seasonal AR component, i.e., \( P \).
[in]sThetas(Optional) the parameters of the seasonal MA component, i.e., \( [\Theta] \).
[in]sQ(Optional) the order of the seasonal MA component, i.e., \( Q \).
[in]pData(Required) The values of the latest (most recent) observations.
[in]nSize(Required) is the number of observations in pData.
[in]nSeed(Required) is an unsigned integer for setting up the random number generators.
[out]retVal(Required) is the calculated simulation value.
[in]nStep(Required) is the simulation time/horizon (expressed in terms of steps beyond end of the time series).
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_INVALID_ARGfailed (see remarks)
NDK_LOW_LICENSE_ARG_LIMITfailed (see remarks)
NDK_FAILEDfailed
Remarks
  1. The underlying model is described here.
  2. The time series is homogeneous or equally spaced.
  3. The data sample may include one or more observation with missing values (i.e., NaN) at either end (not intermediary).
  4. the function returns an array of one simulation path starting from the end of the input data.
  5. The function removes any observations with missing values from the dataset before calculating.
  6. If the value of the nSize is zero, the function will fail and return NDK_INVALID_ARG.
  7. If the value of the retVal argument is NULL, the function will fails and return NDK_INVALID_ARG.
  8. In lite-license mode (e.g., expired license key), the size of the input data set is limited to a maximum of 25. If this limit is exceeded, the function will fail and return NDK_LOW_LICENSE_ARG_LIMIT.
Requirements
Requirement Value
Target Platform Windows
Header SFSDK.h (include Windows.h)
Library SFSDK.lib
DLL SFSDK.dll
SFLUC.dll
SFLOG.dll
Since
v1.63
See also

◆ NDK_SARIMA_VALIDATE()

int __stdcall NDK_SARIMA_VALIDATE ( double mean,
double sigma,
WORD nIntegral,
double * phis,
size_t p,
double * thetas,
size_t q,
WORD nSIntegral,
WORD nSPeriod,
double * sPhis,
size_t sP,
double * sThetas,
size_t sQ )

Examines the model's parameters for stability constraints (e.g. stationarity, invertibility, causality, etc.).

Parameters
[in]mean(Optional) the ARMA model mean, i.e., \(\mu \).
[in]sigma(Required) the standard deviation of the model's residuals/innovations (i.e., \(\sigma \))..
[in]nIntegral(Required) the non-seasonal difference order (i.e., \( d \)).
[in]phis(Optional) the parameters of the AR(p) component model (starting with the lowest lag), i.e., \( [\phi] \).
[in]p(Optional) the number of elements in phis (order of AR component, i.e., \( p \)).
[in]thetas(Optional) the parameters of the MA(q) component model (starting with the lowest lag), i.e., \( [\theta] \).
[in]q(Optional) the number of elements in thetas (order of MA component, i.e., \( q \)).
[in]nSIntegral(Optional) the seasonal difference (i.e., \( D \)).
[in]nSPeriod(Optional) the number of observations per one period (e.g. 12=Annual, 4=Quarter), i.e., \( s \).
[in]sPhis(Optional) the parameters of of the seasonal AR component , i.e., \( [\Phi] \).
[in]sP(Optional) the order of the seasonal AR component, i.e., \( P \).
[in]sThetas(Optional) the parameters of the seasonal MA component, i.e., \( [\Theta] \).
[in]sQ(Optional) the order of the seasonal MA component, i.e., \( Q \).
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_TRUEmodel is stable
NDK_FALSEmodel is instable
NDK_INVALID_ARGfailed (see remarks)
NDK_FAILEDfailed
Remarks
  1. The underlying model is described here.
  2. The function checks if \(\sigma > 0 \), and if all the characteristic roots of the underlying ARMA model fall outside the unit circle.
  3. The residuals/innovations standard deviation ( \(\sigma\)) must be greater than zero.
Requirements
Requirement Value
Target Platform Windows
Header SFSDK.h (include Windows.h)
Library SFSDK.lib
DLL SFSDK.dll
SFLUC.dll
SFLOG.dll
Since
v1.63
See also