Computes the correlation factor using the exponential-weighted correlation function (i.e. using the exponential-weighted covariance (EWCOV) and volatility (EWMA/EWV) method).

## Syntax

**EWXCF**(

**X**,

**Y**,

**Order**,

**Lambda**,

**T**)

- X
- is the first univariate time series data (a one dimensional array of cells (e.g. rows or columns)).
- Y
- is the second univariate time series data (a one dimensional array of cells (e.g. rows or columns)).
- Order
- is the time order in the data series (i.e. whether the first data point corresponds to the earliest or latest date (earliest date=1 (default), latest date=0)).
Order Description 1 ascending (the first data point corresponds to the earliest date) (default) 0 descending (the first data point corresponds to the latest date) - Lambda
- is the smoothing parameter used for the exponential-weighting scheme. If missing, the default value of 0.94 is assumed.
- T
- is the forecast time/horizon (expressed in terms of steps beyond the end of the time series X). If missing, the default value of 1 is assumed.

## Remarks

- The time series is homogeneous or equally spaced.
- The two time series must have identical size and time order.
- The correlation is defined as:

$$\rho^{(xy)}_t=\frac{\sigma_t^{(xy)}}{{_x\sigma_t}\times{_y\sigma_t}} $$

$$\sigma_t^{(xy)} = \lambda\sigma_{t-1}^{(xy)}+(1-\lambda)x_{t-1}y_{t-1}$$

$$_x\sigma_t^2=\lambda\times{_x\sigma_{t-1}^2}+(1-\lambda)x_{t-1}^2 $$

$$_y\sigma_t^2=\lambda\times{_y\sigma_{t-1}^2}+(1-\lambda)y_{t-1}^2 $$

Where:

- $\rho^{(xy)}_t$ is the sample correlation between X and Y at time t.
- $\sigma_t^{(xy)}$ is the sample exponential-weighted covariance between X and Y at time t.
- $_x\sigma_t$ is the sample exponential-weighted volatility for the time series X at time t.
- $_y\sigma_t$ is the sample exponential-weighted volatility for the time series Y at time t.
- $\lambda$ is the smoothing factor used in the exponential-weighted volatility and covariance calculations.

- If the input data sets do not have a zero mean, the
**EWXCF**Excel function removes the mean from each sample data on your behalf. - The
**EWXCF**uses the EWMA volatility and EWCOV representations which do not assume a long-run average volatility (or covariance), and thus, for any forecast horizon beyond one-step, the EWXCF returns a constant value.

## Files Examples

## Related Links

## References

- Hull, John C.; Options, Futures and Other Derivatives Financial Times/ Prentice Hall (2003),pp 385-387, ISBN 1-405-886145
- 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

## Comments

Article is closed for comments.