EGARCH model functions. More...
Functions | |
int __stdcall | NDK_EGARCH_GOF (double *pData, size_t nSize, double mu, const double *Alphas, size_t p, const double *Gammas, size_t g, const double *Betas, size_t q, WORD nInnovationType, double nu, WORD retType, double *retVal) |
int __stdcall | NDK_EGARCH_RESID (double *pData, size_t nSize, double mu, const double *Alphas, size_t p, const double *Gammas, size_t g, const double *Betas, size_t q, WORD nInnovationType, double nu, WORD retType) |
int __stdcall | NDK_EGARCH_PARAM (double *pData, size_t nSize, double *mu, double *Alphas, size_t p, double *Gammas, size_t g, double *Betas, size_t q, WORD nInnovationType, double *nu, WORD retType, size_t maxIter) |
int __stdcall | NDK_EGARCH_SIM (double mu, const double *Alphas, size_t p, const double *Gammas, size_t g, const double *Betas, size_t q, WORD nInnovationType, double nu, double *pData, size_t nSize, double *sigmas, size_t nSigmaSize, UINT nSeed, double *retArray, size_t nSteps) |
int __stdcall | NDK_EGARCH_FORE (double *pData, size_t nSize, double *sigmas, size_t nSigmaSize, double mu, const double *Alphas, size_t p, const double *Gammas, size_t g, const double *Betas, size_t q, WORD nInnovationType, double nu, size_t nStep, WORD retType, double alpha, double *retVal) |
int __stdcall | NDK_EGARCH_FITTED (double *pData, size_t nSize, double mu, const double *Alphas, size_t p, const double *Gammas, size_t g, const double *Betas, size_t q, WORD nInnovationType, double nu, WORD retType) |
int __stdcall | NDK_EGARCH_LRVAR (double mu, const double *Alphas, size_t p, const double *Gammas, size_t g, const double *Betas, size_t q, WORD nInnovationType, double nu, double *retVal) |
int __stdcall | NDK_EGARCH_VALIDATE (double mu, const double *Alphas, size_t p, const double *Gammas, size_t g, const double *Betas, size_t q, WORD nInnovationType, double nu) |
The exponential general autoregressive conditional heteroskedastic (EGARCH) is another form of the GARCH model. The EGARCH model was proposed by Nelson (1991) to overcome the weakness in GARCH’s handling of financial time series. In particular, to allow for asymmetric effects between positive and negative asset returns.
int __stdcall NDK_EGARCH_FITTED | ( | double * | pData, |
size_t | nSize, | ||
double | mu, | ||
const double * | Alphas, | ||
size_t | p, | ||
const double * | Gammas, | ||
size_t | g, | ||
const double * | Betas, | ||
size_t | q, | ||
WORD | nInnovationType, | ||
double | nu, | ||
WORD | retType ) |
Returns an array of cells for the fitted values (i.e. mean, volatility and residuals)
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | pData | is the univariate time series data (a one dimensional array). |
[in] | nSize | is the number of observations in X. |
[in] | mu | is the GARCH model conditional mean (i.e. mu). |
[in] | Alphas | are the parameters of the ARCH(p) component model (starting with the lowest lag). |
[in] | p | is the number of elements in Alphas array |
[in] | Gammas | are the leverage parameters (starting with the lowest lag). |
[in] | g | is the number of elements in Gammas. Must be equal to (p-1). |
[in] | Betas | are the parameters of the GARCH(q) component model (starting with the lowest lag). |
[in] | q | is the number of elements in Betas array |
[in] | nInnovationType | is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE)
|
[in] | nu | is the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. |
[in] | retType | is a switch to select a output type ( see FIT_RETVAL_FUNC) |
int __stdcall NDK_EGARCH_FORE | ( | double * | pData, |
size_t | nSize, | ||
double * | sigmas, | ||
size_t | nSigmaSize, | ||
double | mu, | ||
const double * | Alphas, | ||
size_t | p, | ||
const double * | Gammas, | ||
size_t | g, | ||
const double * | Betas, | ||
size_t | q, | ||
WORD | nInnovationType, | ||
double | nu, | ||
size_t | nStep, | ||
WORD | retType, | ||
double | alpha, | ||
double * | retVal ) |
Calculates the out-of-sample forecast statistics.
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | pData | is the univariate time series data (a one dimensional array). |
[in] | nSize | is the number of observations in X. |
[in] | sigmas | is the univariate time series data (a one dimensional array of cells (e.g. rows or columns)) of the last q realized volatilities. |
[in] | nSigmaSize | is the number of elements in sigmas. Only the latest q observations are used. |
[in] | mu | is the GARCH model conditional mean (i.e. mu). |
[in] | Alphas | are the parameters of the ARCH(p) component model (starting with the lowest lag). |
[in] | p | is the number of elements in Alphas array |
Gammas | [inout] are the leverage parameters (starting with the lowest lag). | |
[in] | g | is the number of elements in Gammas. Must be equal to (p-1). |
[in] | Betas | are the parameters of the GARCH(q) component model (starting with the lowest lag). |
[in] | q | is the number of elements in Betas array |
[in] | nInnovationType | is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE)
|
[in] | nu | is the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. |
[in] | nStep | is the forecast time/horizon (expressed in terms of steps beyond end of the time series). |
[in] | retType | is a switch to select the type of value returned
|
[in] | alpha | is the statistical significance level. If missing, a default of 5% is assumed. |
[out] | retVal | is the simulated value for the GARCH process. |
int __stdcall NDK_EGARCH_GOF | ( | double * | pData, |
size_t | nSize, | ||
double | mu, | ||
const double * | Alphas, | ||
size_t | p, | ||
const double * | Gammas, | ||
size_t | g, | ||
const double * | Betas, | ||
size_t | q, | ||
WORD | nInnovationType, | ||
double | nu, | ||
WORD | retType, | ||
double * | retVal ) |
Computes the log-likelihood ((LLF), Akaike Information Criterion (AIC) or other goodness of fit function of the GARCH model.
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | pData | is the univariate time series data (a one dimensional array). |
[in] | nSize | is the number of observations in X. |
[in] | mu | is the EGARCH model conditional mean (i.e. mu). |
[in] | Alphas | are the parameters of the ARCH(p) component model (starting with the lowest lag). |
[in] | p | is the number of elements in Alphas array |
[in] | Gammas | are the leverage parameters (starting with the lowest lag). |
[in] | g | is the number of elements in Gammas. Must be equal to (p-1). |
[in] | Betas | are the parameters of the GARCH(q) component model (starting with the lowest lag). |
[in] | q | is the number of elements in Betas array |
[in] | nInnovationType | is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE)
|
[in] | nu | is the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. |
[in] | retType | is a switch to select a fitness measure ( see GOODNESS_OF_FIT_FUNC) |
[out] | retVal | is the calculated goodness of fit value. |
int __stdcall NDK_EGARCH_LRVAR | ( | double | mu, |
const double * | Alphas, | ||
size_t | p, | ||
const double * | Gammas, | ||
size_t | g, | ||
const double * | Betas, | ||
size_t | q, | ||
WORD | nInnovationType, | ||
double | nu, | ||
double * | retVal ) |
Calculates the long-run average volatility for a given E-GARCH model.
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | mu | is the GARCH model conditional mean (i.e. mu). |
[in] | Alphas | are the parameters of the ARCH(p) component model (starting with the lowest lag). |
[in] | p | is the number of elements in Alphas array |
Gammas | [inout] are the leverage parameters (starting with the lowest lag). | |
[in] | g | is the number of elements in Gammas. Must be equal to (p-1). |
[in] | Betas | are the parameters of the GARCH(q) component model (starting with the lowest lag). |
[in] | q | is the number of elements in Betas array |
[in] | nInnovationType | is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE)
|
[in] | nu | is the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. |
[out] | retVal | is the calculated Long run volatility. |
int __stdcall NDK_EGARCH_PARAM | ( | double * | pData, |
size_t | nSize, | ||
double * | mu, | ||
double * | Alphas, | ||
size_t | p, | ||
double * | Gammas, | ||
size_t | g, | ||
double * | Betas, | ||
size_t | q, | ||
WORD | nInnovationType, | ||
double * | nu, | ||
WORD | retType, | ||
size_t | maxIter ) |
Returns an array of cells for the initial (non-optimal), optimal or standard errors of the model's parameters.
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | pData | is the univariate time series data (a one dimensional array). |
[in] | nSize | is the number of observations in X. |
mu | [inout] is the EGARCH model conditional mean (i.e. mu). | |
Alphas | [inout] are the parameters of the ARCH(p) component model (starting with the lowest lag). | |
[in] | p | is the number of elements in Alphas array |
Gammas | [inout] are the leverage parameters (starting with the lowest lag). | |
[in] | g | is the number of elements in Gammas. Must be equal to (p-1). |
Betas | [inout] are the parameters of the GARCH(q) component model (starting with the lowest lag). | |
[in] | q | is the number of elements in Betas array |
[in] | nInnovationType | is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE)
|
nu | [inout] is the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. | |
[in] | retType | is a switch to select the type of value returned: 1= Quick Guess, 2=Calibrated, 3= Std. Errors ( see MODEL_RETVAL_FUNC) |
[in] | maxIter | is the maximum number of iterations used to calibrate the model. If missing or less than 100, the default maximum of 100 is assumed. |
int __stdcall NDK_EGARCH_RESID | ( | double * | pData, |
size_t | nSize, | ||
double | mu, | ||
const double * | Alphas, | ||
size_t | p, | ||
const double * | Gammas, | ||
size_t | g, | ||
const double * | Betas, | ||
size_t | q, | ||
WORD | nInnovationType, | ||
double | nu, | ||
WORD | retType ) |
Returns an array of cells for the standardized residuals of a given GARCH model
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | pData | is the univariate time series data (a one dimensional array). |
[in] | nSize | is the number of observations in X. |
[in] | mu | is the EGARCH model conditional mean (i.e. mu). |
[in] | Alphas | are the parameters of the ARCH(p) component model (starting with the lowest lag). |
[in] | p | is the number of elements in Alphas array |
[in] | Gammas | are the leverage parameters (starting with the lowest lag). |
[in] | g | is the number of elements in Gammas. Must be equal to (p-1). |
[in] | Betas | are the parameters of the GARCH(q) component model (starting with the lowest lag). |
[in] | q | is the number of elements in Betas array |
[in] | nInnovationType | is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE)
|
[in] | nu | is the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. |
[in] | retType | is a switch to select a residuals-type:raw or standardized. see RESID_RETVAL_FUNC |
int __stdcall NDK_EGARCH_SIM | ( | double | mu, |
const double * | Alphas, | ||
size_t | p, | ||
const double * | Gammas, | ||
size_t | g, | ||
const double * | Betas, | ||
size_t | q, | ||
WORD | nInnovationType, | ||
double | nu, | ||
double * | pData, | ||
size_t | nSize, | ||
double * | sigmas, | ||
size_t | nSigmaSize, | ||
UINT | nSeed, | ||
double * | retArray, | ||
size_t | nSteps ) |
Returns a simulated data series the underlying EGARCH process.
NDK_SUCCESS | Operation successful |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | mu | is the GARCH model conditional mean (i.e. mu). |
[in] | Alphas | are the parameters of the ARCH(p) component model (starting with the lowest lag). |
[in] | p | is the number of elements in Alphas array |
[in] | Gammas | are the leverage parameters (starting with the lowest lag). |
[in] | g | is the number of elements in Gammas. Must be equal to (p-1). |
[in] | Betas | are the parameters of the GARCH(q) component model (starting with the lowest lag). |
[in] | q | is the number of elements in Betas array |
[in] | nInnovationType | is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE) |
[in] | nu | is the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. |
[in] | pData | is the univariate time series data (a one dimensional array). |
[in] | nSize | is the number of observations in X. |
[in] | sigmas | is the univariate time series data (a one dimensional array of cells (e.g. rows or columns)) of the last q realized volatilities. |
[in] | nSigmaSize | is the number of elements in sigmas. Only the latest q observations are used. |
[in] | nSeed | is an unsigned integer for setting up the random number generators |
[out] | retArray | is the calculated simulation value |
[in] | nSteps | is the number of future steps to simulate for. |
int __stdcall NDK_EGARCH_VALIDATE | ( | double | mu, |
const double * | Alphas, | ||
size_t | p, | ||
const double * | Gammas, | ||
size_t | g, | ||
const double * | Betas, | ||
size_t | q, | ||
WORD | nInnovationType, | ||
double | nu ) |
Examines the model's parameters for stability constraints (e.g. stationary, positive variance, etc.).
NDK_TRUE | Model is stable (i.e. variance process is stationary and yield positive values) |
NDK_FALSE | Model is unstable. |
NDK_FAILED | operation is unsuccessful ( ) |
[in] | mu | is the GARCH model conditional mean (i.e. mu). |
[in] | Alphas | are the parameters of the ARCH(p) component model (starting with the lowest lag). |
[in] | p | is the number of elements in Alphas array |
Gammas | [inout] are the leverage parameters (starting with the lowest lag). | |
[in] | g | is the number of elements in Gammas. Must be equal to (p-1). |
[in] | Betas | are the parameters of the GARCH(q) component model (starting with the lowest lag). |
[in] | q | is the number of elements in Betas array |
[in] | nInnovationType | is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE)
|
[in] | nu | is the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. |