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: steven e. p. <sha...@gm...> - 2010-11-05 23:03:06
|
hello;
I am trying to use the quantlib library from Matlab. As a test case, I
adapted the EquityOption.cpp example code from the quantlib webpage to a cpp
file which would generate the price of an American Put option with parameters
given by the user, using a few different pricing engines. Before writing the
mex, I had created a standalone version which accepted input from std::cin, and
this ran fine.
However, when I run the code from matlab, the results always come back as 0. I
do not know a lot about the guts of quantlib, and the lazy evaluation methods
being used. However, it seems that when I run the standalone, it takes about 1
second or so (there are some binomial lattice engines being used), whereas when
I run the mex file from matlab, it returns zeros instantaneously. I suspect
somehow that the << operator in the standalone (copied from EquityOption.cpp)
forces the option to be evaluated under the given engine, but this is not being
done in my matlab mex.
Am I wrong about this? Do I have to force evaluation somehow? As a snippet of
code, I have things like this in the mex:
americanOptionPut.setPricingEngine(boost::shared_ptr<PricingEngine>(
new BinomialVanillaEngine<JarrowRudd>(bsmProcess,timeSteps)));
P[iii] = (double)americanOptionPut.NPV(); //puts the results in the output
whereas in the standalone it looks more like:
americanOptionPut.setPricingEngine(boost::shared_ptr<PricingEngine>(
new BinomialVanillaEngine<JarrowRudd>(bsmProcess,timeSteps)));
std::cout << "the result is " << americanOptionPut.NPV() << std::endl;
any hints? thanks,
--sep
[ Steven E. Pav {bikes/bitters/linux} nerd ]
[ google voice: 909.SHBYCHF shabbychef a.t gmail d0t com ]
[ parent of tinyurl.com/oskarpix ]
[ a palindrome: wondered now ]
|
|
From: SourceForge.net <no...@so...> - 2010-11-04 21:20:46
|
Feature Requests item #2909164, was opened at 2009-12-04 22:21 Message generated for change (Comment added) made by mpschuetze You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=362740&aid=2909164&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 Priority: 5 Private: No Submitted By: Craig Miller (c-miller) Assigned to: Nobody/Anonymous (nobody) Summary: VS2010 QL solution, projects, and code changes Initial Comment: Visual Studio 2010 Beta 2 is on track to be a significant IDE improvement for multicore programming AND it free to use during the beta testing (release 'might be' in March). There is some pain with the new compiler spewing new errors and warnings that did not appear in msvc-9.0, but I'm sure you expected that :-0 New files include the QL solution, all project files, and some code changes (primarily needed to handle namespace collisions). I've also included a Excel spreadsheet with the build output and a table to filter on the ~14 unfiltered warnings (lots of work to clean up, or filter). The zip file is ~1.2MB so it is too large for uploading to SourceForge. I'll send a copy to Nando for circulation or you can send me an email at <cra...@fl...>. It goes without saying, but I'll say it anyway, you'll need to run a command lime build of the Boost Library using toolset=msvc-10.0 from both the x86 and x64 shell. Remember to set unique target directories to avoid overwriting the files (x86 and x64 lib files have the same name). Enjoy, Craig Miller ---------------------------------------------------------------------- Comment By: Matt Schuetze (mpschuetze) Date: 2010-11-04 17:20 Message: Looking forward to seeing this in a future build now that VS2010 is GA. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=362740&aid=2909164&group_id=12740 |
|
From: Luigi B. <lui...@gm...> - 2010-11-04 12:45:44
|
On Tue, 2010-11-02 at 20:32 -0400, Dominick Samperi wrote: > On the recent addition of solution files for VC++ 10, has anyone > found a simple way to add additional include directories > and libs? This used to be done using Tools/ Options > / Projects and Solutions / VC++ Directories, and in > this way the settings would apply to all projects in a solution. > > But this feature has been deprecated in VC++ 10, and instead > user property sheets are supposed to be used, but I don't > see how to do this so that it applies to all projects in > a solution (globally). Yes, I had to go through the same ordeal. After much searching, what I did was: - select View/Property Manager from the IDE menu; - open the subtree for any project and configuration; - you'll find a Microsoft.Cpp.Win32.User property page inside. - right-click and select Properties. Inside the dialog there's the good old "VC++ directories" option. The trick is that this particular page is shared, so when you edit it in one project/configuration they all should see it (I don't remember if I restarted the IDE after modifying it, though.) Luigi -- I hate quotations. -- Ralph Waldo Emerson |
|
From: Klaus S. <kl...@sp...> - 2010-11-04 09:25:48
|
Hi
it's in SVN. Thanks.
On Wednesday 03 November 2010 00:44:06 Kakhkhor Abdijalilov wrote:
> Hi. Similar problem in SVD::solveFor. It uses all singular values to
> compute matrix pseudo-inverse. Insignificant singular values should be
> dropped. Quick fix:
>
>
> Disposable<Array> SVD::solveFor(const Array& b) const{
> Matrix W(n_, n_, 0.0);
> Size numericalRank = this->rank();
> for (Size i=0; i<numericalRank; i++)
> W[i][i] = 1./s_[i];
>
> Matrix inverse = V()* W * transpose(U());
> Array result = inverse * b;
> return result;
> }
>
>
>
> Also, in SVD::rank implementation we could replace
> Real eps = std::pow(2.0,-52.0);
> with
> Real eps = QL_EPSILON.
>
>
> Regards,
> Kakhkhor Abdijalilov.
>
> ---------------------------------------------------------------------------
>--- Achieve Improved Network Security with IP and DNS Reputation.
> Defend against bad network traffic, including botnets, malware,
> phishing sites, and compromised hosts - saving your company time,
> money, and embarrassment. Learn More!
> http://p.sf.net/sfu/hpdev2dev-nov
> _______________________________________________
> QuantLib-dev mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
|
|
From: Piter D. <pit...@pi...> - 2010-11-03 22:39:44
|
Dominick, >> But this feature has been deprecated in VC++ 10, and instead user property sheets are supposed to be used, but I don't see how to do this so that it applies to all projects in a solution (globally). I found several links about, like http://efreedom.com/Question/1-2629421/Use-Boost-Visual-Studio-2010 and http://blogs.msdn.com/b/vsproject/archive/2009/07/07/vc-directories.aspx. However, I didn't find anything like Microsoft.Cpp.<Platform>.user or Microsoft.Cpp.Win32.user in VC++ Express 2010 so I opened C:\Users\<your login>\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props and add the below I appreciate if someone sends a screenshot of such (Microsoft.Cpp.<Platform>.user or Microsoft.Cpp.Win32.user) options in the GUI once they are supposed to be the right way to setup includes globally. <PropertyGroup> <IncludePath>C:\Users\<your login>\Development\include\boost-1_44;$(IncludePath)</IncludePath> </PropertyGroup> Thanks a lot, _______________________ Piter Dias pit...@pi... |
|
From: SourceForge.net <no...@so...> - 2010-11-03 20:16:31
|
Patches item #3102452, was opened at 2010-11-03 16:16 Message generated for change (Tracker Item Submitted) made by shlagbaum You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312740&aid=3102452&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: Slava Mazur (shlagbaum) Assigned to: Nobody/Anonymous (nobody) Summary: GARCH calibration Initial Comment: Re-designed GARCH volatility model with calibration proposed. Calibration is based on two types of initial approximation and employs simplex optimization method as a default. An ability to provide a user defined optimization method, end criteria and initial guess are also included. More details and examples of use can be found in the attached QuantLib test suite unit. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312740&aid=3102452&group_id=12740 |
|
From: Dominick S. <dsa...@De...> - 2010-11-03 00:45:24
|
On the recent addition of solution files for VC++ 10, has anyone found a simple way to add additional include directories and libs? This used to be done using Tools/ Options / Projects and Solutions / VC++ Directories, and in this way the settings would apply to all projects in a solution. But this feature has been deprecated in VC++ 10, and instead user property sheets are supposed to be used, but I don't see how to do this so that it applies to all projects in a solution (globally). This can be done on a project-by-project basis using Properties / Configuration Properties / VC++ Directories, but this would have do be done for each project, and for each configuration (Debug, Release, x32, x64, etc.). Very tedious. A solution that works for the Express edition is of course preferred. Thanks, Dominick |
|
From: Kakhkhor A. <kab...@gm...> - 2010-11-02 23:44:13
|
Hi. Similar problem in SVD::solveFor. It uses all singular values to
compute matrix pseudo-inverse. Insignificant singular values should be
dropped. Quick fix:
Disposable<Array> SVD::solveFor(const Array& b) const{
Matrix W(n_, n_, 0.0);
Size numericalRank = this->rank();
for (Size i=0; i<numericalRank; i++)
W[i][i] = 1./s_[i];
Matrix inverse = V()* W * transpose(U());
Array result = inverse * b;
return result;
}
Also, in SVD::rank implementation we could replace
Real eps = std::pow(2.0,-52.0);
with
Real eps = QL_EPSILON.
Regards,
Kakhkhor Abdijalilov.
|
|
From: Klaus S. <kl...@sp...> - 2010-11-02 22:18:26
|
Hi you are right, following the TNT/Jama docu the vector SVD::s_ is ordered. I've checked in the patch, thanks! best regards Klaus On Tuesday 02 November 2010 19:56:53 Kakhkhor Abdijalilov wrote: > I am 99% sure. In simple tests they are ordered. From reading the code > I have an impression, that the singular values are indeed ordered. > > Regards, > Kakhkhor Abdijalilov. > > --------------------------------------------------------------------------- >--- Nokia and AT&T present the 2010 Calling All Innovators-North America > contest Create new apps & games for the Nokia N8 for consumers in U.S. and > Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in > marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to > Ovi Store http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
|
From: Klaus S. <kl...@sp...> - 2010-11-02 22:12:12
|
Hi you are right, following the TNT/Jama docu the vector SVD::s_ is ordered. I've checked the patch, thanks! best regards Klaus On Tuesday 02 November 2010 19:56:53 Kakhkhor Abdijalilov wrote: > I am 99% sure. In simple tests they are ordered. From reading the code > I have an impression, that the singular values are indeed ordered. > > Regards, > Kakhkhor Abdijalilov. > > --------------------------------------------------------------------------- >--- Nokia and AT&T present the 2010 Calling All Innovators-North America > contest Create new apps & games for the Nokia N8 for consumers in U.S. and > Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in > marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to > Ovi Store http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
|
From: Kakhkhor A. <kab...@gm...> - 2010-11-02 18:56:59
|
I am 99% sure. In simple tests they are ordered. From reading the code I have an impression, that the singular values are indeed ordered. Regards, Kakhkhor Abdijalilov. |
|
From: SourceForge.net <no...@so...> - 2010-11-02 13:28:56
|
Patches item #3101580, was opened at 2010-11-02 09:25 Message generated for change (Comment added) made by shlagbaum You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312740&aid=3101580&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: Slava Mazur (shlagbaum) Assigned to: Nobody/Anonymous (nobody) Summary: Fix to KnuthUniformRng Initial Comment: The proposed fix makes KnuthUniformRng class safely copyable. ---------------------------------------------------------------------- >Comment By: Slava Mazur (shlagbaum) Date: 2010-11-02 09:28 Message: vector iterators replaced by indices. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312740&aid=3101580&group_id=12740 |
|
From: SourceForge.net <no...@so...> - 2010-11-02 13:25:07
|
Patches item #3101580, was opened at 2010-11-02 09:25 Message generated for change (Tracker Item Submitted) made by shlagbaum You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312740&aid=3101580&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: Slava Mazur (shlagbaum) Assigned to: Nobody/Anonymous (nobody) Summary: Fix to KnuthUniformRng Initial Comment: The proposed fix makes KnuthUniformRng class safely copyable. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312740&aid=3101580&group_id=12740 |
|
From: Luigi B. <lui...@gm...> - 2010-11-02 09:36:40
|
On Sat, 2010-10-30 at 14:16 +0100, Andrea wrote: > I was wondering if there is a special reason why Currency does not have operator< > so that it cannot be the key of a map. I wouldn't add an operator< just for that (because ordering currencies doesn't make much sense) but of course you can add it if you need it. Luigi -- When all else fails, pour a pint of Guinness in the gas tank, advance the spark 20 degrees, cry "God Save the Queen!", and pull the starter knob. -- MG "Series MGA" Workshop Manual |
|
From: Luigi B. <lui...@gm...> - 2010-11-02 09:33:28
|
On Fri, 2010-10-29 at 17:23 -0400, Slava Mazur wrote: > The following declaration in KnuthUniformRng effectively makes this > class non-copyable: > > std::vector<double>::const_iterator ranf_arr_ptr, _arr_sentinel; You're right. Indices instead of iterators are fine with me. Thanks, Luigi -- Weiler's Law: Nothing is impossible for the man who doesn't have to do it himself. |
|
From: Klaus S. <kl...@sp...> - 2010-11-02 08:36:25
|
Hi I'm asking because for your patch it is crucial, that SVD::s_ is ordered. regards Klaus On Friday 29 October 2010 20:26:10 Kakhkhor Abdijalilov wrote: > Do you mean SVD::s_? Yes, it should be ordered. > > Regards, > Kakhkhor Abdijalilov. > > --------------------------------------------------------------------------- >--- Nokia and AT&T present the 2010 Calling All Innovators-North America > contest Create new apps & games for the Nokia N8 for consumers in U.S. and > Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in > marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to > Ovi Store http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
|
From: Kakhkhor A. <kab...@gm...> - 2010-10-30 17:13:46
|
I did manage to run the test suite using the new singleton class designed for ICC. ICC crashes immediately, but Visual Studio finished with only one failure. Everything else except the test suite works fine. I suspect that ICC crash is due to a conflict between compiler settings used by bjam and QuantLib project. Linking to header only boost libraries is OK. Attached is the singleton used to run the test suite. It is the same as one uploaded into the patch system (one without schped_ptr). Regards, Kakhkhor Abdijalilov. ------------------------------------- Error message: Testing kernel 1D interpolation... unknown location(0): fatal error in "QuantLib::detail::quantlib_test_case(&InterpolationTest::testKernelInterpolation)": std::exception: void __thiscall QuantLib::detail::KernelInterpolationImpl<class std::_Vector_iterator<double,class std::allocator<double> >,class std::_Vector_iterator<double,class std::allocator<double> >,class QuantLib::GaussianKernel>::updateAlphaVec(void): ..\ql/math/interpolations/kernelinterpolation.hpp(130): Inversion failed in 1d kernel interpolation c:\quantlib\test-suite\utilities.hpp(78): last checkpoint |
|
From: Andrea <mar...@go...> - 2010-10-30 13:17:01
|
Hi, I was wondering if there is a special reason why Currency does not have operator< so that it cannot be the key of a map. Before adding it myself I wanted to check if I am doing something bad. something like map<Currency, Handle<YieldCurve> > Andrea |
|
From: Slava M. <sm...@li...> - 2010-10-29 21:39:14
|
The following declaration in KnuthUniformRng effectively makes this class non-copyable: std::vector<double>::const_iterator ranf_arr_ptr, _arr_sentinel; However, KnuthUniformRng is not declared as such. As a result, any attempt to call next() of a copy of any temporal instance of KnuthUniformRng ends up in a crash (let me know if further elaboration is needed). I don't believe this is an intended design. There are two possible ways to fix: either to keep indices instead of const_iterator, or to implement a copy constructor and an assignment operator. I personally prefer the former, but can provide any fix community will choose. Best, Slava Mazur |
|
From: Kakhkhor A. <kab...@gm...> - 2010-10-29 18:26:18
|
Do you mean SVD::s_? Yes, it should be ordered. Regards, Kakhkhor Abdijalilov. |
|
From: Kakhkhor A. <kab...@gm...> - 2010-10-29 03:07:17
|
My average-price formula agrees with QuanLib, but my average-strike
formula doesn't.
When the dividend yield is zero, the QuanLib results agree with my own
implementation perfectly. When the dividend yield isn't zero, they
differ in 3rd digit.
Could it be that average-strike engine doesn't handle non-zero
dividend yield properly?
I coded up a special case.
(*) No past fixings.
(*) Two remaining fixings at dt and 2*dt (midpoint and maturity).
(*) Time step dt = 45/365 (i.e. 45 days).
(*) Set yield = rate - 0.5*volatility*volatility (for easy derivation).
(*) Use NullCalendar and ActualActual (calendar and day counter for
theoretical calculations).
(*) Set Settings::instance().evaluationDate() to the settlement date.
A simple code which implements the above special case is below. QL
example and the derivation of formula are in the attachments.
The spacial case code agrees with my general implementation. Could
someone compare it to QuantLib implementation.
Regards,
Kakhkhor Abdijalilov.
//-----------------------------------------------------------------------------------
// Special Case
// Analytic Discrete Geometric Average Strike Asian Option
//-----------------------------------------------------------------------------------
#include <iostream>
#include <boost/math/distributions/normal.hpp>
int main() {
double spot = 22.0;
double r = 0.1; // risk free rate
double dt = 45.0/365.0; // time between fixings
double v = 0.2; // volatility
double yield = r - 0.5*v*v; // set dividend yeild
std::cout << "Average-strike Call and Put prices:\n";
double a = v*std::sqrt(dt);
double s = spot*std::exp(a*a/2 - 2*r*dt);
double x = std::exp(a*a/2);
double y = std::exp(a*a/8);
boost::math::normal_distribution<double> nd;
double n1 = boost::math::cdf(nd,a);
double n2 = boost::math::cdf(nd,a/2);
double c = s*(x*n1 - y*n2); // call
double p = s*(x*(n1-1) - y*(n2-1)); // put
std::cout << c << '\t' << p << '\n';
}
|
|
From: Kakhkhor A. <kab...@gm...> - 2010-10-28 18:52:34
|
Let's use numerical rank as cutoff. Only first SVD::rank() singular
values are used, the rest are dropped. We could replace the loop at
line 118 with this one:
for (i=0; i<svd.rank(); ++i) {
const Real u = std::inner_product(U.column_begin(i),
U.column_end(i),
y.begin(), 0.0)/w[i];
for (Size j=0; j<m; ++j) {
a_[j] +=u*V[j][i];
err_[j]+=V[j][i]*V[j][i]/(w[i]*w[i]);
}
}
There is a deeper issue with 2 pass approach (reusing coefficients
from pass 1 in pass 2). It is not critical for equity pricing. I am
looking into the problem right now and planning to write a working
sometime soon.
Regards,
Kakhkhor Abdijalilov.
|
|
From: Simon I. <Sim...@fs...> - 2010-10-28 17:04:57
|
Hi Luigi,
Thanks for the advice, it works.
I'll be submitting a patch in the next week.
Simon
-----Original Message-----
From: Luigi Ballabio [mailto:lui...@gm...]
Sent: 26 October 2010 15:19
To: Simon Ibbotson
Cc: ja...@fr...; qua...@li...
Subject: Re: [Quantlib-dev] Extending short-rate models for credit /
inflation.
On Mon, 2010-10-25 at 13:20 +0100, Simon Ibbotson wrote:
> That was what I meant (making the classes into template classes ) -
> but it would affect many classes, not just the TSCM and the TSFP.
> Also, any classes that derive from those (e.g. Hull-White, CIR++) and
> that use them (Grids etc.).
>
> [...]
>
> Extending the TermStructure definition would be much simpler - or
> adding another layer (e.g. RateBasedTermStructure) which would derive
> from TermStructure and be the base class for YieldTermStructure,
> DefaultProbabilityTermStructure, InflationTermStructure etc.
I'm not sure. On the one hand, you'd have to modify all the classes
anyway so that they take a RateBasedTermStructure instead of a
YieldTermStructure. Once you're doing that, you might as well make them
into templates. On the other hand, RateBasedTermStructure has no
particular concept associated besides "a term structure returning some
kind of rate" or something like that (is default probability a rate?)
which is a bit too generic. It looks to me it would be just an
implementation thing with no actual financial concept behind.
Since the problem you're trying to solve is to unify different
interfaces in some way, have you thought about doing it explicitly and
using an Adapter pattern instead? Off the top of my head (so I haven't
tested the design to see if there's any showstoppers) you might define
inside the model an inner class like:
class TermStructureConsistentModel {
...
private:
class OneFactorThingamabob { // the name is your call
public:
virtual ~OneFactorThingamabob() {}
virtual Real discountOrSomething(Time t) const = 0;
}
Handle<OneFactorThingamabob> bob_;
...
};
then an adapter like:
template <class T>
class ThingamabobAdapter;
and specializations such as:
template <>
class ThingamabobAdapter<YieldTermStructure>
: public OneFactorThingamabob {
public:
// take and store a YieldTermStructure
Real discountOrSomething(Time t) const {
return storedYTS_->discount(t);
}
};
template <>
class ThingamabobAdapter<DefaultProbabilityTermStructure>
: public OneFactorThingamabob {
public:
// take and store a DefaultProbabilityTermStructure
Real discountOrSomething(Time t) const {
return storedYTS_->defaultProbability(t);
}
};
and finally a template constructor for TSCM:
template <class T>
TermStructureConsistentModel(const Handle<T>& h, ...) {
bob_ = new ThingamabobAdapter<T>(h);
...
}
This should adapt the several interfaces and do the right thing for
each. It might even remove the need of turning the classes into
templates, since adding templates constructors might suffice.
The problem would be backward compatibility. But it might (emphasis on
might) be saved by keeping the old constructors as special cases.
Later,
Luigi
--
Brady's First Law of Problem Solving:
When confronted by a difficult problem, you can solve it more
easily by reducing it to the question, "How would the Lone
Ranger have handled this?"
This communication and any attachments contains information which is confidential and may be subject to legal privilege. It is for intended recipients only. If you are not the intended recipient you must not copy, distribute, publish, rely on or otherwise use it without our consent. Some of our communications may contain confidential information which it could be a criminal offence for you to disclose or use without authority. If you have received this email in error please notify pos...@fs... immediately and delete the email from your computer.
The FSA reserves the right to monitor all email communications for compliance with legal, regulatory and professional standards.
This email is not intended to nor should it be taken to create any legal relations or contractual relationships. This email has originated from
The Financial Services Authority (FSA)
25 The North Colonnade,
Canary Wharf,
London
E14 5HS
United Kingdom
Registered as a Limited Company in England and Wales No.1920623.
Registered Office as above
Switchboard: 020 7066 1000
Web Site: http://www.fsa.gov.uk
*****************************************************************
|
|
From: Klaus S. <kl...@sp...> - 2010-10-28 13:10:16
|
Hi
On Wednesday 08 September 2010 15:42:04 Kakhkhor Abdijalilov wrote:
> SVD can deal with collinearity, but the cutoff threshold for small
> singular values in LinearLeastSquaresRegression is n*QL_EPSILON (n is
> matrix size).
>
> Btw, the cutoff should be applied to the ratio of singular values, not
> to the singular values directly. That is something we need to fix as
> well.
correct. What do you think about the following bug-fix for OLS purposes
change line 116 of linearleastsquaresregression.hpp towards
const Real threshold
= n*QL_EPSILON*(*std::max_element(w.begin(), w.end()));
best regards
Klaus
|
|
From: Kakhkhor A. <kab...@gm...> - 2010-10-27 16:43:19
|
Sounds good to me. Also, please feel free to rename interface functions if you think it fits better QuantLib's naming convention. Regards, Kakhkhor Abdijalilov. |