apaTurbulence(Returns, DoShowContributions, DoShowAbsContrOtherwisePercent)
=apaTurbulence(Returns, DoShowContributions, DoShowAbsContrOtherwisePercent)Result
Calculates the financial turbulence indicator (Kritzman/Li), i.e. the Mahalanobis distance of the returns from their mean, for each observation. Optionally returns the contributions of the constituents to the indicator instead, either absolute or relative to the indicator.
Syntax
Returns: nObs x nAssets matrix of returns, each column containing a time series
DoShowContributions: optional; TRUE: nObs x nAssets matrix with the contribution of each constituent to the turbulence indicator of each observation; FALSE (default): nObs x 1 vector with the turbulence indicator
DoShowAbsContrOtherwisePercent: optional, used if DoShowContributions is TRUE; TRUE (default): absolute contributions, each row sums to the turbulence indicator of the observation; FALSE: relative contributions, i.e. the absolute contributions divided by the turbulence indicator of the same observation, each row sums to 1
Algorithm
With r as asset returns, μ as average asset returns, Σ as covariance matrix and n as number of assets.
Contributions (DoShowContributions = TRUE): with u(t) = (r(t) - μ)' Σ^-1, the contribution of asset k is c(t,k) = u(t,k) x (r(t,k) - μ(k)) / n. The contributions of each observation sum to its turbulence indicator. Relative contributions (DoShowAbsContrOtherwisePercent = FALSE): c(t,k) / Turbulence(t), which sum to 1; observations with a turbulence indicator of 0 return 0.
Remarks
Kinlaw/Turkington(2013): “Correlation Surprise”, Journal of Asset Management: “This statistic, which can be thought of as a multivariate z-score, measures the statistical unusualness of a contemporaneous cross-section of asset returns relative to its historical distribution. It captures the extent to which the risk-adjusted magnitudes of the returns differ from their historical means as well as the extent to which their interaction is inconsistent with the historical correlation matrix.”
Contributions can be negative: a constituent whose deviation from its mean is consistent with its correlations to the other constituents reduces the indicator, and relative contributions can be negative or exceed 1. Plotting the last row of the contributions as a bar chart shows which constituents drive the most recent turbulence reading. Relative contributions are comparable across observations; averaging them over turbulent observations shows which constituents drive turbulence (compare with 1/n).
Uses population covariances (denominator n).
