paft-domain
Domain modeling primitives for the paft ecosystem: instruments, exchanges, periods, and market state.
- Strongly-typed identifiers (
Isin,Figi) with enforced validation Instrumentwith hierarchical identifiers (FIGI → ISIN → Symbol@Exchange → Symbol)- Canonical, serde-stable enums (
Exchange,AssetKind,MarketState) Periodparsing for quarters, years, and dates with a canonical wire format
Install
Prefer the facade crate for most applications:
[]
= "0.7.1"
Advanced (direct dependency, minimal):
[]
= { = "0.7.1", = false }
Alternate decimal backend: enable on dependent crates (e.g., via the facade):
[]
= { = "0.7.1", = ["bigdecimal"] }
Enable DataFrame helpers as needed:
[]
= { = "0.7.1", = false, = ["dataframe"] }
Features
bigdecimal: change money backend fromrust_decimaltobigdecimalviapaft-moneydataframe: enable DataFrame traits for Polars integration
Quickstart
use ;
// Instrument with optional global identifiers
let aapl = try_new.unwrap;
assert!;
assert_eq!;
// Period parsing with canonical output
let q4 = "2023-Q4"..unwrap;
assert_eq!;
Links
- API docs: https://docs.rs/paft-domain
- Workspace overview: https://github.com/paft-rs/paft/blob/main/README.md
- License: https://github.com/paft-rs/paft/blob/main/LICENSE