Questions tagged [quantlib]

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

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

how to change the value set by the addFixing method in QuantLib

Suppose we have had constructed an index for forecasting future interests of a floating bond, and as suggested by the official document, I used addFixing method to set a past fixing for the current ...
1
vote
1answer
240 views

Swing option pricing in QuantLib-Python

Is it possible to use the QuantLib python wrapper to price swing options? I've seen the QuantLib Github repository contains a C++ implementation, swingoption.cpp, but have found no reference to swing ...
3
votes
1answer
613 views

Calculate tenor wise DV01 of a Swap in Quantlib Python, i.e. Key-rate Duration

Is there a way I can get DV01 breakup of a Swap across different tenors of the deal in Quantlib-Python. The question asked here, follows the basic method of re-valuing the swap by shifting the curve ...
4
votes
1answer
713 views

Quantlib derivative valuation from zero curve

I have newly started with Quantlib-Python for valuing derivatives. In all the examples stated in this bolg or in other places, market quote is inserted and bootstrapping is done via individual rate ...
3
votes
1answer
428 views

QuantLib in Python : Execution time with OISRateHelper compared to Swap/Deposit RateHelper

I have been working on valuation of interest rate swaps using dual curve bootstrapping. And for this I use OISRateHelper to create a discount term structure using OIS rates. The entire code below : <...
6
votes
1answer
385 views

OpenGamma's Strata - Computational Overhead

I've been looking at the open-source library Strata (maintained by OpenGamma), which is written in Java. Now, upon inspection of the FX Forward Pricer and Payment Pricer I noticed two things: All ...
1
vote
2answers
686 views

How to change the YieldTermStructureHandle's referenceDate in QuantLib

Suppose we have already known the dates and rates of a spot rate curve, and I passed the data to the ZeroCurve class to construct a discount curve for bond pricing. What I wanna find is how to change ...
2
votes
2answers
681 views

QuantLib-Python: How to set fixed reference dates when bootstrapping the term structure?

I am borrowing from an example in the "Quantlib Python Cookbook" section 7, to ask my question. To make the point as clear as possible I simplify the code a bit. The aim is to strip the EONIA curve ...
1
vote
1answer
520 views

Using DayCounter ActualActual.ISMA in QuantLib

Suppose we have a semiannual coupon bond. The calculation date is 5/8 2017. The ex-coupon date is 4/20 2017 and next coupon date is 10/20 2017. ...
3
votes
1answer
514 views

QuantLib-Python: What is “index = Euribor1Y(term_structure)” doing?

I am currently reading thorugh the QuantLib-Python cookbook to learn about this nice pice of software. On page 141 I encountered a block of code that made me wonder what it is exactly doing. The code ...
3
votes
1answer
269 views

Quantlib - model changes in option value on day of expiry

I'm trying to model option value changes during the progression of the last trading day before expiry. All option pricing Quantlib examples that I've seen work with day-level granularity. I'm ...
1
vote
1answer
984 views

Pricing fixed coupon bond with ytm in QuantLib python

I'm new to QuantLib and I'm confused about ZeroCurve in YieldTermStructureHandle The start date is Oct 20, 2001. Assuming the ...
2
votes
1answer
265 views

QuantLib-Python: Splitting the NPV of an option into intrinsic & time

I am right now working throught the "cookbook" of Goutham Balaraman & Luigi Ballabio. By the way a very nice introduction into QuantLib-Python and a good starting point :-) In section four there ...
1
vote
1answer
1k views

QuantLib-Python: Getting a list of all holidays between D1 & D2 with function “holidayList”

I figured out that the C++ version of QuantLib offers a function called holidayList in the calendar class. ...
0
votes
0answers
142 views

Different scaling conventions for greeks

I have been following this tutorial (http://gouthamanbalaraman.com/blog/value-options-commodity-futures-black-formula-quantlib-python.html). It says in the conclusion and I quote:It is worth pointing ...
2
votes
1answer
457 views

Why we should specify the evaluation date when using Quantlib yield curve? And why updating the evaluation Date is time consuming

I was runing some tests using the yield curve structure in quantlib mainly: PiecewiseYieldCurve It seems that I have to fix the evaluation date using such a line : Settings::instance().evaluationDate(...
2
votes
1answer
164 views

QuantLib: How to change polynomial order in MCAmericanBasketEngine?

My goal is to price American basket put options using the Least squares Monte Carlo, or Longstaff-Schwartz algorithm. I currently have the one-dimensional case working with the Python file below (I ...
-1
votes
1answer
214 views

Quantlib interpolation question

I am trying to use QuantLib to create some curves, but I am finding this error I do not really know how to get around. Say for simplicity this is the example: ...
1
vote
0answers
90 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
1answer
466 views

Fixing Rate in Quantlib

While pricing Interest Rate Swap, I am providing Fixing rate for historical date using "addFixing(date, value)" function. But when I am trying to change value it is not happening and picking up old ...
1
vote
0answers
207 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
2answers
422 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++: ...
1
vote
1answer
149 views

What Quantlib's functions are exported to Python, Excel, etc.?

Is Quantlib's NullCalendar exported to Python? Can't see that there. Also, in general where can I see Quantlib's functions that are exported to Python, Excel, etc.?
1
vote
1answer
726 views

Understanding DiscountCurve in quantlib

I want to create a TermStructureHandle handle in python using quantlib. I use the DiscountCurve class and enter the list of dates and discount factors as follows: <...
1
vote
1answer
148 views

QuantLib: Unusual point in American option volatility smile

I have a set of American options, for which I got the implied volatility thanks to the package "RQuantLib". I then used splines to interpolate my implied volatility as a function of my strikes. ...
1
vote
1answer
340 views

Quantlib | Issue with extrapolation in BlackVarianceSurface

I have created BlackVarianceSurface and enabled extrapolation but unable to change extrapolation type used. It is giving flat extrapolation. Used setInterpolation to change method type but ...
1
vote
0answers
313 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 (...
4
votes
1answer
1k views

Why is there a difference in American option prices when comparing pricing methods (Python)?

I have written a Python script to price American options using Least Squares Monte Carlo and added a QuantLib implementation below (analytical/binomial/finite difference) to compare. The problem is ...
3
votes
1answer
754 views

Using RateHelper (bootstrapping) and Speed up in Quantlib Python

I am wondering whether it is possible somehow to speed up my script using ratehelpers/bootstrapping. I am creating for every days a new ratehelper. Is there a way building up just once the ratehelper ...
2
votes
1answer
569 views

Bootstrapping 3M Curve based on 6M Quotes and Basisswaps 6Mvs3M in Quantlib does not Price to zero

I am trying to understand the rate helper more in detail. In principal I want to build a 3M forward curve based on 6M quotes and 6Mvs3M quotes. The 6M works and prices to 0. I am not sure whether ...
3
votes
1answer
2k views

Quantlib Day Count between dates

Need some help on following items regarding functions in Qunatlib: Is there any function available to calculate time between two dates with specific day count convention. For Example, I want to know ...
4
votes
1answer
852 views

Bootstrapping OIS Curve with data from different days data

I have the following problem bootstrapping the JPY OIS Curve. The bootstrapping itself works when havin one set of data, e.g. for the date 2017-02-09. I have all my instruments and as said ...
1
vote
1answer
462 views

Bootstrapping Quantlib RateHelper Python/C++ [closed]

I am pretty new in the Quant areaa and using Quantlib. I found the pretty good introductions concerning bootstrapping in the book QuantLib Python Cookbook by Luigi Ballabio. I wanted to understand the ...
1
vote
1answer
752 views

Monte-Carlo simulation Hull-White process

I have one question about Monte-Carlo simulation Hull-White process, maybe you can give me some advice. I constructed a Hull-White process using Python and QuantLib. Now I want to construct a Hull-...
2
votes
1answer
386 views

AUD Forward Rate Agreement and Forward Curve Bootstrapping

The pricing between an Australian Forward-Rate-Agreement is different compared to the US one. The question is whether this is somehow included already in the Quantlib? Also how does it compare to the ...
1
vote
1answer
1k views

Calculating Discount Margin on a floating rate bond using QuantLib

Going off Luigi's hint on this answer: Setting up Schedule for an amortizing floater in QuantLib I was able to cobble something together but I'm unable to verify if it's correct. TLDR: I was able to ...
2
votes
0answers
417 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 ...
5
votes
1answer
785 views

Set-Up OvernightIndex Quantlib

somehow I am struggling on my old question concerning set-up an Overnight index in QuantLib (see question: Old Question). What I don't understand is how can I set-up the ...
7
votes
2answers
805 views

Multithreading Monte-Carlo pricing in QuantLib for a single product

I've been actively using QuantLib for structured product pricing using Monte Carlo. Due to the fact that at a great deal of paths are often needed and one needs to speed up the calculation and all ...
5
votes
1answer
2k views

Issue Using QuantLib and Python to Calculate Price and Greeks for American Option With Discrete Dividends

I am having trouble using QuantLib with Python to calculate American options with discrete dividends. I am using Anaconda, Spyder, Python 3.6, and the most recent version of QuantLib. I created ...
6
votes
1answer
3k views

Use QuantLib Python to calculate yield curve par rates

I would want to use QuantLib Python to calculate par rates of a swap curve. The following code is what I've done so far: ...
1
vote
0answers
221 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
1answer
582 views

Quantlib: Getting error trying to price a Swap

I have bootstrapped my curve based on end-of-day data for 24th Nov, 2017 I am then using that to price a off-market swap as below: ...
6
votes
1answer
3k views

Use QuantLib Python to calculate Swap DV01

I would want to use QuantLib Python to calculate DV01 of an interest rate swap. Initially I was thinking of calculating the fixed leg DV01 and floating leg DV01 separately, then add both legs DV01 ...
0
votes
1answer
64 views

qlRateHelperEarliestDate and qlRateHelperLatestDate in QuantLib Python

I have been using Quantlib Addin, now I am looking for the equivalent function for QuantLib in Python: =qlRateHelperEarliestDate(RateHelper) and =qlRateHelperLatestDate(RateHelper) Or any ...
0
votes
1answer
221 views

qlYieldTSDiscount in QuantLib Python

I have been using Quantlib Addin, now I am looking for the equivalent function for QuantLib in Python: =qlYieldTSDiscount(EffectiveDate;DiscountCurve) Or any ...
7
votes
2answers
2k views

Use QuantLib Python to calculate roll-down of a swap

I would want to use QuantLib Python to calculate 6-month roll-down of a 5-year swap. I believe that the calculation I need to do is as follows: $Rolldown=r_{0,5Y}-r_{0,4.5Y}$ Where $r_{0,5Y}$ is ...
3
votes
1answer
292 views

Given QuantLib Python VanillaSwap object, how to get the iborIndex of the swap object?

I'm currently using QuantLib Python. Let's say that I've got a VanillaSwap object: import QuantLib as ql swap_obj = ql.VanillaSwap(... , iborIndex , ...) How can ...
0
votes
1answer
1k views

QuantLib Python price same swap on different evaluation dates

I want to use QuantLib Python to price a swap at 2 different evaluation dates during the life time of the swap. The following is what I've tried so far: ...
2
votes
1answer
302 views

TOIS (CHF), TONAR (JPY), AONIA(AUD) in Quantlib

I am looking for the TOIS, TONAR, AONIA in Quantlib for discounting. I only could find the EOINA, FEDFUNDS, SONIA etc.Do I miss something? In case they don't exist how can I use the corresponding rate ...