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

Function parse_bounds

crates/pyopenquant/src/portfolio.rs:6–8  ·  view source on GitHub ↗
(bounds: Option<Vec<(usize, f64, f64)>>)

Source from the content-addressed store, hash-verified

4use crate::helpers::{matrix_from_rows, to_py_err};
5
6fn parse_bounds(bounds: Option<Vec<(usize, f64, f64)>>) -> Option<HashMap<usize, (f64, f64)>> {
7 bounds.map(|v| v.into_iter().map(|(i, lo, hi)| (i, (lo, hi))).collect())
8}
9
10#[pyfunction(name = "allocate_inverse_variance")]
11fn portfolio_allocate_inverse_variance(

Calls

no outgoing calls

Tested by

no test coverage detected