RE: Caplet volatility structure
Posted by
Perissin Francesco on
URL: http://quantlib.414.s1.nabble.com/Caplet-volatility-structure-tp2702p2706.html
Message
Hi
Amar,
you
need to bootstrap on all caps spot starting, at first it seems that you don't
need a different start date. The implementation of capHelper shows you how it's
possible to obtain model prices and Black prices, but it has the limitation that
it only works with a single Black volatility, while you would need a volatility
vector.
You
need to see if it's possible to extend this class in order to get the vol vector
as input, or if you need to create a new class. If you choose to create a new
class, you will consider to use, inside it, the existing VanillaCap class, after
testing that this able to work with the VolatilityVector.
Hope
it helps
Francesco
How can I get the term structure of calpet volatilities implied by a
given model? ( I had used the following for cap volatility, and was
wondering if startDate in cap/caphelper could somehow be changed to make it a
caplet .Or is there some other better way?) :
Handle<Model> modelHW(new
HullWhite(rhTermStructure),0.05,0.02);//to plot the curve for a=0.05 / sigma =
0.02
for (double t=1;t<30;t++)
{
CapHelper
capHelperObj(Period(t,Years),RelinkableHandle<MarketElement>(Handle<MarketElement>(
new SimpleMarketElement(0.1)),indexSixMonths,rhTermStructure); //dummy
volatility of 0.1
capHelperObj.setPricingEngine(
Handle<PricingEngine>(new AnalyticalCapFloor(modelHW)));
double npv = capHelperObj.modelprice();
double impliedVolatity = capHelperObj.impliedVolatility(npv,
1e-4,
1000, 0.05, 0.50)*100.0;
}
Regards,
Amar
Do you Yahoo!?
The
New Yahoo! Shopping - with improved product
search
############################### DISCLAIMER #################################
This message (including any attachments) is confidential and may be
privileged. If you have received it by mistake please notify the sender by
return e-mail and delete this message from your system. Any unauthorised
use or dissemination of this message in whole or in part is strictly
prohibited. Please note that e-mails are susceptible to change. Banca del
Gottardo (including its group companies) shall not be liable for the
improper or incomplete transmission of the information contained in this
communication nor for any delay in its receipt or damage to your system.
Banca del Gottardo (or its group companies) does not guarantee that the
integrity of this communication has been maintained nor that this
communication is free of viruses, interceptions or interference.
############################################################################