# NDK_RMD

 int __stdcall NDK_RMD ( double * X, size_t N, WORD reserved, double * retVal )

Returns the sample relative mean difference.

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 input data sample (a one/two dimensional array). [in] N is the number of observations in X. [in] reserved This parameter is reserved and must be 1. [out] retVal is the calculated value of this function.
Remarks
1. The time series may include missing values (NaN), but they will not be included in the calculations.
2. The relative mean difference is defined in terms of the NDK_MD as follows:
$\mathrm{RMD}= \frac{\mathrm{MD}}{\bar{x}}$
Where:
• $$\bar{x}$$ is the sample mean (average) of the time series.
• $$\mathrm{MD}$$ is the mean difference of the time series.
3: The RMD is also equal to twice the NDK_GINI.
Requirements
Examples



 Namespace: NumXLAPI Class: SFSDK Scope: Public Lifetime: Static
 NDK_RMD ( double[] pData, UIntPtr nSize, short argMenthod, ref double retVal )

Returns the sample relative mean difference.

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 input data sample (a one/two dimensional array). [in] nSize is the number of observations in pData. [in] argMenthod This parameter is reserved and must be 1. [out] retVal is the calculated value of this function.
Remarks
1. The time series may include missing values (NaN), but they will not be included in the calculations.
2. The relative mean difference is defined in terms of the NDK_MD as follows:
$\mathrm{RMD}= \frac{\mathrm{MD}}{\bar{x}}$
Where:
• $$\bar{x}$$ is the sample mean (average) of the time series.
• $$\mathrm{MD}$$ is the mean difference of the time series.
3: The RMD is also equal to twice the NDK_GINI.
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