Questions tagged [quantlib]
Quantlib is an open-source C++ library for quantitative finance.
469
questions
0
votes
1
answer
111
views
Error in class when pricing vanilla European options using QuantLib
I'm brand new to QuantLib and have the following class that I'm using to price European options:
...
-1
votes
2
answers
391
views
Easier way than using QuantLib to compute the price and Greeks of a vanilla European option?
I'm using the following to compute the price and Greeks a vanilla European option:
...
0
votes
1
answer
177
views
equivalentRate not matching for compounding cashflows
I am calculating equivalentrate between two days in quantlib python using following functions but the output is not matching with the manual calculation.
...
0
votes
0
answers
149
views
Price of a forward delivery bond - Quantlib python
I would like to find the bond price today which has already been issued but delivered later. Basically, the price won't include some of the coupons till the delivery date.
Let's say 10 year bond ...
0
votes
1
answer
320
views
Using QuantLib to get all holidays currently published by an exchange in multiyears without specifying a range
Is there a way to get a list of all the holidays published in an exchange calendar without specifying a date range? For example, NYSE has published their holiday calendar up to 2024 and I want to see ...
1
vote
1
answer
206
views
QuantLib: How to import indexes from QuantLib?
I am trying to import indexes from QuantLib for my further analysis and term structures. But below code is not working and giving me 'ModuleNotFoundError'. Please suggest if this the correct way of ...
1
vote
0
answers
654
views
Quantlib : Valuation of inflation swaps of EUR-RPI using quantlib python?
Below is the sample code to compute the inflation swaps. I have referred the Quantlib cookbook to get the flavor of Inflation swaps. But I feel that the term structure and final NPV is not accurate ...
2
votes
1
answer
397
views
Quantlib: How to print the maturity dates or pillars from the helpers in Quantlib python?
I am trying to value inflation swaps using necessary functions from quantlib and successfully completed the valuation. Underneath helper function is working well for most of the swaps. But few swaps ...
0
votes
1
answer
141
views
Evaluating swaptions with negative interest rates
Does anyone know if it is possible to evaluate swaptions with negative interest rates with Quantlib?
...
1
vote
1
answer
159
views
Quantlib endOfMonth bool
my question is two fold and if the legend Luigi answers this question it would make my day.
what is the purpose of this endofMonth boolean in the depoit or fra or swap helper functions.
what is the ...
2
votes
1
answer
395
views
Quantlib HW 1f model calibration not fitting to market normal vol quotes
I am using Quantlib python to calibrate HW 1f model parameters from normal swaption vols quoted in the market (following the code in the cookbook - I fit both the mean-reversion & vol to market ...
1
vote
1
answer
222
views
Quantlib match clean price with bbg clean price
I'm trying to match QL clean price with BBG clean price for POLGB 2.75 10/25/29 1029 priced for 15th of October 2021 for 2.5% yield. I'm not sure if my setup of bond is wrong or if there is a problem ...
1
vote
0
answers
156
views
Pricing Asian and barrier option using Quantlib
I am exploring to use the ql.FdBlackScholesAsianEngine and ql.FdBlackScholesBarrierEngine using python code to price commodity options with implied volatility from traded European or American options. ...
2
votes
0
answers
176
views
Actual360 convention in quantlib schedule
I'm trying to make a payment schedule for different bonds in quantlib. For example, I made such a schedule:
...
1
vote
1
answer
213
views
30E/360 bond payment schedule
I have a bond that was issued on the 30th of April with 30/360 European day convention basis and semiannual compounding. As far as I understand payments should be every 180 days according to the day ...
0
votes
0
answers
153
views
QuantLib - Help buiding a simple T-Bond (Mischievous Pricing Conventions)
Im having a problem getting the right price for a simple T-Bond, maybe a Mischievous Pricing Conventions like Luigi says in his book. Im tying to price "912810SZ Govt"
...
0
votes
1
answer
602
views
How to make a schedule for amortizing bonds in python quantlib?
I am trying to make a schedule for amortizing bonds in quantlib, but have no idea how to include amortization in this schedule.
I have the following bond:
...
0
votes
0
answers
363
views
Pricing an OIS referencing SONIA with fixing lag
I'm trying to price an Overnight Index Swap referencing SONIA.
The swap will have a 5 day fixing lag (i.e using compounded SONIA over the current interest period but with the last rate set 5 days ...
3
votes
1
answer
670
views
Bootstrapping discount and forward curve (using ESRA) and price a vanilla swap
I am just starting to use Quantlib, and want to try and replicate the SWPM-functionality in Bloomberg, and price a vanilla 5Y EUR OIS. Below is the overall swap data used in BBG:
Overall settings
...
3
votes
0
answers
94
views
Manual Computation of Python QuantLib's NPV for Pricing of a Forward Rate Agreement
Following the question that I have asked on this link and response obtained, I have managed to price a 3x6 FRA using QuantLib Python, using the following codes:
...
2
votes
1
answer
637
views
Pricing a Forward Rate Agreement using QuantLib Python
Can someone please help with the pricing of the following forward rate agreement using QuantLib Python?
A 3x6 forward rate agreement, with a notional of $100,000, the FRA rate being 6%, The FRA ...
0
votes
1
answer
798
views
Is it possible to price a plain vanilla interest rate swap in Python and simulate the price using Hull White 1 Factor Model simultaneously?
I am trying to price plain vanilla interest rate swap (IRS) using QuantLib. What I am trying to do is to generate a path of simulated IRS price by simulating the interest rates using HW 1 Factor model....
0
votes
1
answer
124
views
quantlib: make AmortizingFixedRateBond coupon payments equal
I found some unexpected result when trying to call AmortizingFixedRateBond wiht daily coupon payments, but starting in the last day of the month.
...
0
votes
0
answers
104
views
Incorporate Transaction Date to Price Fixed Rate Bond using Quantlib Python
I am trying to use QuantLib Python to price a fixed rate bond, based on the following data:
Issue date is 28 September 2017 (issueDate), maturity date is 28 ...
0
votes
2
answers
269
views
Generating a PAR curve from Bond Price Inputs
I am a brand new user to QuantLib and I am running it in Python.
I am attempting to generate a PAR yield curve from time to maturity and price input as shown here
'time to maturity': ['30-03-2020','...
1
vote
0
answers
708
views
Schedule, Yield-to-Maturity, and NPV of Fixed Rate Bond from QuantLib Python
I would like to price a fixed rate bond using QuantLib Python.
The pricing is fine, however I would like to understand how to extract the Yield-to-Maturity (YTM) of the fixed rate bond, that is, the ...
0
votes
1
answer
491
views
Specify fixing days for floating leg in Interest Rate Swap valuation using QuantLib Python
I am trying to price an Interest Rate Swap using QuantLib Python, and everything seems to be fine. However, I can't seem to understand where I can specify the number of fixing days.
Below are my codes....
2
votes
0
answers
362
views
cross currency basis swap instrument in Quantlib
I have noticed that there is a cross currency basis swap rate helper added to the Quantlib new release. However, I could not find the instrument cross currency basis swap. I assume the helper is added ...
0
votes
1
answer
510
views
Fixed Rate Bond Pricing using QuantLib Python
I have tried to price a fixed rate bond using Python QuantLib and I verified my answer using a DCF model.
Below are my codes for the pricing of the fixed rate bond using Python QuantLib:
...
-1
votes
1
answer
874
views
Difference arising between Dirty Price and NPV using QuantLib Python
I have used QuantLib Python to price a fixed rate bond.
My codes are as follows:
...
2
votes
1
answer
863
views
Explanation for Different Piecewise Yield Term Structures from QuantLib Python
I am new to QuantLib on Python, but as far as I understand, there are different types of piecewise yield term structures which exist on QuantLib which are bootstrapped on a number of interest rate ...
0
votes
1
answer
193
views
quantlib: add handle to iborindex
I think this might be a very trivial question, but since I am pretty unfamiliar with C, this is a bit of a problem for me.
I have created IborIndex somewhere (it is correctly working):
...
0
votes
1
answer
789
views
Zero Rates for Deposits using Quantlib Python
I have used QuantLib Python to construct a zero curve from deposits and bonds.
Below are my codes:
...
1
vote
1
answer
692
views
QuantLib Inaccurate - American Put Option with Discrete Dividends
I'm trying to use the QuantLib library to price American options that pay discrete dividends.
The call options are priced with good accuracy (generally <0.1% error), however the same inputs for a ...
1
vote
0
answers
178
views
QuantLib Two Asset Barrier Option
I am trying to price a two asset barrier option where each asset has its own barrier and both barriers have to be met for the payoff. The experimental TwoAssetBarrierOption class seems to accept only ...
1
vote
0
answers
372
views
SOLVED Manually Recomputing Forward Rates from QuantLib Python
I have used QuantLib Python to compute 1-month forward rates from zero rates as at 05 December 2019.
My codes can be found below:
...
0
votes
1
answer
498
views
Quantlib: loan cash flow
Situation: I would like to make a small script which prices loans (fe annuities or fixed payment) for the ALM purposes. However, I am stuck in the amount of classes existing in Quantlib and would like ...
1
vote
1
answer
264
views
In Python QuantLib how to identify Principal and Interest cashflows?
I am fairly new to QuantLib Python. I have generated the following cashflows from one AmortizingFloatingBond from QuantLib Python. But I am not able to identify which ones are Interest payments and ...
0
votes
1
answer
166
views
NPV of Interest Rate Swap not coming to be 0 at initiation
I am using the iPython notebook published by Gouthaman Balaraman at [http://gouthamanbalaraman.com/blog/interest-rate-swap-quantlib-python.html][1]
This is to value the Interest Rate Swap. I am ...
0
votes
0
answers
295
views
Using QuantLib for bonds with irregular coupon payments
Could you please help properly use QuantLib python library to estimate different metrics of bond with uncommon coupon payment periods? For example, I have a bond, which pays coupon each 182 day (26 ...
0
votes
1
answer
232
views
How To Properly use QuantLib to Replicate Excel's MDURATION Function
just wanted to ask how to use Quantlib on replicating Excel's MDURATION.
Given the following parameters, I was able to get a value of 4.478837 via MS Excel's MDURATION Function.
...
2
votes
1
answer
570
views
Quantlib Black Model for Commodity Options (Interest Rate Options) is extremely light on gamma and price vs BBG, is model incorrect?
I am using the QuantLib developers example to try and price a TY option. The Delta is pretty close but the price and gamma are way off (almost by a factor of 2).
Am I using the model wrong or is the ...
0
votes
0
answers
207
views
Plotting a CSA curve in QuantLib
IRS under a CSA
Let's consider an example of Interest Rate Swap under a CSA.
To calculate discount factors that can be used to discount cashflows in one currency, $C_{1}$, collateralized in another ...
0
votes
1
answer
338
views
How to compute NPV of Latin American swap CLP-TNA (chilean) using quantlib?
I am trying to value the Latin Americans swaps. But CLP-TNA valuation is far off from the actual valuation. Please suggest, what I am missing in below methodology to compute NPV.
...
0
votes
0
answers
249
views
How to compute the Brazilian Plain vanilla swap using Quantlib?
How to compute the BRL plain vanilla swap. I have followed the below methodology to calculate the valuation for other indexes but BRL-CDI is far off from actual valuation. Please suggest if anything ...
1
vote
2
answers
190
views
Problem with bond.bondYield Quantlib
I'm having issues with a simple FixedRateBond bond yield calculation using QuantLib:
...
1
vote
0
answers
229
views
DV01 on IRS giving error in Quantlib for ZAR curve "1st iteration: failed at 14th alive instrument"
I am at my wits end to calcualte the DV01 of a swap but keep getting the error "RuntimeError: 1st iteration: failed at 14th alive instrument, pillar May 28th, 2024, maturity May 28th, 2024, ...
4
votes
0
answers
238
views
Bates Model on Quantlib
I am actively trying to price an option using bates model on Quantlib.However,when I input my volatility I find the same Black Prices with the basic Heston Model.I wanted to know if my code was right.
...
1
vote
0
answers
238
views
Pricing a amortizing callable danish mortgage bond using quantlib
I am trying to price a callable fixed rate amortizing danish mortgage bond. since QuantLib only has CallableFixedRateBond i have created a dervived class called <...
1
vote
1
answer
285
views
USD Swap curve prices do not line up with inputs
As mentioned in the title, i'm having trouble with pricing USD swaps in quantlib.
I wanted to take some inputs (Prices of swaps in the market) and be able to construct a yield term structure that ...