Blyx Nest Blyx language
Registry / Framework
framework · v0.1.0

Pintail

Compare long-only portfolio snapshots under a one-way turnover budget.

Source repository · Package JSON

Use Pintail

use vendor::pintail::pintail;

Run the example

nest demo pintail@0.1.0
blyxc native-run pintail-demo/main.blyx
Example source and expected output
use vendor::pintail::pintail;

fn main() {
    let current = [0.75, 0.25];
    let target = [0.5, 0.5];
    let turnover_cap = 0.125;
    let result = pintail_compare(current, target, turnover_cap);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

0
0.25
0.25
0.125

Published versions

VersionPackageSource commitSHA-256
0.1.0Download ZIP380c8a3a433dda1405af8f119f8e77e9c98de2c763628829834f2ff1c43b242eae95981556