BondPricingAnchor

class quantsupport.pricing.BondPricingAnchor

Market observable used to anchor native straight or callable bond pricing.

Use one of the named constructors; clean and dirty prices are quoted per the bond’s units. Price anchors imply Z-spread for straight bonds and OAS for bonds with an issuer-call schedule.

Use the documented factory methods below; no direct constructor is exposed.

Source declaration

Methods

static OAS(value: float) → Any

Anchor an issuer-call bond to an option-adjusted spread.

Parameters:

value (float) – Option-adjusted spread in decimal annual rate units; 0.01 represents 100 basis points.

Returns:

OAS anchor for pricing a bond with an issuer-call schedule.

Return type:

BondPricingAnchor

__getitem__(key: str, /) → Any
static clean_price(value: float) → Any

Anchor the trade to a clean price, excluding accrued interest.

Parameters:

value (float) – Clean price in the bond’s quotation units, not a decimal interest rate. Use the same price convention as the instrument being valued.

Returns:

Clean-price anchor; spread inversion is performed by the bond pricer.

Return type:

BondPricingAnchor

static dirty_price(value: float) → Any

Anchor the trade to a dirty price, including accrued interest.

Parameters:

value (float) – Dirty price in the bond’s quotation units, using the same price convention as the instrument being valued.

Returns:

Dirty-price anchor; spread inversion is performed by the bond pricer.

Return type:

BondPricingAnchor

static from_dict(obj: Mapping[str, Any]) → BondPricingAnchor

Deserialize and validate a bond price or spread anchor.

Parameters:

obj (mapping) – Native externally tagged anchor, such as {"CleanPrice": 99.5}, {"DirtyPrice": 100.0}, {"ZSpread": 0.01}, or {"OAS": 0.0075}. Prices use the bond’s quotation units; spreads are decimal annual rates.

Returns:

Validated native anchor.

Return type:

BondPricingAnchor

Raises:

QuantSupportError – If deserialization or native anchor validation fails.

keys() → list[str]
Return serialized field names; supports dict(obj).
to_dict() → dict[str, Any]
Serialize the native bond-anchor enum.
Returns:

Single tagged price/spread value, for example {"OAS": 0.0075}. Serialization does not perform the extraction-time validation of from_dict().

Return type:

dict[str, Any]

Raises:

QuantSupportError – If serialization to Python objects fails.

static z_spread(value: float) → Any

Anchor a straight bond to a continuously compounded Z-spread.

Parameters:

value (float) – Spread in decimal annual rate units; 0.01 represents 100 basis points.

Returns:

Z-spread anchor for straight-bond pricing.

Return type:

BondPricingAnchor