NDK_SSE

int __stdcall NDK_SSE ( double *  X,
double *  Y,
size_t  N,
double *  retVal 
)

Calculates the sum of the squared errors of the prediction function.

Returns
status code of the operation
Return values
NDK_SUCCESS Operation successful
NDK_FAILED Operation unsuccessful. See Macros for full list.
See Also
NDK_XCF()
Parameters
[in] X is the original (eventual outcomes) time series sample data (a one dimensional array).
[in] Y is the forecasted time series data (a one dimensional array).
[in] N is the number of observations in X.
[out] retVal is the calculated sum of squared errors.
Remarks
1. The time series is homogeneous or equally spaced.
2. The two time series must be identical in size.
3. A missing value (e.g. \(x_k\) or \(\hat x_k\)) in either time series will exclude the data point \((x_k,\hat x_k)\) from the SSE.
4. The sum of the squared errors, \(\mathrm{SSE}\), is defined as follows:
\[\mathrm{SSE}=\sum_{i=1}^N \left(x_i-\hat x_i \right )^2\],
where:
  • \(\{x_i\}\) is the actual observations time series.
  • \(\{\hat x_i\}\) is the estimated or forecasted time series.
Requirements
Header SFSDK.H
Library SFSDK.LIB
DLL SFSDK.DLL
Examples


   
Namespace:  NumXLAPI
Class:  SFSDK
Scope:  Public
Lifetime:  Static
int NDK_SSE ( double[]  pData1,
double[]  pData2,
UIntPtr  nSize,
ref double  retVal 
)

Calculates the sum of the squared errors of the prediction function.

Return Value

a value from NDK_RETCODE enumeration for the status of the call. 

NDK_SUCCESS  operation successful
Error  Error Code
Parameters
[in] pData1 is the original (eventual outcomes) time series sample data (a one dimensional array).
[in] pData2 is the forecasted time series data (a one dimensional array).
[in] nSize is the number of observations in pData1.
[out] retVal is the calculated sum of squared errors.
Remarks
1. The time series is homogeneous or equally spaced.
2. The two time series must be identical in size.
3. A missing value (e.g. \(x_k\) or \(\hat x_k\)) in either time series will exclude the data point \((x_k,\hat x_k)\) from the SSE.
4. The sum of the squared errors, \(\mathrm{SSE}\), is defined as follows:
\[\mathrm{SSE}=\sum_{i=1}^N \left(x_i-\hat x_i \right )^2\],
where:
  • \(\{x_i\}\) is the actual observations time series.
  • \(\{\hat x_i\}\) is the estimated or forecasted time series.
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