Questions tagged [quantlib]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
55 views

Option price quantlib

I am lookin at https://github.com/lballabio/QuantLib/blob/master/Examples/EquityOption/EquityOption.cpp . I want plot a graph of the option price for different underlying prices. Other than changing ...
1
vote
1answer
50 views

Quantlib: How do I price a bond after having built a term structure

I below are my codes using QuantLib to build a term structure What I would like to do is use that to price any hypothetical bond lets say startdate : 8 Feb 2016 end date : 8 Feb 2021 coupons : 10% ...
2
votes
1answer
127 views

Pricing Variance Swap [closed]

I want to calculate the NPV of a Variance Swap wherein the cash flow happens every months based on the standard Variance formula of the close prices of S&P500 ...
0
votes
1answer
34 views

Is there a way to create a custom calendar using a holiday and weekend list in quantlib [duplicate]

We have a data set up that provides us a list of holidays and weekends which is different from the country or currency calendars.Is there any method exposed in Quantlib calendars which expects a list ...
1
vote
1answer
32 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....
5
votes
1answer
130 views

Bootstrap with QuantLib: Fair Swap or zero NPV

In all brevity What is the termination condition used in QuantLib's curve bootstrapping? Can I modify this setup to my needs, e.g. can I tune this to a higher accuracy? Background When bootstrapping ...
0
votes
0answers
26 views

How to implement CallableFloatingRateBond in QuantLib?

Is there anybody has any idea (or any C++ code) to implement the pricer for the CallableFloatingRateBond in QuantLib. I want to discount and forecast the cash flows on the tree using the Hull White ...
1
vote
1answer
80 views

FX Forward rate agreement valuation in quantlib

I am trying to value an FRA in quantlib Python using the below code: ...
0
votes
1answer
41 views

How to make futuresHelpers in Quantlib work with monday settlement day not IMM?

My EuroDollar futures have monday of third week expiration and settlement date from CME exchange how ever Python Quantlib doesn't seem to like it. Anyway I can get away with IMM check? futures = { ql....
0
votes
1answer
61 views

CDS Option pricing in quantlib python

I am newbie in Python and I am trying to price a CDS Option in quantlib Python. I have the below code: ...
0
votes
1answer
24 views

How to calculate basis swap fair spread Using Quantlib 'floatfloatswap'?

I am trying to calculate a single currency basis swap by using the Quantlib floatfloatswap function. Please advice if I am doing wrongly. ...
0
votes
1answer
42 views

Swap date doesn't match

I use quantlib to bootstrap yield curve from deposit rate, future price and swap rate. But after I get curve, the date in curve.nodes() doesn't match the date of swap. Here is the code: ...
0
votes
1answer
82 views

float float swap in quantlib

I'm using quantlib to calculate a fair spread of Libor/OIS swap. I have read the reference of ql.Swap and ql.FloatFloatSwap. But the document is too vague. I totally can't understand what parameters ...
0
votes
1answer
46 views

How to handle ON, TN, and S/N in quantlib

I'm wondering how to precisely handle the quote convention of ON, TN, and S/N of FX quote. How to handle these convention in quantlib. Here is my code, is that correct? ...
3
votes
1answer
64 views

Quantlib-Python: Can anyone help me understand how enableExtrapolation works?

I found 'enableExtrapolation' in many curve-building examples but can only guess. Can anyone help me to understand it? It will be perfect if there are examples to show how it works. Thank you very ...
0
votes
1answer
40 views

Quantlib : How to resolve ' more than one instrument with pillar' in valuing swaps?

I had valued interest rate swaps of most of the currencies keeping my valuation date as 13th Sep 2019. But I faced a problem of 'RuntimeError: 2nd leg: more than one instrument with pillar December ...
0
votes
0answers
48 views

How to find Flow of Funds and Money Trail in Python for Finance

I'm trying to find Flow of Funds and Money Trail using python but i'm stuck in middle of it not understanding what to do next My Main goal is to finding Flow of Funds i.e flow of transaction from ...
1
vote
1answer
41 views

QuantLib-Python: where is the function to take Period to years?

The C++ version of QuantLib has a function called years: Real years(const &Period p); I don't see this in QuantLib-Python version 1.18. Is it supposed to be ...
0
votes
0answers
12 views

QuantLib Lattice Rollback

I got a quesiton for below code. The question has nothing to do with the detail logic of below code, but I am just curious why the roll back function uses "Time to" as a parameter? Why not simply use ...
0
votes
1answer
36 views

How can i calculate the yield given price, or price given yield for a callable bond, with several callable dates and strike prices (quantlib)

import QuantLib as ql ql.Settings.instance().evaluationDate = ql.Date(2,3,2020) maturity = ql.Date(10, 5, 2023) coupon = 0.09 issueDate = ql.Date(30, 12, 2019) frequency = ql.Semiannual dayCount = ql....
0
votes
1answer
48 views

how can i see the cashflows of a specific bond created in quantlib in Python? this is the code i have, how should i change it

This is the code i have, what would be the way to see the cashflows of this specific bond i created
2
votes
1answer
138 views

How to get the price of a bond if the yield is given or viceversa in QuantLib

For example Can u provide with a detailed example please if i have ( maturity, issue date, coupon, frequency, days_countbase, (price or yield) what is the (yield or price given this information. ...
2
votes
2answers
73 views

Quantlib: convert par swap rates to zero rates back and forth

I built a zero-coupon curve out of a generic par swap rate curve (Step 1) and I am trying to recover the swap curve back from the zero-coupon curve (Step 2). Step 1 works but not Step 2. I get close ...
1
vote
1answer
54 views

parameter in FixedRateBondHelper of quantlib

I'm working with 10 bonds with different maturity and want to get the zero curve. I tried the quantlib. However, I cannot understand the parameter in FixedRateBondHelper. Here is my code: ...
0
votes
0answers
28 views

Quantlib-SWIG Python: impliedHazardRate requires “warm” discountcurve

I am getting different results from the CreditDefaultSwap().impliedHazardRate() method, depending on whether the discount curve passed is "cold" i.e. just created ...
0
votes
2answers
53 views

Value a Swap with Custom Coupons with QuantLib

I'd like to valuate a custom Libor3M - Fix swap with QuantLib in Python. With custom I mean, custom starting/end/payment dates for every coupon, a fixed coupon in the float leg (starting_date < ...
0
votes
1answer
50 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:
0
votes
1answer
29 views

Valuating Custom Amortization Schedule Libor IRS with QuantLib

I got to bootstrap the OIS and Libor 3M swap curves, and now I'd like to valuate some simple Libor3M - Fix IRS with QuantLib (in python). My problem is that some of the instruments I have to valuate ...
0
votes
1answer
16 views

Which object in DateGeneration object when there are two short, long or combination in Schedule object for py QuantLib?

I'm pricing a vanilla swap. I have two stubs, front and back, and they can be short, long or a combination. In this case, what do I use in ql.Schedule object for <...
0
votes
1answer
18 views

How to make the effective date to start on a holiday/weekend in py QuantLib?

I'm trying to price a non-standard swap. However, my schedule is not returning the correct dates. In particular, the effective date starts on a Saturday but the schedule returns the next biz date ...
1
vote
1answer
51 views

How can I extract the strike price from a Quantlib option object?

I am trying to write a Python function that performs some calculations using a list of Quantlib options, and I would like to pass only that list without other information. In particular, the strike of ...
0
votes
0answers
41 views

Digital Caps/Floors in Quantlib Python

Am I missing something or is there currently no way to price digital libor Caps/Floors in Quantlib Python? It seems there's no mention of DigitalIborCoupon in the cashflows SWIG interface.
0
votes
1answer
110 views

Monotonic Cubic Spline interpolation QuantLib python

I am new to QuantLib-Python and I am trying to replicate the implementation of a Dual Curve bootstrap using QuantLib-Python. I have followed the steps in Chapter 9 of the QuantLib Python Cookbook. ...
0
votes
1answer
35 views

Removing/Purging QuantLib/Boost

I recently updated to Ubuntu 20.04, as well as to R v4. When updating packages, I ran into an issue with QuantLib. I tried removing/reinstalling, but the reinstall was a different version. RQuantLib ...
1
vote
1answer
58 views

QuantLib 1.17 C++ does not contain some YieldTermStructure classes while QuantLib-Swig contains

I want to port some QuantLib-Swig dependent code written in Python to C++ with QuanLib-1.17. However some YieldTermStructure classes (PiecewiseLogCubicDiscount, PiecewiseLinearZero and ...
1
vote
0answers
57 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
0
votes
1answer
56 views
0
votes
0answers
25 views

Missing functions in QuantLibXL

I have been using the open source addin QuantLibXL extensively. This provides an easy way to use the QuantLib library in a simple Excel environment. However, there are a few of the more recent ...
1
vote
1answer
56 views

monotone convex interpolation using QuantLib

I have one yield curves for EUR6M and I want to produce EUR3M using a parallel shift to EUR6M curve. I can just add spread in 6M curve. I am facing problem that my EUR3M curve will have many more ...
1
vote
0answers
49 views

Quantlib ZeroCurve interpolation

I'd like to check how QuantLib does interpolation on rates if I use ZeroCurve constructor. As it was mentioned here, by using curve.nodes() you can get a list of ...
0
votes
1answer
65 views

Bootstrapping the 6m Sterling Libor curve

I am trying to bootstrap the 6m sterling swap curve using the depos and swap rates codes are below. I am a newbie and have been following (or at least trying to!) the python cookbook. I wanted to know ...
0
votes
1answer
32 views

Pricing Compound Options using QuantLib

I am trying to price Compound Options using QuantLib on Python. I've looked around but am unable to find any sample code. I believe that the CompoundOption Class ...
1
vote
1answer
85 views

How do I create a term structure of a bond using QuantLib?

Has anyone used QuantLib to create term structure (i.e bootstrapping process to produce spots) in python? I have been using the below example http://gouthamanbalaraman.com/blog/quantlib-term-structure-...
0
votes
2answers
210 views

Heston volatility surface in Python QuantLib

Does anyone have experience with the Python QuantLib function HestonBlackVolSurface? I'm trying to produce a 3D plot of the volatility surface as done in the ...
0
votes
0answers
79 views

Quantlib : How does interpolation technique in zero curve improve the valuation of interest rate swaps?

I am working on building zero curve using interpolation = ql.Linear(). I know that this method is very popular to build short and long end curve. But am wondering if there is any another way of ...
0
votes
1answer
99 views

Zero Curve from a par curve curve QuantLib

I'm trying to understand why pricing a par bond with zero curve, contracted from par bonds themselves doesn't give me par. (Based on examples here) ...
3
votes
1answer
98 views

Quantlib - exercise probability function?

I am using Quantlib to obtain the option value embedded in a convertible bond. I create an american option as follows: ...
1
vote
1answer
87 views

Interpolation for discount curve building QuantLib for bonds

I'm trying to figure out how to build a discount curve to price bonds from spot rates using some advance interpolation methods like PiecewiseLogCubicDiscount. I know I can build this curve with ...

1
2 3 4 5 6