int __stdcall NDK_ACFTEST | ( | double * | X, |
size_t | N, | ||
int | K, | ||
double | target, | ||
double | alpha, | ||
WORD | method, | ||
WORD | retType, | ||
double * | retVal | ||
) |
Calculates the p-value of the statistical test for the population autocorrelation function.
- 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 univariate time series data (a one dimensional array). [in] N is the number of observations in X. [in] K is the lag order (e.g. k=0 (no lag), k=1 (1st lag), etc.). [in] target is the assumed autocorrelation function value. If missing, the default of zero is assumed. [in] alpha is the statistical significance level. If missing, a default of 5% is assumed. [in] method is the type of test: parametric or non-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
-
- The time series is homogeneous or equally spaced.
- The time series may include missing values (NaN) at either end.
- The lag order (k) must be less than the time series size, or an error value (#VALUE!) is returned.
- This is a two-sides (i.e. two-tails) test, so the computed p-value should be compared with half of the significance level (i.e. \( \frac{\alpha}{2} \) ).
- Requirements
-
Header SFSDK.H Library SFSDK.LIB DLL SFSDK.DLL
- Examples
-
Namespace: | NumXLAPI |
Class: | SFSDK |
Scope: | Public |
Lifetime: | Static |
int NDK_ACFTEST | ( | double[] | pData, |
UIntPtr | nSize, | ||
int | nLag, | ||
double | target, | ||
double | alpha, | ||
UInt16 | method, | ||
UInt16 | retType, | ||
out double * | retVal | ||
) |
Calculates the p-value of the statistical test for the population autocorrelation function.
- Return Value
-
a value from NDK_RETCODE enumeration for the status of the call.
NDK_SUCCESS operation successful Error Error Code
- Parameters
-
[in] pData is the univariate time series data (a one dimensional array). [in] nSize is the number of observations in pData. [in] nLag is the lag order (e.g. k=0 (no lag), k=1 (1st lag), etc.). [in] targetVal is the assumed autocorrelation function value. If missing, the default of zero is assumed. [in] alpha is the statistical significance level. If missing, a default of 5% is assumed. [in] method is the type of test: parametric or non-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
-
- The time series is homogeneous or equally spaced.
- The time series may include missing values (NaN) at either end.
- The lag order (k) must be less than the time series size, or an error value (#VALUE!) is returned.
- This is a two-sides (i.e. two-tails) test, so the computed p-value should be compared with half of the significance level (i.e. \( \frac{\alpha}{2} \) ).
- Exceptions
-
Exception Type Condition None N/A
- Requirements
-
Namespace NumXLAPI Class SFSDK Scope Public Lifetime Static Package NumXLAPI.DLL
- Examples
-
- References
- Hull, John C.; Options, Futures and Other DerivativesFinancial Times/ Prentice Hall (2011), ISBN 978-0132777421
- 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