Questions tagged [quantlib]
Quantlib is an open-source C++ library for quantitative finance.
491
questions
1
vote
1
answer
1k
views
Why QuantLib assumes zero rates to discount factor is continuous?
https://github.com/lballabio/QuantLib/blob/0ec43027834220baf0a554d68de79a159a2c5489/ql/termstructures/yield/zeroyieldstructure.hpp
...
1
vote
1
answer
292
views
QuantLib: New Instrument derived from VanillaOption + PricingEngine that must work for both VanillaOption and the derived class
The derived class is a Vanilla Option on a Future and I need to specify the expiry of the underlying future which is in general different (later) than the expiry of the Vanilla Option. I have ...
1
vote
1
answer
105
views
AmericanOptionImpliedVolatility strange answers for calls IV's
My data provider includes the greeks. I tried to compute the IV's myself using RQuantLib and see if they match -- for Puts it's generally close, for Calls however certain values are way way off -- any ...
2
votes
1
answer
2k
views
AmericanOptionImpliedVolatility - root not bracketed issue in QuantLib/R
I'm trying to compute an implied volatility -- I am trying to match real data I see in Yahoo finance which shows an IV of about 27%. My call in 'R' for the same params returns a root not bracketed ...
2
votes
1
answer
454
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.
...
2
votes
1
answer
825
views
How to price touch options using quantlib?
I am new to quantlib and I want use it to to price a touch option (single/double).
I searched on google for example code but I could not find anything. Hence, I am ...
12
votes
4
answers
5k
views
Why does it take so many lines of code to price even the simplest of options with QuantLib
I have been looking at QuantLib I am trying to figure out why I need to write so much boilerplate code even when pricing the "simplest" of European Options using the analytical Black-Scholes formula (...
3
votes
1
answer
377
views
QuantLib C++: Monte Carlo Engine with SequenceStatistics
I'm trying to implement a Monte Carlo PricingEngine that stores multidimensional statistics.
I have done the following:
Defined a Monte Carlo Trait that among other things stores as the ...
5
votes
1
answer
499
views
QuantLib: Is the StochasticProcess class adapt for a HJM type of modelling?
I would like to use the following model in QuantLib:
$\frac{dF(t,T)}{F(t,T)} = \sigma_se^{-\beta(T-t)}dW_{t}^{1} + \sigma_L\left(1-e^{-\beta(T-t)}\right)dW_{t}^{2}$
This is a reformulation of the ...
1
vote
0
answers
290
views
RQuantLib FixedRateBondPriceByYield() Non-tradable error
How do I use FixedRateBondPriceByYield() function on maturity date that is earlier than today? I get "non tradable error" when applying on date older than today.
<...
2
votes
1
answer
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 :
...
0
votes
1
answer
236
views
Binary Option valuation problem in R using RQuantLib; also result validation aspect
When I am trying to value Binary Option using RQuantLib I am not getting all the greeks for exctype "american" wheras "european" exctype is fine. What is the problem here ?
...
2
votes
1
answer
785
views
CallableFloatingRateBond in QuantLib: just a matter of multiple inheritance?
I would like to know what are the issues related to a possible CallableFloatingRateBond class in QuantLib and to have some hints on implementation.
My (very ...
1
vote
0
answers
166
views
QuantLib C++: Friendship dilemma between derived class from PiecewiseYieldCurve and Bootstrap class
I derived a class template, OISCurve<Traits,Interpolator,Bootstrap>, from ...
3
votes
2
answers
2k
views
Why QuantLib computes the fixed-leg swap rate by this formula?
I'm trying to understand how QuantLib creates (bootstraps) a yield curve from a vanilla swap at the source level. I have the following test code:
...
1
vote
1
answer
339
views
Quantlib FRA with shifted start date
I'm new to quantlib. I am trying to construct a PiecewiseYieldCurve. I been looking at the implementation of FRA. It seems that the start date of the FRA must be an integer number of month from the ...
3
votes
1
answer
1k
views
Best way to do multithread Monte-Carlo in QuantLib
QuantLib has great facilities for Monte-Carlo pricing engines, classes McSimulation and MonteCarloModel do a lot of work. But they do it in a single thread. What is best way to introduce parallel run ...
2
votes
2
answers
4k
views
Bootstrap yield curve with QLNet / Quantlib
I am trying to grasp QLNet (C# version of Quantlib, all the functions of Quantlib have the same name and work the same way, so if you just know Quantlib, you can still help me), especially for pricing ...
4
votes
1
answer
873
views
Black model: Delta - strike relationship regardless of expiry?
While wandering through some QuantLib experimental classes for FX trading, I've found this Black Delta Calculator.
By reading its .cpp, it seems that no use of ...
1
vote
1
answer
1k
views
novice question on fixed coupon schedule in QuantLib
For some bonds I work with the last coupon date is not equal to bond's maturity date. E.g. the last coupon date is April 25th, 2020 and maturity date is April 25th, 2021. I looked at Schedule class ...
3
votes
0
answers
132
views
How do I specify Thirty360::European day counter in RQuantLib
I am taking liberty to ask the following question in quantLib forum though this question is about RQuantLib
I am trying to use RQuantLib to calculate clean price of a fixed coupon bond using a Nelson-...
6
votes
1
answer
238
views
BlackProcess' constructor $x_{0}$ argument in QuantLib
I am currently using BlackProcess to price options and I have a doubt related to the $x_{0}$ argument of the constructor: I've figured out it should be the forward ...
9
votes
1
answer
815
views
QuantLib and exact numerical simulation
I've just downloaded quantlib and started playing around with it, and it looks like it's designed primarily to use Euler discretizations for everything -- so far as I can tell, there's not even a ...
7
votes
3
answers
4k
views
VaR implementation using quantlib?
I am thinking of writing a VaR framework for my existing system, using quantlib to do the bulk of the calculations.
Despite several searches, I have not as yet come across a quantlib VaR ...
9
votes
2
answers
6k
views
using quantlib function in my c++ program
I want to include the QuantLib function for option greeks calculations in my own C++ code.
My question is: can I just include those functions? I don't want to use the rest of their stuff.
I obviously ...
2
votes
1
answer
491
views
QuantLibXL - Optionlet bootstrapping failure
I am trying to bootstrap the Optionlet volatility surface from a Cap/Floor volatility surface using QuantLibXL. To be specific, the data is from ICAP:
...
6
votes
1
answer
378
views
Pricing a bond with variable strike collar with QuantLibXL
I am trying to price a floating rate bond with a capped and floored interest rate.
The strikes of the caps and floors vary, but are known in advance.
I am trying to do this with QuantLibXL, but I am ...
4
votes
1
answer
2k
views
How to manage evaluation date changes in QuantLib while using ImpliedTermStructure Class
I will not attach the whole code 'cause it would be just a huge waste of space and it would be not useful for this question's purpose.
What I am going to attach here is a snippet code and its output, ...
3
votes
1
answer
2k
views
How to sum interest rate curves in QuantLib
C++ code taken from Bonds.cpp and slightly amended:
...
6
votes
1
answer
2k
views
Pricing Fixed-To-Floater bond in QuantLib
Wandering through QuantLib's Financial instruments documentation, I noticed no class for fixed-to-floater bonds exist.
Then I was wondering what a suitable way to price such an instrument would be ...
2
votes
1
answer
2k
views
Automatic fixing of missing floating rate in QuantLib's addFixing()
Due to the periodic fixing of floating rate bonds's coupon rates, in order to calculate the bond clean price one must tell the pricing engine to account for previous LIBOR rate fixing.
If I am right (...
1
vote
1
answer
956
views
Definition of "tenor" argument in QuantLib's Schedule class object
In QuantLib an object of class Schedule takes const Period &tenor as argument.
I would ...
4
votes
1
answer
2k
views
How to price a bond at specified dates in QuantLib
I am wondering what's the most efficient way (i.e. the method which involves the fewest arguments) to price a bond at a specified date, e.g. a future date (as instance, 6 months from now) in QuantLib. ...
3
votes
1
answer
2k
views
QuantLib error with qlPiecewiseYieldCurveData() on qlPiecewiseYieldCurve() with ZeroYield and ForwardRate
I'm using QuantLibXL to build a discount curve, a zero yield curve and a forward curve of the EURIBOR rate (QuantLibXL is downloadable here).
I've built an object of class ...
7
votes
1
answer
938
views
Definition of gearings, spreads and curve in RQuantLib's Floating Rate Bond function
Consider the RQuantLib package function FloatingRateBond().
This takes as inputs gearings ...
4
votes
0
answers
293
views
RQuantLib: any difference between FixedRateBond() and FixedRateBondPriceByYield() with flat term structure?
Please, consider the following functions from RQuantLib package:
FixedRateBond()
...
4
votes
1
answer
665
views
Interpreting QuantLlib implied volatility numbers
I am using QuantLib to calculate implied volatilities.
I am trying to understand the calculated figures (especially, when compared to historical volatility). The calculated implied volatility numbers ...
26
votes
4
answers
5k
views
QuantLib in industry
How much is QuantLib used in industry and how much street cred does it have?
3
votes
1
answer
2k
views
Quantlib in JavaScript? [closed]
Is there such a thing? Or is there a project around that aims to realize Quantlib in JS? I'm a JS coder and I'd like to get involved if so.
Maybe it seems futile or insane today, but who can doubt ...
16
votes
1
answer
2k
views
Is QuantLib more trouble than it's worth?
I'm just starting to work with QuantLib and wonder if I'm going down a very wrong path.
I'm working on a site that presents the visitor with a table of streamed real-time options data, including ...
11
votes
1
answer
4k
views
How to calculate the local volatility surface using QuantLib?
I'd like to calculate the local volatility surface for a series of option strikes, similar to the surface described in this paper:
http://www.ederman.com/new/docs/gs-local_volatility_surface.pdf
...