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: Bojan N. <bo...@bn...> - 2009-02-25 08:05:38
|
-- Bojan Nikolic || http://www.bnikolic.co.uk |
|
From: Luigi B. <lui...@gm...> - 2009-02-23 17:06:27
|
On Mon, 2009-02-23 at 10:00 +0100, Jose Aparicio-Navarro wrote: > Quoting Luigi Ballabio <lui...@gm...>: > > Then again, the current Issuer class is wrong and should not go into > > release 1.0 either. What I would do at this time is to remove the class > > from the library and pass its components to the methods that were > > accepting it. > > quite, if your short of time and need someone to do this I volunteer, just give > me a deadline so you have time to review the changes. No, thanks---it's almost done. I'll commit it in a couple of days if there are no objections. Luigi -- Never mistake motion for action. -- Ernest Hemingway |
|
From: SourceForge.net <no...@so...> - 2009-02-23 15:28:28
|
Bugs item #2617586, was opened at 2009-02-19 15:02 Message generated for change (Comment added) made by grantbirchmeier You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2617586&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: Grant Birchmeier (grantbirchmeier) Assigned to: Nobody/Anonymous (nobody) Summary: config error in CSharp SWIG extension for QuantLib_vc8.sln Initial Comment: Compiling the CSharp SWIG extension fails for vc8. The following easy fix is needed: For both BermudanSwaption_vc8 and EquityOption_vc8 1) right-click -> Properties -> Build Events 2) change copy "$(SolutionDir)cpp\bin\vc80\$(ConfigurationName)\NQuantLibc.dll" "$(TargetDir)" to copy "$(SolutionDir)csharp\bin\vc80\$(ConfigurationName)\NQuantLib.dll" "$(TargetDir)" Notice the change from "cpp" to "csharp" and removing the "c" from NQuantLibc.dll. Rebuild solution and it should compile cleanly. ---------------------------------------------------------------------- >Comment By: Grant Birchmeier (grantbirchmeier) Date: 2009-02-23 09:28 Message: I'm using Visual Studio 2005 Professional Edition - Microsoft Visual C# 2005. In the "Project Dependencies" dialog for BermudanSwaption_vc8 project, the dependencies are NQuantLib_vc8 and NQuantLibc, in that order. For EquityOption_vc8 project, the only dependency is NQuantLib_vc8. These settings are as they were out-of-the-box, that is, I did not alter them. ---------------------------------------------------------------------- Comment By: Luigi Ballabio (lballabio) Date: 2009-02-23 04:19 Message: The dependency on NQuantLib should already take care of it. In fact, it does on my machine. What version of Visual C# are you using? (Express, Standard...) If you open the "Project dependencies" dialog on either BermudanSwaption or EquityOption, do you see NQuantLib as a dependency? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2617586&group_id=12740 |
|
From: Luigi B. <lui...@gm...> - 2009-02-23 14:46:10
|
On Fri, 2009-02-20 at 18:01 +0100, Andreas Spengler wrote: > Compiling the "Bond" example breaks in exactly the same line with SUN CC: > > [...] > > Changing to [the suggested fix] didn't help... Hmm. At least it worked for VC++9... may you try shuffling things around and see if you get it to compile in some way? Luigi -- The shortest way to do many things is to do only one thing at once. -- Samuel Smiles |
|
From: SourceForge.net <no...@so...> - 2009-02-23 10:19:32
|
Bugs item #2617586, was opened at 2009-02-19 22:02 Message generated for change (Comment added) made by lballabio You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2617586&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: Grant Birchmeier (grantbirchmeier) Assigned to: Nobody/Anonymous (nobody) Summary: config error in CSharp SWIG extension for QuantLib_vc8.sln Initial Comment: Compiling the CSharp SWIG extension fails for vc8. The following easy fix is needed: For both BermudanSwaption_vc8 and EquityOption_vc8 1) right-click -> Properties -> Build Events 2) change copy "$(SolutionDir)cpp\bin\vc80\$(ConfigurationName)\NQuantLibc.dll" "$(TargetDir)" to copy "$(SolutionDir)csharp\bin\vc80\$(ConfigurationName)\NQuantLib.dll" "$(TargetDir)" Notice the change from "cpp" to "csharp" and removing the "c" from NQuantLibc.dll. Rebuild solution and it should compile cleanly. ---------------------------------------------------------------------- >Comment By: Luigi Ballabio (lballabio) Date: 2009-02-23 11:19 Message: The dependency on NQuantLib should already take care of it. In fact, it does on my machine. What version of Visual C# are you using? (Express, Standard...) If you open the "Project dependencies" dialog on either BermudanSwaption or EquityOption, do you see NQuantLib as a dependency? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2617586&group_id=12740 |
|
From: SourceForge.net <no...@so...> - 2009-02-23 09:44:25
|
Bugs item #2104135, was opened at 2008-09-10 20:01 Message generated for change (Settings changed) made by lballabio You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2104135&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: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) >Assigned to: Klaus Spanderen (klausspanderen) Summary: HybridHestonHullWhiteProcess -> negative prices for a Call Initial Comment: I am getting negative prices for a call option (among other calibration problems) in the following example code. (Almost entirely based on test-suite code.) ---------------------------------------------------------------------- Comment By: Luigi Ballabio (lballabio) Date: 2009-02-23 10:44 Message: The bug is now fixed in the Subversion repository. Thank you for the report. ---------------------------------------------------------------------- Comment By: Luigi Ballabio (lballabio) Date: 2008-09-24 15:46 Message: results.value = std::max(0.0, results.value); at the end of the engine's calculate() method? Luigi ---------------------------------------------------------------------- Comment By: Klaus Spanderen (klausspanderen) Date: 2008-09-16 09:01 Message: Hi Luigi, I can also generate negative option NPVs with Monte-Carlo engines we have in actual library code (I guess nearly all MC engines supporting control variate can generate negative NPVs for deep OTM options. At least for the MCAmericanEngine it was pretty easy to find an example.). The root of the problem is the control variate algorithm itself, which might generate negative NPVs having a finite MC statistics, see line 104 in montecarlomodel.hpp. At the time being I don't see a one line fix for this behaviour. best regards Klaus ---------------------------------------------------------------------- Comment By: Luigi Ballabio (lballabio) Date: 2008-09-15 18:08 Message: Klaus, I hope you don't mind my stepping in. Is this an issue of the MultiVanillaOption class you had in the example, or of an instrument/engine we have in actual library code? If it's library code, I'd try and avoid negative NPVs being returned--even if the calibration or the use of control variates is not optimal. Maybe the engine can floor the option value at zero? Luigi ---------------------------------------------------------------------- Comment By: Klaus Spanderen (klausspanderen) Date: 2008-09-13 14:27 Message: Hi The example is using control variate to reduce the statistical error. But this method can also lead to small negative option NPV for deep OTM options (as happen in your example). Therefore these options are ignored during the calibration. A few other thinks - in line 751 a constant vol of 12% is added to initialize the calibration helper. IMO that's a bug because the calibration helper does not match to the impliedVols array. - you are using only a few instruments to calibrate the Hull-WHite model. The \sigma is IMO unrealistically high. Look e.g. into the BermudanSwaption example to get more realistic values. - the targetQualityIndex of the test case is much too small for real world problems. For real problems it is better to monitor the improvements of the qualityIndex and exit if no further progress is made. (E.g. for your example I'm getting a qualityIndex of around 100.) - The algorithm is based on Monte-Carlo optimization and therefore by far not as stable as a normal Heston calibration. That the reason why I've removed the example a month ago. best regards Klaus ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2104135&group_id=12740 |
|
From: Jose Aparicio-N. <ja...@fr...> - 2009-02-23 09:00:14
|
Quoting Luigi Ballabio <lui...@gm...>: > Then again, the current Issuer class is wrong and should not go into > release 1.0 either. What I would do at this time is to remove the class > from the library and pass its components to the methods that were > accepting it. quite, if your short of time and need someone to do this I volunteer, just give me a deadline so you have time to review the changes. Maybe we should move all credit derivs code to experimental so to make the point the interface is not stable, the changes will impact the bootstrapping. Regards Pepe |
|
From: David B. <db...@ic...> - 2009-02-21 20:05:56
|
Klaus- >hmm, european are american style exercise? Which dividend model do you want to >use? I've been thinking this problem over, drawing from my training in theory and experience in application. Here are some Grundlagen: 1) Supposing we have a future dividend with an American Option that occurs on X-date. How can we argue that this dividend can be used in a discounted sense? The dividend acts exactly like a Dirac Function on the cash flow of the Stock Holder, or a step-function on the discount curve. Yet despite all of this we can't justify creating some type of curve because of the Dirac-Like nature of the cashflow. One either has the stock or does not; we can't amortize the days one holds the stock as some percentage of the dividend. This is a problem, clearly. We might be able to rely on a parity argument such as options traders use. More on this later perhaps, as this would act on the post-calculated options prices simply to prevent arbitrage. 2) As for the yield curve itself, I think a PiecewiseYieldCurve object should be sufficient. One could build this off a US-Government HRB Yield Curve daily release and maybe add some small prime-plus factor which would be what the Broker-Dealers actually receive for held cash. Sound good on this one? Best, DB -- View this message in context: http://www.nabble.com/Bates-Engine-for-American-Options-tp22094505p22140024.html Sent from the quantlib-dev mailing list archive at Nabble.com. |
|
From: David B. <db...@ic...> - 2009-02-21 19:13:36
|
Hey - Very interesting responses. I'm not sure about the dividend model I want to use. I remember from grad school there was this one guy named Weingartner who reformulated Lorie and Savage's discount model. Its been a while, but if I recall, "Weingartner's formulation" was looked upon as some type of incredible innovation in how we calculate that curve. I'll have to go back and start digging, but to be honest, I don't have an answer yet as-to how I wish to price it. I feel it needs to be maximally consistent, yet simple, so whatever that all means. Any thoughts? DB -- View this message in context: http://www.nabble.com/Bates-Engine-for-American-Options-tp22094505p22139456.html Sent from the quantlib-dev mailing list archive at Nabble.com. |
|
From: Klaus S. <kl...@sp...> - 2009-02-21 15:45:38
|
Hi > 2) To use the above paper, we'd need to figure out how to turn all of > these ruminations and thoughts into an analytic model. In a > GARCH-direction there was some type of Mean Tracking Tree which is about > 10-years old and apparently has decent efficiency. Kilin, in the above, > uses a Gaussian Quadrature, so something of that nature might be necessary > to solve this. IMO these methods work for european options but for american options one has to use Finite Difference methods which are often too slow for model calibration. As far as I know, efficient Bates/Heston calibration on american option plus discrete dividends is an open topic. > 3) Supposing I'm willing to accept the risk-neutral > log-normality of options 1Y+ into the future, which from what I've read is > not a bad hypothesis, I could probably build some type of Brownian Bridge > to accelerate the calibration. This far-future strike series could be used > (perhaps) like a shrinkage estimator, where if we turn on regularization to > the maximum, the output is the standard answer. hmm, european are american style exercise? Which dividend model do you want to use? regards Klaus -- Klaus Spanderen Ludwig Erhard Str. 12 48734 Reken (Germany) EMail: kl...@NO... (remove NOSPAM from the address) |
|
From: David B. <db...@ic...> - 2009-02-21 02:26:07
|
Hey - More progress. Any reason that getCalibrationError would throw the
following upon compile:
"getCalibrationError": identifier not found
Where is this located? Here's the code from Klaus's DAX example:
Real calculated = std::fabs(getCalibrationError(options));
if (std::fabs(calculated - expectedValues[i]) > tolerance)
BOOST_ERROR("failed to calculated prices for derived Bates models"
<< "\n calculated: " << calculated
<< "\n expected: " << expectedValues[i]);
Best,
DB
--
View this message in context: http://www.nabble.com/Bates-Engine-for-American-Options-tp22094505p22131660.html
Sent from the quantlib-dev mailing list archive at Nabble.com.
|
|
From: Chris K. <chr...@ya...> - 2009-02-20 23:20:22
|
Makes sense - better not to have it in the current form and maybe not enough time to get it right before 1.0. Your suggestion on the interfaces arranges so no breakage later. I really need it - but not in its current form.
Regards,
Chris
________________________________
From: Luigi Ballabio <lui...@gm...>
To: Jose Aparicio-Navarro <ja...@fr...>
Cc: Chris Kenyon <chr...@ya...>; Roland Lichters <rol...@go...>; Simon Ibbotson <s.i...@gm...>; qua...@li...; qua...@li...
Sent: Friday, February 20, 2009 5:15:20 PM
Subject: Re: [Quantlib-dev] credit modeling, Issuer, etc.
On Fri, 2009-02-20 at 08:30 +0100, Jose Aparicio-Navarro wrote:
> The other subject was the data structure, am I the only one having a problem
> with a one to one reltaion between issuer and recovery?
No, you're not the only one. The data structure is wrong.
However, I'm not sure that I would commit to a given class interface at
this time. It would probably take some trials to get it right, and
since I'd like to get release 1.0 out in a few months (and doing so, to
freeze the existing interfaces) I don't think we have the time for that.
Then again, the current Issuer class is wrong and should not go into
release 1.0 either. What I would do at this time is to remove the class
from the library and pass its components to the methods that were
accepting it. For instance, instead of
MidPointCdsEngine(const Issuer& issuer,
const Handle<YieldTermStructure>& discountCurve);
I would write
MidPointCdsEngine(
const Handle<DefaultProbabilityTermStructure>& probability,
Real recoveryRate,
const Handle<YieldTermStructure>& discountCurve,
const std::vector<boost::shared_ptr<DefaultEvent> >& events);
which is no longer so wrong---it just assumes that the correct
probability curve and recovery rate were chosen externally. Once we
experiment a bit and settle on an Issuer design, we can add the old
constructor back without breaking existing code.
Thoughts?
Luigi
--
Every solution breeds new problems.
-- unknown |
|
From: Luigi B. <lui...@gm...> - 2009-02-20 17:21:54
|
On Fri, 2009-02-20 at 08:30 +0100, Jose Aparicio-Navarro wrote:
> The other subject was the data structure, am I the only one having a problem
> with a one to one reltaion between issuer and recovery?
No, you're not the only one. The data structure is wrong.
However, I'm not sure that I would commit to a given class interface at
this time. It would probably take some trials to get it right, and
since I'd like to get release 1.0 out in a few months (and doing so, to
freeze the existing interfaces) I don't think we have the time for that.
Then again, the current Issuer class is wrong and should not go into
release 1.0 either. What I would do at this time is to remove the class
from the library and pass its components to the methods that were
accepting it. For instance, instead of
MidPointCdsEngine(const Issuer& issuer,
const Handle<YieldTermStructure>& discountCurve);
I would write
MidPointCdsEngine(
const Handle<DefaultProbabilityTermStructure>& probability,
Real recoveryRate,
const Handle<YieldTermStructure>& discountCurve,
const std::vector<boost::shared_ptr<DefaultEvent> >& events);
which is no longer so wrong---it just assumes that the correct
probability curve and recovery rate were chosen externally. Once we
experiment a bit and settle on an Issuer design, we can add the old
constructor back without breaking existing code.
Thoughts?
Luigi
--
Every solution breeds new problems.
-- unknown
|
|
From: Andreas S. <an...@sp...> - 2009-02-20 17:01:56
|
Guys, sorry for entering this thread, too, but > Try replacing the offending line > > friend class Bootstrap<this_curve>; > > with > > typedef typename Bootstrap<this_curve> bootstrapper; > friend class bootstrapper; Compiling the "Bond" example breaks in exactly the same line with SUN CC: "../../ql/termstructures/yield/piecewiseyieldcurve.hpp", line 149: Error, notempname: A class template name was expected instead of QuantLib::Bootstrap<QuantLib::Curve>. "Bonds.cpp", line 214: Where, temwhilespec: While specializing "QuantLib::PiecewiseYieldCurve<QuantLib::Discount, QuantLib::LogLinear, QuantLib::IterativeBootstrap<QuantLib::Curve>>". "Bonds.cpp", line 214: Where, temspecend: Specialized in non-template code. "../../ql/termstructures/yield/piecewiseyieldcurve.hpp", line 149: Error, nofriendfield: A "friend" declaration must specify a class or function. "Bonds.cpp", line 214: Where, temwhilespec: While specializing "QuantLib::PiecewiseYieldCurve<QuantLib::Discount, QuantLib::LogLinear, QuantLib::IterativeBootstrap<QuantLib::Curve>>". "Bonds.cpp", line 214: Where, temspecend: Specialized in non-template code. 2 Error(s) and 6 Warning(s) detected. Changing to the above didn't help... Rgds, Andreas |
|
From: Luigi B. <lui...@gm...> - 2009-02-20 16:13:00
|
On Fri, 2009-02-20 at 16:44 +0100, Ferdinando Ametrano wrote: > Compiling... > yoycapfloortermpricesurface.cpp > .\ql/termstructures/inflation/piecewiseyoyinflationcurve.hpp(127) : > error C2059: syntax error : '<' > .\ql/termstructures/inflation/piecewiseyoyinflationcurve.hpp(130) > : see reference to class template instantiation > 'QuantLib::PiecewiseYoYInflationCurve<Interpolator,Bootstrap,Traits>' > being compiled > .\ql/termstructures/inflation/piecewiseyoyinflationcurve.hpp(127) : > error C2238: unexpected token(s) preceding ';' > > no problem using VC8 Go figure... We can only try to move stuff around and see if it's more digestible. Try replacing the offending line friend class Bootstrap<this_curve>; with typedef typename Bootstrap<this_curve> bootstrapper; friend class bootstrapper; Luigi -- The First Rule of Optimization: Don't do it. The Second Rule of Optimization (For experts only): Don't do it yet. -- Michael Jackson |
|
From: Andreas S. <an...@sp...> - 2009-02-20 16:04:07
|
Hi Luigi, I looked up "function pointer template" with google and ended up at http://coding.derkeiler.com/Archive/C_CPP/comp.lang.cpp/2004-03/3445.html, which basically states "what do you need the function pointer template for"? ;-) So I tried passing the function pointers as arguments, which gets compiled now: *** alphafinder.cpp.orig Fri Feb 20 15:57:37 2009 --- alphafinder.cpp Fri Feb 20 16:56:25 2009 *************** *** 25,36 **** namespace { ! template<class T, Real (T::*Value)(Real) > Real Bisection(Real target, Real low, Real high, Real tolerance, ! T& theObject) { Real x=0.5*(low+high); Real y=(theObject.*Value)(x); --- 25,37 ---- namespace { ! template<class T> Real Bisection(Real target, Real low, Real high, Real tolerance, ! T& theObject, ! Real (T::*Value)(Real)) { Real x=0.5*(low+high); Real y=(theObject.*Value)(x); *************** *** 41,56 **** x = 0.5*(low+high); y = (theObject.*Value)(x); ! } while ((fabs(high-low) > tolerance)); return x; } ! template<class T, bool (T::*Value)(Real) > Real FindHighestOK(Real low, Real high, Real tolerance, ! T& theObject) { Real x=0.5*(low+high); bool ok=(theObject.*Value)(x); --- 42,58 ---- x = 0.5*(low+high); y = (theObject.*Value)(x); ! } while ((std::fabs(high-low) > tolerance)); return x; } ! template<class T> Real FindHighestOK(Real low, Real high, Real tolerance, ! T& theObject, ! bool (T::*Value)(Real)) { Real x=0.5*(low+high); bool ok=(theObject.*Value)(x); *************** *** 61,76 **** x = 0.5*(low+high); ok = (theObject.*Value)(x); ! } while ((fabs(high-low) > tolerance)); return x; } ! template<class T, bool (T::*Value)(Real) > Real FindLowestOK(Real low, Real high, Real tolerance, ! T& theObject) { Real x=0.5*(low+high); bool ok=(theObject.*Value)(x); --- 63,79 ---- x = 0.5*(low+high); ok = (theObject.*Value)(x); ! } while ((std::fabs(high-low) > tolerance)); return x; } ! template<class T> Real FindLowestOK(Real low, Real high, Real tolerance, ! T& theObject, ! bool (T::*Value)(Real)) { Real x=0.5*(low+high); bool ok=(theObject.*Value)(x); *************** *** 81,102 **** x = 0.5*(low+high); ok = (theObject.*Value)(x); ! } while ( (fabs(high-low) > tolerance) ); return x; } ! template<class T, Real (T::*Value)(Real), bool (T::*Condition)(Real) > Real Minimize(Real low, Real high, Real tolerance, T& theObject, bool& failed) { Real leftValue = (theObject.*Value)(low); Real rightValue = (theObject.*Value)(high); ! Real W = 0.5*(3.0-sqrt(5.0)); Real x=W*low+(1-W)*high; Real midValue = (theObject.*Value)(x); --- 84,107 ---- x = 0.5*(low+high); ok = (theObject.*Value)(x); ! } while ( (std::fabs(high-low) > tolerance) ); return x; } ! template<class T> Real Minimize(Real low, Real high, Real tolerance, T& theObject, + Real (T::*Value)(Real), + bool (T::*Condition)(Real), bool& failed) { Real leftValue = (theObject.*Value)(low); Real rightValue = (theObject.*Value)(high); ! Real W = 0.5*(3.0-std::sqrt(5.0)); Real x=W*low+(1-W)*high; Real midValue = (theObject.*Value)(x); *************** *** 379,398 **** if (bottomValue <= targetVariance) { // then find root of increasing function // (or as if increasing function) ! alpha = Bisection<AlphaFinder, &AlphaFinder::valueAtTurningPoint>( ! targetVariance, ! bottomAlpha, ! bilimit, ! tolerance, ! *this); } else { // find root of decreasing function (or as if decreasing function) ! alpha=Bisection<AlphaFinder, &AlphaFinder::minusValueAtTurningPoint>( ! -targetVariance, ! bilimit, ! topAlpha, ! tolerance, ! *this); } finalPart(alpha, stepindex, --- 384,405 ---- if (bottomValue <= targetVariance) { // then find root of increasing function // (or as if increasing function) ! alpha = Bisection<AlphaFinder>( ! targetVariance, ! bottomAlpha, ! bilimit, ! tolerance, ! *this, ! &AlphaFinder::valueAtTurningPoint); } else { // find root of decreasing function (or as if decreasing function) ! alpha=Bisection<AlphaFinder>( ! -targetVariance, ! bilimit, ! topAlpha, ! tolerance, ! *this, ! &AlphaFinder::minusValueAtTurningPoint); } finalPart(alpha, stepindex, *************** *** 460,477 **** // lower alpha is bad if (alpha0OK) { // must die somewhere in between ! alpha1 = FindLowestOK<AlphaFinder, &AlphaFinder::testIfSolutionExists>( alphaMin, alpha0, tolerance, ! *this); } else { // alphaMaxOK must be true to get here ! alpha1 = FindLowestOK<AlphaFinder, &AlphaFinder::testIfSolutionExists>( alpha0, alphaMax, tolerance, ! *this); } } --- 467,486 ---- // lower alpha is bad if (alpha0OK) { // must die somewhere in between ! alpha1 = FindLowestOK<AlphaFinder>( alphaMin, alpha0, tolerance, ! *this, ! &AlphaFinder::testIfSolutionExists); } else { // alphaMaxOK must be true to get here ! alpha1 = FindLowestOK<AlphaFinder>( alpha0, alphaMax, tolerance, ! *this, ! &AlphaFinder::testIfSolutionExists); } } *************** *** 478,488 **** if (!alphaMaxOK) { // higher alpha is bad ! alpha2 = FindHighestOK<AlphaFinder, &AlphaFinder::testIfSolutionExists>( alpha1, alphaMax, tolerance, ! *this); } else alpha2= alphaMax; } --- 487,498 ---- if (!alphaMaxOK) { // higher alpha is bad ! alpha2 = FindHighestOK<AlphaFinder>( alpha1, alphaMax, tolerance, ! *this, ! &AlphaFinder::testIfSolutionExists); } else alpha2= alphaMax; } *************** *** 507,524 **** if (foundUpOK) { alpha1 = alphaUp; ! alpha2 = FindHighestOK<AlphaFinder, &AlphaFinder::testIfSolutionExists>( alpha1, alphaMax, tolerance, ! *this); } else { alpha2 = alphaDown; ! alpha1 = FindLowestOK<AlphaFinder, &AlphaFinder::testIfSolutionExists>( alphaMin, alpha2, tolerance, ! *this); } } --- 517,536 ---- if (foundUpOK) { alpha1 = alphaUp; ! alpha2 = FindHighestOK<AlphaFinder>( alpha1, alphaMax, tolerance, ! *this, ! &AlphaFinder::testIfSolutionExists); } else { alpha2 = alphaDown; ! alpha1 = FindLowestOK<AlphaFinder>( alphaMin, alpha2, tolerance, ! *this, ! &AlphaFinder::testIfSolutionExists); } } *************** *** 525,535 **** // we have now found alpha1, alpha2 such that solution exists // at endpoints. we now want to minimize within that interval bool failed; ! alpha = Minimize<AlphaFinder, &AlphaFinder::homogeneityfailure, &AlphaFinder::testIfSolutionExists>( alpha1, alpha2, tolerance, *this, failed) ; finalPart(alpha, --- 537,549 ---- // we have now found alpha1, alpha2 such that solution exists // at endpoints. we now want to minimize within that interval bool failed; ! alpha = Minimize<AlphaFinder>( alpha1, alpha2, tolerance, *this, + &AlphaFinder::homogeneityfailure, + &AlphaFinder::testIfSolutionExists, failed) ; finalPart(alpha, --------------------------------------------------------------------------- Rgds, Andreas |
|
From: Ferdinando A. <na...@am...> - 2009-02-20 15:44:24
|
Hi all
Compiling...
yoycapfloortermpricesurface.cpp
.\ql/termstructures/inflation/piecewiseyoyinflationcurve.hpp(127) :
error C2059: syntax error : '<'
.\ql/termstructures/inflation/piecewiseyoyinflationcurve.hpp(130)
: see reference to class template instantiation
'QuantLib::PiecewiseYoYInflationCurve<Interpolator,Bootstrap,Traits>'
being compiled
.\ql/termstructures/inflation/piecewiseyoyinflationcurve.hpp(127) :
error C2238: unexpected token(s) preceding ';'
no problem using VC8
ciao -- Nando
|
|
From: Andreas S. <an...@sp...> - 2009-02-20 15:17:12
|
Hi Luigi, Es schrieb Luigi Ballabio > Can you send me a diff of those, so we're sure I don't miss some > instance? (Just send it to me, it will probably be too large for the > list.) I didn't keep the originals of those files so I will have to diff them against another copy, and then send them to you directly... > These two are strange. You _can_ modify a const iterator (you wouldn't > be able to iterate otherwise, which kind of defeats the whole > purpose...) You just can't modify the object it points to. What was the > error message? "bond.cpp", line 203: Error, badunaryop: Operand for operator "--" must be an lvalue. "bond.cpp", line 225: Error, badunaryop: Operand for operator "++" must be an lvalue. 2 Error(s) detected. >> Now I only keep getting an error in >> ql/models/marketmodels/models/alphafinder.cpp (maybe because of the >> empty namespace surrounding the declaration): > > Does it compile if you remove the surrounding namespace? No. I also tried giving the namespace a name and adapt the usage of Bisection further down in the file, but it didn't help. Somehow the compiler thinks the second template parameter (function pointer) doesn't match, because the compiler looks for "Bisection<::T,::Value>"... Rgds, Andreas |
|
From: Luigi B. <lui...@gm...> - 2009-02-20 14:41:55
|
On Fri, 2009-02-20 at 15:03 +0100, Andreas Spengler wrote: > > Can you send me a list of those? > > Course. The following files had to be adapted because of missing std:: > qualifier before some mathematical functions: > > [...list of files...] Can you send me a diff of those, so we're sure I don't miss some instance? (Just send it to me, it will probably be too large for the list.) > In ./ql/instruments/bond.cpp I had to do the following change, because you > can't modify a const iterator: These two are strange. You _can_ modify a const iterator (you wouldn't be able to iterate otherwise, which kind of defeats the whole purpose...) You just can't modify the object it points to. What was the error message? > Now I only keep getting an error in > ql/models/marketmodels/models/alphafinder.cpp (maybe because of the empty > namespace surrounding the declaration): Does it compile if you remove the surrounding namespace? Thanks, Luigi -- The young man knows the rules, but the old man knows the exceptions. -- O. W. Holmes |
|
From: Ferdinando A. <qf...@am...> - 2009-02-20 14:17:54
|
On Fri, Feb 20, 2009 at 2:56 PM, Luigi Ballabio <lui...@gm...> wrote: > before the change, if the reference date for > the term structure was 2 days from today, the schedule would start 5 > days from today. Now it starts 3 days from today, so there was some > information in that parameter that cannot be retrieved elsewhere. The > question is, was the past behavior the correct one, or is the new one? the new one. If the user doesn't input an explicit schedule the default assumption has always been that he is pricing an asset swap with today as trade date, i.e. with 3 settlement days in the case of EUR bond. As a matter of fact both Chiara and I (which wrote the original code) have been always using it this way with a discount curve's reference date equal to today. Your refactoring just pointed out the possible unexpected behaviour of 2+3 settlement days, which would not make sense as default behaviour, whatever is your choice for the discount curve's reference date. ciao -- Nando |
|
From: Andreas S. <an...@sp...> - 2009-02-20 14:14:43
|
Also in ql/models/marketmodels/models
*** capletcoterminalalphacalibration.cpp.orig Fri Feb 20 15:11:46 2009
--- capletcoterminalalphacalibration.cpp Fri Feb 20 15:12:00 2009
***************
*** 128,134 ****
std::vector<std::vector<Volatility> > newVols;
std::vector<Volatility> theseNewVols(numberOfRates);
std::vector<Volatility> firstRateVols(numberOfRates);
! firstRateVols[0] = sqrt(displacedSwapVariances[0]->variances()[0]);
std::vector<Volatility> secondRateVols(numberOfRates);
std::vector<Real> correlations(numberOfRates);
newVols.push_back(firstRateVols);
--- 128,134 ----
std::vector<std::vector<Volatility> > newVols;
std::vector<Volatility> theseNewVols(numberOfRates);
std::vector<Volatility> firstRateVols(numberOfRates);
! firstRateVols[0] =
std::sqrt(displacedSwapVariances[0]->variances()[0]);
std::vector<Volatility> secondRateVols(numberOfRates);
std::vector<Real> correlations(numberOfRates);
newVols.push_back(firstRateVols);
***************
*** 146,152 ****
const std::vector<Real>& var =
displacedSwapVariances[i+1]->variances();
for (Size j =0; j < i+2; ++j)
! secondRateVols[j] = sqrt(var[j]);
for (Size k=0; k < i+1; k++) {
Real correlation=0.0;
--- 146,152 ----
const std::vector<Real>& var =
displacedSwapVariances[i+1]->variances();
for (Size j =0; j < i+2; ++j)
! secondRateVols[j] = std::sqrt(var[j]);
for (Size k=0; k < i+1; k++) {
Real correlation=0.0;
----------------------------------------------------------------------------
*** capletcoterminalperiodic.cpp.orig Fri Feb 20 15:09:51 2009
--- capletcoterminalperiodic.cpp Fri Feb 20 15:10:05 2009
***************
*** 151,157 ****
for (Size i=0; i < numberBigRates; ++i)
{
! modelSwaptionVols[i] =
sqrt(swaptionTotCovariance[i][i]/periodsmm->evolution().rateTimes()[i]);
Real scale = marketSwaptionVols[i]/modelSwaptionVols[i];
scalingFactors[i] *= scale; // since applied to vol
--- 151,157 ----
for (Size i=0; i < numberBigRates; ++i)
{
! modelSwaptionVols[i] =
std::sqrt(swaptionTotCovariance[i][i]/periodsmm->evolution().rateTimes()[i]);
Real scale = marketSwaptionVols[i]/modelSwaptionVols[i];
scalingFactors[i] *= scale; // since applied to vol
***************
*** 162,168 ****
for (Size i=0; i < numberBigRates; ++i)
modelSwaptionVolsMatrix[iterationsDone][i] =
modelSwaptionVols[i];
! periodSwaptionRmsError =
sqrt(totalSwaptionError/numberBigRates);
errorImprovement = previousError -periodSwaptionRmsError;
previousError = periodSwaptionRmsError;
}
--- 162,168 ----
for (Size i=0; i < numberBigRates; ++i)
modelSwaptionVolsMatrix[iterationsDone][i] =
modelSwaptionVols[i];
! periodSwaptionRmsError =
std::sqrt(totalSwaptionError/numberBigRates);
errorImprovement = previousError -periodSwaptionRmsError;
previousError = periodSwaptionRmsError;
}
---------------------------------------------------------------------------
*** capletcoterminalswaptioncalibration.cpp.orig Fri Feb 20
15:07:52 2009
--- capletcoterminalswaptioncalibration.cpp Fri Feb 20 15:08:29 2009
***************
*** 134,140 ****
for (Size j=0; j<numberOfRates; ++j)
for (Size k=0; k < CovarianceSwapPseudos[i].columns();
++k)
CovarianceSwapPseudos[i][j][k] *=
! sqrt(swapTimeInhomogeneousVariances[i][j]);
CovarianceSwapMarginalCovs[i] = CovarianceSwapPseudos[i] *
transpose(CovarianceSwapPseudos[i]);
--- 134,140 ----
for (Size j=0; j<numberOfRates; ++j)
for (Size k=0; k < CovarianceSwapPseudos[i].columns();
++k)
CovarianceSwapPseudos[i][j][k] *=
!
std::sqrt(swapTimeInhomogeneousVariances[i][j]);
CovarianceSwapMarginalCovs[i] = CovarianceSwapPseudos[i] *
transpose(CovarianceSwapPseudos[i]);
***************
*** 162,168 ****
for (Size k=0; k<numberOfFactors; ++k)
correlation += thisPseudo[i-1][k]*thisPseudo[i][k];
almostTotCovariance[i] += correlation *
! sqrt(swapTimeInhomogeneousVariances[j][i] *
swapTimeInhomogeneousVariances[j][i-1]);
}
if (i>0) {
--- 162,168 ----
for (Size k=0; k<numberOfFactors; ++k)
correlation += thisPseudo[i-1][k]*thisPseudo[i][k];
almostTotCovariance[i] += correlation *
! std::sqrt(swapTimeInhomogeneousVariances[j][i] *
swapTimeInhomogeneousVariances[j][i-1]);
}
if (i>0) {
***************
*** 171,177 ****
for (Size k=0; k<numberOfFactors; ++k)
correlation += thisPseudo[i-1][k]*thisPseudo[i][k];
leftCovariance[i] = correlation *
! sqrt(swapTimeInhomogeneousVariances[j][i] *
swapTimeInhomogeneousVariances[j][i-1]);
}
}
--- 171,177 ----
for (Size k=0; k<numberOfFactors; ++k)
correlation += thisPseudo[i-1][k]*thisPseudo[i][k];
leftCovariance[i] = correlation *
! std::sqrt(swapTimeInhomogeneousVariances[j][i] *
swapTimeInhomogeneousVariances[j][i-1]);
}
}
***************
*** 260,272 ****
// pick up the minimum vol for the caplet
root = minimum;
} else if (lowestRoot) {
! root = (-linearPart-sqrt(disc))/(2.0*quadraticPart);
} else {
if (minimum>1.0)
! root = (-linearPart-sqrt(disc))/(2.0*quadraticPart);
else {
rightUsed = true;
! root = (-linearPart+sqrt(disc))/(2.0*quadraticPart);
}
}
--- 260,272 ----
// pick up the minimum vol for the caplet
root = minimum;
} else if (lowestRoot) {
! root = (-linearPart-std::sqrt(disc))/(2.0*quadraticPart);
} else {
if (minimum>1.0)
! root =
(-linearPart-std::sqrt(disc))/(2.0*quadraticPart);
else {
rightUsed = true;
! root =
(-linearPart+std::sqrt(disc))/(2.0*quadraticPart);
}
}
***************
*** 274,280 ****
Real varianceToFind = totVariance[i]-varianceFound;
Real mult =
varianceToFind/swapTimeInhomogeneousVariances[i][i];
if (mult<=0.0 && rightUsed) {
! root = (-linearPart-sqrt(disc))/(2.0*quadraticPart);
varianceFound = root*root*almostTotVariance[i];
varianceToFind = totVariance[i]-varianceFound;
mult = varianceToFind/swapTimeInhomogeneousVariances[i][i];
--- 274,280 ----
Real varianceToFind = totVariance[i]-varianceFound;
Real mult =
varianceToFind/swapTimeInhomogeneousVariances[i][i];
if (mult<=0.0 && rightUsed) {
! root = (-linearPart-std::sqrt(disc))/(2.0*quadraticPart);
varianceFound = root*root*almostTotVariance[i];
varianceToFind = totVariance[i]-varianceFound;
mult = varianceToFind/swapTimeInhomogeneousVariances[i][i];
|
|
From: Andreas S. <an...@sp...> - 2009-02-20 14:03:14
|
> Can you send me a list of those?
Course. The following files had to be adapted because of missing std::
qualifier before some mathematical functions:
./ql/models/marketmodels/models/alphafinder.cpp
./ql/models/marketmodels/evolvers/volprocesses/squarerootandersen.cpp
./ql/models/marketmodels/evolvers/lognormalfwdrateeulerconstrained.cpp
./ql/cashflows/rangeaccrual.cpp
./ql/processes/hullwhiteprocess.cpp
./ql/processes/hestonprocess.cpp
./ql/processes/gjrgarchprocess.cpp
./ql/math/randomnumbers/latticersg.cpp
./ql/math/randomnumbers/latticerules.cpp
./ql/math/surface.cpp
./ql/math/quadratic.cpp
./ql/math/integrals/kronrodintegral.cpp
./ql/math/matrixutilities/basisincompleteordered.cpp
./ql/math/optimization/spherecylinder.cpp
./ql/experimental/credit/onefactorgaussiancopula.cpp
./ql/experimental/credit/cdsoption.cpp
./ql/experimental/credit/onefactorstudentcopula.cpp
./ql/experimental/amortizingbonds/amortizingfixedratebond.cpp
./ql/experimental/varianceoption/integralhestonvarianceoptionengine.cpp
./ql/experimental/finitedifferences/fdhestonrebateengine.cpp
./ql/experimental/finitedifferences/fdblackscholesrebateengine.cpp
./ql/experimental/finitedifferences/fdblackscholesvanillaengine.cpp
./ql/experimental/finitedifferences/fdhestonvanillaengine.cpp
./ql/experimental/finitedifferences/fdblackscholesbarrierengine.cpp
./ql/experimental/finitedifferences/fdhestonbarrierengine.cpp
./ql/experimental/lattices/extendedbinomialtree.cpp
./ql/pricingengines/blackformula.cpp
./ql/methods/lattices/binomialtree.cpp
./ql/termstructures/volatility/swaption/swaptionvolcube1.cpp
Furthermore, I had to add an "#include <math.h>" line in the following
three files, because some define's (M_PI_2 and the like) were not found...
./ql/math/randomnumbers/sobolrsg.cpp
./ql/math/integrals/gaussianorthogonalpolynomial.cpp
./ql/pricingengines/vanilla/analyticgjrgarchengine.cpp
In ./ql/instruments/bond.cpp I had to do the following change, because you
can't modify a const iterator:
*** ./ql/instruments/bond.cpp.orig Fri Feb 20 10:46:22 2009
--- ./ql/instruments/bond.cpp Fri Feb 20 10:46:50 2009
***************
*** 200,206 ****
redemptions_.push_back(cashflows.back());
! std::sort(cashflows_.begin(), --cashflows_.end(),
earlier_than<boost::shared_ptr<CashFlow> >());
}
--- 200,206 ----
redemptions_.push_back(cashflows.back());
! std::sort(cashflows_.begin(), cashflows_.end()-1,
earlier_than<boost::shared_ptr<CashFlow> >());
}
***************
*** 222,228 ****
// lower_bound, *i is the earliest date which is greater or
// equal than d. Its index is greater or equal to 1.
std::vector<Date>::const_iterator i =
! std::lower_bound(++notionalSchedule_.begin(),
notionalSchedule_.end(), d);
Size index = std::distance(notionalSchedule_.begin(), i);
--- 222,228 ----
// lower_bound, *i is the earliest date which is greater or
// equal than d. Its index is greater or equal to 1.
std::vector<Date>::const_iterator i =
! std::lower_bound(notionalSchedule_.begin()+1,
notionalSchedule_.end(), d);
Size index = std::distance(notionalSchedule_.begin(), i);
Now I only keep getting an error in
ql/models/marketmodels/models/alphafinder.cpp (maybe because of the empty
namespace surrounding the declaration):
"alphafinder.cpp", line 386: Error, nomatchoverin: Could not find a match
for::Bisection<::T,::Value>(double, double, double, double,
QuantLib::AlphaFinder) needed in QuantLib::AlphaFinder::solve(double, int,
const std::vector<double>&, const std::vector<double>&, const
std::vector<double>&, double, double, double, double, double, double, int,
double&, double&, double&, std::vector<double>&).
"alphafinder.cpp", line 394: Error, nomatchoverin: Could not find a match
for::Bisection<::T,::Value>(double, double, double, double,
QuantLib::AlphaFinder) needed in QuantLib::AlphaFinder::solve(double, int,
const std::vector<double>&, const std::vector<double>&, const
std::vector<double>&, double, double, double, double, double, double, int,
double&, double&, double&, std::vector<double>&).
"alphafinder.cpp", line 466: Error, nomatchoverin: Could not find a match
for::FindLowestOK<::T,::Value>(double, double, double,
QuantLib::AlphaFinder) needed in
QuantLib::AlphaFinder::solveWithMaxHomogeneity(double, int, const
std::vector<double>&, const std::vector<double>&, const
std::vector<double>&, double, double, double, double, double, double, int,
double&, double&, double&, std::vector<double>&).
"alphafinder.cpp", line 473: Error, nomatchoverin: Could not find a match
for::FindLowestOK<::T,::Value>(double, double, double,
QuantLib::AlphaFinder) needed in
QuantLib::AlphaFinder::solveWithMaxHomogeneity(double, int, const
std::vector<double>&, const std::vector<double>&, const
std::vector<double>&, double, double, double, double, double, double, int,
double&, double&, double&, std::vector<double>&).
"alphafinder.cpp", line 484: Error, nomatchoverin: Could not find a match
for::FindHighestOK<::T,::Value>(double, double, double,
QuantLib::AlphaFinder) needed in
QuantLib::AlphaFinder::solveWithMaxHomogeneity(double, int, const
std::vector<double>&, const std::vector<double>&, const
std::vector<double>&, double, double, double, double, double, double, int,
double&, double&, double&, std::vector<double>&).
"alphafinder.cpp", line 513: Error, nomatchoverin: Could not find a match
for::FindHighestOK<::T,::Value>(double, double, double,
QuantLib::AlphaFinder) needed in
QuantLib::AlphaFinder::solveWithMaxHomogeneity(double, int, const
std::vector<double>&, const std::vector<double>&, const
std::vector<double>&, double, double, double, double, double, double, int,
double&, double&, double&, std::vector<double>&).
"alphafinder.cpp", line 520: Error, nomatchoverin: Could not find a match
for::FindLowestOK<::T,::Value>(double, double, double,
QuantLib::AlphaFinder) needed in
QuantLib::AlphaFinder::solveWithMaxHomogeneity(double, int, const
std::vector<double>&, const std::vector<double>&, const
std::vector<double>&, double, double, double, double, double, double, int,
double&, double&, double&, std::vector<double>&).
"alphafinder.cpp", line 533: Error, nomatchoverin: Could not find a match
for::Minimize<::T,::Value,::Condition>(double, double, double,
QuantLib::AlphaFinder, bool) needed in
QuantLib::AlphaFinder::solveWithMaxHomogeneity(double, int, const
std::vector<double>&, const std::vector<double>&, const
std::vector<double>&, double, double, double, double, double, double, int,
double&, double&, double&, std::vector<double>&).
8 Error(s) detected.
Rgds,
Andreas
|
|
From: Luigi B. <lui...@gm...> - 2009-02-20 13:57:38
|
On Fri, 2009-02-20 at 13:37 +0000, na...@us... wrote:
> Log Message:
> -----------
> removed redundant parameter
>
> Modified: trunk/QuantLib/ql/instruments/assetswap.cpp
> ===================================================================
> --- trunk/QuantLib/ql/instruments/assetswap.cpp 2009-02-20 13:36:45 UTC (rev 15946)
> +++ trunk/QuantLib/ql/instruments/assetswap.cpp 2009-02-20 13:37:51 UTC (rev 15947)
> @@ -35,16 +35,14 @@
> Real bondCleanPrice,
> const boost::shared_ptr<IborIndex>& index,
> Spread spread,
> - const Date& settlementDate,
> const Schedule& floatSch,
> const DayCounter& floatingDayCounter,
> bool parSwap)
> - : Swap(2), spread_(spread), bondCleanPrice_(bondCleanPrice),
> - settlementDate_(settlementDate) {
> + : Swap(2), spread_(spread), bondCleanPrice_(bondCleanPrice) {
>
> Schedule schedule = floatSch;
> if (floatSch.empty()) {
> - schedule = Schedule(bond->settlementDate(settlementDate),
> + schedule = Schedule(bond->settlementDate(),
> bond->maturityDate(),
> index->tenor(),
> index->fixingCalendar(),
Not entirely redundant---before the change, if the reference date for
the term structure was 2 days from today, the schedule would start 5
days from today. Now it starts 3 days from today, so there was some
information in that parameter that cannot be retrieved elsewhere. The
question is, was the past behavior the correct one, or is the new one?
Luigi
--
Just remember what ol' Jack Burton does when the earth quakes, the
poison arrows fall from the sky, and the pillars of Heaven shake. Yeah,
Jack Burton just looks that big old storm right in the eye and says,
"Give me your best shot. I can take it."
-- Jack Burton, "Big trouble in Little China"
|
|
From: David B. <db...@ic...> - 2009-02-20 13:49:43
|
Hi Klaus - I'll definitely take a look at that example. I'm using your DAX example right now as a base. The research I've done has shown me that one can-not neglect Jumps in the near-term, or the core Vol process becomes over-estimated. There are a number of facets to this problem which I've yet to fully understand, but I've been reading a few papers on the topic which have proved quite interesting: http://papers.ssrn.com/sol3/papers.cfm?abstract_id=965248 There are a few issues which I'm currently having, conceptually. 1) I don't believe I'm actually getting the clustering effects of a GARCH-model. To get that, error-propagation is necessary. I would probably like to handle it in some-fashion despite it not being needed to fit the implied volatility surfaces accurately. This would require me to further understand the link between the P-measure / Q-measure and the cross-time Surface Dynamics of a stochastic vol. model. 2) To use the above paper, we'd need to figure out how to turn all of these ruminations and thoughts into an analytic model. In a GARCH-direction there was some type of Mean Tracking Tree which is about 10-years old and apparently has decent efficiency. Kilin, in the above, uses a Gaussian Quadrature, so something of that nature might be necessary to solve this. 3) Supposing I'm willing to accept the risk-neutral log-normality of options 1Y+ into the future, which from what I've read is not a bad hypothesis, I could probably build some type of Brownian Bridge to accelerate the calibration. This far-future strike series could be used (perhaps) like a shrinkage estimator, where if we turn on regularization to the maximum, the output is the standard answer. What do you think? Best, DB Klaus Spanderen-2 wrote: > > Hi > > If for the time being you can set aside the jumps it might be worth > looking at > the Heston finite difference pricing engine, e.g. the test case > testFdmHestonAmerican() in test-suite/fdheston.cpp ist a good starting > point. > > regards > > Klaus > > On Thursday 19 February 2009 07:04:00 uptotibet wrote: >> Hey Guys - I've looked through the list and was just wondering if anyone >> has used the Bates Model to price American Options? I started down this >> path trying to find some connection for GARCH-based option pricing. >> After >> a lot of meandering around, I realized I don't need "garch" per-se, but >> some type of stochastic volatility model. >> >> I want to be able to handle the skews on options more accurately for >> portfolio optimizations. I don't care about arbing this stuff, but I >> dont >> want to get arbed - if that makes sense. >> >> >> Any thoughts? > > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, > CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source code: > SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > -- View this message in context: http://www.nabble.com/Bates-Engine-for-American-Options-tp22094505p22120196.html Sent from the quantlib-dev mailing list archive at Nabble.com. |
|
From: Klaus S. <kl...@sp...> - 2009-02-20 08:42:39
|
Hi If for the time being you can set aside the jumps it might be worth looking at the Heston finite difference pricing engine, e.g. the test case testFdmHestonAmerican() in test-suite/fdheston.cpp ist a good starting point. regards Klaus On Thursday 19 February 2009 07:04:00 uptotibet wrote: > Hey Guys - I've looked through the list and was just wondering if anyone > has used the Bates Model to price American Options? I started down this > path trying to find some connection for GARCH-based option pricing. After > a lot of meandering around, I realized I don't need "garch" per-se, but > some type of stochastic volatility model. > > I want to be able to handle the skews on options more accurately for > portfolio optimizations. I don't care about arbing this stuff, but I dont > want to get arbed - if that makes sense. > > > Any thoughts? |