cutup 0.1.4

A flexible and efficient allocation library for Rust, capable of distributing assets, resources, and other divisible entities.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use cutup::run_portfolio_allocation;
use nalgebra::DMatrix;

#[cfg(not(tarpaulin_include))]
fn main() {
    let prices = DMatrix::from_row_slice(
        4,
        4,
        &[
            125.0, 1500.0, 210.0, 600.0, 123.0, 1520.0, 215.0, 620.0, 130.0, 1510.0, 220.0, 610.0,
            128.0, 1530.0, 225.0, 630.0,
        ],
    );

    let weights = run_portfolio_allocation(prices);
    println!("Portfolio Weights: {:?}", weights);
}