WARNING: This server is unstable and will be retired in the next days.
If you want to keep this forum available, please request immediately a migration
on the Nabble Support forum.
Forums that don't receive any migration request will be deleted forever.
On Fri, May 18, 2012 at 11:41 PM, Paul Carter <pc502060@...> wrote:
> Thanks for the quick and helpful reply. In a next step, I would actually
> like to feed a time dependent (deterministic) volatility into the MC engine.
> However, I am not quite sure where to start looking... There doesn't seem to
> be much documentation around this. At the moment I'm doing this:
> Handle<BlackVolTermStructure> flatVolTermStructure(
> boost::shared_ptr<BlackVolTermStructure>( new BlackConstantVol( evalDate,
> calendar, volatility, dayCounter )));
> So basically I'm looking to replace BlackConstantVol by something where
> volatility isn't a simple double as above, but a function pointer (well, I
> presume the actual implementation in QuantLib is more clever than this).
You can try using BlackVarianceCurve instead of BlackConstantVol. It
allows you to interpolate a number of at-the-money volatilities for
> Another thing I was wondering about are the greeks. Currently, these aren't
> implemented for the MC Asian engines, but I would have thought that
> somewhere relatively far up the instrument class hierarchy, there should be
> a method that allows one to numerically approximate the greeks but simply
> bumping the relevant arguments (e.g. price of underlying for delta,
> volatility for vega, etc) and calculating the resulting slope of the change
> in value of the instrument. Any thoughts on this?
You can bump the quotes you used to build the instrument and the
curves, and the price of the instrument will vary accordingly. You
can look at test-suite/asianoptions.cpp and see how it's done in the
test*Greeks() test cases (it's the part that calculates the expected
numerical Greeks and stores them into the "expected" map). It will
work for MC engines, too.