NDK_MAE

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

Calculates the mean absolute error function for the forecast and the eventual outcomes.

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 original (eventual outcomes) time series sample data (a one dimensional array).
[in] Y is the forecast time series data (a one dimensional array).
[in] N is the number of observations in X.
[out] retVal is the calculated value of this function.
Remarks
1. The mean absolute error is a common measure of forecast error in time series analysis.
2. The time series is homogeneous or equally spaced.
3. The two time series must be identical in size.
4. The mean absolute error is given by:
\[\mathrm{MAE}=\frac{\mathrm{SAE}}{N}=\frac{\sum_{i=1}^N \left | x_i - \hat x_i \right |}{N}\],
where:
  • \(\{x_i\}\) is the actual observations time series.
  • \(\{\hat x_i\}\) is the estimated or forecasted time series.
  • \(\mathrm{SAE}\) is the sum of the absolute errors (or deviations).
  • \(N\) is the number of non-missing data points.
Requirements
Header SFSDK.H
Library SFSDK.LIB
DLL SFSDK.DLL
Examples


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

Calculates the mean absolute error function for the forecast and the eventual outcomes.

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 forecast time series data (a one dimensional array).
[in] nSize is the number of observations in pData1.
[out] retVal is the calculated value of this function.
Remarks
1. The mean absolute error is a common measure of forecast error in time series analysis.
2. The time series is homogeneous or equally spaced.
3. The two time series must be identical in size.
4. The mean absolute error is given by:
\[\mathrm{MAE}=\frac{\mathrm{SAE}}{N}=\frac{\sum_{i=1}^N \left | x_i - \hat x_i \right |}{N}\],
where:
  • \(\{x_i\}\) is the actual observations time series.
  • \(\{\hat x_i\}\) is the estimated or forecasted time series.
  • \(\mathrm{SAE}\) is the sum of the absolute errors (or deviations).
  • \(N\) is the number of non-missing data points.
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