Function parse_yield_basis
pub(crate) fn parse_yield_basis(
yield_convention: Named<YieldQuoteConvention>,
bond_frequency: Frequency,
day_count: Option<Named<DayCountFraction>>,
) -> PyResult<YieldBasis>Expand description
The yield basis a quote is stated on, from the convention a caller named.
A basis is a compounding and a frequency, and a caller who could state
one without the other could only get the pairing wrong. So it crosses as a
single name — the package’s vocabulary style, as parse_delta_convention
above — resolved against the bond’s own payment frequency. The two
conventions with no single basis are refused here by name: the readings
that reach this (a duration, a convexity, a rung) need one.