Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [quantlib]

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

0
votes
0answers
6 views

Calculating QuantLib IborCoupon with / from given index fixing

How can I calc with QuantLib the coupon amount of a floating rate IborCoupon on the 3M Euribor Index with a given 3M Euribor Index Fixing? If I try the following Python code: ...
0
votes
0answers
19 views

QuantLib - Discreet Dividend Binomial Two Rate Option Implementation

Can anyone point me in the direction of an implementation example in python of a two rate, discreet dividend binomial option model?
1
vote
0answers
74 views

Using QuantLib Python to value FX options using stochastic volatility

I would like to use QuantLib (and in particular the python wrapper) to value FX option using the Heston model. Thanks to http://gouthamanbalaraman.com and all of the articles therein : in particular ...
0
votes
1answer
117 views

Basic fixed rate bond pricing issue in Quantlib

I'm trying to price a fixed rate bond in Quantlib but the result comes out wrong. I'm trying to price 1Y fixed rate bond: ...
1
vote
0answers
63 views

Mixed local-stochastic volatility model in Quantlib

At a conference the speaker mentioned that it is a standard approach today to use a mix of local and stochastic volatility model in equity, FX and interest rates. Can you please suggest the most ...
0
votes
0answers
28 views

QuantLib FuturesRateHelper how do I input Future type = 'ASX', the 'IMM' date check is causing Runtime Error

How do I input Future type = 'ASX', the 'IMM' date check is causing Runtime Error future_maturities 1 2019-06-14 2 2019-09-13 3 2019-12-13 4 2020-03-13 5 2020-06-12 6 2020-09-11 ...
3
votes
1answer
61 views

forward + displacement

I I am trying to price a cap/floor using Quantlib in Python. the initial code from from this website: http://gouthamanbalaraman.com/blog/interest-rate-cap-floor-valuation-quantlib-python.html Here is ...
1
vote
0answers
48 views

Error in QuantLib-Python when I use function “Bond”

I am using the "Bond" function in QuantLib-Python 1.14. I am planning to use it in this way: ...
1
vote
0answers
47 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 ...
2
votes
1answer
54 views

QuantLib CDS pricing error: negative time given

I am new to QuantLib, and I am using it to price CDS. Following is my python code: ...
2
votes
0answers
36 views

SquareRootProcess in QuantLib - Python

I would like to price an American put option using the SquareRootProcess class in QuantLib - Python but it seems that it does not exist. As the underlying follows the following model : $$\rm{d}S_t=...
3
votes
1answer
56 views

Why Quantlib Option NPV does not change when repricing?

Trying to learn Quantlib with Python, please have a look at below code: ...
2
votes
0answers
51 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
0answers
69 views

How to price equity options using a Black76 implied volatility surface?

I would like to calculate the fair value of american and european options on various equities and indices using QuantLib C++. Since I do have discrete dividends available for most underlyings, I use <...
3
votes
1answer
107 views

QuantLib: BondFunctions.zSpread does not match clean price “exactly”

I am using QuantLib to compute prices of fixed rate bonds in different scenarios. In the first step I would like to replicate the current market price by adjusting the yield curve with the zspread. ...
2
votes
1answer
79 views

TermStructure/Evaluation Dates in Quantlib

i'm puzzled by the way Quantlib handles the evaluation date in the yield term structure classes. I have the following code as example: ...
-1
votes
1answer
225 views

How to use QuantLib in C# easily?

I am not good at environment setting. Sometimes I use QuantLib in Python. Now I am wondering if there is a instruction on how to use QuantLib in C#. I looked at the QuantLib web page, but there is not ...
0
votes
1answer
149 views

Structured Payoff Scripting in QuantLib

I'm trying to price a snowball payoff in quantlib and would like to create a payoff like: $$Coupon = PreviousCoupon + FloorPayoff$$ Would the payoff class be able to reference the previous coupon? ...
0
votes
1answer
60 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
106 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 ...
1
vote
0answers
199 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 ...
3
votes
1answer
264 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
144 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 : <...
5
votes
1answer
166 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 ...
0
votes
0answers
34 views

Understanding QuantLib qlYieldTSForwardRate

I'm trying to understand the QuantLibXL function qlYieldTSForwardRate() but the QuantLib manual is not of much help so I'm hoping to find answers here. I think I ...
0
votes
0answers
35 views

How can I use advance(startDate,…) or another RQuantLib function to invert yearFraction(startDate, endDate, …)?

I am using RQuantLib. I would like to convert back and forth (accurately) between a future date and a year fraction from a reference date. But I have been unable to convert reliably between the output ...
1
vote
2answers
154 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
304 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
141 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. ...
2
votes
1answer
156 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 ...
2
votes
1answer
111 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
361 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 ...
0
votes
0answers
222 views

Heston Wrapper for QuantLib

As a follow up to my question here, I have written a (hopefully) easy to use Python 3 Wrapper around the excellent QuantLib library. My wrapper abstracts away all the QuantLib machinery under the hood ...
2
votes
1answer
116 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
412 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
68 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
154 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
80 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
104 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
70 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, <...
0
votes
0answers
286 views

Issue with DV01 for Vanilla IRS

I am trying to calculate DV01 of an Interest Rate Swap using methodology given in Use QuantLib Python to calculate Swap DV01 but getting some strange results. Issue 1: DV01 coming out using ...
1
vote
1answer
200 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
106 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
1answer
176 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
111 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
227 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
113 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
158 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
193 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
739 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 ...