

Options Pricing in Excel with QuantLib - karamazov
https://datanitro.com/blog/2012/08/13/QuantLib/

======
photon137
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.

~~~
karamazov
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.

~~~
photon137
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.

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

~~~
photon137
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>)

~~~
mathewrphillips
Nice! Thanks man.

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

------
zaidmo
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?

~~~
photon137
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.

~~~
zaidmo
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

------
Mythbusters
Neat. You should make it an app using the new 2013 excel applications
[http://msdn.microsoft.com/en-
us/library/office/apps/fp142161...](http://msdn.microsoft.com/en-
us/library/office/apps/fp142161\(v=office.15\))

------
hogu
honest question - does anyone use quantlib in production?

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

------
porter
who would need to use QuantLib in Excel?

~~~
yeureka
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.

~~~
jwilliams
+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).

~~~
svdad
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.

------
chermanowicz
this is pretty neat, thanks for sharing

