# Questions tagged [quantlib]

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

447 questions
Filter by
Sorted by
Tagged with
962 views

### How to use both yield curve and discount curve to value call in QuantLib

I'm new to QuantLib, and I'm trying value a simple European call. QuantLib's Black-Scholes-Merton Process makes sense to me, but I don't know how to incorporate a discount curve into it. Please see ...
• 123
1k views

### Using the binomial-tree approach to price an option in quantlib - with time expressed as a fraction of year

For learning purpose, I'm trying to price, with quantlib, an European option using the Cox-Ross-Rubinstein tree approach. Some examples are provided in the file ...
• 2,542
2k views

### Quantlib with python on mac?

Is there anyone who knows a good guide to get quantlib working for python om mac? I have tried to search online and have not found any good guidance. I need to use quantlib for a project on python. ...
• 427
2k views

### Quantlib bootstraping fails on 5y swap

I'm trying to build a euro swap curve with real up to date data. I should say that examples provided in github work fine. as soon as I add the 5y swap, I got the following error : ...
• 205
159 views

### Optimize interest rate swap calculations in Monte Carlo Simulation

I’m running a simulation in which I want to calculate the NPV of 100 swaps over 1000 (or even much more) different interest rate curves. It looks like Quantlib is not really fast in performing these ...
• 325
521 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 ...
• 51
142 views

### Excel PasteSpecial Values shortcut button causing QuantLib to crash

I am experiencing a strange issue with QuantLibXL when I use the quick-access PasteOptions/Values button on the Excel right-click toolbar (apologies for the picture: it is surprisingly hard to capture ...
• 223
735 views

### Forward bond yield with QuantLib

I'm looking into way to calculate forward bond yield using QuantLib. In Python QuantLib book I see an example for bond futures, where ...
• 149
224 views

• 21
2k 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 ...
• 342
282 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 ...
• 153
980 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 ...
• 107
2k views

### Calculating market value of a vanilla swap at a later date in QuantLib

I am following the cookbook example for pricing a Vanilla Swap in QuantLib Python, given here. Now let's assume that a week passed, and we are trying to calculate the mark to market value of the ...
428 views

### Debugging Quantlib

I am trying to understand Quantlib's finite-difference pricer using Eclipse with GDB debugger. The code shown below prices an American put option using the Crank-Nicholson finite-difference scheme. ...
• 203
101 views

### Quantlib vol surface issue 'the black vol surface is not smooth enough'

I create a vol surface from the market and do smoothing(interpolation and extrapolation), and explicitly correct for any total variance decreasing on a given strike as we increase maturity. I create a ...
• 21