Questions tagged [quantlib]

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

90 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
0answers
567 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 ...
4
votes
0answers
85 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. ...
4
votes
0answers
285 views

RQuantLib: any difference between FixedRateBond() and FixedRateBondPriceByYield() with flat term structure?

Please, consider the following functions from RQuantLib package: FixedRateBond() ...
3
votes
0answers
59 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: ...
3
votes
0answers
491 views

FX curve stripping beyond one year (with CCS and NDS)

In QuantLib, the FxSwapRateHelper allows to create bootstrap a curve FX Swap quotes. For instance, the link below includes example of bootstrapping PLN yield curve using EURPLN spot rate and forward ...
3
votes
0answers
409 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-...
3
votes
0answers
115 views

How do I specify Thirty360::European day counter in RQuantLib

I am taking liberty to ask the following question in quantLib forum though this question is about RQuantLib I am trying to use RQuantLib to calculate clean price of a fixed coupon bond using a Nelson-...
2
votes
0answers
69 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: ...
2
votes
0answers
97 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 ...
2
votes
0answers
447 views

Using Python Quantlib's FittedBondDiscountCurve as Evaluator of Parametric Curve - Errors

I am using Quantlib's FittedBondDiscountCurve in Python 3.7 and setting MaxIterations to 0, and giving a guess_solution, which then turns the routine into an evaluator for the parametric form I choose,...
2
votes
0answers
387 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
0answers
80 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 ...
2
votes
0answers
229 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 ...
2
votes
2answers
799 views

In quantlib (python), is there a way to specify settlementdays for a swapratehelper without having to also give discountCurve?

Using the following Python code I am setting USD LIBOR Swap quotes. I found that by default settlementdays uses whatever is associated with the Index (in C++: ...
2
votes
0answers
574 views

Bootstraping CLP Swap with Quantlib

After reviewing and fixing my last code (Swap Bootstrapping with quantlib), i managed to get the zero rates for the ICP swap curve (CLP). Now the thing is that there is a considerable difference ...
2
votes
0answers
172 views

python and quantlib - setting futures priority

In setting up a curve using deposit rates and futures in python, is there a trigger which allows one to set when the futures start? Looking for something similar to ...
1
vote
0answers
202 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 ...
1
vote
0answers
65 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. ...
1
vote
0answers
84 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 ...
1
vote
0answers
69 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
0answers
83 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: ...
1
vote
0answers
71 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, ...
1
vote
0answers
91 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
2answers
231 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 ...
1
vote
0answers
107 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
0answers
27 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 ...
1
vote
0answers
61 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 ...
1
vote
0answers
32 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
0answers
47 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?
1
vote
0answers
109 views

Unable to find QuantLib-Python bindings for Synthetic CDO

I am trying to price a Synthetic CDO using QuantLib Python. Unfortunately, I am unable to find any suitable CDO pricing engine ported into Python. They do exists but in C++ as per my preliminary ...
1
vote
1answer
141 views

QuantLib in Python - RuntimeError: could not bootstrap optionlet:

I receiving the following error when I try to compute a cap price. However, I'm not sure how to solve this error. " error: nu (-1.00062) must be >= -1.0 expiry: June 4th, 2020 annuity: 0....
1
vote
0answers
139 views

How to use quantlib Excel for valuation of european swaption with vol surface to calibrate?

I would like to replicate the following Bloomberg pricer in quantlib using Quantlib xl. Is it possible? Thanks
1
vote
0answers
121 views

Why Quantlib CreditDefaultSwap::ISDA fail on roll dates: 1st iteration: failed at 1st alive instrument, pillar

I am experimenting with Quantlib CDS engine, I create a piecwise hzard rate based on CDSHelpers and try to compute default probability with it and then some specific upfront. I managed to match BBG ...
1
vote
0answers
130 views

quantlib isda cds time-series

I am trying to use quantlib from python to work with time series of cds quote, e.g I would like to evaluate the PV or PUF or other metrics on many different days. Each day has an associated yield ...
1
vote
0answers
160 views

Quantlib Python OISRateHelper using Quantlib Cookbook - hands on Quant Finance

I am completely new to Python, just trying to reference Quantlib Cookbook to construct eonia curve, here is my code. I didn't change much compared to the cookbook Eonia Curve BootStrapping chapter, ...
1
vote
0answers
201 views

Building OIS curve in Quantlib from Fed Funds Futures and handling steps

Has anyone tried building an OIS curve with Quantlib from Fed Funds futures? If so, could you share a code snippet for how you do it. (Assuming you already have the prices for the futures) How do ...
1
vote
0answers
326 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
vote
0answers
123 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 ...
1
vote
0answers
178 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 ...
1
vote
0answers
121 views

How to debug Example_1 of the Open Risk Engine (ORE) library?

Following the manual, I have built an Open Risk Engine library and I would like to learn the library by modifying examples that come together with the library. Question: How to run, for instance, <...
1
vote
0answers
296 views

QuantLib in Python, are there any existing methods to handle the options delta on expiration day?

Tried [ql.Settings.instance().includeReferenceDateEvents = True] and it works for the calculation of NPV using intrinsic value of the option. But Delta is nan for an in-the-money option. I understand ...
1
vote
0answers
377 views

Calculating price -> yield and yield -> price for fixed rate bonds using QLNet

I'm trying to implement a simple calculation module to calculate fixed rate bond yield given the price (and then price based on yield to verify the calculation). I've looked at a number of examples (...
1
vote
0answers
335 views

What rate/structure to use in <yield term structure> for the pricing of callable bond using QuantLib

I am new to quantlib (actually to the fixed income universe). I am trying to price a callable bond using the CallableFixedRateBond classe of quantlib, and compare it to the market data(bloomberg). I ...
1
vote
0answers
610 views

FIX engines comparison

Need help, looking for some comparison between c++ FIX engines, like onixs, antenna and some fpga solutions. If anyone has experienced some of the named engines also would like to hear the ...
1
vote
0answers
141 views

Quantlib binomial tree

I was trying to price options with the extendedBinomialTree class of quantlib. I actually tried at some point to modify this class in order to optimize it. Normally the drift and diffusion of the ...
1
vote
0answers
225 views

RQuantLib FixedRateBondPriceByYield() Non-tradable error

How do I use FixedRateBondPriceByYield() function on maturity date that is earlier than today? I get "non tradable error" when applying on date older than today. <...
1
vote
0answers
153 views

QuantLib C++: Friendship dilemma between derived class from PiecewiseYieldCurve and Bootstrap class

I derived a class template, OISCurve<Traits,Interpolator,Bootstrap>, from ...
0
votes
0answers
28 views

QuantLib Python: how to retrieve the Yield Term Structures connected to a VanillaSwap Object

For pricing a fix vs. float swap in QuantLib Python two YieldTermStructure Objects are necessary: one for forward rate estimation connected to a FloatingRateIndex Object, and one for discounting the ...
0
votes
0answers
26 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
1answer
28 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 ...