Duration von Zero-Coupon- und Coupon-Anleihen
Duration ist ein Maß für das Zinsänderungsrisiko und lässt sich auf jede Anleihe anwenden – unabhängig davon, ob sie einen Coupon zahlt oder nicht.
In dieser Übung berechnest du die Duration einer Zero-Coupon-Anleihe mit zehn Jahren Laufzeit, einem Nennwert von 100 USD und einer Rendite bis zur Endfälligkeit von 3 % und vergleichst sie mit der Duration derselben Anleihe, die einen jährlichen Coupon von 3 % zahlt. numpy_financial wurde bereits als npf importiert.
Erinnere dich: Die Formel für die Duration lautet:
\(Duration = \frac{P(down) \ -\ P(up)}{2\ \times\ P\ \times\ \Delta y}\)
Diese Übung ist Teil des Kurses
Anleihebewertung und -analyse in Python
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Find the price of the zero coupon bond at current yield levels
price = ____
# Find the price of the zero coupon bond at 1% higher yield levels
price_up = ____
# Find the price of the zero coupon bond at 1% lower yield levels
price_down = ____
# Calculate duration using the formula and print result
duration = (____ - ____) / (____ * ____ * ____)
print("Zero Coupon Bond Duration: ", ____)