quantlib

QuantLib Python: How to calculate the price of a zero coupon bond?

QuantLib Python: How to calculate the price of a zero coupon bond? Question: I would like to calculate the price of a 5-year zero-coupon bond at 10% interest with a face value of $1000. I expect such a bond to be priced at $620.92 since $620.92 = 1000/((1.10)^5). Here’s my attempt in Python (Version 3.9.12) …

Total answers: 1

Python QuantLib cannot bootstrap – wrong number or type of arguments

Python QuantLib cannot bootstrap – wrong number or type of arguments Question: I have been trying to bootstrap par yields from South African IRS with QuantLib. I am new to the library and been having problems running the code below: import QuantLib as ql import pandas as pd calendar = ql.SouthAfrica() day_count = ql.Actual365Fixed() settlementDays …

Total answers: 1

module 'QuantLib' has no attribute 'CallabilityPrice'

module 'QuantLib' has no attribute 'CallabilityPrice' Question: I have pip installed newest QuantLib for python 1.23 for Windows. ql.Callability() is available but ql.CallabilityPrice is not provided. Is there any issue? Asked By: MandyChen622 || Source Answers: CallabilityPrice was renamed to BondPrice in the underlying C++ library a couple of versions ago. The Python module kept …

Total answers: 2

Pricing of Asian Option using the Heston Model using QuantLib Python

Pricing of Asian Option using the Heston Model using QuantLib Python Question: I am trying to price an Asian option with a Geometric average type using QuantLib. However, I can’t seem to be able to compute the NPV or any Greek. I get the following error RuntimeError: wrong argument type Please find the codes below. …

Total answers: 1