Forums  > Risk Management  > Quantlib and ORE in Risk Management  
     
Page 1 of 1
Display using:  

Mitor


Total Posts: 2
Joined: Apr 2017
 
Posted: 2017-05-05 05:44
Hi
Has anyone built a risk management framework using Quantlib as the pricing library? Difficulties?
what do you think about http://opensourcerisk.org?

finanzmaster


Total Posts: 125
Joined: Feb 2011
 
Posted: 2017-06-07 15:35
I did (together with R) and even put a couple of things online

https://letyourmoneygrow.com/2017/04/29/option-calculator-estimate-future-value-option/

https://letyourmoneygrow.com/2017/06/04/gas-storage-fair-price-online-calculator/


www.yetanotherquant.com - Knowledge rather than Hope: A Book for Retail Investors and Mathematical Finance Students

finanzmaster


Total Posts: 125
Joined: Feb 2011
 
Posted: 2017-06-07 15:38
The general difficulty with QuantLib is that it a powerful gun, heavy enough to shoot your own foot.
But my getting started with QuantLib notes may help.

As to ORE, I didn't use it yet but I know personally the people who develop it, they are good :)

www.yetanotherquant.com - Knowledge rather than Hope: A Book for Retail Investors and Mathematical Finance Students

elektor


Total Posts: 5
Joined: Feb 2010
 
Posted: 2017-06-07 16:05
@finanzmaster

Nice. Did you rebuild Quantilib to work in R or use the RQuantlib library?
Also is the webpage working off R in the background?

finanzmaster


Total Posts: 125
Joined: Feb 2011
 
Posted: 2017-06-07 19:34
@elektor
Both. If possible, I use RQuantLib, which, however, implements a very limited subset of QuantLib features.
Otherwise I call Rscript from PHP and Rscript, in turn, calls a quantlib-based executable, e.g.
res = system("/path/to/KnockOut 0 95 90 100 0.5 0.25 0.08 0.04", intern=TRUE)

I host
letYourMoneyGrow.com on DigitalOcean, so I have a virtual server in cloud and can install whatever I want.

Installation of R is straightforward (however, there are nuances by calling R-scripts from PHP)

And here I explain how to install (the latest version of) RQauntLib on Ubuntu.

www.yetanotherquant.com - Knowledge rather than Hope: A Book for Retail Investors and Mathematical Finance Students

elektor


Total Posts: 5
Joined: Feb 2010
 
Posted: 2017-06-08 12:57
Cool. Will need to go thru your links.

mtsm


Total Posts: 195
Joined: Dec 2010
 
Posted: 2017-06-08 15:11
One of the major problems with quantlib is that it hasn't really been submitted to any really significant bullsh!t filter in practice. As such I don't think it's that solid and I would not trust it upfront.

It being open source and/or somewhat engineered is of exactly 0 value in this business. I have looked at some of the more basic fixed income bits and pieces of it, curves to be precise and it's not exactly cutting edge, tested and trusted. A quantlib curve just isn't the same as a curve in a proprietary library being looked by a market maker all day long.

I am just saying. It obviously depends on your specific application and for a risk management framework it might just be sufficient. I find it somewhat dubious that people don't even seem to question or know this. Quantlib appears to be some kind of de facto standard nowadays.

elektor


Total Posts: 5
Joined: Feb 2010
 
Posted: 2017-06-08 16:44
I for one am only looking from the risk side especially the margin modeling and netting from ORE.

I have not seriously looked into Quantlib but are you saying that basic curve building is not accurate? i.e. using depo, Futures/FRA, and swap curve rates?

finanzmaster


Total Posts: 125
Joined: Feb 2011
 
Posted: 2017-06-11 11:28
@mtsm, could you be more specific on curve inaccuracy in QuantLib?

I worked in fixed income domain for two years and I would say QuantLib yield curve fitting is quite accurately implemented. And the peculiars of bonds (settlement days, scheduling, day count convention, business day conventions) too.
The problems are, however:
1. By such a big realm of parameters you should choose very carefully and know the market conventions exactly. E.g. messing with day counting (say, choosing 30/360 instead of ACT/ACT) will significantly distort the bond yields.
2. By current weird fixed income market (partially negative rates, huge volatility) it is hard to fit a smooth yield curve.

And of course nothing is perfect, neither QuantLib.
But contrary to proprietary systems you can check and debug the business logic in QuantLib. And BTW, I know firsthand that one popular proprietary system has, well, intensively borrowed code from QuantLib, at least at the early stage.

www.yetanotherquant.com - Knowledge rather than Hope: A Book for Retail Investors and Mathematical Finance Students
Previous Thread :: Next Thread 
Page 1 of 1