NDK_ACF_ERROR

int __stdcall NDK_ACF_ERROR ( double *  X,
size_t  N,
size_t  K,
double *  retVal 
)

Calculates the standard error in the sample 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.).
[out] retVal is the standard error in the sample auto correlation value.
Remarks
  • The time series is homogeneous or equally spaced.
  • The time series may include missing values (e.g. NaN) at either end.
  • The lag order (k) must be less than the time series size, or else an error value (NDK_INVALID_VALUE=-302) is returned.
Requirements
Header SFSDK.H
Library SFSDK.LIB
DLL SFSDK.DLL
Examples
#include "SFMacros.h"
#include "SFSDK.h"

// Input time series: 110 observation 
double data[110]={0.23, 0.24, 0.45, ..., 0.95}

int nRet = NDK_FAILED;
double retVal = -2.0f;
nRet = NDK_ACF_ERROR(data, 110, 1, &retVal);
if( nRet < NDK_SUCCESS){
    // Error occured
    // Call NDK_MSG to retrieve description of the error, and write it to the log file
    ....
}
	
Namespace:  NumXLAPI
Class:  SFSDK
Scope:  Public
Lifetime:  Static
int NDK_ACF_ERROR ( double[]  pData,
UIntPtr  nSize,
int  nLag,
out double  retVal 
)

Calculates the standard error in the sample 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. nLag=0 (no lag), nLag=1 (1st lag), etc.).
[out] retVal is the standard error in the sample auto correlation value.
Remarks
  • The time series is homogeneous or equally spaced.
  • The time series may include missing values (e.g. NaN) at either end.
  • The lag order (nLag) must be less than the time series size, or else an error value (NDK_INVALID_VALUE=-302) is returned.
Exceptions
Exception Type Condition
None N/A
Requirements
Namespace NumXLAPI
Class SFSDK
Scope Public
Lifetime Static
Package NumXLAPI.DLL
Examples
	
References
* 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