Discussion:
[Quantlib-users] Vanilla American Option Pricing
Sachin Kumar
2013-08-07 15:05:16 UTC
Permalink
Greetings,

Like others here, I'm new to QuantLib. I'm interested in implementing a
vanilla american option pricing methodology with QuantLib.

The option will be an OCC listed option, overlying a large company like IBM
(may or may not pay discrete dividends, but will not have a continuous
dividend yield).

I've reviewed the example found in EquityOption.cpp. Unfortunately, this
departs from what I need in the following ways:

1. Assumption of a constant black-scholes volatility term-structure. I
understand that using a LocalVolCurve term-structure might be what I'm
looking for here, but I'm not sure.

2. Related to (1) is how one goes about implementing their own implied
volatility calculation given market data.

3. Time to maturity resolution. I've read on other posts that QuantLib
currently doesn't support intraday time, i.e. time to maturity that's less
than 1 day. Given that I require this, I suspect I may need to create my
own class hierarchy that mirrors the 1-day resolution classes. Is there any
other way around this? If not, which classes would I need to mirror and
re-implement?

Any insight here is appreciated.


Thanks!
Luigi Ballabio
2013-08-13 14:15:52 UTC
Permalink
Hello Sachin,

1) the assumption of constant vol is made in the example but can be
relaxed. When instantiating the BlackScholesProcess instance, you can
pass a BlackVarianceCurve instance if you're given at-the-money
volatilies at different maturities, or a BlackVarianceSurface instance
if you're given volatilities for different maturities and strikes.
Both classes are in the ql/termstructures/volatility/equityfx folder.

2) Calculation of implied Black volatility is implemented in the
impliedVolatility() method of VanillaOption. What other calculation
did you have in mind?

3) The option and term structure classes would in principle support
intraday calculation, but the Date class doesn't have a time part.
Adding a time data member to Date and modifying the DayCounter class
so that it takes it into account might do the trick (the day counters
are responsible for converting into time the distance between two
dates, such as the current evaluation date and the maturity date). Let
me know if it works.

Later,
Luigi
Post by Sachin Kumar
Greetings,
Like others here, I'm new to QuantLib. I'm interested in implementing a
vanilla american option pricing methodology with QuantLib.
The option will be an OCC listed option, overlying a large company like IBM
(may or may not pay discrete dividends, but will not have a continuous
dividend yield).
I've reviewed the example found in EquityOption.cpp. Unfortunately, this
1. Assumption of a constant black-scholes volatility term-structure. I
understand that using a LocalVolCurve term-structure might be what I'm
looking for here, but I'm not sure.
2. Related to (1) is how one goes about implementing their own implied
volatility calculation given market data.
3. Time to maturity resolution. I've read on other posts that QuantLib
currently doesn't support intraday time, i.e. time to maturity that's less
than 1 day. Given that I require this, I suspect I may need to create my own
class hierarchy that mirrors the 1-day resolution classes. Is there any
other way around this? If not, which classes would I need to mirror and
re-implement?
Any insight here is appreciated.
Thanks!
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
https://lists.sourceforge.net/lists/listinfo/quantlib-users
--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>
Jack Pai
2017-04-28 21:40:07 UTC
Permalink
Hi,

Follow up questions regarding what volatility is used in VanillaOption
Engine or BlackScholesProcess.

The EquityOption sample code uses constant vol, which is implied vol. The
BlackVarianceSurface will store an implied vol surface. If I pass the
BlackVarianceSurface to the constructor of BlackScholesProcess, and then,
use the Process in a VanillaEngine, e.g. BinomialVanillaEngine<Tian>, how
does the BinomialVanillaEngine use the Vol Surface? Does it pick 1 implied
vol from the surface and use it across the binomial tree as constant vol? Or
does it calculate a local vol surface based on the implied vol surface
passed in and then use the local vol in the binomial tree?

Thanks




--
View this message in context: http://quantlib.10058.n7.nabble.com/Vanilla-American-Option-Pricing-tp14486p18233.html
Sent from the quantlib-users mailing list archive at Nabble.com.
Luigi Ballabio
2017-05-10 15:14:09 UTC
Permalink
The binomial engine extracts from the surface the volatility corresponding
to the maturity and strike of the option, and then uses it across the tree
as constant vol.

Luigi
Post by Jack Pai
Hi,
Follow up questions regarding what volatility is used in VanillaOption
Engine or BlackScholesProcess.
The EquityOption sample code uses constant vol, which is implied vol. The
BlackVarianceSurface will store an implied vol surface. If I pass the
BlackVarianceSurface to the constructor of BlackScholesProcess, and then,
use the Process in a VanillaEngine, e.g. BinomialVanillaEngine<Tian>, how
does the BinomialVanillaEngine use the Vol Surface? Does it pick 1 implied
vol from the surface and use it across the binomial tree as constant vol? Or
does it calculate a local vol surface based on the implied vol surface
passed in and then use the local vol in the binomial tree?
Thanks
--
http://quantlib.10058.n7.nabble.com/Vanilla-American-Option-Pricing-tp14486p18233.html
Sent from the quantlib-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Loading...