Questions tagged [quantlib]

Quantlib is an open-source C++ library for quantitative finance.

Filter by
Sorted by
Tagged with
1
vote
1answer
71 views

Implementation of the Hull and White short rate model

This is the first time I'm using quantlib, and I wanted to compare the velocity of quantlib with my own Python code. I found a tutorial about Hull and White to generate the short rate paths with ...
1
vote
0answers
39 views

Matching the yield on a bond with the zeroRate on a curve in Quantlib

I am using QuantLib to generate a US Treasury curve from 1y, 3y, 5y, and 10y yield quotes. However, after building the curve and running zeroRate on it, it ...
-1
votes
0answers
39 views

Python Quantlib : what is missing in creating new Libor or Euribor object?

So I am trying to follow the guide on QuantLib Python Cookbook on Hull-White 1 Factor model calibration and was able to set it up. But what I wanted to do was to include a term structure model that ...
0
votes
0answers
35 views

Bootstrapping spot rates based on swap rates using QuantLib

I am bootstrapping the shibor curve and fr007 curve using swap rates in China. I created my own index like following: ...
2
votes
1answer
54 views

Difference between modelValue from HestonModelHelper and NPV() from VanillaOption

I am trying to calibrate an Heston model and price vanilla option using Quantlib 1.15 and Python 2.7. I use the following code ...
0
votes
0answers
40 views

Why doesn't tenor of Euribor index change spot rate in Quantlib?

I'm trying to create a yield curve in QuantLib based on swap rates. The swap rates I'm using have a 6 months fixed frequency and a 3 month float frequency based on LIBOR. What I don't understand is ...
1
vote
1answer
73 views

How to use both yield curve and discount curve to value call in QuantLib

I'm new to QuantLib, and I'm trying value a simple European call. QuantLib's Black-Scholes-Merton Process makes sense to me, but I don't know how to incorporate a discount curve into it. Please see ...
1
vote
0answers
36 views

How to apply multiplicative price seasonality to bond prices in quantlib?

Can someone please give a brief or any link which explains how to apply multiplicative price seasonality to inflation linked bonds in Quantlib using python modules. Have gone through most of the ...
3
votes
0answers
82 views

How to calculate YTW (yield-to-worst) in QuantLib?

After defining a CallableFixedRateBond object in QuantLib, I can calculate YTM (yield-to-maturity) right now. I'm using Python so the function is bondYield(). Is there any way to calculate YTW (yield-...
1
vote
0answers
23 views

How do I calculate from discountfactor to zerorate in Python using Quantlib [closed]

I knew rate to discountfactor InterestRate.discountFactor(yearFraction) I want to calculation discountfactor to zerorate
2
votes
0answers
72 views

How to build an inflation term structure in QuantLib?

This is what I've got, but I'm getting weird results. Can you spot an error?: ...
2
votes
1answer
166 views

Quantlib CDS model

I have started working on CDS model using Quantlib and as a starting point, utilized code provided in GitHub Quantlib/Python examples with modifications in initial code as given at the end and have ...
1
vote
0answers
32 views

QuantLib - Asset Swap Cash Flow Final Period

I am comparing CFs of asset swaps in QuantLib to the asset swap screen (ASW) in Bloomberg. I noticed that the final payments of both swap legs do not include an interest payment for the final period. ...
2
votes
0answers
37 views

QuantLib XL Swap Valuation Fixing Dates

I want to rate IRS Swaps on an specific Valuation Date using QuantLibXL. Everything works fine besides the last Index Fixing before the Val Date. After using SwapLegAnalysis I saw that the Index ...
1
vote
1answer
130 views

How to compute the Carry + Roll-down of a bond with QuantLib?

I’m new using QuantLib (I have no idea how to use it) and I would like to know how to calculate the C+R of a bond, say the current 30Y. The textbook definition of C+R is the P&L due to the ...
1
vote
0answers
54 views

Calculating YTM, OAS, etc. in QuantLib with given bond price [duplicate]

I am attempting to use QuantLib to calculate several bond metrics such as yield to maturity, option-adjusted spread, etc. The catch is that I am already given a market price and thus have no need to ...
1
vote
0answers
204 views

Calibration of Theta, A(t) and B(t) of Hull White 1Factor model

I’m simulating interest rates via the HullWhite One factor model. To simulate the short rate I’m using the code from the Quantlib Python Cookbook, chapter 15 and beyond (By Goutham Balaraman and Luigi ...
0
votes
2answers
232 views

CDS ISDA model/Bloomberg

I am becoming more acquainted with QuantLib as a platform. I've been using both the python implementation and QuantLib XL. As I have started to look at CDS, I would like to know if there is a ...
2
votes
1answer
367 views

Quantlib-Python: use zero rates to get the originally bootstrapped curve

Let's say I am trying to build a curve using deposits, future and swaps with one of the three Quantlib methods in Python as below: ...
1
vote
1answer
55 views

Calculating QuantLib IborCoupon with / from given index fixing

How can I calc with QuantLib the coupon amount of a floating rate IborCoupon on the 3M Euribor Index with a given 3M Euribor Index Fixing? If I try the following Python code: ...
0
votes
0answers
29 views

QuantLib - Discreet Dividend Binomial Two Rate Option Implementation

Can anyone point me in the direction of an implementation example in python of a two rate, discreet dividend binomial option model?
2
votes
0answers
268 views

Using QuantLib Python to value FX options using stochastic volatility

I would like to use QuantLib (and in particular the python wrapper) to value FX option using the Heston model. Thanks to http://gouthamanbalaraman.com and all of the articles therein : in particular ...
0
votes
1answer
176 views

Basic fixed rate bond pricing issue in Quantlib

I'm trying to price a fixed rate bond in Quantlib but the result comes out wrong. I'm trying to price 1Y fixed rate bond: ...
1
vote
0answers
152 views

Mixed local-stochastic volatility model in Quantlib

At a conference the speaker mentioned that it is a standard approach today to use a mix of local and stochastic volatility model in equity, FX and interest rates. Can you please suggest the most ...
0
votes
0answers
66 views

QuantLib FuturesRateHelper how do I input Future type = 'ASX', the 'IMM' date check is causing Runtime Error

How do I input Future type = 'ASX', the 'IMM' date check is causing Runtime Error future_maturities 1 2019-06-14 2 2019-09-13 3 2019-12-13 4 2020-03-13 5 2020-06-12 6 2020-09-11 ...
3
votes
1answer
97 views

forward + displacement

I I am trying to price a cap/floor using Quantlib in Python. the initial code from from this website: http://gouthamanbalaraman.com/blog/interest-rate-cap-floor-valuation-quantlib-python.html Here is ...
1
vote
0answers
54 views

Error in QuantLib-Python when I use function “Bond”

I am using the "Bond" function in QuantLib-Python 1.14. I am planning to use it in this way: ...
1
vote
0answers
80 views

QuantLibXL no intraday pricing, even with QL_HIGH_RESOLUTION_DATE enabled while compiling

I built QuantLibXL myself following the instruction here: https://www.quantlib.org/quantlibaddin/build_qlxl.html And in the QuantLib code, I turned on the QL_HIGH_RESOLUTION_DATE flag, before I run ...
2
votes
1answer
149 views

QuantLib CDS pricing error: negative time given

I am new to QuantLib, and I am using it to price CDS. Following is my python code: ...
2
votes
0answers
47 views

SquareRootProcess in QuantLib - Python

I would like to price an American put option using the SquareRootProcess class in QuantLib - Python but it seems that it does not exist. As the underlying follows the following model : $$\rm{d}S_t=...
3
votes
1answer
96 views

Why Quantlib Option NPV does not change when repricing?

Trying to learn Quantlib with Python, please have a look at below code: ...
2
votes
0answers
98 views

QuantLib - Synthetic deposit/FRA rates in yield curve

In my flat forwards dollar curve implemented in QuantLib I would like to add the following instrument: Today is 12/28/2018 Pillar quote is 1% p.a. (ACT/360) Pillar start is 1/30/2019 (specific ...
3
votes
1answer
251 views

QuantLib: BondFunctions.zSpread does not match clean price “exactly”

I am using QuantLib to compute prices of fixed rate bonds in different scenarios. In the first step I would like to replicate the current market price by adjusting the yield curve with the zspread. ...
2
votes
1answer
149 views

TermStructure/Evaluation Dates in Quantlib

i'm puzzled by the way Quantlib handles the evaluation date in the yield term structure classes. I have the following code as example: ...
-1
votes
1answer
380 views

How to use QuantLib in C# easily?

I am not good at environment setting. Sometimes I use QuantLib in Python. Now I am wondering if there is a instruction on how to use QuantLib in C#. I looked at the QuantLib web page, but there is not ...
0
votes
1answer
214 views

Structured Payoff Scripting in QuantLib

I'm trying to price a snowball payoff in quantlib and would like to create a payoff like: $$Coupon = PreviousCoupon + FloorPayoff$$ Would the payoff class be able to reference the previous coupon? ...
0
votes
1answer
96 views

how to change the value set by the addFixing method in QuantLib

Suppose we have had constructed an index for forecasting future interests of a floating bond, and as suggested by the official document, I used addFixing method to set a past fixing for the current ...
1
vote
1answer
146 views

Swing option pricing in QuantLib-Python

Is it possible to use the QuantLib python wrapper to price swing options? I've seen the QuantLib Github repository contains a C++ implementation, swingoption.cpp, but have found no reference to swing ...
2
votes
0answers
269 views

Calculate tenor wise DV01 of a Swap in Quantlib Python, i.e. Key-rate Duration

Is there a way I can get DV01 breakup of a Swap across different tenors of the deal in Quantlib-Python. The question asked here, follows the basic method of re-valuing the swap by shifting the curve ...
3
votes
1answer
471 views

Quantlib derivative valuation from zero curve

I have newly started with Quantlib-Python for valuing derivatives. In all the examples stated in this bolg or in other places, market quote is inserted and bootstrapping is done via individual rate ...
3
votes
1answer
229 views

QuantLib in Python : Execution time with OISRateHelper compared to Swap/Deposit RateHelper

I have been working on valuation of interest rate swaps using dual curve bootstrapping. And for this I use OISRateHelper to create a discount term structure using OIS rates. The entire code below : <...
5
votes
1answer
216 views

OpenGamma's Strata - Computational Overhead

I've been looking at the open-source library Strata (maintained by OpenGamma), which is written in Java. Now, upon inspection of the FX Forward Pricer and Payment Pricer I noticed two things: All ...
1
vote
2answers
329 views

How to change the YieldTermStructureHandle's referenceDate in QuantLib

Suppose we have already known the dates and rates of a spot rate curve, and I passed the data to the ZeroCurve class to construct a discount curve for bond pricing. What I wanna find is how to change ...
2
votes
2answers
386 views

QuantLib-Python: How to set fixed reference dates when bootstrapping the term structure?

I am borrowing from an example in the "Quantlib Python Cookbook" section 7, to ask my question. To make the point as clear as possible I simplify the code a bit. The aim is to strip the EONIA curve ...
1
vote
1answer
258 views

Using DayCounter ActualActual.ISMA in QuantLib

Suppose we have a semiannual coupon bond. The calculation date is 5/8 2017. The ex-coupon date is 4/20 2017 and next coupon date is 10/20 2017. ...
2
votes
1answer
270 views

QuantLib-Python: What is “index = Euribor1Y(term_structure)” doing?

I am currently reading thorugh the QuantLib-Python cookbook to learn about this nice pice of software. On page 141 I encountered a block of code that made me wonder what it is exactly doing. The code ...
2
votes
1answer
139 views

Quantlib - model changes in option value on day of expiry

I'm trying to model option value changes during the progression of the last trading day before expiry. All option pricing Quantlib examples that I've seen work with day-level granularity. I'm ...
1
vote
1answer
582 views

Pricing fixed coupon bond with ytm in QuantLib python

I'm new to QuantLib and I'm confused about ZeroCurve in YieldTermStructureHandle The start date is Oct 20, 2001. Assuming the ...
2
votes
1answer
161 views

QuantLib-Python: Splitting the NPV of an option into intrinsic & time

I am right now working throught the "cookbook" of Goutham Balaraman & Luigi Ballabio. By the way a very nice introduction into QuantLib-Python and a good starting point :-) In section four there ...
1
vote
1answer
616 views

QuantLib-Python: Getting a list of all holidays between D1 & D2 with function “holidayList”

I figured out that the C++ version of QuantLib offers a function called holidayList in the calendar class. ...