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: Ferdinando A. <na...@am...> - 2010-08-03 10:37:36
|
Hi Dima On Mon, Jul 19, 2010 at 1:47 PM, Dima <dim...@go...> wrote: > I can't find a constructor for the Euribor Overnight rate. Eonia in the ql/indexes/ibor/eonia.hpp file > I can't use the standard Euribor constructor > which points me to the "dedicated DailyTenor constructor". Where can I > find the dedication? not sure I got this point. A few more details would have been appreciated: are you using C++ or Excel? which library version? I must confess I'm puzzled how people would fire questions on the mailing lists without providing this basic information Anyway... the EURLibor class has a DailyTenorEURLibor sister class, while the Euribor doesn't have such a similar sister. All 3 derive from IborIndex. Eonia derives from OvernightIndex, which derives from IborIndex too. OvernightIndex can be used in OvernightIndexedSwap, while IborIndex cannot hope it helps ciao -- Nando |
|
From: Kim K. T. <kue...@vo...> - 2010-07-30 20:51:04
|
Hi Patrick, henaffp schrieb: > Hello, > > I can build and run the entire test suite > /usr/local/bin/quantlib-test-suite > > I'm now trying to run a single unit test with > /usr/local/bin/quantlib-test-suite --run_test=xxx > test cases in quantlib are registered using free functions instead of arguments. So i am afraid that this is not possible. Take a look at test-suite\utilities.hpp on line 63. It uses BOOST_TEST_CASE instead of BOOST_AUTO_TEST_CASE. A workaround would be u just comment the tests out in file quantlibtestsuite.hpp that you dont want to run. HTH -Kim > What should xxx look like? If I take the example of the Quotetest suite > (quotes.cpp), I see that > the suite is named "Quote tests" > > but > /usr/local/bin/quantlib-test-suite --run_test="Quotes tests" > does not work, nor many variations on that theme. > > Could anyone indicate how to do this? > > Thanks in advance > > Patrick Hénaff > |
|
From: Javit H. <ch...@vi...> - 2010-07-30 05:49:49
|
I updated the generalized Hull White model and performed tests with QL-1.0.1. Tests are successful. For some reason calibration takes longer now. In the BermudanSwaption.cpp, I changed the optimization end criteria down to 40 and 10 from 400 and 100 for the max iteration and stationary iterations. This way, it takes shorter to calibrate. I attached the files. The changes: -- For some reason, parameter.hpp in QL-1.0.1 is not the same as trunk version 17224. The trunk version is the correct one except the line 145 : Parameter(times.size()+1, where the “+1” should go away. -- The changes in GHW classes are only at the lines where a PiecewiseConstantParameter class is initiated. The new parameter.hpp accepts constraints at the initialization. I imposed positive constraints for both the a_ and sigma_ parameters in the model. Here are my suggestions: -- Update the parameter.hpp in QL-1.0.1 as above. -- Update the GHW model files with the ones attached. -- The BermudanSwaption.cpp test file can be modified as the one I attached to include the GHW test in the test-suite. The BermudanSwaption.cpp output from my laptop is below. I look forward to your comments. Thank you, Javit G2 (analytic formulae) calibration 1x5: model 10.05475 %, market 11.48000 % (-1.42525 %) 2x4: model 10.48803 %, market 11.08000 % (-0.59197 %) 3x3: model 10.67504 %, market 10.70000 % (-0.02496 %) 4x2: model 10.83340 %, market 10.21000 % (+0.62340 %) 5x1: model 10.98264 %, market 10.00000 % (+0.98264 %) calibrated to: a = 0.099851, sigma = 0.010545 b = 0.099851, eta = 0.010545 rho = -0.74998 Hull-White (analytic formulae) calibration 1x5: model 11.87889 %, market 11.48000 % (+0.39889 %) 2x4: model 11.76594 %, market 11.08000 % (+0.68594 %) 3x3: model 11.87495 %, market 10.70000 % (+1.17495 %) 4x2: model 11.88579 %, market 10.21000 % (+1.67579 %) 5x1: model 11.85322 %, market 10.00000 % (+1.85322 %) calibrated to: a = 0.10014, sigma = 0.0076919 Hull-White (numerical) calibration 1x5: model 10.31044 %, market 11.48000 % (-1.16956 %) 2x4: model 10.50842 %, market 11.08000 % (-0.57158 %) 3x3: model 10.62836 %, market 10.70000 % (-0.07164 %) 4x2: model 10.71895 %, market 10.21000 % (+0.50895 %) 5x1: model 10.81202 %, market 10.00000 % (+0.81202 %) calibrated to: a = 0.10014, sigma = 0.006877 Black-Karasinski (numerical) calibration 1x5: model 12.85815 %, market 11.48000 % (+1.37815 %) 2x4: model 13.11871 %, market 11.08000 % (+2.03871 %) 3x3: model 13.25333 %, market 10.70000 % (+2.55333 %) 4x2: model 13.33942 %, market 10.21000 % (+3.12942 %) 5x1: model 13.43137 %, market 10.00000 % (+3.43137 %) calibrated to: a = 0.08249, sigma = 0.1667 Generalized Hull-White calibration 1x5: model 11.16996 %, market 11.48000 % (-0.31004 %) 2x4: model 11.15188 %, market 11.08000 % (+0.07188 %) 3x3: model 10.87750 %, market 10.70000 % (+0.17750 %) 4x2: model 10.42011 %, market 10.21000 % (+0.21011 %) 5x1: model 9.78110 %, market 10.00000 % (-0.21890 %) parameter[0] =, 0.04 parameter[1] =, 0.37449 parameter[2] =, 0.084144 parameter[3] =, 0.1 parameter[4] =, 0.24785 parameter[5] =, 0.053831 Payer bermudan swaption struck at 5.00000 % (ATM) Generalized HW: 14.515 G2: 14.549 HW: 15.005 HW (num): 13.404 BK: 16.457 Payer bermudan swaption struck at 6.00000 % (OTM) Generalized HW: 3.671 G2: 3.4158 HW: 3.6088 HW (num): 2.6985 BK: 5.6241 Payer bermudan swaption struck at 4.00000 % (ITM) Generalized HW: 42.622 G2: 42.838 HW: 43.154 HW (num): 42.52 BK: 42.998 Run completed in 15 m 31 s Press any key to continue . . . Alexander Lotter wrote: > > > > Javit Hafizoglu wrote: >> >> I'm relocating. Lots of things to do. I'm planning to finish this update >> by the end of June. >> >> > > Hi Javit, > > Great. I could assist you by tests. Just let me know, if you need any > help. > > Take care > > Alex > > http://old.nabble.com/file/p29303026/GHW.rar GHW.rar -- View this message in context: http://old.nabble.com/Generalized-Hull-White-model-problems-tp28647789p29303026.html Sent from the quantlib-dev mailing list archive at Nabble.com. |
|
From: henaffp <pat...@ke...> - 2010-07-30 00:41:11
|
Hello, I can build and run the entire test suite /usr/local/bin/quantlib-test-suite I'm now trying to run a single unit test with /usr/local/bin/quantlib-test-suite --run_test=xxx What should xxx look like? If I take the example of the Quotetest suite (quotes.cpp), I see that the suite is named "Quote tests" but /usr/local/bin/quantlib-test-suite --run_test="Quotes tests" does not work, nor many variations on that theme. Could anyone indicate how to do this? Thanks in advance Patrick Hénaff -- View this message in context: http://old.nabble.com/unit-test-tp29301875p29301875.html Sent from the quantlib-dev mailing list archive at Nabble.com. |
|
From: james h. <j_h...@ya...> - 2010-07-25 13:44:08
|
Yes, a Gamma process would be good to have, not just for VG. Maybe the best way to implement VG is to use Brownian motion with a random time change given by the gamma process. I'm not sure of the pros and cons versus taking the difference of two gamma processes, or of approximating VG by a compound Poisson process. James ----- Original Message ---- From: animesh saxena <ani...@gm...> To: james hirschorn <j_h...@ya...> Cc: qua...@li...; qua...@li... Sent: Mon, July 19, 2010 7:22:54 PM Subject: Re: [Quantlib-dev] [Quantlib-users] Poisson process Why not just have a gamma process. it will solve both the issues. VG Process can be coded via difference of two gamma processes Also it's more generic compared to PoissonProcess Am also missing processes which allow fat tailed distributions in Quantlib On 7/19/10 9:09 PM, james hirschorn wrote: > Thanks Dima and Dominik, > > (1) If you don't mind a comment by a newbie: I think the documentation for > StochasticProcess and StochasticProcess1D is misleading. The Detailed > Description does not mention the possibility of including jump processes in > derived classes. > > (2) Is there any point in implementing a PoissonProcess class? > > (3) The reason for my original question was that I was looking for the Variance > Gamma process. Is there some plan to implement this? > > James > > > ----- Original Message ---- > From: Dominik Holenstein<dho...@gm...> > To: james hirschorn<j_h...@ya...> > Sent: Mon, July 19, 2010 2:22:38 AM > Subject: Re: [Quantlib-users] Poisson process > > Poisson distribution is here: > Quantlib\QuantLib-1.0.1\ql\math\distributions\poissondistribution.hpp > > Used here: >Quantlib\QuantLib-1.0.1\ql\pricingengines\vanilla\batesengine.hpp/batesengine.cpp >p > > Quantlib\QuantLib-1.0.1\ql\processes\batesprocess.hpp/batesprocess.cpp > Quantlib\QuantLib-1.0.1\ql\math\randomnumbers\rngtraits.hpp > > Dominik > > > > > On Mon, Jul 19, 2010 at 2:43 AM, james hirschorn<j_h...@ya...> wrote: >> Looking at the documentation, it appears that QuantLib only implements >> stochastic processes based on Brownian motion, i.e. Ito processes. >> >> Is this correct? There is no Poisson process for example? >> >> Thanks, >> J >> >> >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > -- Regards, Animesh Saxena (http://quantanalysis.wordpress.com) |
|
From: <tar...@li...> - 2010-07-21 21:09:16
|
Hi all, I am using quantlib in Matlab but the job is quite frustrating because of Matlab mex-files. I would like to know if someone has experience on this staff and if yes I would like to know if it is possible to pass directly from c++ to matlab (via mex file) directly the object created in c++ and re-use their structure. Second question is about Mathematica link...any one knows any version later than those implemented by Niels..I mean is there any link with Mathematica on the latest version of quantlib? thanks rgrds P |
|
From: animesh s. <ani...@gm...> - 2010-07-19 23:23:10
|
Why not just have a gamma process. it will solve both the issues. VG Process can be coded via difference of two gamma processes Also it's more generic compared to PoissonProcess Am also missing processes which allow fat tailed distributions in Quantlib On 7/19/10 9:09 PM, james hirschorn wrote: > Thanks Dima and Dominik, > > (1) If you don't mind a comment by a newbie: I think the documentation for > StochasticProcess and StochasticProcess1D is misleading. The Detailed > Description does not mention the possibility of including jump processes in > derived classes. > > (2) Is there any point in implementing a PoissonProcess class? > > (3) The reason for my original question was that I was looking for the Variance > Gamma process. Is there some plan to implement this? > > James > > > ----- Original Message ---- > From: Dominik Holenstein<dho...@gm...> > To: james hirschorn<j_h...@ya...> > Sent: Mon, July 19, 2010 2:22:38 AM > Subject: Re: [Quantlib-users] Poisson process > > Poisson distribution is here: > Quantlib\QuantLib-1.0.1\ql\math\distributions\poissondistribution.hpp > > Used here: > Quantlib\QuantLib-1.0.1\ql\pricingengines\vanilla\batesengine.hpp/batesengine.cpp > > Quantlib\QuantLib-1.0.1\ql\processes\batesprocess.hpp/batesprocess.cpp > Quantlib\QuantLib-1.0.1\ql\math\randomnumbers\rngtraits.hpp > > Dominik > > > > > On Mon, Jul 19, 2010 at 2:43 AM, james hirschorn<j_h...@ya...> wrote: >> Looking at the documentation, it appears that QuantLib only implements >> stochastic processes based on Brownian motion, i.e. Ito processes. >> >> Is this correct? There is no Poisson process for example? >> >> Thanks, >> J >> >> >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > -- Regards, Animesh Saxena (http://quantanalysis.wordpress.com) |
|
From: james h. <j_h...@ya...> - 2010-07-19 15:39:36
|
Thanks Dima and Dominik, (1) If you don't mind a comment by a newbie: I think the documentation for StochasticProcess and StochasticProcess1D is misleading. The Detailed Description does not mention the possibility of including jump processes in derived classes. (2) Is there any point in implementing a PoissonProcess class? (3) The reason for my original question was that I was looking for the Variance Gamma process. Is there some plan to implement this? James ----- Original Message ---- From: Dominik Holenstein <dho...@gm...> To: james hirschorn <j_h...@ya...> Sent: Mon, July 19, 2010 2:22:38 AM Subject: Re: [Quantlib-users] Poisson process Poisson distribution is here: Quantlib\QuantLib-1.0.1\ql\math\distributions\poissondistribution.hpp Used here: Quantlib\QuantLib-1.0.1\ql\pricingengines\vanilla\batesengine.hpp/batesengine.cpp Quantlib\QuantLib-1.0.1\ql\processes\batesprocess.hpp/batesprocess.cpp Quantlib\QuantLib-1.0.1\ql\math\randomnumbers\rngtraits.hpp Dominik On Mon, Jul 19, 2010 at 2:43 AM, james hirschorn <j_h...@ya...> wrote: > Looking at the documentation, it appears that QuantLib only implements > stochastic processes based on Brownian motion, i.e. Ito processes. > > Is this correct? There is no Poisson process for example? > > Thanks, > J > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Dima <dim...@go...> - 2010-07-19 11:47:36
|
I can't find a constructor for the Euribor Overnight rate. And I can't use the standard Euribor constructor which points me to the "dedicated DailyTenor constructor". Where can I find the dedication? |
|
From: Luigi B. <lui...@gm...> - 2010-07-16 15:25:24
|
Hi all, just a quick note to say that I'll be in vacation for the next couple of weeks (without a connection the internet---I'm told it does a lot of good.) Therefore, I won't be answering posts to the mailing lists until the beginning of August. If you never considered answering posts from fellow users, this might be a good time to begin... See you, 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: quantobe <qua...@go...> - 2010-07-16 14:30:24
|
Hello all, I am quite new to ql, so bear with me if I'm off in my post. I need to implement swing option pricing. the setting under which I want to implement this is as in this paper: http://www.springerlink.com/content/f1m78783l64rj300/ - Basically I m going to use OU process - One factor model for dynamics of forward curve (as in above paper) - using trinomial tree for pricing engine - defining a new instrument as swing option. I need to have a concrete one factor model class for implementing some option pricing in commodities. I need this really to implement calculation of spot price which is comprised of a stochastic part (solution to OU process) plus a deterministic part. as I can see the OneFactorModel in short rate model is an abstract class, from which i dont need shortRateDynamics, shortRateTree etc. I think All I really need is something that using which I can build a tree representing the dynamics ofmy OU process. My question is that shall I use an existing class here, or shall derive my own ? Any help is greatly appreciated. |
|
From: Dirk E. <ed...@de...> - 2010-07-15 15:22:44
|
Hi all, We're trying to put together RQuantLib for Win64. RQuantLib has worked for many years using Win 32-bit, and as an R extension requires to be built with the same compiler as R -- hence MinGW. That works fine using the Dev-C++ project file. Now R is turning to dual builds for 32 and 64 bit Windows using the MinGW versions of gcc / g++ 4.5. Has anybody tried this toolchain for QuantLib? Does Dev-C++ exist, or does one point the 32-bit IDE at the 64-bit compilers? Thanks for any pointers. -- Regards, Dirk |
|
From: <ja...@fr...> - 2010-07-13 15:08:56
|
Hi again,
Its not a large difference though, have you played around with schedule rules,
year fractions etc...? e.g. the bootstrap date is May 15th, so
the year fraction is above 0.25 for the first period.
Regards
Pepe
----- Mail Original -----
De: "animesh saxena" <ani...@gm...>
À: ja...@fr...
Cc: qua...@li...
Envoyé: Lundi 12 Juillet 2010 21h28:27 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
Objet: Re: [Quantlib-dev] Survival Probability
Pepe,
Thanks for your mail. I located the class and could understand the
implementation a bit. Another issue is I tried running the CDS example
in quantlib reference. It gave following output.
hazard rate on May 15th, 2007 is 0.0299689
hazard rate on September 20th, 2007 is 0.0299689
hazard rate on December 20th, 2007 is 0.0299613
hazard rate on June 20th, 2008 is 0.0299619
hazard rate on June 22nd, 2009 is 0.0299607
Some survival probability values:
1Y survival probability: 97.040061 %
expected: 97.040000 %
2Y survival probability: 94.175780 %
expected: 94.180000 %
I am assuming it is calculating implied survival probabilities based on
Credit Spreads of 150bps, taken in the example. Assuming recover rate of
50%, and using the standard bootstrapping approach. As per bootstrapping
default leg = coupon leg.
So I am getting these values for year 1 and 2.
97.060795%
For year 2, 94.2338%
Attaching excel sheet for simple calculations done for CDS.
From these values it's easy to back out hazard rate using S(t) =
exp^(-lambda * t) = 97.060795, where lambda is hazard rate. For first
case it's 2.98326%
Thanks
Animesh Saxena
(http://quantanalysis.wordpress.com)
On 7/11/10 3:28 PM, ja...@fr... wrote:
> Hi,
> DefaultDensityStructure does not rely on a hazard rate model to compute the probabilities. You might well have other ways to compute them. Dont be confused by the methods in the parent class, you can still compute the rates. But see that
> DefaultDensityStructure::defaultDensityImpl
> does need to be making any reference to a HR model. Its more 'abstract' conceptually
>
> The more specialized class and method:
> HazardRateStructure::survivalProbabilityImpl
> is what you have in mind.
>
> Hope it helps.
> Pepe
>
>
> ----- Mail Original -----
> De: "animesh saxena"<ani...@gm...>
> À: qua...@li...
> Envoyé: Samedi 10 Juillet 2010 17h06:02 GMT -08:00 Tijuana / Baja California
> Objet: [Quantlib-dev] Survival Probability
>
> Minor doubt in defaultdensitystructure.cpp
>
> In the function
> Probability DefaultDensityStructure::survivalProbabilityImpl(Time t)
> const {
> static GaussChebyshevIntegration integral(48);
> // this stores the address of the method to integrate (so that
> // we don't have to insert its full expression inside the
> // integral below--it's long enough already)
> Real (DefaultDensityStructure::*f)(Time) const =
> &DefaultDensityStructure::defaultDensityImpl;
> // the Gauss-Chebyshev quadratures integrate over [-1,1],
> // hence the remapping (and the Jacobian term t/2)
> Probability P = 1.0 - integral(remap(bind(f,this,_1), t)) * t/2.0;
> //QL_ENSURE(P>= 0.0, "negative survival probability");
> return std::max<Real>(P, 0.0);
> }
>
> The following code is present. If lambda is constant then survival
> probability is exp(-lambda * t)
> If not then we integrate to find lambda over [0,t] and it becomes
> exp(Integral over [0,t] lambda dt)
>
> In the code it looks like it is calculating default probability which is
> 1 - P or 1 - Survival Probability.
> Maybe my understanding is wrong. Can someone explain?
>
>
> Probability P = 1.0 - integral(remap(bind(f,this,_1), t)) * t/2.0;
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> QuantLib-dev mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>
|
|
From: Luigi B. <lui...@gm...> - 2010-07-13 13:00:39
|
On Fri, 2010-06-11 at 09:49 +0800, P Nelnik wrote: > Due to the current quantlib compiler settings, access violations are > not caught with catch(...) > as a result we can have some rather ungraceful crashes. > > I wonder are there reasons why the settings are the way they are? I don't think there's a particular reason. It might have been ported from an earlier compiler version, or the compiler defaults. We just didn't give it much thought. > I'd suggest changing the settings. > To do this in MS Visual C++ 2008, click on: > Project -> Properties -> Configuration Properties -> C/C++ -> Code > Generatoin > and set: > Enable C++ Exceptions > to > Yes With SEH Exceptions (/EHa) > rather than > Yes ( /EHsc) Ok, I'll do it for next release. Does the setting just add some error-catching code, or is there any binary-compatibility issue to be aware of? Luigi -- Steinbach's Guideline for Systems Programming: Never test for an error condition you don't know how to handle. |
|
From: Luigi B. <lui...@gm...> - 2010-07-13 12:54:30
|
On Mon, 2010-07-12 at 15:47 -0500, Kakhkhor Abdijalilov wrote: > >We should define P though. Do you care to give it a try? > I would, but never used doxygen before. No problem, just send me the text. > >> 5. instrument.hpp > >> "virtual" can be omitted from the declaration of 'performCalculations'. > > >No, that's intentional. We wanted to leave it virtual so that one can > >override the engine mechanism if needed. > > It is not a bug, but more like pedantic adherence to the coding style. > performCalculations is declared virtual in LazyObject. Sorry, I though you meant to declare it as non-virtual. You're right, it's redundant. It doesn't hurt though. Luigi -- When I was a boy of fourteen, my father was so ignorant I could hardly stand to have the old man around. But when I got to be twenty-one, I was astonished at how much the old man had learned in seven years. -- Mark Twain |
|
From: Kakhkhor A. <kab...@gm...> - 2010-07-12 20:47:41
|
>> 1. generalstatistics.hpp >> In reset() method use "the swap trick" to reset the vector of >> samples. The assignment >> of an empty vector doesn't free the storage. (Item 17 in >> "Effective STL"). >I'm not sure about that. It's likely that after a reset(), we'll start >adding new samples, in which case the storage will save us an >allocation. Agree. The storage can be reused later. In that case, we could simply use vector's clear method instead of assigning an empty vector. >We should define P though. Do you care to give it a try? I would, but never used doxygen before. >> 5. instrument.hpp >> "virtual" can be omitted from the declaration of 'performCalculations'. >No, that's intentional. We wanted to leave it virtual so that one can >override the engine mechanism if needed. It is not a bug, but more like pedantic adherence to the coding style. performCalculations is declared virtual in LazyObject. We could drop the keyword virtual when overwriting performCalculations in Instrument, just like we drop the keyword virtual when overwriting all other virtual methods in derived classes. Regards, Kakhkhor Abdijalilov. |
|
From: animesh s. <ani...@gm...> - 2010-07-12 19:29:31
|
Pepe,
Thanks for your mail. I located the class and could understand the
implementation a bit. Another issue is I tried running the CDS example
in quantlib reference. It gave following output.
hazard rate on May 15th, 2007 is 0.0299689
hazard rate on September 20th, 2007 is 0.0299689
hazard rate on December 20th, 2007 is 0.0299613
hazard rate on June 20th, 2008 is 0.0299619
hazard rate on June 22nd, 2009 is 0.0299607
Some survival probability values:
1Y survival probability: 97.040061 %
expected: 97.040000 %
2Y survival probability: 94.175780 %
expected: 94.180000 %
I am assuming it is calculating implied survival probabilities based on
Credit Spreads of 150bps, taken in the example. Assuming recover rate of
50%, and using the standard bootstrapping approach. As per bootstrapping
default leg = coupon leg.
So I am getting these values for year 1 and 2.
97.060795%
For year 2, 94.2338%
Attaching excel sheet for simple calculations done for CDS.
From these values it's easy to back out hazard rate using S(t) =
exp^(-lambda * t) = 97.060795, where lambda is hazard rate. For first
case it's 2.98326%
Thanks
Animesh Saxena
(http://quantanalysis.wordpress.com)
On 7/11/10 3:28 PM, ja...@fr... wrote:
> Hi,
> DefaultDensityStructure does not rely on a hazard rate model to compute the probabilities. You might well have other ways to compute them. Dont be confused by the methods in the parent class, you can still compute the rates. But see that
> DefaultDensityStructure::defaultDensityImpl
> does need to be making any reference to a HR model. Its more 'abstract' conceptually
>
> The more specialized class and method:
> HazardRateStructure::survivalProbabilityImpl
> is what you have in mind.
>
> Hope it helps.
> Pepe
>
>
> ----- Mail Original -----
> De: "animesh saxena"<ani...@gm...>
> À: qua...@li...
> Envoyé: Samedi 10 Juillet 2010 17h06:02 GMT -08:00 Tijuana / Baja California
> Objet: [Quantlib-dev] Survival Probability
>
> Minor doubt in defaultdensitystructure.cpp
>
> In the function
> Probability DefaultDensityStructure::survivalProbabilityImpl(Time t)
> const {
> static GaussChebyshevIntegration integral(48);
> // this stores the address of the method to integrate (so that
> // we don't have to insert its full expression inside the
> // integral below--it's long enough already)
> Real (DefaultDensityStructure::*f)(Time) const =
> &DefaultDensityStructure::defaultDensityImpl;
> // the Gauss-Chebyshev quadratures integrate over [-1,1],
> // hence the remapping (and the Jacobian term t/2)
> Probability P = 1.0 - integral(remap(bind(f,this,_1), t)) * t/2.0;
> //QL_ENSURE(P>= 0.0, "negative survival probability");
> return std::max<Real>(P, 0.0);
> }
>
> The following code is present. If lambda is constant then survival
> probability is exp(-lambda * t)
> If not then we integrate to find lambda over [0,t] and it becomes
> exp(Integral over [0,t] lambda dt)
>
> In the code it looks like it is calculating default probability which is
> 1 - P or 1 - Survival Probability.
> Maybe my understanding is wrong. Can someone explain?
>
>
> Probability P = 1.0 - integral(remap(bind(f,this,_1), t)) * t/2.0;
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> QuantLib-dev mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>
|
|
From: Luigi B. <lui...@gm...> - 2010-07-12 16:41:32
|
On Mon, 2010-07-05 at 16:51 -0500, Kakhkhor Abdijalilov wrote: > I was looking into QuantLib implementation recently and noticed > several things which could be improved (IMHO). These aren't really > bugs, more like small issues related to documentation, coding style > and efficiency. Here is my list. Kakhkhor, thanks for the report. Here we go: > ============================================================= > 1. generalstatistics.hpp > In reset() method use "the swap trick" to reset the vector of > samples. The assignment > of an empty vector doesn't free the storage. (Item 17 in > "Effective STL"). I'm not sure about that. It's likely that after a reset(), we'll start adding new samples, in which case the storage will save us an allocation. > Doxygen for percentile() should say something like this: > Smallest x from the sample, such that P(X<=x) >= y. > > Doxygen for topPercentile() should say somthing like this: > Largest x from the sample, such that P(X>=x) >= y. We should define P though. Do you care to give it a try? > 2. capfloortermvolcurve.hpp. > Use private inheritance from boost::noncopyable. Done. > 3. longstaffschwartzpathpricer.hpp > It is very hard to understand what is going on here. > > Can we replace it with this simple loop? > > \code > for(Size i=0; i<n; ++i) > prices[i] = (*pathPricer_)(paths_[i], len-1); > \endcode Done. > At the end of LongstaffSchwartzPathPricer::calibrate() use "the > swap trick" to reset > the vector paths_, instead of using paths_.clear(). Clearing a > vector doesn't free the storage. > The calibration of LongstaffSchwartzPathPricer requires tons of > memory. We better to free > all the memory used by the vector paths_. Done. > 5. instrument.hpp > "virtual" can be omitted from the declaration of 'performCalculations'. No, that's intentional. We wanted to leave it virtual so that one can override the engine mechanism if needed. > 6. randomsequencegenerator.hpp > Document that both RNG::next() and RNG::nextInt32() are required. Done. > 7. timergrid.cpp > replace times_.reserve(steps) with times_.reserve(steps+1), because times_ > stores steps+1 values. Done. Thanks again, Luigi -- These are my principles, and if you don't like them... Well, I have others. -- Groucho Marx |
|
From: <ja...@fr...> - 2010-07-11 09:58:38
|
Hi,
DefaultDensityStructure does not rely on a hazard rate model to compute the probabilities. You might well have other ways to compute them. Dont be confused by the methods in the parent class, you can still compute the rates. But see that
DefaultDensityStructure::defaultDensityImpl
does need to be making any reference to a HR model. Its more 'abstract' conceptually
The more specialized class and method:
HazardRateStructure::survivalProbabilityImpl
is what you have in mind.
Hope it helps.
Pepe
----- Mail Original -----
De: "animesh saxena" <ani...@gm...>
À: qua...@li...
Envoyé: Samedi 10 Juillet 2010 17h06:02 GMT -08:00 Tijuana / Baja California
Objet: [Quantlib-dev] Survival Probability
Minor doubt in defaultdensitystructure.cpp
In the function
Probability DefaultDensityStructure::survivalProbabilityImpl(Time t)
const {
static GaussChebyshevIntegration integral(48);
// this stores the address of the method to integrate (so that
// we don't have to insert its full expression inside the
// integral below--it's long enough already)
Real (DefaultDensityStructure::*f)(Time) const =
&DefaultDensityStructure::defaultDensityImpl;
// the Gauss-Chebyshev quadratures integrate over [-1,1],
// hence the remapping (and the Jacobian term t/2)
Probability P = 1.0 - integral(remap(bind(f,this,_1), t)) * t/2.0;
//QL_ENSURE(P >= 0.0, "negative survival probability");
return std::max<Real>(P, 0.0);
}
The following code is present. If lambda is constant then survival
probability is exp(-lambda * t)
If not then we integrate to find lambda over [0,t] and it becomes
exp(Integral over [0,t] lambda dt)
In the code it looks like it is calculating default probability which is
1 - P or 1 - Survival Probability.
Maybe my understanding is wrong. Can someone explain?
Probability P = 1.0 - integral(remap(bind(f,this,_1), t)) * t/2.0;
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
QuantLib-dev mailing list
Qua...@li...
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
|
|
From: animesh s. <ani...@gm...> - 2010-07-11 00:06:14
|
Minor doubt in defaultdensitystructure.cpp
In the function
Probability DefaultDensityStructure::survivalProbabilityImpl(Time t)
const {
static GaussChebyshevIntegration integral(48);
// this stores the address of the method to integrate (so that
// we don't have to insert its full expression inside the
// integral below--it's long enough already)
Real (DefaultDensityStructure::*f)(Time) const =
&DefaultDensityStructure::defaultDensityImpl;
// the Gauss-Chebyshev quadratures integrate over [-1,1],
// hence the remapping (and the Jacobian term t/2)
Probability P = 1.0 - integral(remap(bind(f,this,_1), t)) * t/2.0;
//QL_ENSURE(P >= 0.0, "negative survival probability");
return std::max<Real>(P, 0.0);
}
The following code is present. If lambda is constant then survival
probability is exp(-lambda * t)
If not then we integrate to find lambda over [0,t] and it becomes
exp(Integral over [0,t] lambda dt)
In the code it looks like it is calculating default probability which is
1 - P or 1 - Survival Probability.
Maybe my understanding is wrong. Can someone explain?
Probability P = 1.0 - integral(remap(bind(f,this,_1), t)) * t/2.0;
|
|
From: animesh s. <ani...@gm...> - 2010-07-07 14:12:46
|
Stephen,
Thanks for the reply :). I don't generally trust
semi-analytical solutions if FD methods are applicable. The advantage in
FD methods is from a trader perspective you can model various scenarios.
In programming perspective it might be hard to see. So let me say my 2
bit as a quant / trader. Let's say I find out my greek vega from a very
sophisticated model say heston for a barrier option. Standard
programming practice / maths says that it's partial derivative of V /
sigma.
This is where the problem starts. Greeks are interrelated. If gamma of
option is positive and volatility is maximum and if you are long that
option then it will rise in price and you will earn lots of money (Rake
Millions ;) ).
If gamma is maximum and volatility is minimum and if you are long the
option, it won't affect your position much.
Similarly if gamma is negative and volatility is maximum and you are
long the option, oh dear you are gone with huge losses.
So for exotic structures in which gamma changes signs this modeling is
not possible in any of the models available till date! I believe if this
can somehow be incorporated into quantlib design it will make it a much
more practical tool.
More analysis on my post ->
http://quantanalysis.wordpress.com/2010/02/24/vega-the-stupid-greek/
Below is a simple implementation I have used at my workplace.
Parameters need to be fudged. I agree implementation might not be very
stable, but it can be done in a better way with other methods like crank
nicholson. I know the code is very badly written, but anyway my point is
making the fd model more generic so any partial differential equation
can be fudged as an operator. Of course too much waste for multi asset
options coz it will be too many for loops. So just wanted to know if
this is possible?
I can help with the math, and these days trying to learn the quantlib
design...hopefully will be able to pick up!
Thanks again for reading the mail,
Animesh Saxena
Associate
(Exotic Derivatives)
Blog -> http://quantanalysis.wordpress.com
void stochasticvol(double expiry, double strike, double interestrate,
int smax, int sigmax, double dt)
{
double
ds,dsig,a,b,c,d,rho,deltas,deltasig,deltasig1,deltasig2,gammas,gammasig,xgamma,theta;
int N,i,j,k;
ds = strike / smax*2;
dsig = (double)(1 / (double)sigmax);
N = (int)(expiry/dt) + 1;
dt = expiry/N;
a = 0.2;
b=1;
c=1;
d=1;
rho = 0;
double S[smax];
double Sig[sigmax];
double previousprices[smax][sigmax];
double newprices[smax][sigmax];
for(i=0;i<=smax;i++){
S[i] = i * ds;
}
std::cout<<ds;
for(j=0;j<=sigmax;j++)
Sig[j] = dsig * j;
for(i=0;i<=smax;i++)
for(j=0;j<=sigmax;j++) {
previousprices[i][j] = ((S[i] - strike)>0?S[i]-strike:0);
}
for(k=1;k<=N;k++) {
for(i=0;i<=smax-1;i++) {
for(j=0;j<=sigmax-1;j++)
{
deltas = (previousprices[i+1][j] -
previousprices[i-1][j])/(2*ds);
deltasig1 = (previousprices[i][j+1] -
previousprices[i][j])/dsig;
deltasig2 = (previousprices[i][j] -
previousprices[i][j-1])/dsig;
deltasig = deltasig1;
if((a-b * Sig[j]) < 0) deltasig = deltasig2;
gammas = (previousprices[i+1][j] - 2 * previousprices[i][j]
+ previousprices[i-1][j])/(ds*ds);
gammasig = (previousprices[i][j+1] - 2 *
previousprices[i][j] + previousprices[i][j-1])/(dsig*dsig);
xgamma = (previousprices[i+1][j+1] -
previousprices[i+1][j-1] - previousprices[i-1][j+1] +
previousprices[i-1][j-1])/(4*ds*dsig);
theta = 0.5 * Sig[j]*Sig[j] *S[i] *S[i] * gammas +
interestrate * S[i] * deltas - interestrate * previousprices[i][j] + 0.5
* d *d * Sig[j] * gammasig + c*(a-b * Sig[j])*deltasig + rho * Sig[j] *
S[i] * d * pow(Sig[j],2) * xgamma;
newprices[i][j] = previousprices[i][j] + dt *theta;
}
}
for(j=0;j<=sigmax-1;j++)
newprices[smax][j] = 2 * newprices[smax-1][j] -
newprices[smax-2][j];
for(i=0;i<=smax;i++)
newprices[i][sigmax] = 2 * newprices[i][sigmax-1] -
newprices[i][sigmax-2];
for(i=0;i<=smax;i++)
for(j=0;j<=sigmax;j++) {
previousprices[i][j] = newprices[i][j];
}
}
for(i=0;i<smax;i++)
for(j=0;j<sigmax;j++){
std::cout<<"Spot" << (i*ds) << "Vol:"<< (j*dsig) << "Price:"
<< newprices[i][j]<<"\n";
}
}
Stephen Tse wrote:
> Have you tried to implement it using other language and check the
> accuracy (against European call prices which has semi-analytical
> formula under the Heston model)?
>
> As far as I know, the mixed-derivative term is very difficult to
> handle and I have seen no research paper using standard FD method to
> discretize the Heston PDE. One recent paper uses ADI and may be of
> interest to you. Please see attachment.
>
>
> On Tue, Jul 6, 2010 at 5:43 AM, animesh saxena
> <ani...@gm... <mailto:ani...@gm...>> wrote:
>
>
> No FD method solution in the case of a generic partial
> differential equation like (Stochastic Vol Model)
>
> for {d sigma = p dt + q dX}, p = (a – b sigma2)
>
> Do read the pdf for bit more understanding. It's just a single page!
>
> I am not sure if this is implemented in quantlib, or maybe I don't
> know how to use it.
>
> Thanks for ur time
>
> Animesh Saxena
>
> Associate
>
> (Exotic Derivatives)
>
> Blog -> http://quantanalysis.wordpress.com
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first <http://sprint.com/first> --
> http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> QuantLib-dev mailing list
> Qua...@li...
> <mailto:Qua...@li...>
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>
>
>
>
> --
> Stephen Tse
> http://www.cs.uwaterloo.ca/~sttse/ <http://www.cs.uwaterloo.ca/%7Esttse/>
|
|
From: animesh s. <ani...@gm...> - 2010-07-06 09:44:02
|
No FD method solution in the case of a generic partial differential
equation like (Stochastic Vol Model)
for {d sigma = p dt + q dX}, p = (a – b sigma2)
Do read the pdf for bit more understanding. It's just a single page!
I am not sure if this is implemented in quantlib, or maybe I don't know
how to use it.
Thanks for ur time
Animesh Saxena
Associate
(Exotic Derivatives)
Blog -> http://quantanalysis.wordpress.com
|
|
From: Kakhkhor A. <kab...@gm...> - 2010-07-05 22:17:07
|
I was looking into QuantLib implementation recently and noticed
several things which could be improved (IMHO). These aren't really
bugs, more like small issues related to documentation, coding style
and efficiency. Here is my list.
=============================================================
1. generalstatistics.hpp
In reset() method use "the swap trick" to reset the vector of
samples. The assignment
of an empty vector doesn't free the storage. (Item 17 in
"Effective STL").
Doxygen for percentile() should say something like this:
Smallest x from the sample, such that P(X<=x) >= y.
Doxygen for topPercentile() should say somthing like this:
Largest x from the sample, such that P(X>=x) >= y.
2. capfloortermvolcurve.hpp.
Use private inheritance from boost::noncopyable.
3. longstaffschwartzpathpricer.hpp
It is very hard to understand what is going on here.
\code
std::transform(paths_.begin(), paths_.end(), prices.begin(),
boost::bind(&EarlyExercisePathPricer<PathType>
::operator(),
pathPricer_.get(), _1, len-1));
\endcode
Can we replace it with this simple loop?
\code
for(Size i=0; i<n; ++i)
prices[i] = (*pathPricer_)(paths_[i], len-1);
\endcode
At the end of LongstaffSchwartzPathPricer::calibrate() use "the
swap trick" to reset
the vector paths_, instead of using paths_.clear(). Clearing a
vector doesn't free the storage.
The calibration of LongstaffSchwartzPathPricer requires tons of
memory. We better to free
all the memory used by the vector paths_.
5. instrument.hpp
"virtual" can be omitted from the declaration of 'performCalculations'.
6. randomsequencegenerator.hpp
Document that both RNG::next() and RNG::nextInt32() are required.
7. timergrid.cpp
replace times_.reserve(steps) with times_.reserve(steps+1), because times_
stores steps+1 values.
=============================================================
Regards,
Kakhkhor Abdijalilov.
|
|
From: animesh s. <ani...@gm...> - 2010-07-03 21:53:03
|
I am trying to create an instance of fd class using this call FiniteDifferenceModel<CrankNicolson<TridiagonalOperator> > Obviously this is not possible since the constructor is (const operator_type& L, const bc_set& bcs, const std::vector<Time>& stoppingTimes = std::vector<Time>()) What I understand is stoppingTimes is an array for maturities. In case of plain vanilla or simple up out call it might be single maturity say 1 year. So that information can be easily sent through. The other two fields operator_type and bc_set are wierdos. Tough to get at first glance :) . Since the documentation is obsolete I tried opening up lots of header files and lots of cpp files to wrap around the code in my head. (Frankly speaking I come from C Linux Kernel Coding world so C++ is a mess to me!). Anyway if someone has followed my problem till this point do read on! Again operator_type and bc_set are members of Evolver class which can be something like CrankNicolson. So I rushed to it's header file cranknicolson.hpp to get some clues. But still I can't figure out what's operator_type or bc_set. My best guess was TridiagonalOperator class, but still that didn't work. Since most of the FD engines given in the sample examples are of useless from trading perspective I was creating more practicle ones which can be used more from static hedging perspective. So it would be really helpful if someone can help me understand at least how to initialize the generic FiniteDifferenceModel class. I guess I should send this to dev's list, but well will wait...if I don't get the reply I will forward coz i guess questions are not that simple ;) Thanks for reading, Animesh Saxena (Associate) Exotic Derivatives NOMURA |
|
From: Ferdinando M. A. <fer...@am...> - 2010-07-01 09:10:14
|
Luigi Ballabio wrote: > I don't think the change is backward compatible, as a vector of Derived > is not convertible to a vector of Base---did you try compiling the > relevant example? sorry, my bad habit of not compiling examples. If only there was an equivalent test for each example... > I guess you'll need to overload the constructor... done thank you ciao -- Nando |