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

Function test_free_bound_weights

crates/openquant/tests/cla.rs:151–160  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

149 let last = cla.expected_returns[(cla.expected_returns.nrows() - 1, 0)];
150 assert!((last - 1e-5).abs() < 1e-12);
151}
152
153#[test]
154fn test_purge_excess() {
155 let prices = load_asset_prices();
156 let mut cla = CLA::new(WeightBounds::Tuple(0.0, 1.0), "mean");
157 cla.allocate(
158 Some(AssetPricesInput::Prices(&prices)),
159 None,
160 None,
161 None,
162 Some("cla_turning_points"),
163 )

Callers

nothing calls this directly

Calls 3

load_asset_pricesFunction · 0.85
_free_bound_weightMethod · 0.80
allocateMethod · 0.45

Tested by

no test coverage detected