RE: books on derivatives

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

RE: books on derivatives

Vadim Ogranovich-3
Hi,

I seem to need a method to set underlying on a SingleAssetOption.
Unfortunately, there is no such method (a complete list of available
modifiers is given below)
            // modifiers
            virtual void setVolatility(double newVolatility) ;
            virtual void setRiskFreeRate(Rate newRate) ;
            virtual void setDividendYield(Rate newDividendYield) ;

In this respect I have a couple of questions:
1. What was the criteria for deciding which set methods should be
implemented?
2. Why the methods are virtual? I looked at the default implementation of
setVolatility() and found it more than adequate.

        void SingleAssetOption::setVolatility(double volatility) {
                // ... some code is striped ...
            volatility_ = volatility;
            hasBeenCalculated_ = false;
        }

I noticed that EuropeanOption overloads setVolatility(), but this doesn't
make sense to me; hasBeenCalculated_ = false should be good enough to
invalidate the cache. Am I missing anything?

        void EuropeanOption::setVolatility(double newVolatility) {
            SingleAssetOption::setVolatility(newVolatility);
            D1_ = D2_ = alpha_ = beta_ = NID1_ = Null<double>();
            standardDeviation_ = Null<double>();
        }

Thanks, Vadim

--------------------------------------------------
DISCLAIMER
This e-mail, and any attachments thereto, is intended only for use by the
addressee(s) named herein and may contain legally privileged and/or
confidential information.  If you are not the intended recipient of this
e-mail, you are hereby notified that any dissemination, distribution or
copying of this e-mail, and any attachments thereto, is strictly prohibited.
If you have received this e-mail in error, please immediately notify me and
permanently delete the original and any copy of any e-mail and any printout
thereof.

E-mail transmission cannot be guaranteed to be secure or error-free.  The
sender therefore does not accept liability for any errors or omissions in
the contents of this message which arise as a result of e-mail transmission.

NOTICE REGARDING PRIVACY AND CONFIDENTIALITY

Knight Trading Group may, at its discretion, monitor and review the content
of all e-mail communications.