MulaiMulai sekarang secara gratis

Comparing coupon bond yields

Often you will be presented with several bonds with different characteristics, and it isn't clear which one has the highest yield.

In these cases, it can be helpful to find their yields in order to compare them properly, since the yield tells you which bond will give you the greatest return on your investment.

In this exercise, you will use the npf.rate() to compare three different bonds.

numpy_financial has already been imported for you as npf.

Latihan ini adalah bagian dari kursus

Bond Valuation and Analysis in Python

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Bond with price of USD 92 paying 3% coupon for 3 years
bond_a = ____
print("Bond A: ", bond_a)
Edit dan Jalankan Kode