Statistics and time-series analytics API

Fractional ARIMA Model functions. More...

Functions

int __stdcall NDK_FARIMA_GOF (double *pData, size_t nSize, double mean, double sigma, double nIntegral, double *phis, size_t p, double *thetas, size_t q, GOODNESS_OF_FIT_FUNC retType, double *retVal)
 
int __stdcall NDK_FARIMA_RESID (double *pData, size_t nSize, double mean, double sigma, double nIntegral, double *phis, size_t p, double *thetas, size_t q, WORD retType)
 
int __stdcall NDK_FARIMA_PARAM (double *pData, size_t nSize, double *mean, double *sigma, double nIntegral, double *phis, size_t p, double *thetas, size_t q, MODEL_RETVAL_FUNC retType, size_t maxIter)
 
int __stdcall NDK_FARIMA_SIM (double *pData, size_t nSize, double mean, double sigma, double nIntegral, double *phis, size_t p, double *thetas, size_t q, size_t nStep, size_t nSeed, double *retVal)
 
int __stdcall NDK_FARIMA_FORE (double *pData, size_t nSize, double mean, double sigma, double nIntegral, double *phis, size_t p, double *thetas, size_t q, size_t nStep, FORECAST_RETVAL_FUNC retType, double alpha, double *retVal)
 
int __stdcall NDK_FARIMA_FITTED (double *pData, size_t nSize, double mean, double sigma, double nIntegral, double *phis, size_t p, double *thetas, size_t q, FIT_RETVAL_FUNC retType)
 

Detailed Description

Fractional ARIMA Model functions

Function Documentation

◆ NDK_FARIMA_FITTED()

int __stdcall NDK_FARIMA_FITTED ( double * pData,
size_t nSize,
double mean,
double sigma,
double nIntegral,
double * phis,
size_t p,
double * thetas,
size_t q,
FIT_RETVAL_FUNC retType )

Returns an array of cells for the fitted values (i.e. mean, volatility and residuals)

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]mean(Required) is the ARMA model mean (i.e. mu).
[in]sigma(Required) is the standard deviation of the model's residuals/innovations..
[in]nIntegral(Required) is the model's integration (fractional) order.
[in]phis(Required) are the parameters of the AR(p) component model (starting with the lowest lag).
[in]p(Required) is the number of elements in phis (order of AR component).
[in]thetas(Required) are the parameters of the MA(q) component model (starting with the lowest lag).
[in]q(Required) is the number of elements in thetas (order of MA component).
[in]retType(Required) is a switch to select a output type ( see FIT_RETVAL_FUNC).
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_FARIMA_GOF(), NDK_FARIMA_RESID(), NDK_FARIMA_PARAM(), NDK_FARIMA_FORE(), NDK_FARIMA_VALIDATE()

◆ NDK_FARIMA_FORE()

int __stdcall NDK_FARIMA_FORE ( double * pData,
size_t nSize,
double mean,
double sigma,
double nIntegral,
double * phis,
size_t p,
double * thetas,
size_t q,
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 (a one dimensional array).
[in]nSize(Required) is the number of observations in pData.
[in]mean(Required) is the ARMA model mean (i.e. mu).
[in]sigma(Required) is the standard deviation of the model's residuals/innovations..
[in]nIntegral(Required) is the model's integration (fractional) order.
[in]phis(Required) are the parameters of the AR(p) component model (starting with the lowest lag).
[in]p(Required) is the number of elements in phis (order of AR component).
[in]thetas(Required) are the parameters of the MA(q) component model (starting with the lowest lag).
[in]q(Required) is the number of elements in thetas (order of MA component).
[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).
[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_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_FARIMA_GOF(), NDK_FARIMA_RESID(), NDK_FARIMA_PARAM(), NDK_FARIMA_FITTED(), NDK_FARIMA_VALIDATE()

◆ NDK_FARIMA_GOF()

int __stdcall NDK_FARIMA_GOF ( double * pData,
size_t nSize,
double mean,
double sigma,
double nIntegral,
double * phis,
size_t p,
double * thetas,
size_t q,
GOODNESS_OF_FIT_FUNC retType,
double * retVal )

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

Parameters
[in]pData(Required) is the univariate time series data (a one dimensional array).
[in]nSize(Required) is the number of observations in pData.
[in]mean(Required) is the ARMA model mean (i.e. mu).
[in]sigma(Required) is the standard deviation of the model's residuals/innovations..
[in]nIntegral(Required) is the model's integration (fractional) order.
[in]phis(Required) are the parameters of the AR(p) component model (starting with the lowest lag).
[in]p(Required) is the number of elements in phis (order of AR component).
[in]thetas(Required) are the parameters of the MA(q) component model (starting with the lowest lag).
[in]q(Required) is the number of elements in thetas (order of MA component).
[in]retType(Required) is a switch to select a fitness measure ( see GOODNESS_OF_FIT_FUNC).
[out]retVal(Required) is the calculated GOF return value.
Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_AIRLINE_RESID(), NDK_AIRLINE_PARAM(), NDK_AIRLINE_FORE(), NDK_AIRLINE_FITTED(), NDK_AIRLINE_VALIDATE()

◆ NDK_FARIMA_PARAM()

int __stdcall NDK_FARIMA_PARAM ( double * pData,
size_t nSize,
double * mean,
double * sigma,
double nIntegral,
double * phis,
size_t p,
double * thetas,
size_t q,
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(Required) is the ARMA model mean (i.e. mu).
[in,out]sigma(Required) is the standard deviation of the model's residuals/innovations..
[in]nIntegral(Required) is the model's integration (fractional) order.
[in,out]phis(Required) are the parameters of the AR(p) component model (starting with the lowest lag).
[in]p(Required) is the number of elements in phis (order of AR component).
[in,out]thetas(Required) are the parameters of the MA(q) component model (starting with the lowest lag).
[in]q(Required) is the number of elements in thetas (order of MA component).
[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).
[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_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_AIRLINE_GOF(), NDK_AIRLINE_RESID(), NDK_AIRLINE_FORE(), NDK_AIRLINE_FITTED(), NDK_AIRLINE_VALIDATE()

◆ NDK_FARIMA_RESID()

int __stdcall NDK_FARIMA_RESID ( double * pData,
size_t nSize,
double mean,
double sigma,
double nIntegral,
double * phis,
size_t p,
double * thetas,
size_t q,
WORD retType )

Returns the standardized residuals of a given FARIMA model

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]mean(Required) is the ARMA model mean (i.e. mu).
[in]sigma(Required) is the standard deviation of the model's residuals/innovations..
[in]nIntegral(Required) is the model's integration (fractional) order.
[in]phis(Required) are the parameters of the AR(p) component model (starting with the lowest lag).
[in]p(Required) is the number of elements in phis (order of AR component).
[in]thetas(Required) are the parameters of the MA(q) component model (starting with the lowest lag).
[in]q(Required) is the number of elements in thetas (order of MA component).
[in]retType(Required) is a switch to select a residuals-type:raw or standardized. see RESID_RETVAL_FUNC
Returns
status code of the operation
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_AIRLINE_GOF(), NDK_AIRLINE_PARAM(), NDK_AIRLINE_FORE(), NDK_AIRLINE_FITTED(), NDK_AIRLINE_VALIDATE()

◆ NDK_FARIMA_SIM()

int __stdcall NDK_FARIMA_SIM ( double * pData,
size_t nSize,
double mean,
double sigma,
double nIntegral,
double * phis,
size_t p,
double * thetas,
size_t q,
size_t nStep,
size_t nSeed,
double * retVal )

Returns a simulated data series the underlying FARIMA process.

Parameters
[in]pData(Required) is the univariate time series data (a one dimensional array).
[in]nSize(Required) is the number of observations in pData.
[in]mean(Required) is the ARMA model mean (i.e. mu).
[in]sigma(Required) is the standard deviation of the model's residuals/innovations..
[in]nIntegral(Required) is the model's integration (fractional) order.
[in]phis(Required) are the parameters of the AR(p) component model (starting with the lowest lag).
[in]p(Required) is the number of elements in phis (order of AR component).
[in]thetas(Required) are the parameters of the MA(q) component model (starting with the lowest lag).
[in]q(Required) is the number of elements in thetas (order of MA component).
[in]nStep(Required) is the number of future steps to simulate for.
[in]nSeed(Required) is an unsigned integer for setting up the random number generators.
[out]retVal(Required) is the calculated simulation value.
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSOperation successful
NDK_FAILEDoperation is unsuccessful ( )
See also
NDK_FARIMA_GOF(), NDK_AIRLINE_RESID(), NDK_AIRLINE_FORE(), NDK_AIRLINE_FITTED(), NDK_AIRLINE_VALIDATE()