Forums  > Software  > quant library?  
     
Page 1 of 1
Display using:  

Strange


Total Posts: 1436
Joined: Jun 2004
 
Posted: 2018-05-27 18:42
I think I have discussed this before but I can't find the thread. I am running a run of the mill relative value book, so my modeling needs are pretty modest:

(1) Fixed income models. I don't really do anything fancy in that space, but I do want a reasonable swap curve and a pricer for swaptions and bond futures options.
(2) Volatility products - vol surface fitters/interpolators, obviously vanillas (both European and American, with a discrete dividend model), variance swaps, maybe some simple "exotics" like vol swaps and corridor var. Barriers would be nice, but not really required.

So given the above, I think there are 3 choices:

(a) go commercial (fincad, numerix etc)
(b) go open source (I think quantlib is the only option there)
(c) roll my own (considering that my universe is reasonably small)

There are drawbacks to each choice.

Going commercial is pretty expensive for the value added - I called the usual suspects and they all seem to want a 100k for a license. Also, commercial library is pretty opaque and if there is an issue you have to wait for a patch.

Open source is obviously free and I can hack the fixes on my own, however I don't seem to be able to figure out what the f*ck is going on in that library. I get a general sense that to fully understand what's going on there you need to really invest time into it.

Rolling my own is fairly easy as it allows to hack models as I need them, but it's possible to introduce errors and, in any case, I am not a true quant so i'd have to outsource it somehow.

I don't interest myself in 'why?'. I think more often in terms of 'when?'...sometimes 'where?'. And always how much?'

ronin


Total Posts: 339
Joined: May 2006
 
Posted: 2018-06-04 12:17
I don't think commercial will let you off the hook. There is still a significant investment of time and effort with any commercial library.

Unless you pay the sellers to set it all up to do what you want, but that is even more expensive.

But generally, lots of what is going on in these libraries is just plumbing. There are many, many layers between the inputs and the calculators. The idea is to keep the library robust and generic so various people can add features without breaking anything.

You, on the other hand, really only have to understand the calculators. Plumbing is plumbing - it's only of interest if you are a plumber.


"There is a SIX am?" -- Arthur

Strange


Total Posts: 1436
Joined: Jun 2004
 
Posted: 2018-06-04 19:00
So your suggestion is to go with Quantlib, I take it? My sense is that it’s cheaper to go that way and have a consultant set things up for me than go commercial. There is also an added benefit of the library being well known by FE students for that , right?

I don't interest myself in 'why?'. I think more often in terms of 'when?'...sometimes 'where?'. And always how much?'

Strange


Total Posts: 1436
Joined: Jun 2004
 
Posted: 2018-06-04 19:00
So your suggestion is to go with Quantlib, I take it? My sense is that it’s cheaper to go that way and have a consultant set things up for me than go commercial. There is also an added benefit of the library being well known by FE students for that , right?

I don't interest myself in 'why?'. I think more often in terms of 'when?'...sometimes 'where?'. And always how much?'

Strange


Total Posts: 1436
Joined: Jun 2004
 
Posted: 2018-06-04 19:00
So your suggestion is to go with Quantlib, I take it? My sense is that it’s cheaper to go that way and have a consultant set things up for me than go commercial. There is also an added benefit of the library being well known by FE students for that , right?

I don't interest myself in 'why?'. I think more often in terms of 'when?'...sometimes 'where?'. And always how much?'

ronin


Total Posts: 339
Joined: May 2006
 
Posted: 2018-06-05 11:07
I think so.

Quantlib + consultant will be a small fraction of what you pay for commercial with a custom build.

I actually went through this a few years ago. I taught myself enough quantlib to set it up to price a book of vanilla swaps and swaptions in excel. It only took about a week, and I started with zero experience with quantlib. And yes - it is all open source, so if anything goes wrong, you can dig in.

One thing I remember that Quantlib was bad for was any form of backtesting. You can't do things like "for each date in this list, create an instance of market data" - it is more like "today's date is xxx, this is the market data".

But if you don't need backtesting, Quantlib it is.

"There is a SIX am?" -- Arthur

deeds


Total Posts: 403
Joined: Dec 2008
 
Posted: 2018-06-05 13:23
@ronin

Difficulties with backtesting seems a significant limitation.

Do you need backtesting in your work? If so, what do you do?

thanks

Strange


Total Posts: 1436
Joined: Jun 2004
 
Posted: 2018-06-05 13:51
How good are the models for light exotics like barriers, no-touches etc?

I don't interest myself in 'why?'. I think more often in terms of 'when?'...sometimes 'where?'. And always how much?'

ronin


Total Posts: 339
Joined: May 2006
 
Posted: 2018-06-05 14:48
Ouch - didn't mean to sound like a reference source on Quantlib. I only used it briefly a few years ago.

> How good are the models for light exotics like barriers, no-touches etc?

There is a Monte Carlo double barrier engine which takes a process with time and strike dependent drift and diffusion, and you should be able to calibrate it to vanillas without significant problems. There is also a Heston finite difference double barrier engine. Both pricers work fine, but I haven't done any sort of extensive testing. There is also a bunch of analytical formulas, but analytical formulas are problematic for barriers so I wouldn't go there.

> Do you need backtesting in your work? If so, what do you do?

Well, my day job these days is quant trading equities and futures, with occasional fx and listed options. So I do a plenty of backtesting. I don't use Quantlib for any of that.

This was more about helping somebody out while keeping in touch with my previous life in exotics - it wasn't a serious job.

"There is a SIX am?" -- Arthur

finanzmaster


Total Posts: 158
Joined: Feb 2011
 
Posted: 2018-06-10 16:03
How about combining (c) and (b): roll your own but cross check with QuantLib?

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

finanzmaster


Total Posts: 158
Joined: Feb 2011
 
Posted: 2018-06-10 16:03
Apropos, QuantLib is also available as a SWIG port to Python, which makes testing/prototyping much faster

Debugging of the C++ might though be tricky but is also possible:
https://letyourmoneygrow.com/2018/06/10/quantlib-python-debugging-c-side-with-visual-studio-and-pycharm-a-dirty-way/

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

c10


Total Posts: 10
Joined: Jul 2015
 
Posted: 2018-06-13 19:52
@Strange -- For your situation, I’d argue there is a perfect solution to the main problems you mention (cash dividend modeling, vol surface fitting, vol derivatives):

https://www.voladynamics.com/what.html

For (1) you can presumably use QuantLib, but for the issues above it does not have practical solutions.

The Vola Dynamics analytics is super fast and robust, and very easy to integrate into your infrastructure. It has been battle-tested by clients through Brexit, the US and french elections and the recent volmageddon. It is used by prop shops and hedge funds like Capstone Investment Advisors. We guarantee a fast response to any issues (but the library is, as mentioned, very much battle-tested; you will most likely find no issues at all).

Feel free to contact us for a chat: infoVolaDynamicscom


Strange


Total Posts: 1436
Joined: Jun 2004
 
Posted: 2018-06-13 22:56
Took a quick look. It looks interesting, but I feel it is more geared toward higher frequency MM than a volarb book. Might be worth a trial, though.

I don't interest myself in 'why?'. I think more often in terms of 'when?'...sometimes 'where?'. And always how much?'

c10


Total Posts: 10
Joined: Jul 2015
 
Posted: 2018-06-14 05:19
We have clients in both categories using our library. The reason it is useful for all players in the options trading eco system, we believe, is because of (a) the intuitive nature of our vol curve parametrizations and (b) that there is a super robust and fast volsurface auto-fitter.

The vol curve parameters are comparable across terms, names, different historical periods, etc, and make it easy to do signal research for relative value trades.

Please contact us about a trial.

mtsm


Total Posts: 217
Joined: Dec 2010
 
Posted: 2018-07-10 21:42
Can I just chime in here?

I am looking for recommendations/pointers to commercial quant analytics libraries. It is mostly for use with fixed income products, mostly linear, maybe some non-exotic options.

It should have very good curve building capabilities, possibly state of the art.

It needs to have an API.

Any ideas?

Thanks,
m

ronin


Total Posts: 339
Joined: May 2006
 
Posted: 2018-07-11 16:22

Any of them. Including Quantlib.

In all seriousness, they are pretty much the same on the basic level. When you dig deeper, you start finding holes in every one of them.

"There is a SIX am?" -- Arthur

mtsm


Total Posts: 217
Joined: Dec 2010
 
Posted: 2018-07-17 03:59
Yes, I am considering all of them including quantlib.

As you say, most of them are ok-ish for a buy-side place with holes here and there, I am aware of this.

But right now I need to know which one if any has some high quality components, competitive with dealer analytics. Specifically, right now I need to know which one has a high quality curve.

ronin


Total Posts: 339
Joined: May 2006
 
Posted: 2018-07-17 10:02
It's been a few years since I last looked, and things may have changed.

Last time I looked, they all gave you all the tools to build high quality curves, but you had to build the curves yourself.


"There is a SIX am?" -- Arthur

mtsm


Total Posts: 217
Joined: Dec 2010
 
Posted: 2018-07-18 03:24
Nonsense, I know enough about select libraries to say that they are not at all at the same level. Moreover curve building standards have kept changing continuously over time and a lot of these products have struggled keeping up with the street.

vqwerty


Total Posts: 11
Joined: Feb 2014
 
Posted: 2018-07-23 05:30
Any decent open source or commercial libraries that include OTC FX options?
I'd appreciate any recommendation.

I'll need backtesting sooner or later.

mtsm


Total Posts: 217
Joined: Dec 2010
 
Posted: 2018-07-26 05:03
What kind of FXOs? Exotics?

Backtesting, I would consider as an extra level of complexity on top of core analytics. Just like risk or pnl explain. Don't expect to find this all in one, I would say.

On QuantLib, I have had the chance to look a bit at it. Mostly for linear rates. I am little uncomfortable criticizing it, but since I feel that my comments might be useful, I'll shoot. First of all, many thanks to the many people having contributed to this over the years. It's decently packaged and buildable without too much problems. Now the bad part is that it's comes nowhere near what you get in a Tier 1 IB, a good buy side shop or a commercial library. It's really quite limited. The curves tech isn't really modern enough to accommodate most needs. No multiple curves fitting, only sequential iteratiive bootstrap, limited fitting instrument availability. That's a problem for G2 curves I think, where you really do need more flexibility. Initially I thought that this would be a minor limitation as using the library as a container to hold extensions would be an option. But now that I have seen the cpp, I am not sure that even that would be a good idea. It's a bit overengineered in my opinion, lacking a certain pragmatism and there are some silly features such as an attempt to incorporate some dependency graph features based on the Handle class. I shudder to think having to deal with that sort of construct when having to deal with my own modifications. I still find it useful for some fairly elementary calculation related to date arithmetic or schedule setup, but that's about it I feel. Might leverage some of the elementary option calculators later on, too.
Previous Thread :: Next Thread 
Page 1 of 1