{"repo":"Mattbusel/fin-primitives","free":true,"listed":false,"github":"https://github.com/Mattbusel/fin-primitives","clone":"git clone https://github.com/Mattbusel/fin-primitives.git","description":"Financial market primitives — price types, order book, OHLCV, indicators, position ledger, risk monitor","language":"Rust","stars":15,"topics":["finance","rust","trading","ohlcv","order-book"],"license":"MIT","category":"trading","readme_excerpt":"fin-primitives Yield Curve Modeler The yield curve module provides a full yield curve construction and analytics toolkit. Key Types Type Description ------ ------------- YieldPoint A single (maturity years: f64, yield rate: f64) observation YieldCurve Collection of YieldPoint s sorted by maturity; primary analytics surface CurveShape Normal , Inverted , Flat , Humped — classified from first/last yields and interior peak NelsonSiegel Parametric model: beta0 , beta1 , beta2 , tau Interpolation Method Description -------- ------------- YieldCurve::linear interp(t) Piecewise-linear interpolation; clamps at endpoints YieldCurve::cubic spline(t) Natural cubic spline via tridiagonal (Thomas) solver Analytics Method Formula -------- --------- forward rate(t1, t2) f = (r2·t2 − r1·t1) / (t2 − t1) duration(cash flows) Macaulay: Σ(t · CF · e^(−r·t)) / Σ(CF · e^(−r·t)) convexity(cash flows) Σ(t² · CF · e^(−r·t)) / PV shape() Classifies as Normal / Inverted / Flat / Humped Nelson-Siegel Model NelsonSiegel::fit(points) fits all four parameters via gradient descent (500 iterations). --- Event Study Framework The events module implements a standard event-study methodology for measuring abnormal returns around discrete market events (earnings releases, guidance, macro shocks). Key Types Type Description ------ ------------- MarketEvent event id , event date (Unix secs), event type , description EventWindow pre days: i32 , post days: i32 — e.g. (-10, +10) AbnormalReturn Per-day: day , raw retur","default_branch":null,"files":null,"tree":[],"storefront":"/r/Mattbusel","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Mattbusel/fin-primitives/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}