Exponential General Autoregressive Conditional Heteroskedastic (EGARCH) Model. 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) |
Computes the log-likelihood (LLF), Akaike Information Criterion (AIC) or other goodness of fit functions of the ARMA model. | |
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 E-GARCH model. | |
int __stdcall | NDK_EGARCH_PARAM (double *pData, size_t nSize, double *mean, 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. | |
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 *pSigmas, size_t nSigmaSize, UINT nSeed, double *retArray, size_t nSteps) |
Returns a simulated data series the underlying EGARCH process. | |
int __stdcall | NDK_EGARCH_FORE (double *pData, size_t nSize, double *pVols, size_t nVolSize, 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 nSteps, WORD retType, double alpha, double *retVal) |
Calculates the out-of-sample forecast statistics. | |
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) |
Calculates the out-of-sample forecast statistics. | |
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 the given E-GARCH model. | |
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. variance stationary, positive variance, etc.). | |
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.
Formally, an EGARCH(p, q):
\[x_t = \mu + a_t \]
\[\ln\sigma_t^2 = \alpha_o + \sum_{i=1}^p {\alpha_i \left(\left|\epsilon_{t-i}\right|+\gamma_i\epsilon_{t-i}\right )}+\sum_{j=1}^q{\beta_j \ln\sigma_{t-j}^2}\]
\[a_t = \sigma_t \times \epsilon_t\]
\[\epsilon_t \sim P_{\nu}(0,1) \]
Where:
\[\left[\epsilon_t \right] \sim i.i.d\]
\[E\left[\epsilon_t\right]=0\]
\[\mathit{VAR}\left[\epsilon_t\right]=1 \]
\[P_{\nu} = N(0,1) \]
\[ P_{\nu} = t_{\nu}(0,1) \]
\[\nu \gt 4 \]
\[P_{\nu} = \mathit{GED}_{\nu}(0,1) \]
\[\nu \gt 1 \]
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).
[in,out] | pData | (Required) The univariate time series data. | ||||||||||
[in] | nSize | (Required) The number of observations in pData . | ||||||||||
[in] | mu | (Optional) The GARCH model conditional mean (i.e. mu). | ||||||||||
[in] | Alphas | (Optional) The parameters of the ARCH(p) component model (starting with the lowest lag). | ||||||||||
[in] | p | (Optional) The number of elements in Alphas array. | ||||||||||
[in] | Gammas | (Optional) The leverage parameters (starting with the lowest lag). | ||||||||||
[in] | g | (Optional) the number of elements in Gammas. Must be equal to (p-1). | ||||||||||
[in] | Betas | (Optional) The parameters of the GARCH(q) component model (starting with the lowest lag). | ||||||||||
[in] | q | (Optional) The number of elements in Betas array. | ||||||||||
[in] | nInnovationType | (Optional) is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE)
| ||||||||||
[in] | nu | (Optional) the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. | ||||||||||
[in] | retType | (Required) A switch to select the desired output type (see FIT_RETVAL_FUNC).
|
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.retVal
argument is NULL, the function will fails and return NDK_INVALID_ARG.Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_EGARCH_FORE | ( | double * | pData, |
size_t | nSize, | ||
double * | pVols, | ||
size_t | nVolSize, | ||
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 | nSteps, | ||
WORD | retType, | ||
double | alpha, | ||
double * | retVal ) |
Calculates the out-of-sample forecast statistics.
[in] | pData | (Required) The univariate time series data. | ||||||||||||
[in] | nSize | (Required) The number of observations in pData . | ||||||||||||
[in] | pVols | (Required) the univariate time series data (a one dimensional array of cells (e.g. rows or columns)) of the last q realized volatilities. | ||||||||||||
[in] | nVolSize | (Required) the number of elements in sigmas. Only the latest q observations are used. | ||||||||||||
[in] | mu | (Optional) The GARCH model conditional mean (i.e. mu). | ||||||||||||
[in] | Alphas | (Optional) The parameters of the ARCH(p) component model (starting with the lowest lag). | ||||||||||||
[in] | p | (Optional) The number of elements in Alphas array. | ||||||||||||
[in] | Gammas | (Optional) The leverage parameters (starting with the lowest lag). | ||||||||||||
[in] | g | (Optional) the number of elements in Gammas. Must be equal to (p-1). | ||||||||||||
[in] | Betas | (Optional) The parameters of the GARCH(q) component model (starting with the lowest lag). | ||||||||||||
[in] | q | (Optional) The number of elements in Betas array. | ||||||||||||
[in] | nInnovationType | (Optional) is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE)
| ||||||||||||
[in] | nu | (Optional) the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. | ||||||||||||
[in] | nSteps | (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. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.retVal
argument is NULL, the function will fails and return NDK_INVALID_ARG.Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
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 functions of the ARMA model.
[in] | pData | (Required) The univariate time series data. | ||||||||||||||
[in] | nSize | (Required) The number of observations in pData . | ||||||||||||||
[in] | mu | (Optional) The GARCH model conditional mean (i.e. mu). | ||||||||||||||
[in] | Alphas | (Optional) The parameters of the ARCH(p) component model (starting with the lowest lag). | ||||||||||||||
[in] | p | (Optional) The number of elements in Alphas array. | ||||||||||||||
[in] | Gammas | (Optional) The leverage parameters (starting with the lowest lag). | ||||||||||||||
[in] | g | (Optional) the number of elements in Gammas. Must be equal to (p-1). | ||||||||||||||
[in] | Betas | (Optional) The parameters of the GARCH(q) component model (starting with the lowest lag). | ||||||||||||||
[in] | q | (Optional) The number of elements in Betas array. | ||||||||||||||
[in] | nInnovationType | (Optional) is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE)
| ||||||||||||||
[in] | nu | (Optional) the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. | ||||||||||||||
[in] | retType | (Required) a switch to select a fitness measure ( see GOODNESS_OF_FIT_FUNC).
| ||||||||||||||
[out] | retVal | (Required) is a pointer to a variable to hold the calculated GOF statistics. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.retVal
argument is NULL, the function will fails and return NDK_INVALID_ARG.Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
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 the given E-GARCH model
[in] | mu | (Optional) The GARCH model conditional mean (i.e. mu). | ||||||||
[in] | Alphas | (Optional) The parameters of the ARCH(p) component model (starting with the lowest lag). | ||||||||
[in] | p | (Optional) The number of elements in Alphas array. | ||||||||
[in] | Gammas | (Optional) The leverage parameters (starting with the lowest lag). | ||||||||
[in] | g | (Optional) the number of elements in Gammas. Must be equal to (p-1). | ||||||||
[in] | Betas | (Optional) The parameters of the GARCH(q) component model (starting with the lowest lag). | ||||||||
[in] | q | (Optional) The number of elements in Betas array. | ||||||||
[in] | nInnovationType | (Optional) is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE)
| ||||||||
[in] | nu | (Optional) the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. | ||||||||
[out] | retVal | (Required) is a pointer to a variable to hold the calculated GOF statistics. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
retVal
argument is NULL, the function will fails and return NDK_INVALID_ARG.Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
int __stdcall NDK_EGARCH_PARAM | ( | double * | pData, |
size_t | nSize, | ||
double * | mean, | ||
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.
[in] | pData | (Required) The univariate time series data. | ||||||||
[in] | nSize | (Required) The number of observations in pData . | ||||||||
[in,out] | mean | (Optional) The GARCH model conditional mean (i.e. mu). | ||||||||
[in,out] | Alphas | (Optional) The parameters of the ARCH(p) component model (starting with the lowest lag). | ||||||||
[in] | p | (Optional) The number of elements in Alphas array. | ||||||||
[in,out] | Gammas | (Optional) The leverage parameters (starting with the lowest lag). | ||||||||
[in] | g | (Optional) the number of elements in Gammas. Must be equal to (p-1). | ||||||||
[in,out] | Betas | (Optional) The parameters of the GARCH(q) component model (starting with the lowest lag). | ||||||||
[in] | q | (Optional) The number of elements in Betas array. | ||||||||
[in] | nInnovationType | (Optional) is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE)
| ||||||||
[in,out] | nu | (Optional) the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. | ||||||||
[in] | retType | (Required) 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. |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.retVal
argument is NULL, the function will fails and return NDK_INVALID_ARG.Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
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 E-GARCH model
[in,out] | pData | (Required) The univariate time series data. | ||||||||
[in] | nSize | (Required) The number of observations in pData . | ||||||||
[in] | mu | (Optional) The GARCH model conditional mean (i.e. mu). | ||||||||
[in] | Alphas | (Optional) The parameters of the ARCH(p) component model (starting with the lowest lag). | ||||||||
[in] | p | (Optional) The number of elements in Alphas array. | ||||||||
[in] | Gammas | (Optional) The leverage parameters (starting with the lowest lag). | ||||||||
[in] | g | (Optional) the number of elements in Gammas. Must be equal to (p-1). | ||||||||
[in] | Betas | (Optional) The parameters of the GARCH(q) component model (starting with the lowest lag). | ||||||||
[in] | q | (Optional) The number of elements in Betas array. | ||||||||
[in] | nInnovationType | (Optional) is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE)
| ||||||||
[in] | nu | (Optional) the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. | ||||||||
[in] | retType | (Required) is a switch to select a residuals-type:raw or standardized. see RESID_RETVAL_FUNC
|
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.retVal
argument is NULL, the function will fails and return NDK_INVALID_ARG.Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
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 * | pSigmas, | ||
size_t | nSigmaSize, | ||
UINT | nSeed, | ||
double * | retArray, | ||
size_t | nSteps ) |
Returns a simulated data series the underlying EGARCH process.
[in] | mu | (Optional) The GARCH model conditional mean (i.e. mu). | ||||||||
[in] | Alphas | (Optional) The parameters of the ARCH(p) component model (starting with the lowest lag). | ||||||||
[in] | p | (Optional) The number of elements in Alphas array. | ||||||||
[in] | Gammas | (Optional) The leverage parameters (starting with the lowest lag). | ||||||||
[in] | g | (Optional) the number of elements in Gammas. Must be equal to (p-1). | ||||||||
[in] | Betas | (Optional) The parameters of the GARCH(q) component model (starting with the lowest lag). | ||||||||
[in] | q | (Optional) The number of elements in Betas array. | ||||||||
[in] | nInnovationType | (Optional) is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE)
| ||||||||
[in] | nu | (Optional) the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. | ||||||||
[in] | pData | (Optional) he univariate time series of the latest observations (a one dimensional array). | ||||||||
[in] | nSize | (Required) The number of observations in pData . | ||||||||
[in] | pSigmas | (Optional) The univariate time series of the latest observations (a one dimensional array). | ||||||||
[in] | nSigmaSize | (Required) The number of observations in pSigmas . | ||||||||
[in] | nSeed | (Required) is an unsigned integer for setting up the random number generators. | ||||||||
[out] | retArray | (Required) is the calculated simulation value. | ||||||||
[in] | nSteps | (Required) is the simulation time/horizon (expressed in terms of steps beyond end of the time series). |
NDK_SUCCESS | success |
NDK_INVALID_ARG | failed (see remarks) |
NDK_LOW_LICENSE_ARG_LIMIT | failed (see remarks) |
NDK_FAILED | failed |
nSize
is zero, the function will fail and return NDK_INVALID_ARG.retVal
argument is NULL, the function will fails and return NDK_INVALID_ARG.Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |
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. variance stationary, positive variance, etc.).
[in] | mu | (Optional) The GARCH model conditional mean (i.e. mu). | ||||||||
[in] | Alphas | (Optional) The parameters of the ARCH(p) component model (starting with the lowest lag). | ||||||||
[in] | p | (Optional) The number of elements in Alphas array. | ||||||||
[in] | Gammas | (Optional) The leverage parameters (starting with the lowest lag). | ||||||||
[in] | g | (Optional) the number of elements in Gammas. Must be equal to (p-1). | ||||||||
[in] | Betas | (Optional) The parameters of the GARCH(q) component model (starting with the lowest lag). | ||||||||
[in] | q | (Optional) The number of elements in Betas array. | ||||||||
[in] | nInnovationType | (Optional) is the probability distribution function of the innovations/residuals (see INNOVATION_TYPE)
| ||||||||
[in] | nu | (Optional) the shape factor (or degrees of freedom) of the innovations/residuals probability distribution function. |
NDK_TRUE | model is stable |
NDK_FALSE | model is instable |
NDK_INVALID_ARG | failed (see remarks) |
NDK_FAILED | failed |
Requirement | Value |
---|---|
Target Platform | Windows |
Header | SFSDK.h (include Windows.h) |
Library | SFSDK.lib |
DLL | SFSDK.dll SFLUC.dll SFLOG.dll |