Mental model
Three objects, one verb. That’s the API.
PricingModel— calendars, day counts, curves. Built once per valuation date.Position— an instrument (OIS, XCCY, bond, …) wrapped in a direction (PAY / REC / LONG / SHORT) and a quantity.Portfolio— a bag of positions. Optional — single positions price fine on their own.
The verb is .calculate(model, requests=[...]). It returns a
CalculationResult whose attributes correspond to the requests you
asked for: .value, .risk, .cashflows.
→ Detailed concept diagrams (PricingModel ↔ Curve ↔ Position relationships, result-class shapes) — coming in v1.3.