Bond

class tmval.bond.Bond(face: float = None, term: float = None, red: float = None, gr: Union[float, tmval.rate.Rate] = None, cgr: tmval.rate.Rate = None, alpha: Union[float, list] = None, cfreq: Union[float, list] = None, price: float = None, pd: float = None, k: float = None, fr: float = None)[source]

Bond is TmVal’s class for representing bonds. Bonds can be initialized if the arguments contain enough information to calculate:

  1. Bond price (price)

  2. Coupons (alpha and cfreq or cgr)

  3. Yield rate (gr)

  4. Redemption amount (red)

  5. Face value (face)

  6. Term (term)

When one of these values is absent, the initialization will be able to solve for the missing quantity. When two values are missing, you can still initialize the bond under certain cases:

  1. Missing price and redemption amount - can be solved if premium/discount is supplied.

  2. Missing price and term - can be solved if Makeham’s k is supplied.

  3. Missing price and coupon rate - can be solved if coupon amount is supplied.

Coupon information is usually supplied by specifying an alpha amount for the nominal coupon rate and cfreq for the coupon frequency. Alternatively, you may supply a nominal interest rate with a compounding frequency to the argument cgr. It’s possible to specify a coupon amount via fr and the coupon frequency of cfreq if you do not know alpha but know the coupon amount.

Parameters
  • face (float) – The face value.

  • red (float) – The redemption amount.

  • gr (float, Rate) – The yield rate used to price the bond.

  • cgr (Rate) – A nominal rate representing the coupon rate and frequency.

  • alpha (float, list) – When supplied as a float, a nominal coupon rate. When supplied as a list of tuples of the form [(x1, y_1), (x2, y2), …], represents a series of coupon rates x supplied during periods beginning at time y. For example alpha=[(.05, 0), (.04, 2)] means a 5% coupon rate the first two years and a 4% rate after that.

  • cfreq (float, list) – The coupon frequency, or a list of coupon frequencies. When supplied as a list, alpha must also be supplied as a list and each element in cfreq needs to correspond to a tuple in alpha.

  • price (float) – The bond price.

  • pd (float) – The bond premium or discount.

  • k (float) – The present value of the redemption amount, used if instantiating from Makeham’s formula.

  • fr (float) – The coupon amount per period. Can be supplied with cfreq instead of alpha.