Questions tagged [quantlib]
Quantlib is an open-source C++ library for quantitative finance.
491
questions
1
vote
0
answers
330
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
2
answers
452
views
Python QuantLib FuturesRateHelper issue
I'm trying to do bootstrapping using some future rates however encountered some errors below. A reproducible case is as follows:
this is constructing a future rate helper with 'IRM1 Comdty' from ...
1
vote
1
answer
369
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 ...
0
votes
1
answer
367
views
Calculate DV01 for a vanilla swal for MXN index using quantlib
I am trying to calculate dv01 for a vanilla swap using quantlib. Its a MXN TIIE Swaps for built an index like
...
0
votes
1
answer
58
views
Sorting SimpleCashFlows in QuantLib
I would like to sort SimpleCashFlow(s) according to date. I am having trouble incorporing the the less than function < in std::sort
...
0
votes
1
answer
421
views
Calculate Fixed Rate on Vanilla Swap in Quantlib
I am trying to calculate dv01 on the vanilla swap using quantlib but not able to understand how to calculate the fixed_rate. In all the examples it's a hardcoded value which is not right. Any ...
1
vote
0
answers
427
views
QuantLib-Python Libor Market Model
It appears that QuantLib-Python does not include Libor Market Model, although the C++ version has it.
(https://rkapl123.github.io/QLAnnotatedSource/d5/d8d/class_quant_lib_1_1_market_model.html)
Is ...
0
votes
0
answers
99
views
Black Standard Deviation in QuantLibXL
I was having a doubt about a fucntion in the QuantLib add-on for excel.
What is the formula for the function: qlBlackFormulaImpliedStdDev(...)
I know that there ...
1
vote
0
answers
291
views
CDS option pricing in Quantlib Excel (QuantlibXL)
I am trying to price an index CDS option using QuantlibXL. Anyone aware of an existing template sheet or sample formula for creation of CDS and CDS objects? The sample template sheets provided with ...
1
vote
0
answers
50
views
MC Simulation using G2Process Evolve function
I am trying to simulate the IR for G2 Process using the following code. However, the initial value of the simulation starts with zero. I want to initialize the simulation using a starting value.
Is ...
0
votes
0
answers
228
views
Rebonatos's formula in C++
I'm trying to code in C++ Rebonato's formula for swaption volatilities
$$ v_{\alpha,\beta}^2=\frac{1}{T_\alpha} \sum_{i,j=\alpha+1}^{\beta} \frac{w_i(0)w_j(0)F_i(0)F_j(0)}{S_{\alpha\beta}^2(0)}\rho_{i,...
0
votes
1
answer
255
views
Swaptions vols,object using quantlib xl
How can I build a good vol surface using QuantlibXl?
My goal is to price a swaption 5 year with option maturity 1Y1M.
The data are:
2
votes
2
answers
849
views
Building a percent of floating rate IRS in QuantLib
Just starting to learn Quantlib for Python.
I am trying to figure out how you create an interest rate swap where the floating leg is a percent of the floating index. For example, the floating leg ...
0
votes
1
answer
3k
views
Quantlib Calendar Advance
Hi I'm trying to advance a business date (28-12-2012) by 1 day and 1 week according to the Japan calendar.
...
0
votes
1
answer
485
views
0
votes
1
answer
97
views
Quantlib error initializing CapFloor C++ Class
I'd like to use QuantLib as a C++ library to price interest rate derivatives, in particular Cap&Floors. To semplify things a little, let's say I have a vector of EURLibor1Y rates for different ...
-1
votes
1
answer
2k
views
QuantLib Python: how to calculate duration and convexity for irregular cashflows? Can I use SimpleCashFlow or must I define a custom bond?
I have 2 questions:
If I want to discount a set of irregular cashflows, I can do it using the SimpleCashFlow class, or defining a bond with custom cashflows (thank you to Ballabio and David Duarte for ...
-1
votes
1
answer
206
views
QuantLib Python: why is the NPV different? NPV(0.1,[0,110]) should be 100, not 99.53
I am trying to learn QuantLib for Python. Further to my previous question on the syntax for CashFlows.npv(), now that I understand how the syntax works, I have a question on why the output differs ...
-1
votes
2
answers
1k
views
QuantLib Python: how to calculate the npv of irregular cashflows?
I am trying to learn QuantLib for Python but I must say I am banging my head against the documentation (I also bought Ballabio's python cookbook) - maybe it's me, but even finding the most basic ...
-1
votes
1
answer
2k
views
Converting pandas datetime to QuantLib dates: why do the inputs need to be converted to int only some times? It seems random
I am trying to use the QuantLib library with Python.
In the example below, I create a pandas dataframe with some dates and some cashflows, convert the dates from pandas' format to QuantLib's, and use ...
0
votes
2
answers
2k
views
Getting quarterly forward rates with QuantLib
I am trying to build a quarterly forward curve with 3 month USD Libor swap rates from 1Y to 50Y as inputs.
From other posts I have looked at, I have managed to come up with this code so far:
...
0
votes
1
answer
345
views
Constructing Daily Term Structure
I am very new to QuantLib and am trying to do Swaption Model calibration following the example here:http://gouthamanbalaraman.com/blog/short-interest-rate-model-calibration-quantlib.html
Appreciate ...
1
vote
1
answer
1k
views
QuantLib constructing yield curve error: root not bracketed
much appreciated if anyone can help with the below, basically i'm trying to construct a yield curve using some real market data. I have pasted the python code below. I use a list of swap rates and ...
0
votes
2
answers
3k
views
QuantLib python ql.schedule getting end of month dates
i'm trying to get payment schedule of a bond that pays coupon quarterly. value date is 2020-04-01, first coupon date is 2020-06-30, maturity date is 2022-09-30. so I expect to have a list of dates:
...
1
vote
0
answers
144
views
Why do I get different results from different credit pricing engines in QuantLib
I am trying to use three credit pricing engines: IsdaCdsEngine, MidPointCdsEngine and IntegralCdsEngine but I am getting different NPV results from each of them. The case is like this: When I have as ...
0
votes
1
answer
2k
views
Bloomberg bond clean price and accrued amount differs from Quantlib
I'm getting the different bond clean price from Bloomberg and from QL but surprisingly Bloomberg price matches with excel price() function
I have the following bond : GETC21117030. The parameters are ...
1
vote
1
answer
380
views
LIBOR Quoting Conventions and Swap Pricing
Given that LIBOR quotes have value date T+2, when considering a simple IRS, which dates are considered when fixing the floating rate? Say floating leg is Euribor 3M and next fixing date is today (02/...
0
votes
1
answer
334
views
Constructor error pricing american ops with divs quantlib?
Looking at post from Issue Using QuantLib and Python to Calculate Price and Greeks for American Option With Discrete Dividends
and trying to recreate the result; but getting a constructor error I ...
0
votes
1
answer
1k
views
What is the cause of this error 'TypeError: Wrong number or type of arguments for overloaded function 'new_HestonModelHelper'?
I'm simulating the option prices every month using the Heston Model. The option contract expires at the of the month and the next option contract start the day after the previous contract expire. In ...
1
vote
0
answers
59
views
When using qlSmileSectionFromSabrVolSurface in Quantlibxl, why the Option Time for input cannot be less than 1?
I constructed a SabrVolSurface in Quantlibxl. Then I wanted to obtain a volatility smile from the surface using qlSmileSectionFromSabrVolSurface. The problem is that the time input is the year-...
1
vote
1
answer
1k
views
QuantLib Bond Yield
I think I have the same question as was asked here but I still haven't been able to resolve my issue:
Excel YIELD function equivalent in python Quantlib
I am trying to calculate the yield on a bond ...
2
votes
1
answer
2k
views
QuantLib - Calibrating Hull White one-factor on negative interest rates
I have been working with the QuantLib Python package for some days now. Currently, I am working on calibrating a Hull White one-factor model for short rates. I am calibrating the model on the yield-...
0
votes
0
answers
166
views
Quantlib simulating options with different evaluation dates
Im given a dataset of option data that looks like this.
...
2
votes
1
answer
174
views
Excel PasteSpecial Values shortcut button causing QuantLib to crash
I am experiencing a strange issue with QuantLibXL when I use the quick-access PasteOptions/Values button on the Excel right-click toolbar (apologies for the picture: it is surprisingly hard to capture ...
0
votes
1
answer
252
views
2
votes
2
answers
1k
views
Best Approach to Creating a USD LIBOR Forward Curve from Market Data
This is a very basic question, I am convinced this has been answered before but I cannot seem to find it.
What is the best approach for constructing a USD Libor forward curve from market data?
For ...
2
votes
1
answer
1k
views
Forward bond yield with QuantLib
I'm looking into way to calculate forward bond yield using QuantLib. In Python QuantLib book I see an example for bond futures, where
...
2
votes
1
answer
322
views
How many parameters in a discount curve exponential spline fit?
I am investigating the ExponentialSplinesFitting class in QuantLib. I've used this fitting technique using a variety of systems in the past (including by hand!). The form is $$df(t) = \sum_{n=1}^{N}(\...
0
votes
1
answer
1k
views
Getting a daily forward OIS rate curve with QuantLib in Python
I am trying to build a 1-day EONIA forward curve with QuantLib giving OIS yields from 1mo to 50yr as input.
My current approach consists on (i) obtaining the yield curve with ...
1
vote
1
answer
372
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:
...
3
votes
2
answers
3k
views
How to use quantlib with excel?
I installed an quantlib on my mac, but have no idea, how to start using it with an excel. Please advise hoq to do it. I followed all instructions here:
http://quantlib.org/install/macosx.shtml. I ...
1
vote
0
answers
75
views
Quantlib Yield Curve given spot and forward rate
Is it possible to create a yield curve, given the spot rate and the forward rate?
0
votes
0
answers
544
views
Bootstrapping Swap Curve
I am trying to get the zero rates from the swap curve for chilean pesos (vs Camara). I tried this code (from a previuos question similar to mine from other person) and I am very close to get the ...
0
votes
1
answer
236
views
Why Yield cannot be calculated for short dated Bonds using Quantlib
I am trying to calculate a yield from a clean price using Quantlib for Bond.
I play a lot with the Quantlib samples (Bonds.java) and succeed but when I change to set today close to maturity, Quantlib ...
1
vote
1
answer
39
views
Failing to create Quantlib's LM Fixed Volatility Model object
I want to create am LmFixedVolatilityModel object as defined in http://www.jquantlib.com/en/latest/_static/javadocs/0.2.6-SNAPSHOT/jquantlib/index.html?org/...
3
votes
1
answer
2k
views
Bootstrapping OIS curve
I am trying to get a zero curve from a series of EONIA-based OIS rates with Quantlib. When comparing my output with Bloomberg, I find some differences (see at the end of the question), and and I don't ...
0
votes
1
answer
237
views
dirtyPrice() and discounting curve on QuantLib
I am pretty new to Quant field and QuantLib and have been having the following problem when trying to model a very simple fixed rate bond using Python.
It looks like the library does not use the ...
0
votes
3
answers
698
views
How to convert a Zero curve to a Discount Curve
I have created a Zero-Curve as below -
...
0
votes
0
answers
591
views
How to Calibrate SABR parameters by fixing Beta(Quantlib XL/Python)
Unable to find a good example for either Quantlib XL/Python where we can calibrate Alpha, Rho and Nu by fixing Beta. Any help would be appreciated
1
vote
1
answer
342
views
Is there a ZABR model on Quantlib XL
I am relatively new to QuantlibXL and would like to build a ZABR model in excel. But I cant find much help online. Any help would be appreciated