Zero-Coupon Bonds¶
Zero-coupon bonds are bonds that do not pay any coupons. They are the simplest type of bond, in which a bond issuer sells the bond to a bondholder. The price paid for the bond is the amount of money loaned the bond issuer from the bondholder. At the end of a specified amount of time, the bond issuer pays a redemption amount to the bondholder to settle the debt.
Examples¶
Suppose an entity issues a bond for 1,000 to be repaid in 5 years for 1,200. What is the yield rate on the bond?
Since we know the price, redemption amount, and term, we can supply these to the Bond
class arguments price
, red
, and term
respectively. The Bond
class constructor will automatically detect which argument is missing and solve for it. We can then find the missing value (in this case the yield rate) by printing the attribute.
In [1]: from tmval import Bond
In [2]: bd = Bond(
...: price=1000,
...: red=1200,
...: term=5
...: )
...:
[-1000, 1200]
In [3]: print(bd.irr())
[0.03713728933664773]
To further illustrate how Bond
can solve for missing values, here are some more examples with various missing values.
If an entity issues a bond for 1,000 to be repaid in 5 years with a yield of 5% compounded annually, what should the redemption amount be?
In [4]: bd = Bond(
...: price=1000,
...: gr=.05,
...: term=5
...: )
...:
In [5]: print(bd.red)
1276.2815625000003
If an entity issues a bond redeemable for 1,200 in 5 years at a yield rate of 5% compounded annually, what is the price of the bond?
In [6]: bd = Bond(
...: red=1200,
...: gr=.05,
...: term=5
...: )
...:
In [7]: print(bd.price)
940.2313997621505
If an entity issues a bond for a price of 1,000, to be redeemed for 1,200 at a yield rate of 5% compounded annually, what is the term of the bond?
In [8]: bd = Bond(
...: price=1000,
...: red=1200,
...: gr=.05
...: )
...:
In [9]: print(bd.term)
3.73685