Questions tagged [quantlib]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
25 views

Reasonable way to price swap under realized forwards assumption

I'm looking for a way to price swaps in QuantLib under the assumption of realized forwards, i.e. couple of weeks or months from today the yield curve would be the same as it is expected by the market. ...
user avatar
  • 149
1 vote
1 answer
32 views

Quantlib Yield curve and rate compounding [duplicate]

I need help in understanding Quantlib's interpretation of yield curve and rates. The rate output retrieved from yield curve differs from expectation for non continuous cases. Illustration: Let's start ...
user avatar
0 votes
2 answers
64 views

Quantlib yield curve - zerorate output differs from expectation

I was creating an yield curve using zeroRate, when I read back the value from the created yield curve - it differs from expectation. ...
user avatar
0 votes
1 answer
40 views

Pricing IRS over a range of days using QuantLib

I'm trying to figure out the way to value SONIA swap over the range of days based on the example in the QuantLib Python book (which has bonds in it). ...
user avatar
  • 149
0 votes
1 answer
59 views

falling flatforward curve in quantlib

I am trying to create a floating rate bond where I need to create a flatforward curve, but the curve seems falling over the time, or is there any way to keep the rate constant. ...
user avatar
0 votes
1 answer
36 views

Bond Discounting Error With QuantLib

I have a list of bond coupons, their maturities and their current price. I want to find their corresponding discount factors. The code I have used is from the QuantLib cookbook, attached below: ...
user avatar
0 votes
1 answer
112 views

Quantlib: How to bootstrap FedFunds Index having other tenors 3M, 1Wk, etc?

I am valuing few Basis Swaps having combination of USD-FedFunds-H.15-OIS-COMPOUND3M vs USD3MLibor. However, I can understand to value 'USD-FedFunds-H.15-OIS-COMPOUND1D' by using ql.FedFunds(). But ...
user avatar
  • 59
0 votes
0 answers
76 views

Quantlib in Python

I have been playing around with QuantLib in Python and have been struggling with couple of simple tasks I would like to share and hopefully get help from the community debugging: The fact that it's c++...
user avatar
0 votes
1 answer
42 views

Does quantlib support Equity/Index Swap valuations?

Is there a way to create a Leg in quantlib in which the notional and reset amounts are calculated by how an index/equity performs?
user avatar
1 vote
1 answer
104 views

Is float32 enough for option pricing?

Most quantitate libraries use float64 precision for monte-carlo or other method. Some academic papers do experiments on float16 and find it has some restrictions on float16. I just wondering if ...
user avatar
0 votes
0 answers
45 views

Simple bond math calculation - Quantlib

I am reconciling a dirty price calculation using quantlib and I am having difficulty getting the same dirty price manually. I am confident it is used to the day count convention but I've tripled ...
user avatar
  • 21
2 votes
1 answer
218 views

Quantlib: day-by-day evaluation of option value

I'm using Quantlib in Python to price an FX option. I'm comparing the result to Bloomberg, to make sure the code is working correct. I want to calculate the P&L of a certain option trading ...
user avatar
  • 51
3 votes
1 answer
447 views

Quantlib: Greeks of FX option in Python

I'm using Quantlib in Python to price an FX option. I'm comparing the result to Bloomberg, to make sure the code is working correct. I also want to calculate all the Greeks, and eventually use those ...
user avatar
  • 51
1 vote
0 answers
55 views

Calibrating HW 1f model params to a term structure market data

I am using Quantlib to calibrate the HW model params to the market swaption price. The attached chart shows the performance of the calibration. Am I correct in saying, this is expected for the 1f HW ...
user avatar
  • 121
1 vote
0 answers
64 views

QuantLib: Modeling GBP-6M-Libor Fixed-Float swaps as valuation date after 2021-12-31 using QuantLib

Starting from January 2022, LIBOR fixings/rates for most currencies (GBP, EUR, CHF, JPY) will be discontinued. After the switching date 2021-12-31 , such floating-rate bonds will effectively have two ...
user avatar
  • 59
0 votes
2 answers
138 views

QuantlIb: How to use maturities in place of Tenors in OIS rate helpers Quantlib?

I would like to know if I can use maturity dates from my rates dataframe to generate OISratehelpers. In the following code the OIS rate helper use 'tenors' and I want to replace those tenors with ...
user avatar
  • 59
0 votes
0 answers
67 views

QuantLib: null pricing engine

I have the following class: ...
user avatar
0 votes
1 answer
52 views

Error in class when pricing vanilla European options using QuantLib

I'm brand new to QuantLib and have the following class that I'm using to price European options: ...
user avatar
-1 votes
2 answers
93 views

Easier way than using QuantLib to compute the price and Greeks of a vanilla European option?

I'm using the following to compute the price and Greeks a vanilla European option: ...
user avatar
0 votes
1 answer
90 views

equivalentRate not matching for compounding cashflows

I am calculating equivalentrate between two days in quantlib python using following functions but the output is not matching with the manual calculation. ...
user avatar
0 votes
0 answers
57 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 ...
user avatar
0 votes
0 answers
53 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 ...
user avatar
0 votes
1 answer
79 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 ...
user avatar
  • 1
0 votes
0 answers
52 views

Quant Lib Reconcilation of output with Open Gamma Java Library

The Strata project is the new pure Java market risk quant library from OpenGamma. If we price a vanilla swap and compare results between Strata and Quant Lib or Bloomberg terminal will it reconcile?
user avatar
1 vote
1 answer
152 views

QuantLib: How to import indexes from QuantLib?

I am trying to import indexes from QuantLib for my further analysis and term structures. But below code is not working and giving me 'ModuleNotFoundError'. Please suggest if this the correct way of ...
user avatar
  • 59
0 votes
0 answers
67 views

Forward Price from Spot Price QuantLib

Is there a way to compute the forward price of a bond from its spot price in QuantLib? Based on the documentation and on examples online, it seems that it is only meant to be used with a yield term ...
user avatar
  • 1
1 vote
0 answers
288 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 ...
user avatar
  • 59
2 votes
1 answer
110 views

Quantlib: How to print the maturity dates or pillars from the helpers in Quantlib python?

I am trying to value inflation swaps using necessary functions from quantlib and successfully completed the valuation. Underneath helper function is working well for most of the swaps. But few swaps ...
user avatar
  • 59
0 votes
1 answer
106 views

Evaluating swaptions with negative interest rates

Does anyone know if it is possible to evaluate swaptions with negative interest rates with Quantlib? ...
user avatar
0 votes
0 answers
49 views

Antithetic method in GaussianMultiPathGenerator quantlib

I am trying to generate MS simulation paths as well as antithetic paths, however when I try to use the Pathgenerator.antithetic(), it gives me the exact same result of the Pathgenerator.next(). here's ...
user avatar
  • 1
1 vote
1 answer
76 views

Quantlib endOfMonth bool

my question is two fold and if the legend Luigi answers this question it would make my day. what is the purpose of this endofMonth boolean in the depoit or fra or swap helper functions. what is the ...
user avatar
  • 13
1 vote
1 answer
165 views

Quantlib HW 1f model calibration not fitting to market normal vol quotes

I am using Quantlib python to calibrate HW 1f model parameters from normal swaption vols quoted in the market (following the code in the cookbook - I fit both the mean-reversion & vol to market ...
user avatar
  • 121
1 vote
1 answer
114 views

Quantlib match clean price with bbg clean price

I'm trying to match QL clean price with BBG clean price for POLGB 2.75 10/25/29 1029 priced for 15th of October 2021 for 2.5% yield. I'm not sure if my setup of bond is wrong or if there is a problem ...
user avatar
1 vote
0 answers
90 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. ...
user avatar
2 votes
0 answers
86 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: ...
user avatar
  • 183
1 vote
1 answer
83 views

30E/360 bond payment schedule

I have a bond that was issued on the 30th of April with 30/360 European day convention basis and semiannual compounding. As far as I understand payments should be every 180 days according to the day ...
user avatar
  • 183
0 votes
0 answers
39 views

VS 2019 error when implementing Equity-linked note using Monte Carlo framework

I am trying to follow the QuantLib codes listed here for Monte-Carlo pricing on an Equity-linked note: [1]: http://mikejuniperhill.blogspot.com/2017/12/quantlib-implementing-equity-linked.html However,...
user avatar
0 votes
0 answers
67 views

QuantLib - Help buiding a simple T-Bond (Mischievous Pricing Conventions)

Im having a problem getting the right price for a simple T-Bond, maybe a Mischievous Pricing Conventions like Luigi says in his book. Im tying to price "912810SZ Govt" ...
user avatar
  • 1
0 votes
1 answer
174 views

How to make a schedule for amortizing bonds in python quantlib?

I am trying to make a schedule for amortizing bonds in quantlib, but have no idea how to include amortization in this schedule. I have the following bond: ...
user avatar
0 votes
0 answers
92 views

Help with aligning discount factors and forwards for Interest Rate Swap valuation using Quantlib

I am trying to price an IRS using Quantlib. As a natural benchmark for pricing, I use Bloombergs SWPM function. Before digging into the actual pricing, I want to see if my bootstrapping of the curves ...
user avatar
  • 151
0 votes
0 answers
135 views

Pricing an OIS referencing SONIA with fixing lag

I'm trying to price an Overnight Index Swap referencing SONIA. The swap will have a 5 day fixing lag (i.e using compounded SONIA over the current interest period but with the last rate set 5 days ...
user avatar
  • 1
0 votes
0 answers
55 views

QuantLib Python - stripped caplet volatilities as input

My market data source provides me with already stripped caplet volatilities as a matrix with strikes in one dimension and caplet maturities in the other dimension. Is there any way to put these caplet ...
user avatar
0 votes
0 answers
48 views

Local Evaluation Date in QuantLib

I am trying to construct a price history for swaps in QuantLib, i.e. to have a timeseries of daily prices for a given swap. I have my rates data on each day, but what I'm struggling with is the ...
user avatar
0 votes
0 answers
27 views

QuantLib C++: Extract RateHelpers from PiecewiseYieldCurve

Is there any way to extract RateHelpers that are used to build the PiecewiseYieldCurve in QuantLib? More specifically, I would like to know whether there is a way to obtain the instruments that are ...
user avatar
3 votes
1 answer
205 views

Bootstrapping discount and forward curve (using ESRA) and price a vanilla swap

I am just starting to use Quantlib, and want to try and replicate the SWPM-functionality in Bloomberg, and price a vanilla 5Y EUR OIS. Below is the overall swap data used in BBG: Overall settings ...
user avatar
  • 151
3 votes
0 answers
67 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: ...
user avatar
2 votes
1 answer
250 views

Pricing a Forward Rate Agreement using QuantLib Python

Can someone please help with the pricing of the following forward rate agreement using QuantLib Python? A 3x6 forward rate agreement, with a notional of $100,000, the FRA rate being 6%, The FRA ...
user avatar
0 votes
1 answer
141 views

Is it possible to price a plain vanilla interest rate swap in Python and simulate the price using Hull White 1 Factor Model simultaneously?

I am trying to price plain vanilla interest rate swap (IRS) using QuantLib. What I am trying to do is to generate a path of simulated IRS price by simulating the interest rates using HW 1 Factor model....
user avatar
0 votes
1 answer
54 views

quantlib: make AmortizingFixedRateBond coupon payments equal

I found some unexpected result when trying to call AmortizingFixedRateBond wiht daily coupon payments, but starting in the last day of the month. ...
user avatar
0 votes
0 answers
40 views

Incorporate Transaction Date to Price Fixed Rate Bond using Quantlib Python

I am trying to use QuantLib Python to price a fixed rate bond, based on the following data: Issue date is 28 September 2017 (issueDate), maturity date is 28 ...
user avatar

1
2 3 4 5
9