()
| 137 | |
| 138 | #[test] |
| 139 | fn test_lambda_for_no_bounded_weights() { |
| 140 | let prices = load_asset_prices(); |
| 141 | let mut cla = CLA::new(WeightBounds::Tuple(0.0, 1.0), "mean"); |
| 142 | cla.allocate(Some(AssetPricesInput::Prices(&prices)), None, None, None, Some("min_volatility")) |
| 143 | .unwrap(); |
| 144 | let cov = covariance(&prices.data); |
| 145 | let (x, y) = cla._compute_lambda(&cov, &cov, &cla.expected_returns, None, &[1], &[0]); |
| 146 | assert!(x.is_finite()); |
| 147 | let _ = y as i64; |
| 148 | } |
| 149 | |
| 150 | #[test] |
| 151 | fn test_free_bound_weights() { |
nothing calls this directly
no test coverage detected