# NDK_XKURTTEST

 int __stdcall NDK_XKURTTEST ( double * X, size_t N, double alpha, WORD method, WORD retType, double * retVal )

Calculates the p-value of the statistical test for the population excess kurtosis (4th moment).

Returns
status code of the operation
Return values
 NDK_SUCCESS Operation successful NDK_FAILED Operation unsuccessful. See Macros for full list.
Parameters
[in] X is the sample data (a one dimensional array).
[in] N is the number of observations in X.
[in] alpha is the statistical significance level. If missing, a default of 5% is assumed.
[in] method is the statistical test to perform (1=parametric).
[in] retType is a switch to select the return output:
Method Value Description
TEST_PVALUE 1 P-Value
TEST_SCORE 2 Test statistics (aka score)
TEST_CRITICALVALUE 3 Critical value.
[out] retVal is the calculated test statistics.
Remarks
1. The data sample may include missing values (e.g. #N/A).
2. The test hypothesis for the population excess kurtosis:
$H_{o}: K=0$
$H_{1}: K\neq 0$,
where:
• $$H_{o}$$ is the null hypothesis.
• $$H_{1}$$ is the alternate hypothesis.
3. For the case in which the underlying population distribution is normal, the sample excess kurtosis also has a normal sampling distribution: $$\hat K \sim N(0,\frac{24}{T})$$, where: $$\hat k$$ is the sample excess kurtosis (i.e. 4th moment). $$T$$ is the number of non-missing values in the data sample. $$N(.)$$ is the normal (i.e. gaussian) probability distribution function.
4. Using a given data sample, the sample excess kurtosis is calculated as:
$\hat K (x)= \frac{\sum_{t=1}^T(x_t-\bar x)^4}{(T-1)\hat \sigma^4}-3$,
where:
• $$\hat K(x)$$ is the sample excess kurtosis.
• $$x_i$$ is the i-th non-missing value in the data sample.
• $$T$$ is the number of non-missing values in the data sample.
• $$\hat \sigma$$ is the sample standard deviation.
5. The underlying population distribution is assumed normal (gaussian)..
6. This is a two-sides (i.e. two-tails) test, so the computed p-value should be compared with half of the significance level $$\frac{\alpha}{2}$$.
Requirements
Examples



 Namespace: NumXLAPI Class: SFSDK Scope: Public Lifetime: Static
 int NDK_XKURTTEST ( double[] pData, UIntPtr nSize, double alpha, UInt16 argMethod, UInt16 retType, out double retVal )

Calculates the p-value of the statistical test for the population excess kurtosis (4th moment).

Returns
status code of the operation
Return values
 NDK_SUCCESS Operation successful NDK_FAILED Operation unsuccessful. See Macros for full list.
Parameters
[in] pData is the sample data (a one dimensional array).
[in] nSize is the number of observations in pData.
[in] alpha is the statistical significance level. If missing, a default of 5% is assumed.
[in] argMethod is the statistical test to perform (1=parametric).
[in] retType is a switch to select the return output:
Method Value Description
TEST_PVALUE 1 P-Value
TEST_SCORE 2 Test statistics (aka score)
TEST_CRITICALVALUE 3 Critical value.
[out] retVal is the calculated test statistics.
Remarks
1. The data sample may include missing values (e.g. #N/A).
2. The test hypothesis for the population excess kurtosis:
$H_{o}: K=0$
$H_{1}: K\neq 0$,
where:
• $$H_{o}$$ is the null hypothesis.
• $$H_{1}$$ is the alternate hypothesis.
3. For the case in which the underlying population distribution is normal, the sample excess kurtosis also has a normal sampling distribution: $$\hat K \sim N(0,\frac{24}{T})$$, where: $$\hat k$$ is the sample excess kurtosis (i.e. 4th moment). $$T$$ is the number of non-missing values in the data sample. $$N(.)$$ is the normal (i.e. gaussian) probability distribution function.
4. Using a given data sample, the sample excess kurtosis is calculated as:
$\hat K (x)= \frac{\sum_{t=1}^T(x_t-\bar x)^4}{(T-1)\hat \sigma^4}-3$,
where:
• $$\hat K(x)$$ is the sample excess kurtosis.
• $$x_i$$ is the i-th non-missing value in the data sample.
• $$T$$ is the number of non-missing values in the data sample.
• $$\hat \sigma$$ is the sample standard deviation.
5. The underlying population distribution is assumed normal (gaussian)..
6. This is a two-sides (i.e. two-tails) test, so the computed p-value should be compared with half of the significance level $$\frac{\alpha}{2}$$.
Exceptions
Exception Type Condition
None N/A
Requirements
Namespace NumXLAPI SFSDK Public Static NumXLAPI.DLL
Examples

References
Hull, John C.; Options, Futures and Other DerivativesFinancial Times/ Prentice Hall (2011), ISBN 978-0132777421
Hans-Peter Deutsch; , Derivatives and Internal Models, Palgrave Macmillan (2002), ISBN 0333977068
John Y. Campbell, Andrew W. Lo, A. Craig MacKinlay, Andrew Y. Lo; The Econometrics of Financial Markets; Princeton University Press; 2nd edition(Dec 09, 1996), ISBN: 691043019
* Hamilton, J .D.; Time Series Analysis , Princeton University Press (1994), ISBN 0-691-04289-6
* Tsay, Ruey S.; Analysis of Financial Time Series John Wiley & SONS. (2005), ISBN 0-471-690740
* D. S.G. Pollock; Handbook of Time Series Analysis, Signal Processing, and Dynamics; Academic Press; Har/Cdr edition(Nov 17, 1999), ISBN: 125609906
* Box, Jenkins and Reisel; Time Series Analysis: Forecasting and Control; John Wiley & SONS.; 4th edition(Jun 30, 2008), ISBN: 470272848