Stack Exchange Network

Stack Exchange network consists of 174 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
29 views

How do I derive the historical bond price series from FRED yields using QuantLib Python?

I'm interested in using QuantLib Python to derive daily historical price series from the following yield series: 3-Month Treasury Bill (https://fred.stlouisfed.org/series/DTB3) 10-Year Treasury ...
0
votes
0answers
32 views

Bootstrap Survival Curve using ISDA Conventions Python QuantLib

Is there currently any way to bootstrap the survival probability curve given a term structure of credit spreads using the ISDA CDS Standard Model conventions? I see that this has been done with the ...
0
votes
0answers
34 views

QuantLib-Swig Python ISDA CDS Model

I saw that a new swig has been added to the QuantLib with a link to the ISDA CDS engine. Has someone tested it and can confirm that it agrees with Bloomberg. https://github.com/lballabio/QuantLib-...
0
votes
0answers
40 views

Calibrating from swaption straddle price quotes in QuantLib

I'm calibrating a short-rate model in QuantLib, and need to work with ATM swaption straddle price quotes. From reading Luigi Ballabio's highly instructive and entertaining Implementing QuantLib I ...
0
votes
0answers
30 views

How to understand ZeroSpreadedTermStructure influenced by compounding & compounding frequency?

Long story short: I used two ways to price a floating rate bond, which I expected to get the same result, but not actually. ...
-1
votes
1answer
66 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
83 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
33 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 ...
0
votes
1answer
47 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 ...
0
votes
0answers
85 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
110 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
99 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 : <...
0
votes
0answers
43 views

G++ calibration and simulation

I am trying to calibrate and run a monte carlo simulation using the Gaussian 2 Factor in Quantlib Python. However, I am getting the error message as follows: ...
5
votes
1answer
116 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
128 views

Quantlib Python: Issue withg Heston MC Paths generation

I am trying to price a corridor Variance Swap with Heston. I am generating paths with the following code, however I get weird results of the MC simulation. Any idea why ? ...
0
votes
0answers
46 views

Quantlib : How to get fixed leg NPV?

for my project using Quantlib 1.13 C++, I have to create a swap by creating each leg separately. So for instance in the case of a Vanilla swap, I have a Leg corresponding to a vector of ...
0
votes
0answers
27 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
27 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
82 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
190 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
67 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. ...
1
vote
1answer
82 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
72 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
199 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
98 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
82 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
206 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
63 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
113 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
58 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
82 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
48 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
195 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
120 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
78 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
133 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
92 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
135 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
91 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
102 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 ...
0
votes
0answers
85 views

How to calculate bond equivalent Yield of treasury strips using Quantlib?

I'm trying to calculate the bond equivalent yield of a zero coupon treasury strip with a quoted yield of 2.4162%. I've tried the following code and get 2.4424% but Bloomberg is reporting a Treasury ...
1
vote
0answers
128 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
467 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 ...
2
votes
1answer
236 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
230 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 ...
1
vote
1answer
508 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
385 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 ...
0
votes
0answers
187 views

calculating greeks using binomial tree c++ quantlib

I am trying to calculate greeks using binomial tree in quantlib with c++. I had errors that I don't know the origin of the problem. ...
1
vote
1answer
223 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
299 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-...