Re: SmileSection

Posted by Chris Kenyon-2 on
URL: http://quantlib.414.s1.nabble.com/Re-SmileSection-tp13110p13118.html

hmmmm, as a top-level interface I'd be keen not to add more internal methods to SmileSection.  I.e. why do any calculations there at all?  I'd suggest having the Impl's as virtual and having nothing else.  I.e. do not do anything in the volatility and variance methods except calls the implementations.  This would leave all time questions to the descendents, i.e. out of the interface. 

In fact why bother with Impl methods at all?  Why not just make volatility and variance virtual?  PIMPL is handy when the implementers can be changed (i.e. ptr to another class) but just calling another method doesn't really seem to qualify.  Just my musings.


From: Ferdinando Ametrano <[hidden email]>
To: Chris Kenyon <[hidden email]>
Cc: [hidden email]
Sent: Tue, October 20, 2009 2:11:24 PM
Subject: Re: SmileSection

On Tue, Oct 20, 2009 at 2:46 PM, Chris Kenyon <[hidden email]> wrote:
> Exercise time, for inflation,
> could mean time-for-volatility-to-build-up OR
> time-from-referenceDate()-to-exercise.  For interest rates these are the
> same.  Having exercise time virtual gives more possibilities for descendants
> to change things.  At a pinch I could make do with only varianceImpl(Rate
> strike) as virtual.

mmm... I'm not familiar enough with inflation to really challenge your
proposal, so for me it's OK.

Anyway I wonder if we might reserve exerciseTime for
time-from-referenceDate()-to-exercise and then deal with
time-for-volatility-to-build-up in volatilityImpl / varianceImpl.
Would this choice make your code more complex or unnatural ?
I.e. add a varianceTime (time-for-volatility-to-build-up) when it is
not equal to exerciseTime (time-from-referenceDate()-to-exercise)

ciao -- Nando

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev