Brownian Distance Variance

PortfolioOptimisers.BrownianDistanceVarianceType
struct BrownianDistanceVariance{__T_settings, __T_alg1, __T_alg2} <: RiskMeasure

Represents the Brownian Distance Variance (BDVar) risk measure.

BrownianDistanceVariance measures the dispersion of the portfolio return series through its distance variance, the Brownian distance covariance of the series with itself. It is built from the pairwise distances between observations rather than from their deviations about the mean, so it reads non-linear structure that the variance cannot see. The functor and the optimisation model both return a disciplined-convex upper bound on that statistic, not the statistic itself.

Mathematical definition

Given a portfolio returns vector $\boldsymbol{x} = (x_1, \ldots, x_T)^\intercal$, define the pairwise absolute distance matrix, the centring matrix, and the doubly centred distance matrix:

\[\begin{align} D_{ij} &= |x_i - x_j|\,, \\ \mathbf{C}_T &= \mathbf{I}_T - \frac{1}{T} \boldsymbol{1}_T \boldsymbol{1}_T^\intercal\,, \\ \mathbf{A} &= \mathbf{C}_T \mathbf{D} \mathbf{C}_T\,. \end{align}\]

Where:

  • $D_{ij}$: Pairwise absolute distance between returns at periods $i$ and $j$.
  • $\boldsymbol{x}$: Portfolio returns vector $T \times 1$.
  • $T$: Number of observations.
  • $\mathbf{D}$: $T \times T$ pairwise distance matrix.
  • $\mathbf{C}_T$: $T \times T$ centring matrix.
  • $\mathbf{A}$: $T \times T$ doubly centred distance matrix.
  • $\boldsymbol{1}_T$: Column vector of ones, $T \times 1$.

The distance variance is the mean square of the centred matrix:

\[\begin{align} \mathrm{dVar}(\boldsymbol{x}) &= \frac{1}{T^2} \lVert \mathbf{A} \rVert_F^2 = \frac{1}{T^2} \left( \mathrm{tr}\left( \mathbf{D}^\intercal \mathbf{D} \left( \mathbf{I}_T - \frac{2}{T} \boldsymbol{1}_T \boldsymbol{1}_T^\intercal \right) \right) + \frac{1}{T^2} \left( \boldsymbol{1}_T^\intercal \mathbf{D} \boldsymbol{1}_T \right)^2 \right)\,. \end{align}\]

Where:

  • $\mathrm{dVar}(\boldsymbol{x})$: Distance variance.
  • $\lVert \cdot \rVert_F$: Frobenius norm.

$\mathbf{I}_T - \frac{2}{T} \boldsymbol{1}_T \boldsymbol{1}_T^\intercal$ is indefinite, with eigenvalues $1$ and $-1$, so that expression is not disciplined-convex and no solver takes it directly. The trace inequality $\mathrm{tr}(\mathbf{A}\mathbf{B}) \leq \lambda_{\max}(\mathbf{A}) \mathrm{tr}(\mathbf{B})$ holds for a symmetric $\mathbf{A}$ and a positive semi-definite $\mathbf{B}$, and here $\lambda_{\max} = 1$. This gives the disciplined-convex upper bound that this type computes:

\[\begin{align} \mathrm{BDVar}(\boldsymbol{x}) &= \frac{1}{T^2} \left( \lVert \mathbf{D} \rVert_F^2 + \frac{1}{T^2} \left( \sum_{i,j} D_{ij} \right)^2 \right) \geq \mathrm{dVar}(\boldsymbol{x})\,. \end{align}\]

Where:

  • $\mathrm{BDVar}(\boldsymbol{x})$: The upper bound on the distance variance, and the value this type reports.

The functor and set_risk_constraints! compute the same bound, so a reported figure and the objective the optimiser minimised are the same quantity.

Fields

  • settings: Risk measure settings.
  • alg1: First algorithm variant.
  • alg2: Second algorithm variant.

Constructors

BrownianDistanceVariance(;    settings::RiskMeasureSettings = RiskMeasureSettings(),    alg1::BDVarRkFormulations = QuadRiskExpr(),    alg2::BrownianDistanceVarianceFormulation = NormOneConeBrownianDistanceVariance()) -> BrownianDistanceVariance

Keywords correspond to the struct's fields.

Functor

(r::BrownianDistanceVariance)(x::VecNum)

Computes the Brownian Distance Variance of a portfolio returns vector x.

Arguments

  • x::VecNum: Portfolio returns vector.

Examples

julia> BrownianDistanceVariance()BrownianDistanceVariance  settings ┼ RiskMeasureSettings           │   scale ┼ Float64: 1.0           │      ub ┼ nothing           │     rke ┴ Bool: true      alg1 ┼ QuadRiskExpr()      alg2 ┴ NormOneConeBrownianDistanceVariance()

Related

References

  • [16] G. J. Székely, M. L. Rizzo and N. K. Bakirov. Measuring and testing dependence by correlation of distances. The Annals of Statistics 35, 2769–2794 (2007).
  • [114] D. Cajas. Portfolio Optimization of Brownian Distance Variance. Available at SSRN 4561293 (2023).
source

References

[16]
G. J. Székely, M. L. Rizzo and N. K. Bakirov. Measuring and testing dependence by correlation of distances. The Annals of Statistics 35, 2769–2794 (2007).
[114]
D. Cajas. Portfolio Optimization of Brownian Distance Variance. Available at SSRN 4561293 (2023).