BillCalcMode#
- class rateslib.instruments.BillCalcMode(price_type, ytm_clone_kwargs)#
Bases:
object
Define calculation conventions for
Bill
type.- Parameters:
price_type (str in {"simple", "discount"}) – The default calculation convention for the rate of the bill.
ytm_clone_kwargs (dict | str,) – A list of bond keyword arguments, or the
spec
for a given bond for which a replicable zero coupon bond is constructed and its YTM calculated as comparison.
Notes
“simple”: uses simple interest formula:
\[P = \frac{100}{1+r_{simple}d}\]“discount”: uses a discount rate:
\[P = 100 ( 1 - r_{discount} d )\]
Attributes Summary
String representation of the parameters for the calculation convention.
Attributes Documentation
- kwargs#
String representation of the parameters for the calculation convention.