MCPcopy Create free account
hub / github.com/Open-Quant/openquant / new

Method new

crates/openquant/src/hcaa.rs:28–35  ·  view source on GitHub ↗
(calculate_expected_returns: &str)

Source from the content-addressed store, hash-verified

26//! | `"minimum_variance"` | `1 - var_L / (var_L + var_R)` |
27//! | `"minimum_standard_deviation"` | `1 - sd_L / (sd_L + sd_R)` |
28//! | `"expected_shortfall"` | `1 - es_L / (es_L + es_R)` |
29//! | `"conditional_drawdown_risk"` | `1 - cdd_L / (cdd_L + cdd_R)` |
30//! | `"sharpe_ratio"` | `sr_L / (sr_L + sr_R)` when both are `>= 0` and not both 0; otherwise minimum variance |
31//! | `"equal_weighting"` | `0.5` |
32//!
33//! The Sharpe-ratio share is only meaningful when neither side's Sharpe ratio is negative. With
34//! both negative the raw ratio still lies in `[0, 1]` but favours the *worse* side (`-1` against
35//! `-3` would give the better, left side 0.25), and with mixed signs it leaves `[0, 1]`. Every
36//! such split, and a split where both are 0, uses the minimum-variance share instead.
37//!
38//! What is **not** implemented: Raffinot's gap-statistic choice of the number of clusters.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected