Hacker News new | past | comments | ask | show | jobs | submit login
Options Pricing in Excel with QuantLib (datanitro.com)
73 points by karamazov on Aug 13, 2012 | hide | past | favorite | 22 comments



This reminds me that compiling QuantLib is such a pain in the ass. I love QuantLib though - I use it via C# and there is an Excel plugin already available in the source code.

As regards your example:

(a) single-name options usually have an American exercise-type.

(b) the main difficulty (and the thing one would actually pay for) is getting and maintaining a vol-surface for pricing these things - using flat vol to price this is quite inaccurate and risky.


I've played around with QuantLib's Excel plugin, and I don't find it easy to use - the hybrid system they set up to merge Excel with the C++ structure of QuantLib is unintuitive. I've had better luck just pulling the functions into Python and going from there.


I agree. It's quite messy. That's why I use the C# swig bindings instead and if I had to use Excel as a UI, I'd build my own plugins in C# rather than use the ones they provide - in a similar fashion as you've done with Python.


I had a hard time getting the swig bindings to work for me. Would you be willing to make a nuget package of that?


Well, it requires an unmanaged dll (NQuantLibc) to be compiled which would be pinvoked by the managed bindings dll (NQuantLib). The unmanaged dll will not be platform independent (I don't know if you'd be using x86/x64). It also needs to be copied over to the same directory in which your output binaries would reside.

Anyways, I've uploaded an x86 version:

PM> Install-Package NQuantLib (https://www.nuget.org/packages/NQuantLib)


Nice! Thanks man.


You're welcome (I'm pretty sure I've set some sort of a bad precedent here :) )


Perhaps someone can help me with a related capability. I am looking for a tool to administer and query the price of structured products (options, securities, indices, etc)

On the administration side: Manage which clients, have been sold which products, value of the product (notional/sold value) and maturity date. On the valuation side: link to treasury and banking systems, and various price feeds to determine current value of structured product.

Is there anything off-the shelf that any of you are aware off?


How advanced and how expensive?

Numerix (http://www.numerix.com/products-and-services) is one. I've used them before at my previous job to handle client portfolios.

In general you'd need to have separate licenses with the feed providers (Reuters/Markit/Bloomberg etc) and those are quite expensive.


Thanks for the referral. I'll have a look at the website. Our business does sell and manage some complex products - most of it is managed out of Excel. I was told to treat this as a low priority (I have a list of solutions I need to get them), so I'm not sure what their budget is. However, if I believe their is a business case for them to adopt a new solution, the door is open for me to make a recommendation


Neat. You should make it an app using the new 2013 excel applications http://msdn.microsoft.com/en-us/library/office/apps/fp142161...


honest question - does anyone use quantlib in production?


We use it pretty heavily for calculating implied vol and for delta calculations.


"What seems to be standard practice is to use quantlib as a module which is used as part of an in-house module. Usually to make third party software work with internal systems takes a lot of masking tape and sledge hammers." - twofish, on the Wilmott forum, 2005


who would need to use QuantLib in Excel?


Excel is used quite a lot in the finance sector.

I my previous job I had to write a plugin to allow traders to do some simple algo trading in Excel.

Oh, and once you are forced to work in VBA all other languages seem amazing.


+1

I worked for a long time in Finance & Market Data - in Europe (UK/CH mostly). Most people would be surprised how much of it runs of Excel.

Particularly Fixed Income - a lot of the sophisticated instruments will be priced straight off Excel spreadsheets (so you use Excel to publish data, not just analyse it).


In fact, most people outside finance would be surprised at how much sophisticated analysis and interactivity you can build in Excel. Once you start digging under the hood it's a powerful platform. The only addition you need is a pricing feed e.g. Bloomberg.


I'd like to ask you a few questions about your finance experience - could you contact me? ben@datanitro.com


If you've got any questions, feel free to drop me an e-mail as well - it's in my profile.


We do alot of what-if calculations usign quantlib and excel.

It's great because it allows the traders to use the excel macro language and vba to try out new models.

If something looks promising then we can break out C++ and R to do more indepth analysis.

Heck we have a plugin that allows traders to do straight DMA trading out of excel. You can run an entire hedge fund on excel.


this is pretty neat, thanks for sharing




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: