Install helixio and check it runs
You'll install the exact helixio build these pages describe, in Rust or Python, and confirm it works with a ten-line program.
Before you start
You need a clone of the helixio library repository; the steps below assume its folder is called
helixio. For Python you need Python 3.11 or later, uv and
maturin. For Rust you need the toolchain the library pins, which the rust-toolchain.toml at
the root of its repository names; rustup installs it on the first build.
Every page in this line describes one pinned revision of the 0.0.x series. The line's
pin.toml names the revision, and every example on every page ran against it.
Steps
1. Check out the pinned revision
Check out the commit this documentation describes, so your build matches the pages:
cd helixio
git checkout 6828e7a8dfc55c9d7298f0d71068791c8ea061e4
Git reports a detached checkout at that commit.
2. Build the package or depend on the crate
=== "Python"
Run these commands from `crates/helixio/` in the checkout. The build compiles the engine and
the binding, then installs the package into `.venv`; a first build takes a few minutes.
```bash
uv venv .venv
source .venv/bin/activate
maturin develop --uv
```
=== "Rust"
Point your own project's `Cargo.toml` at the checkout. The library's dates are `chrono` dates,
as Python's are `datetime.date`, so you need `chrono` too. Depend on `helixrs`, the engine;
the `helixio` crate is the Python binding.
```toml
[dependencies]
helixrs = { path = "../helixio/crates/helixrs" }
chrono = { version = ">=0.4.31, <0.5", default-features = false, features = ["std"] }
```
3. Run a check program
Save this as a file and run it. It prints the version your build reports, then builds a curve from a single swap quote and reads a discount factor off it.
use chrono::NaiveDate;
use helixrs::{CollateralSpec, Locator, MarketContext, QuoteSheet, YieldCurve};
type Outcome<T> = Result<T, Box<dyn std::error::Error>>;
/// The date to mark the market at.
const SOFR_CLOSE_DATE: (i32, u32, u32) = (2026, 10, 1);
fn date((year, month, day): (i32, u32, u32)) -> NaiveDate {
NaiveDate::from_ymd_opt(year, month, day).expect("a real calendar date")
}
fn main() -> Outcome<()> {
let close = date(SOFR_CLOSE_DATE);
// The version the build reports names the series this documentation describes.
// A different series means a different checkout was built.
let version = helixrs::version();
println!("library version {version}");
// One swap quote is enough for a curve: the recipe builds a single-pillar curve
// from it, and the swap it was solved from prices back to par.
let sheet = QuoteSheet::new().with("USD-SOFR-OIS", Locator::parse("5Y")?, 0.0471);
let market = MarketContext::as_of(close)
.with_recipe_quotes(&CollateralSpec::Currency("USD".parse()?), &sheet)?;
let (curve, _) = market.curve(&"discount(USD)".parse()?).expect("the USD curve");
let factor = curve.view::<f64>().discount(date((2031, 10, 1)))?;
println!("pillars {}", curve.parameter_count());
println!("5Y discount {factor:.10}");
Ok(())
}from datetime import date
import helixio as hlx
# The date to mark the market at.
SOFR_CLOSE_DATE = date(2026, 10, 1)
# The version the build reports names the series this documentation describes.
# A different series means a different checkout was built.
version = hlx.__version__
print(f"library version {version}")
# One swap quote is enough for a curve: the recipe builds a single-pillar curve
# from it, and the swap it was solved from prices back to par.
market = hlx.MarketContext(SOFR_CLOSE_DATE).with_recipe_quotes("USD", {"USD-SOFR-OIS": {"5Y": 0.0471}})
curve = market.curve("discount(USD)")
factor = curve.discount(SOFR_CLOSE_DATE.replace(year=2031))
print(f"pillars {curve.parameter_count()}")
print(f"5Y discount {factor:.10f}")library version 0.0.1
pillars 1
5Y discount 0.7918631482
Check it worked
- The version starts with
0.0.. Anything else means you built a different checkout, and these pages describe a different library. - The curve has one pillar, and its discount factor is between zero and one. If the market call raises instead, your build can't find its shipped recipes, which usually means it was built from an incomplete checkout.
Related
- Your first trade prices a swap from a full quote sheet, end to end.
- Coding agents installs the helixio skill for Claude Code or Codex.
- Overnight indexed swap is the reference for the swap the check builds its curve from.
From the 0.0 line at revision bf7f2e2. Every printed number is that revision's own output.