Questions tagged [quantlib]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
33 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
1answer
53 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 ...
0
votes
1answer
57 views

Canada House Trust Floater pricing

I am using python quantlib, according to one of the Quantlib sample code to evaluate the CHT (Canada Housing Trust) Floaters, and the index I am using is CDOR, and somehow the price I got is always ...
0
votes
0answers
22 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
0answers
34 views

QuantLib Python currency conversion

A simple code below to do currency conversion copied from QuantLib-Python Documentation. This is failing in the EUR to GBP conversion (in the last line of code). Thank you for looking into this. The ...
0
votes
0answers
45 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
2answers
84 views

Repricing SOFR Quotes and Non-Zero NPV

I generated/calibrated a SOFR Curve using Quantlib Python and would like to know why when repricing the swaps have non-zero NPVs. Appreciate any assistance. Thank you. Parameters ...
5
votes
0answers
98 views

Replicating Bloomberg Swap Prices with QuantLib

I'm trying to learn more about the QuantLib python package and as an exercise I'm trying to replicate some swaps on Bloomberg. However, when I do so, it seems like my swaps are consistently ...
1
vote
0answers
37 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 ...
0
votes
0answers
28 views

Calibrating Hull-White 2 Factor in Quantlib

I am trying to calibrate Hull White 2 factor model in Quantlib in Python. Since, the Quantlib doesn't have Hull-White 2 Factor, I am using G2(Gaussian 2-Factor Model). Ideally, the interest rates ...
1
vote
0answers
18 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
0answers
96 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
0answers
25 views

QuantLib forward dates not matching

I am getting forward swap rates from spot rates of various different curves (3M USD Libor, 6M GBP Libor, 6M Euribor, Fed Funds, SONIA & EONIA): ...
0
votes
0answers
32 views

Calculation Option Greeks per day using Quantlib

I'm trying to calculate option greeks and impVol for a series of European index options (they are in a DataFrame) using QuantLib. Is there a way to get the Greeks and impVol on a daily basis? Thank ...
0
votes
1answer
40 views

Configuring barrier option in Quantlib-Python

Is there a possibility to configure the period the barrier is active, using Quantlib for python? Namely to set up the start and the end dates we compare the spot vs the barrier. If we look at quantlib-...
0
votes
0answers
30 views

How to build Basis Swap Instrument for Libor Curve Bootstrapping

I am trying to bootstrap LIBOR curve in QuantLib-Python similar to what Bloomberg does. I need to create Basis Swap instruments for this but I could not find any helper like basis swap rate helper (...
0
votes
1answer
70 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
0answers
130 views

Nelson-Siegel-Svensson Yield Curve Estimation From Zero-rates Using QuantLib (Python)

I am using QuantLib in Python to estimate yield curves using the Nelson-Siegel-Svensson (NSS) model with zero-rates as input. Since the NSS model in QuantLib uses the discount function to estimate the ...
0
votes
0answers
28 views

Import an external term rates structure in QuantLib

I need to create a Monte Carlo simulation for a Hull-White process. I have the term rates structure already given in a csv, and imported it into Python with the name "rates". However, I have ...
0
votes
1answer
41 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 ...
0
votes
1answer
82 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 ...
0
votes
1answer
55 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 ...
0
votes
2answers
68 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 ...
0
votes
1answer
90 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
2answers
91 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: ...
1
vote
1answer
68 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
0answers
47 views

question on QuantLib schedule to get bond coupon payment dates - python

sorry the original question was answered by an expert but somehow I cannot edit the original question and add comments. so posting it again with some follow up questions: i have a number of bonds that ...
0
votes
2answers
191 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: ...
0
votes
0answers
42 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
1answer
190 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
1answer
82 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
1answer
52 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 ...
1
vote
0answers
24 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
1answer
396 views

QuantLib: ImportError: DLL load failed:

I intalled quantlib using "pip install QuantLib" and now I'm getting the below error. I'm using windows 10 and Spyder IDE. I don't see any dll file called _QuantLib, only _QuantLib.cp37-...
0
votes
1answer
80 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 ...
1
vote
1answer
237 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
0answers
50 views

Quantlib simulating options with different evaluation dates

Im given a dataset of option data that looks like this. ...
2
votes
1answer
92 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
1answer
93 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 ...
2
votes
2answers
343 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
1answer
169 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 ...
0
votes
1answer
164 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 ...
2
votes
1answer
107 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}(\...
2
votes
2answers
219 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
0answers
27 views

What is the meaning of these parameters in the Valuation class?

I am studying the valuation engine for a typical IR Swaption named G2SwaptionEngine. The class reference is available in : https:...
1
vote
0answers
38 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
0answers
266 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
1answer
92 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 ...
0
votes
1answer
372 views

Instrument valuation using Monte Carlo simulation with Quantlib

I am looking for some example to value an American swaption using monte carlo simulation of ...
1
vote
1answer
35 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/...

1
2 3 4 5
7