You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(17) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(23) |
| 2002 |
Jan
(18) |
Feb
(20) |
Mar
(22) |
Apr
(41) |
May
(28) |
Jun
(25) |
Jul
(10) |
Aug
(7) |
Sep
(5) |
Oct
(20) |
Nov
(13) |
Dec
(11) |
| 2003 |
Jan
(28) |
Feb
(5) |
Mar
(6) |
Apr
(5) |
May
(17) |
Jun
(6) |
Jul
(45) |
Aug
(35) |
Sep
(24) |
Oct
(50) |
Nov
(53) |
Dec
(6) |
| 2004 |
Jan
(4) |
Feb
(10) |
Mar
(52) |
Apr
(46) |
May
(8) |
Jun
(25) |
Jul
(12) |
Aug
(6) |
Sep
(8) |
Oct
(8) |
Nov
(9) |
Dec
(7) |
| 2005 |
Jan
(18) |
Feb
(60) |
Mar
(19) |
Apr
(26) |
May
(14) |
Jun
(27) |
Jul
(8) |
Aug
(15) |
Sep
(19) |
Oct
(53) |
Nov
(20) |
Dec
(23) |
| 2006 |
Jan
(16) |
Feb
(27) |
Mar
(33) |
Apr
(51) |
May
(36) |
Jun
(25) |
Jul
(54) |
Aug
(30) |
Sep
(25) |
Oct
(67) |
Nov
(43) |
Dec
(13) |
| 2007 |
Jan
(23) |
Feb
(27) |
Mar
(55) |
Apr
(79) |
May
(60) |
Jun
(66) |
Jul
(46) |
Aug
(30) |
Sep
(90) |
Oct
(49) |
Nov
(85) |
Dec
(74) |
| 2008 |
Jan
(68) |
Feb
(59) |
Mar
(64) |
Apr
(28) |
May
(66) |
Jun
(35) |
Jul
(73) |
Aug
(76) |
Sep
(65) |
Oct
(46) |
Nov
(41) |
Dec
(19) |
| 2009 |
Jan
(46) |
Feb
(90) |
Mar
(51) |
Apr
(104) |
May
(13) |
Jun
(24) |
Jul
(20) |
Aug
(39) |
Sep
(109) |
Oct
(101) |
Nov
(117) |
Dec
(57) |
| 2010 |
Jan
(55) |
Feb
(42) |
Mar
(39) |
Apr
(22) |
May
(33) |
Jun
(41) |
Jul
(25) |
Aug
(52) |
Sep
(75) |
Oct
(60) |
Nov
(62) |
Dec
(52) |
| 2011 |
Jan
(70) |
Feb
(31) |
Mar
(26) |
Apr
(28) |
May
(17) |
Jun
(38) |
Jul
(51) |
Aug
(35) |
Sep
(27) |
Oct
(35) |
Nov
(10) |
Dec
(20) |
| 2012 |
Jan
(21) |
Feb
(29) |
Mar
(13) |
Apr
(37) |
May
(33) |
Jun
(12) |
Jul
(34) |
Aug
(27) |
Sep
(29) |
Oct
(35) |
Nov
(58) |
Dec
(27) |
| 2013 |
Jan
(27) |
Feb
(16) |
Mar
(40) |
Apr
(16) |
May
(34) |
Jun
(37) |
Jul
(6) |
Aug
(3) |
Sep
(4) |
Oct
(49) |
Nov
(13) |
Dec
(12) |
| 2014 |
Jan
(15) |
Feb
(21) |
Mar
(11) |
Apr
(13) |
May
(27) |
Jun
(60) |
Jul
(19) |
Aug
(29) |
Sep
(20) |
Oct
(28) |
Nov
(41) |
Dec
(15) |
| 2015 |
Jan
(33) |
Feb
(29) |
Mar
(26) |
Apr
(17) |
May
(2) |
Jun
(13) |
Jul
(21) |
Aug
(30) |
Sep
(22) |
Oct
(15) |
Nov
(46) |
Dec
(20) |
| 2016 |
Jan
(6) |
Feb
(5) |
Mar
(9) |
Apr
(15) |
May
(9) |
Jun
(4) |
Jul
(3) |
Aug
(4) |
Sep
(39) |
Oct
(8) |
Nov
(5) |
Dec
(8) |
| 2017 |
Jan
(4) |
Feb
(14) |
Mar
(4) |
Apr
(16) |
May
(5) |
Jun
(10) |
Jul
(25) |
Aug
(2) |
Sep
(5) |
Oct
(11) |
Nov
(8) |
Dec
(11) |
| 2018 |
Jan
(7) |
Feb
(4) |
Mar
|
Apr
(1) |
May
(4) |
Jun
(21) |
Jul
(8) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2019 |
Jan
(1) |
Feb
(5) |
Mar
(18) |
Apr
(9) |
May
(5) |
Jun
(21) |
Jul
(25) |
Aug
(25) |
Sep
(4) |
Oct
(2) |
Nov
(2) |
Dec
(5) |
| 2020 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(6) |
Dec
|
| 2021 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(1) |
May
(4) |
Jun
|
Jul
(1) |
Aug
|
Sep
(2) |
Oct
(9) |
Nov
(1) |
Dec
(5) |
| 2022 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
(2) |
May
(5) |
Jun
(3) |
Jul
(3) |
Aug
(3) |
Sep
(3) |
Oct
(14) |
Nov
|
Dec
(1) |
| 2023 |
Jan
(10) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
(2) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(5) |
Nov
|
Dec
|
| 2024 |
Jan
(8) |
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(4) |
Aug
(5) |
Sep
|
Oct
(4) |
Nov
(1) |
Dec
(1) |
| 2025 |
Jan
(3) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2026 |
Jan
(1) |
Feb
(12) |
Mar
|
Apr
(2) |
May
(8) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Richard T. <rt...@gm...> - 2010-04-25 14:33:30
|
Hi there Has anyone ever considered integrating Quantlib with Marketcetera's Photon? I thought it might be able to be done through QuantLib SWIG with bindings to Java or Ruby. Photon supports both languages for scripting strategies using the libary. Thanks Richard |
|
From: Luigi B. <lui...@gm...> - 2010-04-20 13:37:59
|
QuantLib is a cross-platform, free/open-source quantitative finance C++ library for modeling, pricing, trading, and risk management in real-life. Version 1.0.1 has been released and is available for download at <http://quantlib.org/download.shtml>. QuantLib 1.0.1 is a bug-fix release for version 1.0. The SWIG bindings for version 1.0 will work with 1.0.1 as well. Please log any problems you have with this release in the SourceForge bug tracker at <http://sourceforge.net/tracker/?group_id=12740&atid=112740> specifying that you're using QuantLib 1.0.1. The QuantLib group |
|
From: Krishna M. <kir...@gm...> - 2010-04-15 20:48:07
|
Hi, Can I find BDT, HJM models in QuantLib. Could someone point me to files or examples. Thanks. Rgds Krishna On Thu, Apr 15, 2010 at 5:18 AM, Peter Caspers <pet...@ar...>wrote: > sorry, attachments were missing > > ----- Original Nachricht ---- > Von: Peter Caspers <pet...@ar...> > An: qua...@li... > Datum: 15.04.2010 10:10 > Betreff: Multicurve Swaption Volatility II > > Hi Luigi, Eric, > > I developed the things concerning the pricing of non quoted swaptions a bit > further and exported them to excel (based on the files in Eric's > prerelease). > > I noticed that the QuantLibAddin::SwapIndex always uses the > QuantLib::SwapIndex constructor _with_ the discount curve parameter. > Therefore you can not set up a swap index in excel without specifiying the > discount curve. I would expect instead that specifying no discount curve > leads to a QuantLib::SwapIndex where exogenousDiscount_ = false, especially > since the default value for the discount curve in the excel wizard is an > empty value. Therefore I propose to check in the QuantLibAddin constructor, > if the handle is empty and in this case invoke the QuantLib constructor > without discount curve. Then the exogenous_ flag will be set to false and > everything is fine. > > On the QuantLib side I introduced an enumeration which specifies the > conversion mode. There are four modes available now > > Pricing: Compute price w.r.t. quoted index atm, then compute implied > volatility w.r.t. non quoted index atm > Arithmetic: Use arithmetic mean of atm and strike to approximate normal > volatility > Geometric: Use geometric mean of atm and strike to approximate normal > volatility > Basispoint: Use atm to approximate normal volatility > > This replaces the old "exact" flag. > > Furthermore I changed the interface of nonQuotedIndexVolatility. The swap > index is now a boost::shared_ptr. As I understand it, this is more in line > with the excel export stuff. > > I attach the modified QuantLib files again. Below I insert the changes > concerning the export to excel. > > One more comment on the project file: I use QuantLibAddin_vc9.sln with MSVC > 2008. When I generate the xll and try to register it in excel I get an error > message (not a valid addin). I have to set "generate manifest" to yes in > order to get a valid xll. This should be changed in the project file > therefore, I think. > > Thank you, best regards > Peter > > types: > > <DataType > defaultSuperType='enumeration'>QuantLib::SwaptionVolatilityCube::NormalConversion</DataType> > > enumeratedtypes: > > <EnumeratedTypeGroup > type='QuantLib::SwaptionVolatilityCube::NormalConversion'> > <includeFile>oh/enumerations/typefactory.hpp</includeFile> > <constructor>true</constructor> > <EnumeratedTypes> > <EnumeratedType> > <string>Pricing</string> > <value>QuantLib::SwaptionVolatilityCube::Pricing</value> > </EnumeratedType> > <EnumeratedType> > <string>Arithmetic</string> > <value>QuantLib::SwaptionVolatilityCube::Arithmetic</value> > </EnumeratedType> > <EnumeratedType> > <string>Geometric</string> > <value>QuantLib::SwaptionVolatilityCube::Geometric</value> > </EnumeratedType> > <EnumeratedType> > <string>Basispoint</string> > <value>QuantLib::SwaptionVolatilityCube::Basispoint</value> > </EnumeratedType> > </EnumeratedTypes> > </EnumeratedTypeGroup> > > swaptionvolstructure: > > <Member name='qlSwaptionVTSNonQuotedIndexVolatility' > type='QuantLib::SwaptionVolatilityCube' superType='libraryTermStructure'> > <description>returns a lognormal volatility for a non quoted index via > normal conversion</description> > <libraryFunction>nonQuotedIndexVolatility</libraryFunction> > <SupportedPlatforms> > <SupportedPlatform name='Excel'/> > <!--SupportedPlatform name='Cpp'/--> > </SupportedPlatforms> > <ParameterList> > <Parameters> > <Parameter name='OptionDate'> > <type>QuantLib::Date</type> > <tensorRank>scalar</tensorRank> > <description>Option Date</description> > </Parameter> > <Parameter name='SwapIndex' superType='objectClass'> > <type>QuantLib::SwapIndex</type> > <tensorRank>scalar</tensorRank> > <description>Underlying Swap Index</description> > </Parameter> > <Parameter name='Strike'> > <type>double</type> > <tensorRank>scalar</tensorRank> > <description>Strike</description> > </Parameter> > <Parameter name='Extrapolate' default='false'> > <type>bool</type> > <tensorRank>scalar</tensorRank> > <description>Extrapolate</description> > </Parameter> > <Parameter name='Conversion' default='"Arithmetic"'> > <type>QuantLib::SwaptionVolatilityCube::NormalConversion</type> > <tensorRank>scalar</tensorRank> > <description>Pricing, Arithmetic, Geometric, > Basispoint</description> > </Parameter> > <Parameter name='FallBackConversion' default='"Arithmetic"'> > <type>QuantLib::SwaptionVolatilityCube::NormalConversion</type> > <tensorRank>scalar</tensorRank> > <description>This conversion is used if Pricing > fails</description> > </Parameter> > </Parameters> > </ParameterList> > <ReturnValue> > <type>double</type> > <tensorRank>scalar</tensorRank> > </ReturnValue> > </Member> > > stub.enum.types: > > #include <ql/termstructures/volatility/swaption/swaptionvolcube.hpp> > > > > ----- Original Nachricht ---- > Von: Peter Caspers <pet...@ar...> > An: qua...@li... > Datum: 26.03.2010 17:18 > Betreff: Multicurve Swaption Volatility > > Hi, > > I am interested in computing swaption (and also cap) volatilities for non > quoted indices e.g. the volatility for a 2y/5y swaption with the underlying > swap being vs. 3M Euribor. The quoted volatility for this swaption is vs. 6M > Euribor. The market converts this volatility using a normal black76 model > which is level independent contrary to the lognormal standard model. > > As far as I can see QuantLib 1.0 supports the separation of discounting and > forwarding curves for curve bootstrapping and swap index estimation. > > However, both swaption and cap volatility classes seem to need adjustments. > I started to do some things about swaption volatilities and would be happy > to contribute them to the project. I attach the modified source files. The > modifications are marked with a comment which reads // PC. Perhaps the > people who wrote the classes can have a look at the code and see if > something like that can be introduced in future versions. > > 1. The ATM swaption class SwaptionVolatilityMatrix does not know anything > about absolute rate levels. So it would probably be a great effort to do > something here. I left this class unchanged and concentrated on the cube > classes solely. > > 2. The first adjustment I did is to add a method discountingTermStructure() > to the class SwapIndex. In case the index has an exogeneous discount curve, > this is returned, otherwise an empty Handle. > > 3. The next adjustment is in the class SwaptionVolatilityCube. The > atmStrike() method does not work for swap indices with exogeneous discount > curve. I did the necessary modifications to take this into account. The > interface of the method does not need to be changed. > > 4. It seems hard to me to extend the existing volatility methods in order > to return volatilities for non quoted indices. Instead I added a method > nonQuotedIndexVolatility() to compute a (lognormal) volatility for a non > quoted index. It should work together with all extensions (SABR, bilinear) > of the base cube class. There is an approximated mode (exact = false which > is also the default) and an exact mode (exact = true) implemented. The > approximation is due to Kazuhiro Iwasawa , "Analytic Formula for the > European Normal Black Scholes Formula", Section 3. > > If I can do anything else to push this forward, please let me know, I am > not so much into the development processes of this project yet... > > Thank you, best regards > Peter > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > |
|
From: Norbert I. <N....@di...> - 2010-04-15 09:49:23
|
Hello,
I am checking your new version at the moment. Looks very good now,
but I still had 3 issues:
1.) There seems to be no "abs" for integral types in "ql/termstructures/inflation/seasonality.cpp".
The compiler complains:
Source:
Real MultiplicativePriceSeasonality::seasonalityFactor(const Date &to) const {
Date from = seasonalityBaseDate();
....
Integer diffDays = abs(to - from); // in days
Error:
"/home/nir/tmp/unchecked/QuantLib-1.0.1/ql/termstructures/inflation/seasonality.cpp", line 151: Error: Overloading ambiguity between "std::abs(double)" and "std::abs(float)".
1 Error(s) detected.
*** Error code 1
I resolved this ambiguity by casting the operand to "double", so that it take std::abs(double):
Integer diffDays = abs((double)(to - from)); // in days
2.) and 3.):
The compiler complains that the "operand--" must have a "lvalue" as an operand in
"ql/instruments/makecapfloor.cpp" and "ql/instruments/makeyoyinflationcapfloor.cpp".
Source (in "makecapfloor.cpp"):
if (asOptionlet_ && leg.size() > 1)
leg.erase(leg.begin(), --leg.end());
Fix:
if (asOptionlet_ && leg.size() > 1)
{
Leg::iterator tmp = leg.end();
leg.erase(leg.begin(), --tmp);
}
it looks very good now
-----Ursprüngliche Nachricht-----
Von: Luigi Ballabio [mailto:lui...@gm...]
Gesendet: Mittwoch, 14. April 2010 17:55
An: Norbert Irmer
Betreff: ***UNCHECKED*** Re: AW: AW: AW: [Quantlib-dev] Quantlib with Sunstudio 12.1 on Solaris 2.10/Sparc
On Wed, 2010-04-14 at 17:48 +0200, Norbert Irmer wrote:
> Yes, would be nice.
Ok, please try the attached tarball.
Hopefully, it should compile without modifications.
Thanks,
Luigi
--
Harrison's Postulate:
For every action, there is an equal and opposite criticism.
|
|
From: Peter C. <pet...@ar...> - 2010-04-15 09:18:28
|
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2006 Ferdinando Ametrano This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email <qua...@li...>. The license is also available online at <http://quantlib.org/license.shtml>. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. */ /*! \file swaptionvolcube.hpp \brief Swaption volatility cube */ #ifndef quantlib_swaption_volatility_cube_h #define quantlib_swaption_volatility_cube_h #include <ql/termstructures/volatility/swaption/swaptionvoldiscrete.hpp> #include <ql/termstructures/volatility/smilesection.hpp> #include <ql/pricingengines/blackformula.hpp> // PC namespace QuantLib { class SwapIndex; class Quote; //! swaption-volatility cube /*! \warning this class is not finalized and its interface might change in subsequent releases. */ class SwaptionVolatilityCube : public SwaptionVolatilityDiscrete { public: enum NormalConversion { // PC Pricing, Arithmetic, Geometric, Basispoint }; SwaptionVolatilityCube( const Handle<SwaptionVolatilityStructure>& atmVolStructure, const std::vector<Period>& optionTenors, const std::vector<Period>& swapTenors, const std::vector<Spread>& strikeSpreads, const std::vector<std::vector<Handle<Quote> > >& volSpreads, const boost::shared_ptr<SwapIndex>& swapIndexBase, const boost::shared_ptr<SwapIndex>& shortSwapIndexBase, bool vegaWeightedSmileFit); //! \name TermStructure interface //@{ DayCounter dayCounter() const { return atmVol_->dayCounter(); } Date maxDate() const { return atmVol_->maxDate(); } Time maxTime() const { return atmVol_->maxTime(); } const Date& referenceDate() const { return atmVol_->referenceDate();} Calendar calendar() const { return atmVol_->calendar(); } Natural settlementDays() const { return atmVol_->settlementDays(); } //! \name VolatilityTermStructure interface //@{ Rate minStrike() const { return 0.0; } Rate maxStrike() const { return 1.0; } //@} //! \name SwaptionVolatilityStructure interface //@{ const Period& maxSwapTenor() const { return atmVol_->maxSwapTenor(); } //@} //! \name Other inspectors //@{ Rate atmStrike(const Date& optionDate, const Period& swapTenor) const; Rate atmStrike(const Period& optionTenor, const Period& swapTenor) const { Date optionDate = optionDateFromTenor(optionTenor); return atmStrike(optionDate, swapTenor); } Volatility nonQuotedIndexVolatility(const Date& optionDate, // PC const boost::shared_ptr<SwapIndex>& index, const Rate& strike, const bool extrapolate=false, const SwaptionVolatilityCube::NormalConversion conv = Arithmetic, const SwaptionVolatilityCube::NormalConversion fallBackConv = Arithmetic) const; //@} protected: void registerWithVolatilitySpread(); Volatility volatilityImpl(Time optionTime, Time swapLength, Rate strike) const; Volatility volatilityImpl(const Date& optionDate, const Period& swapTenor, Rate strike) const; Handle<SwaptionVolatilityStructure> atmVol_; Size nStrikes_; std::vector<Spread> strikeSpreads_; mutable std::vector<Rate> localStrikes_; mutable std::vector<Volatility> localSmile_; std::vector<std::vector<Handle<Quote> > > volSpreads_; boost::shared_ptr<SwapIndex> swapIndexBase_, shortSwapIndexBase_; bool vegaWeightedSmileFit_; }; // inline inline Volatility SwaptionVolatilityCube::volatilityImpl( Time optionTime, Time swapLength, Rate strike) const { return smileSectionImpl(optionTime, swapLength)->volatility(strike); } inline Volatility SwaptionVolatilityCube::volatilityImpl( const Date& optionDate, const Period& swapTenor, Rate strike) const { return smileSectionImpl(optionDate, swapTenor)->volatility(strike); } } #endif |
|
From: Peter C. <pet...@ar...> - 2010-04-15 08:10:17
|
Hi Luigi, Eric,
I developed the things concerning the pricing of non quoted swaptions a bit further and exported them to excel (based on the files in Eric's prerelease).
I noticed that the QuantLibAddin::SwapIndex always uses the QuantLib::SwapIndex constructor _with_ the discount curve parameter. Therefore you can not set up a swap index in excel without specifiying the discount curve. I would expect instead that specifying no discount curve leads to a QuantLib::SwapIndex where exogenousDiscount_ = false, especially since the default value for the discount curve in the excel wizard is an empty value. Therefore I propose to check in the QuantLibAddin constructor, if the handle is empty and in this case invoke the QuantLib constructor without discount curve. Then the exogenous_ flag will be set to false and everything is fine.
On the QuantLib side I introduced an enumeration which specifies the conversion mode. There are four modes available now
Pricing: Compute price w.r.t. quoted index atm, then compute implied volatility w.r.t. non quoted index atm
Arithmetic: Use arithmetic mean of atm and strike to approximate normal volatility
Geometric: Use geometric mean of atm and strike to approximate normal volatility
Basispoint: Use atm to approximate normal volatility
This replaces the old "exact" flag.
Furthermore I changed the interface of nonQuotedIndexVolatility. The swap index is now a boost::shared_ptr. As I understand it, this is more in line with the excel export stuff.
I attach the modified QuantLib files again. Below I insert the changes concerning the export to excel.
One more comment on the project file: I use QuantLibAddin_vc9.sln with MSVC 2008. When I generate the xll and try to register it in excel I get an error message (not a valid addin). I have to set "generate manifest" to yes in order to get a valid xll. This should be changed in the project file therefore, I think.
Thank you, best regards
Peter
types:
<DataType defaultSuperType='enumeration'>QuantLib::SwaptionVolatilityCube::NormalConversion</DataType>
enumeratedtypes:
<EnumeratedTypeGroup type='QuantLib::SwaptionVolatilityCube::NormalConversion'>
<includeFile>oh/enumerations/typefactory.hpp</includeFile>
<constructor>true</constructor>
<EnumeratedTypes>
<EnumeratedType>
<string>Pricing</string>
<value>QuantLib::SwaptionVolatilityCube::Pricing</value>
</EnumeratedType>
<EnumeratedType>
<string>Arithmetic</string>
<value>QuantLib::SwaptionVolatilityCube::Arithmetic</value>
</EnumeratedType>
<EnumeratedType>
<string>Geometric</string>
<value>QuantLib::SwaptionVolatilityCube::Geometric</value>
</EnumeratedType>
<EnumeratedType>
<string>Basispoint</string>
<value>QuantLib::SwaptionVolatilityCube::Basispoint</value>
</EnumeratedType>
</EnumeratedTypes>
</EnumeratedTypeGroup>
swaptionvolstructure:
<Member name='qlSwaptionVTSNonQuotedIndexVolatility' type='QuantLib::SwaptionVolatilityCube' superType='libraryTermStructure'>
<description>returns a lognormal volatility for a non quoted index via normal conversion</description>
<libraryFunction>nonQuotedIndexVolatility</libraryFunction>
<SupportedPlatforms>
<SupportedPlatform name='Excel'/>
<!--SupportedPlatform name='Cpp'/-->
</SupportedPlatforms>
<ParameterList>
<Parameters>
<Parameter name='OptionDate'>
<type>QuantLib::Date</type>
<tensorRank>scalar</tensorRank>
<description>Option Date</description>
</Parameter>
<Parameter name='SwapIndex' superType='objectClass'>
<type>QuantLib::SwapIndex</type>
<tensorRank>scalar</tensorRank>
<description>Underlying Swap Index</description>
</Parameter>
<Parameter name='Strike'>
<type>double</type>
<tensorRank>scalar</tensorRank>
<description>Strike</description>
</Parameter>
<Parameter name='Extrapolate' default='false'>
<type>bool</type>
<tensorRank>scalar</tensorRank>
<description>Extrapolate</description>
</Parameter>
<Parameter name='Conversion' default='"Arithmetic"'>
<type>QuantLib::SwaptionVolatilityCube::NormalConversion</type>
<tensorRank>scalar</tensorRank>
<description>Pricing, Arithmetic, Geometric, Basispoint</description>
</Parameter>
<Parameter name='FallBackConversion' default='"Arithmetic"'>
<type>QuantLib::SwaptionVolatilityCube::NormalConversion</type>
<tensorRank>scalar</tensorRank>
<description>This conversion is used if Pricing fails</description>
</Parameter>
</Parameters>
</ParameterList>
<ReturnValue>
<type>double</type>
<tensorRank>scalar</tensorRank>
</ReturnValue>
</Member>
stub.enum.types:
#include <ql/termstructures/volatility/swaption/swaptionvolcube.hpp>
----- Original Nachricht ----
Von: Peter Caspers <pet...@ar...>
An: qua...@li...
Datum: 26.03.2010 17:18
Betreff: Multicurve Swaption Volatility
Hi,
I am interested in computing swaption (and also cap) volatilities for non quoted indices e.g. the volatility for a 2y/5y swaption with the underlying swap being vs. 3M Euribor. The quoted volatility for this swaption is vs. 6M Euribor. The market converts this volatility using a normal black76 model which is level independent contrary to the lognormal standard model.
As far as I can see QuantLib 1.0 supports the separation of discounting and forwarding curves for curve bootstrapping and swap index estimation.
However, both swaption and cap volatility classes seem to need adjustments. I started to do some things about swaption volatilities and would be happy to contribute them to the project. I attach the modified source files. The modifications are marked with a comment which reads // PC. Perhaps the people who wrote the classes can have a look at the code and see if something like that can be introduced in future versions.
1. The ATM swaption class SwaptionVolatilityMatrix does not know anything about absolute rate levels. So it would probably be a great effort to do something here. I left this class unchanged and concentrated on the cube classes solely.
2. The first adjustment I did is to add a method discountingTermStructure() to the class SwapIndex. In case the index has an exogeneous discount curve, this is returned, otherwise an empty Handle.
3. The next adjustment is in the class SwaptionVolatilityCube. The atmStrike() method does not work for swap indices with exogeneous discount curve. I did the necessary modifications to take this into account. The interface of the method does not need to be changed.
4. It seems hard to me to extend the existing volatility methods in order to return volatilities for non quoted indices. Instead I added a method nonQuotedIndexVolatility() to compute a (lognormal) volatility for a non quoted index. It should work together with all extensions (SABR, bilinear) of the base cube class. There is an approximated mode (exact = false which is also the default) and an exact mode (exact = true) implemented. The approximation is due to Kazuhiro Iwasawa , "Analytic Formula for the European Normal Black Scholes Formula", Section 3.
If I can do anything else to push this forward, please let me know, I am not so much into the development processes of this project yet...
Thank you, best regards
Peter
|
|
From: Norbert I. <N....@di...> - 2010-04-14 14:34:53
|
Yes, "__SUNPRO_CC", e.g.: #ifdef __SUNPRO_CC #include <unistd.h> #endif -----Ursprüngliche Nachricht----- Von: Luigi Ballabio [mailto:lui...@gm...] Gesendet: Mittwoch, 14. April 2010 11:51 An: Norbert Irmer Cc: qua...@li... Betreff: Re: AW: [Quantlib-dev] Quantlib with Sunstudio 12.1 on Solaris 2.10/Sparc On Tue, 2010-04-13 at 15:51 +0200, Norbert Irmer wrote: > Sunstudio is an IDE plus compiler (successor of Sun-Forte, -WorkshopPro, or > whatever names, this product ever had:). The IDE uses NetBeans, and the > Debugging is very professional, reliable and robust on Sparc platforms > (like in Visual Studio, KDevelop+GCC+GDB cannot compare to this!). Ok. Is there any #define that I can test for if I want to check whether I'm using the Sun Studio compiler? (as in, e.g., #ifdef __MINGW32__ to check for the MinGW compiler.) Thanks, Luigi -- All generalizations are false, including this one. -- Mark Twain |
|
From: Luigi B. <lui...@gm...> - 2010-04-14 09:51:26
|
On Tue, 2010-04-13 at 15:51 +0200, Norbert Irmer wrote: > Sunstudio is an IDE plus compiler (successor of Sun-Forte, -WorkshopPro, or > whatever names, this product ever had:). The IDE uses NetBeans, and the > Debugging is very professional, reliable and robust on Sparc platforms > (like in Visual Studio, KDevelop+GCC+GDB cannot compare to this!). Ok. Is there any #define that I can test for if I want to check whether I'm using the Sun Studio compiler? (as in, e.g., #ifdef __MINGW32__ to check for the MinGW compiler.) Thanks, Luigi -- All generalizations are false, including this one. -- Mark Twain |
|
From: Norbert I. <N....@di...> - 2010-04-13 13:54:07
|
Sunstudio is an IDE plus compiler (successor of Sun-Forte, -WorkshopPro, or
whatever names, this product ever had:). The IDE uses NetBeans, and the
Debugging is very professional, reliable and robust on Sparc platforms
(like in Visual Studio, KDevelop+GCC+GDB cannot compare to this!).
At first I used ./configure. After the first problems, i installed "libtool"
and "automake" and recreated the configure script, but I still had the same problems.
Afterwards i used "cmake" (we are using this for our own projects too, much easier
to work with than automake!). I simply extracted the source files via a python
script from the Visual Studio project, and included them in the cmake project,
which simply looks like this:
PROJECT( QuantLib CXX C )
ADD_DEFINITIONS( -mt -library=stlport4 )
SET( CMAKE_EXE_LINKER_FLAGS "-mt -library=stlport4" )
INCLUDE_DIRECTORIES( /opt/diii_foreign/include /home/nir/tmp/original/QuantLib-1.0 )
INCLUDE( sources.cmake )
ADD_LIBRARY( QuantLib SHARED ${SOURCES} )
(if you are interested, i can send the project files / python script to you).
The first error message with unresolved math symbols is:
/opt/diii_foreign/bin/cmake -E cmake_progress_report /home/nir/tmp/original/QuantBuild/CMakeFiles
[ 0%] Building CXX object CMakeFiles/QuantLib.dir/home/nir/tmp/original/QuantLib-1.0/ql/math/distributions/bivariatenormaldistribution.o
/opt/sunstudio12.1/bin/CC -DQuantLib_EXPORTS -KPIC -I/opt/diii_foreign/include -I/home/nir/tmp/original/QuantLib-1.0 -mt -library=stlport4 -o CMakeFiles/QuantLib.dir/home/nir/tmp/original/QuantLib-1.0/ql/math/distributions/bivariatenormaldistribution.o -c /home/nir/tmp/original/QuantLib-1.0/ql/math/distributions/bivariatenormaldistribution.cpp
"/home/nir/tmp/original/QuantLib-1.0/ql/math/array.hpp", line 593: Warning (Anachronism): Formal argument __x of type double(*)(double) in call to std::ptr_fun<double, double>(double(*)(double)) is being passed extern "C" double(*)(double).
"/home/nir/tmp/original/QuantLib-1.0/ql/math/array.hpp", line 600: Warning (Anachronism): Formal argument __x of type double(*)(double) in call to std::ptr_fun<double, double>(double(*)(double)) is being passed extern "C" double(*)(double).
"/home/nir/tmp/original/QuantLib-1.0/ql/math/array.hpp", line 607: Warning (Anachronism): Formal argument __x of type double(*)(double) in call to std::ptr_fun<double, double>(double(*)(double)) is being passed extern "C" double(*)(double).
"/home/nir/tmp/original/QuantLib-1.0/ql/math/array.hpp", line 614: Warning (Anachronism): Formal argument __x of type double(*)(double) in call to std::ptr_fun<double, double>(double(*)(double)) is being passed extern "C" double(*)(double).
"/home/nir/tmp/original/QuantLib-1.0/ql/math/distributions/bivariatenormaldistribution.cpp", line 85: Error: M_PI is not defined.
"/home/nir/tmp/original/QuantLib-1.0/ql/math/distributions/bivariatenormaldistribution.cpp", line 204: Error: M_PI is not defined.
"/home/nir/tmp/original/QuantLib-1.0/ql/math/distributions/bivariatenormaldistribution.cpp", line 239: Error: M_PI is not defined.
3 Error(s) and 4 Warning(s) detected.
*** Error code 3
The content of "bivariatenormaldistribution.cpp", line 85, is
result = std::sqrt(1.0 - rho_*rho_)/M_PI*sum;
The problem with "sqrt" etc. seems to arise only, where these functions are used without the "std::"
modifier (I think <cmath> simply includes math.h in namespace std). To find one of those locations again,
I simply unpacked quantlib-1.0.tar.gz and defined M_PI, M_PI_2 and M_LN2 on the compiler command line
to get past the undefined constant errors. The first location I found was:
/opt/diii_foreign/bin/cmake -E cmake_progress_report /home/nir/tmp/original/QuantBuild/CMakeFiles
[ 0%] Building CXX object CMakeFiles/QuantLib.dir/home/nir/tmp/original/QuantLib-1.0/ql/termstructures/inflation/seasonality.o
/opt/sunstudio12.1/bin/CC -DQuantLib_EXPORTS -KPIC -I/opt/diii_foreign/include -I/home/nir/tmp/original/QuantLib-1.0 -mt -library=stlport4 -DM_PI="3.14" -DM_PI_2="3.14/2.0" -DM_LN2="0.69" -o CMakeFiles/QuantLib.dir/home/nir/tmp/original/QuantLib-1.0/ql/termstructures/inflation/seasonality.o -c /home/nir/tmp/original/QuantLib-1.0/ql/termstructures/inflation/seasonality.cpp
"/home/nir/tmp/original/QuantLib-1.0/ql/termstructures/inflation/seasonality.cpp", line 84: Error: The function "fabs" must have a prototype.
"/home/nir/tmp/original/QuantLib-1.0/ql/termstructures/inflation/seasonality.cpp", line 151: Error: The function "abs" must have a prototype.
"/home/nir/tmp/original/QuantLib-1.0/ql/termstructures/inflation/seasonality.cpp", line 203: Error: The function "pow" must have a prototype.
3 Error(s) detected.
*** Error code 3
-----Ursprüngliche Nachricht-----
Von: Luigi Ballabio [mailto:lui...@gm...]
Gesendet: Dienstag, 13. April 2010 11:09
An: Norbert Irmer
Cc: qua...@li...
Betreff: Re: [Quantlib-dev] Quantlib with Sunstudio 12.1 on Solaris 2.10/Sparc
On Fri, 2010-04-09 at 13:15 +0200, Norbert Irmer wrote:
> I finally solved my problems.
>
> I had 4 unresolved symbols.
>
> 3 were due to functions, which were declared and defined with
> different signatures, e.g.
Ok, I'll fix those for next release.
> As i previously wrote, when compiling Quantlib with Sunstudio i got a
> lot of undefined "M_PI", "sqrt" etc..
>
> I solved these by simply adding lots of "#include <math.h>" to the
> sources, perhaps this could be done more elegantly at a central
> location.
Strange. Does adding '#include <cmath>' work instead? Also, does the
compiler complain about 'sqrt' or 'std::sqrt'? May you send me the exact
message?
Finally, I'm not familiar with Sunstudio---is it just a set of compilers
or an IDE? That is, do you run './configure' and 'make' or what?
Thanks,
Luigi
--
Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away.
-- Antoine de Saint-Exupery
|
|
From: Luigi B. <lui...@gm...> - 2010-04-13 09:10:50
|
On Fri, 2010-04-09 at 13:15 +0200, Norbert Irmer wrote: > I finally solved my problems. > > I had 4 unresolved symbols. > > 3 were due to functions, which were declared and defined with > different signatures, e.g. Ok, I'll fix those for next release. > As i previously wrote, when compiling Quantlib with Sunstudio i got a > lot of undefined "M_PI", "sqrt" etc.. > > I solved these by simply adding lots of "#include <math.h>" to the > sources, perhaps this could be done more elegantly at a central > location. Strange. Does adding '#include <cmath>' work instead? Also, does the compiler complain about 'sqrt' or 'std::sqrt'? May you send me the exact message? Finally, I'm not familiar with Sunstudio---is it just a set of compilers or an IDE? That is, do you run './configure' and 'make' or what? Thanks, Luigi -- Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away. -- Antoine de Saint-Exupery |
|
From: SourceForge.net <no...@so...> - 2010-04-13 08:50:23
|
Bugs item #2985589, was opened at 2010-04-11 23:00 Message generated for change (Comment added) made by lballabio You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2985589&group_id=12740 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Resolution: None Priority: 5 Private: No Submitted By: perissf (perissf) Assigned to: Luigi Ballabio (lballabio) Summary: Access violation when pricing coupon Initial Comment: Hi all, I attach a code snippet that produces an access violation error when trying to price a FloatingRateCoupon with BlackIborCouponPricer. QL version is 1.0 Cheers Francesco ---------------------------------------------------------------------- Comment By: Luigi Ballabio (lballabio) Date: 2010-04-13 10:50 Message: The bug is now fixed in the Subversion repository. Thank you for the report. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2985589&group_id=12740 |
|
From: SourceForge.net <no...@so...> - 2010-04-12 13:54:50
|
Bugs item #2985589, was opened at 2010-04-11 23:00 Message generated for change (Settings changed) made by lballabio You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2985589&group_id=12740 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: perissf (perissf) >Assigned to: Luigi Ballabio (lballabio) Summary: Access violation when pricing coupon Initial Comment: Hi all, I attach a code snippet that produces an access violation error when trying to price a FloatingRateCoupon with BlackIborCouponPricer. QL version is 1.0 Cheers Francesco ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2985589&group_id=12740 |
|
From: SourceForge.net <no...@so...> - 2010-04-11 21:00:02
|
Bugs item #2985589, was opened at 2010-04-11 23:00 Message generated for change (Tracker Item Submitted) made by perissf You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2985589&group_id=12740 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: perissf (perissf) Assigned to: Nobody/Anonymous (nobody) Summary: Access violation when pricing coupon Initial Comment: Hi all, I attach a code snippet that produces an access violation error when trying to price a FloatingRateCoupon with BlackIborCouponPricer. QL version is 1.0 Cheers Francesco ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2985589&group_id=12740 |
|
From: Luigi B. <lui...@gm...> - 2010-04-09 15:24:55
|
Ok, it was a date-adjustment thing. It's fixed now. Thanks, Luigi On Wed, 2010-03-24 at 18:30 -0400, Kevin Kim wrote: > 2010-03-19 > > > -kevin > > > On Wed, Mar 24, 2010 at 3:49 AM, Luigi Ballabio > <lui...@gm...> wrote: > On Tue, 2010-03-23 at 19:23 -0400, Kevin Kim wrote: > > interesting - all the tests passed today. > > > Might be a date-adjustment problem. Do you remember on what > day you ran > the tests the first time? > > Luigi > > > -- > > An ideal world is left as an exercise to the reader. > -- Paul Graham > > > > -- What is written without effort is, in general, read without pleasure. -- Samuel Johnson |
|
From: Norbert I. <N....@di...> - 2010-04-09 11:18:05
|
I finally solved my problems.
I had 4 unresolved symbols.
3 were due to functions, which were declared and defined with different signatures, e.g.
Quantlib:: DefaultEvent:: DefaultSettlement::recoveryRate
was declared in "QuantLib-1.0/ql/experimental/credit/defaultevent.hpp" as
Real recoveryRate(Seniority sen) const;
while in "QuantLib-1.0/ql/experimental/credit/defaultevent.cpp"
Real recoveryRate(const Seniority sen) const { ... }
was defined.
The same problem i had with the constructors:
QuantLib::FdmHestonSolver::FdmHestonSolver
QuantLib::FdmHestonHullWhiteSolver:: FdmHestonHullWhiteSolver
They also had different declarations and definitions (parameters declared as non-const,
but const in definition).
The 4-th unresolved symbol was the template function,
ForwardOptionArguments<QuantLib::Option::arguments>::validate
which was not instantiated, because the template definition (defined in
/pricingengines/forward/forwardengine.hpp) was not visible at the
instantiation location.
I simply added the line
#include <ql/pricingengines/forward/forwardengine.hpp>
to
QuantLib-1.0/ql/instruments/forwardvanillaoption.cpp
and the problem was gone.
As i previously wrote, when compiling Quantlib with Sunstudio i got
a lot of undefined "M_PI", "sqrt" etc..
I solved these by simply adding lots of "#include <math.h>" to the sources,
perhaps this could be done more elegantly at a central location.
But overall i can say QuantLib builds and runs fine on Solaris10/Sparc/Sunstudio12.1
with only minor modifications.
|
|
From: Luigi B. <lui...@gm...> - 2010-04-09 07:46:16
|
On Wed, 2010-03-24 at 11:42 -0700, Nathan Abbott wrote: > There has been a problem with using QuantLib with .Net Framework. > [...] The better solution is to place the singleton class under the > preprocessor "pragma managed" and get rid of lines 69-70. Ok, done. Thanks, Luigi -- The first thing we do, let's kill all the lawyers. -- W. Shakespeare, "King Henry VI, Part II" |
|
From: Stéphane L. <ste...@gm...> - 2010-04-02 17:41:01
|
Hi all, in the toDo list i saw that improvments are to be made in the and of spline implementation. So if someone may say to me what are the problems ill be ok to see what it returns about. http://stephane.lefranc.free.fr/Splines/splines.pdf thx |
|
From: Gary K. <gar...@gm...> - 2010-04-01 07:39:35
|
Just ran the same test suite this morning, it passes fine. I guess something in the test is relying the system date being a good business day. gary On 31 March 2010 13:05, Luigi Ballabio <lui...@gm...> wrote: > On Sun, 2010-03-28 at 12:52 +0100, Gary Kennedy wrote: >> I ran the test suite on new install of openSUSE 11.2 (64bit) >> The following errors occur. > > Ok, thanks. Do they still occur today? > > Luigi > > > -- > > What is written without effort is, in general, read without pleasure. > -- Samuel Johnson > > > |
|
From: Andrea <mar...@go...> - 2010-03-31 19:54:13
|
On 31/03/10 17:09, Luigi Ballabio wrote:
> In your design, the instrument builds the path pricer and passes it to
> the engine, so the parameters don't need to be passed. However, in
> doing so, you've coupled the instrument to the Monte Carlo method. On
> the one hand, the instrument (which used to model the real-world
> contract, independent of how it would be priced) now has to care about
> building a Monte Carlo path pricer (and in principle, has to take inputs
> related to MC calculations such as the number of steps, as well as
> inputs such as the stochastic process to use.) On the other hand, once
> you've put the path pricer in the instrument arguments, you've ruled out
> using another, non-MC engine.
You are right.
The PathMultiAssetOption contains a method
virtual boost::shared_ptr<PathPayoff> pathPayoff() const = 0;
That is 100% coupled with the MC engine.
If I wanted to price with a PDE, I would need to add something like
virtual boost::shared_ptr<PDE????> pdePayoff() const = 0;
Which might be considered good or bad. I am not sure either way.
Maybe one could multiple inherit from each engine-base class that the product supports (e.g. MC or
PDE), rather than forcing all engines in the base class and then to all instruments.
Alternatively, could we register a factory of path pricers against Instruments so to move the method
pathPayoff() elsewhere?
Something like
shared_ptr<PathPricer> PathPricerFactory::create(shared_ptr<Instrument> ins);
I am not too good with design patterns, but this sounds like a visitor issue. Would it help?
> Unfortunately, I don't have a solution for this. One road to try might
> be to write a template engine that just passes the entire arguments
> structure to the path pricer; something like
>
> template <class InstrumentType,
> class PricerType>
> class McEngine : public InstrumentType::engine {
> ...
> shared_ptr<PathPricer> pathPricer() const {
> return new PricerType(
> dynamic_pointer_cast<InstrumentType::arguments>(
> getArguments()));
> }
> };
>
> after which the path pricer can extract the needed parameters from the
> argument structure. You'll probably have to add another template
> parameter for the type of stochastic process to use in order to
> instantiate the path generator.
>
Here the path pricer is a template argument, so I don't need to *write* a new McEngine, but I still
need to write the code to *instantiate* each new engine. Which is a step in the right direction.
Still need to think about it...
Andrea
|
|
From: Luigi B. <lui...@gm...> - 2010-03-31 16:11:23
|
On Mon, 2010-03-15 at 12:27 +0000, Andrea wrote: > I would like to return more information from a run of the LS American > Montecarlo. For instance, the probability of exercise at each exercise > time. > > [...] > > What I could do is to change the ValueType template argument of the > PathPricer (default to Real) and make it a more complicated structure. > > Is there an example of something similar? No, I'm afraid not. Luigi -- Do the right thing. It will gratify some people and astonish the rest. -- Mark Twain |
|
From: Luigi B. <lui...@gm...> - 2010-03-31 16:10:39
|
On Mon, 2010-03-15 at 12:49 +0000, Andrea wrote:
> I have a question about the role of PathPricer / Instrument and
> engines in the MC framework.
>
> [...]
>
> It looks to me that the PathPricer is ultimately the object that is
> able to compute the "values" for a give stochastic path.
> The path prices usually needs some information coming from the
> Instrument (sometime the Payoff object, other times else) to be able
> to do this. And it is directly created by the engine for that
> particular instrument.
Correct.
> Now, my question is the following: it looks like an engine can only
> work with one pathpricer which can only work with one instrument.
> So for every new option one needs to write instrument, pathpricer,
> engine, makeengine
Yes, I'm not very happy with it either. As you probably saw, that would
be because different parameters need to be passed from the instrument to
the engine to the path pricer. One way to bypass the problem might be
the one you suggest, namely,
> If the PathPricer was somehow "inferred" from the instrument, one
> could (maybe) get rid of all (maybe just some) of the engines (and
> makeengines) for a generic one.
>
> This is what I did try to do with the code in mcbasket, there is only
> one engine and the pathpricer for all instruments (inheriting from
> PathMultiAssetOption) is always the same.
In your design, the instrument builds the path pricer and passes it to
the engine, so the parameters don't need to be passed. However, in
doing so, you've coupled the instrument to the Monte Carlo method. On
the one hand, the instrument (which used to model the real-world
contract, independent of how it would be priced) now has to care about
building a Monte Carlo path pricer (and in principle, has to take inputs
related to MC calculations such as the number of steps, as well as
inputs such as the stochastic process to use.) On the other hand, once
you've put the path pricer in the instrument arguments, you've ruled out
using another, non-MC engine.
Unfortunately, I don't have a solution for this. One road to try might
be to write a template engine that just passes the entire arguments
structure to the path pricer; something like
template <class InstrumentType,
class PricerType>
class McEngine : public InstrumentType::engine {
...
shared_ptr<PathPricer> pathPricer() const {
return new PricerType(
dynamic_pointer_cast<InstrumentType::arguments>(
getArguments()));
}
};
after which the path pricer can extract the needed parameters from the
argument structure. You'll probably have to add another template
parameter for the type of stochastic process to use in order to
instantiate the path generator.
Later,
Luigi
--
What is written without effort is, in general, read without pleasure.
-- Samuel Johnson
|
|
From: <mys...@go...> - 2010-03-31 12:36:29
|
Hello, Is there a way to use Quantlib into Visual Basic .Net (specifically in Visual Basic Express 2008)? Thank you and regards Arnaud Dupuis |
|
From: Luigi B. <lui...@gm...> - 2010-03-31 12:06:05
|
On Sun, 2010-03-28 at 12:52 +0100, Gary Kennedy wrote: > I ran the test suite on new install of openSUSE 11.2 (64bit) > The following errors occur. Ok, thanks. Do they still occur today? Luigi -- What is written without effort is, in general, read without pleasure. -- Samuel Johnson |
|
From: Gary K. <gar...@gm...> - 2010-03-28 11:52:58
|
FYI I ran the test suite on new install of openSUSE 11.2 (64bit) The following errors occur. Gary gary@linux-lnki:~/quantlib/trunk/QuantLib/test-suite> quantlib-test-suite Running 446 test cases... unknown location(0): fatal error in "QuantLib::detail::quantlib_test_case(&CreditDefaultSwapTest::testImpliedHazardRate)": std::exception: negative time (-0.00273973) given utilities.hpp(78): last checkpoint optionletstripper.cpp(303): fatal error in "QuantLib::detail::quantlib_test_case(&OptionletStripperTest::testFlatTermVolatilityStripping1)": option tenor: 7Y strike: 4.000000 % stripped vol price: 2.760330 % constant vol price: 2.763458 % error: 0.003129 % tolerance: 0.002500 % optionletstripper.cpp(362): fatal error in "QuantLib::detail::quantlib_test_case(&OptionletStripperTest::testTermVolatilityStripping1)": option tenor: 7Y strike: 4.000000 % stripped vol price: 2.389897 % constant vol price: 2.392624 % error: 0.002727 % tolerance: 0.002500 % Tests completed in 15 m 28 s *** 3 failures detected in test suite "Master Test Suite" gary@linux-lnki:~/quantlib/trunk/QuantLib/test-suite> gcc -version gcc: unrecognized option '-version' gcc: no input files gary@linux-lnki:~/quantlib/trunk/QuantLib/test-suite> gcc --version gcc (SUSE Linux) 4.4.1 [gcc-4_4-branch revision 150839] Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. gary@linux-lnki:~/quantlib/trunk/QuantLib/test-suite> |
|
From: Gary K. <gar...@gm...> - 2010-03-27 09:26:40
|
Are there swaption approximations in the market models code that one might use for calibration, in particular, Kawai 2003 approximation? gary |