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: SourceForge.net <no...@so...> - 2010-06-11 11:06:37
|
Bugs item #3013290, was opened at 2010-06-08 17:13 Message generated for change (Comment added) made by miemiec You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3013290&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: Andre Miemiec (miemiec) Assigned to: Nobody/Anonymous (nobody) Summary: Bug: CMS Swap Initial Comment: In Version 1.1 the CMS Swap does not work correctly. The problem is located in the constructor BlackVanillaOptionPricer::BlackVanillaOptionPricer(Rate forwardValue, Date expiryDate, const Period& swapTenor, const boost::shared_ptr<SwaptionVolatilityStructure>& volatilityStructure ) where the member variable smile_ should be initialized with the result from volatilityStructure_->smileSection(expiryDate_, swapTenor_). As far as I can see inside the function volatilityStructure_->smileSection(expiryDate_, swapTenor_) everything is constructed correctly. But as soon as the result is copied into smile_ some of the data are not set. In particular the variable exerciseTime_ is a huge negative number causing an error later on. ---------------------------------------------------------------------- >Comment By: Andre Miemiec (miemiec) Date: 2010-06-11 13:06 Message: Even in release mode the results are not convincing. Recomputation of a cms-swap produces two different results. The cashflow table of the CMS-Leg is completely wrong. ---------------------------------------------------------------------- Comment By: Andre Miemiec (miemiec) Date: 2010-06-10 09:18 Message: Seems only to appear in Debug Mode (Static XL). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3013290&group_id=12740 |
|
From: Luigi B. <lui...@gm...> - 2010-06-11 08:47:52
|
On Thu, 2010-06-10 at 10:16 -0700, Javit Hafizoglu wrote: > I'm relocating. Lots of things to do. I'm planning to finish this update by > the end of June. No problem, take your time. Luigi > Luigi Ballabio wrote: > > > > On Thu, 2010-05-27 at 10:04 -0700, Javit Hafizoglu wrote: > >> I believe Luigi forgot to change the generalized HW code when he made the > >> change in the parameter class to include the positive constraint. > > > > Yes, possibly. > > > >> Your point for the "size()" vs "size()+1" is valid. > > > >> Luigi, please let me know if you would like me to get involved also. > > > > Yes, please. If you could correct the size issue and check that the > > trunk version calibrates correctly, that would be great. > > > > Thanks, > > Luigi > > > > > > -- > > > > Ogden's Law: > > The sooner you fall behind, the more time you have to catch up. > > > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > > QuantLib-dev mailing list > > Qua...@li... > > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > > > > -- Father's got the sack from the water-works For smoking of his old cherry-briar; Father's got the sack from the water-works 'Cos he might set the water-works on fire. |
|
From: P N. <pn...@gm...> - 2010-06-11 01:49:18
|
Good morning all,
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'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)
Here are some details of the compiler settings:
http://msdn.microsoft.com/en-us/library/1deeycx5.aspx
Right now, when I use the quantlib XL addin in excel ( 2007 ) as excel is
closes it crashes ( almost always).
There are two problems with this,
1: some error is thrown
2: the error is not caught
By changing the settings above we can at least solve number 2.
Cheers
Philip
|
|
From: Javit H. <ch...@vi...> - 2010-06-10 17:16:14
|
I'm relocating. Lots of things to do. I'm planning to finish this update by the end of June. Luigi Ballabio wrote: > > On Thu, 2010-05-27 at 10:04 -0700, Javit Hafizoglu wrote: >> I believe Luigi forgot to change the generalized HW code when he made the >> change in the parameter class to include the positive constraint. > > Yes, possibly. > >> Your point for the "size()" vs "size()+1" is valid. > >> Luigi, please let me know if you would like me to get involved also. > > Yes, please. If you could correct the size issue and check that the > trunk version calibrates correctly, that would be great. > > Thanks, > Luigi > > > -- > > Ogden's Law: > The sooner you fall behind, the more time you have to catch up. > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > -- View this message in context: http://old.nabble.com/Generalized-Hull-White-model-problems-tp28647789p28846017.html Sent from the quantlib-dev mailing list archive at Nabble.com. |
|
From: SourceForge.net <no...@so...> - 2010-06-10 07:19:02
|
Bugs item #3013290, was opened at 2010-06-08 17:13 Message generated for change (Comment added) made by miemiec You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3013290&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: Andre Miemiec (miemiec) Assigned to: Nobody/Anonymous (nobody) Summary: Bug: CMS Swap Initial Comment: In Version 1.1 the CMS Swap does not work correctly. The problem is located in the constructor BlackVanillaOptionPricer::BlackVanillaOptionPricer(Rate forwardValue, Date expiryDate, const Period& swapTenor, const boost::shared_ptr<SwaptionVolatilityStructure>& volatilityStructure ) where the member variable smile_ should be initialized with the result from volatilityStructure_->smileSection(expiryDate_, swapTenor_). As far as I can see inside the function volatilityStructure_->smileSection(expiryDate_, swapTenor_) everything is constructed correctly. But as soon as the result is copied into smile_ some of the data are not set. In particular the variable exerciseTime_ is a huge negative number causing an error later on. ---------------------------------------------------------------------- >Comment By: Andre Miemiec (miemiec) Date: 2010-06-10 09:18 Message: Seems only to appear in Debug Mode (Static XL). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3013290&group_id=12740 |
|
From: SourceForge.net <no...@so...> - 2010-06-08 15:13:28
|
Bugs item #3013290, was opened at 2010-06-08 17:13 Message generated for change (Tracker Item Submitted) made by miemiec You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3013290&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: Andre Miemiec (miemiec) Assigned to: Nobody/Anonymous (nobody) Summary: Bug: CMS Swap Initial Comment: In Version 1.1 the CMS Swap does not work correctly. The problem is located in the constructor BlackVanillaOptionPricer::BlackVanillaOptionPricer(Rate forwardValue, Date expiryDate, const Period& swapTenor, const boost::shared_ptr<SwaptionVolatilityStructure>& volatilityStructure ) where the member variable smile_ should be initialized with the result from volatilityStructure_->smileSection(expiryDate_, swapTenor_). As far as I can see inside the function volatilityStructure_->smileSection(expiryDate_, swapTenor_) everything is constructed correctly. But as soon as the result is copied into smile_ some of the data are not set. In particular the variable exerciseTime_ is a huge negative number causing an error later on. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=3013290&group_id=12740 |
|
From: Don S. <Don...@fs...> - 2010-06-08 14:21:30
|
Hi there, Using the tutorial http://quantlib.org/quantlibaddin/extend_tutorial.html and some trial and error I've been able to expose QuantLib's default probability functionality to QuantLibXL. The attached zip file contains the source code changes made to QuantLibAddin-1.0.0b3 (which as far as I'm aware is the latest published version of QuantLibAddin). I've compiled this code using Microsoft Visual C++ 2008 to both Debug (runtime static) and Release (runtime static) .xll files. I've used these in Excel 2003 to back out probability of default from CDS spreads which validate against data I have from JP Morgan and against a separate model built in Matlab by a colleague. I'd like to publish this code to the QuantLib source code base and would appreciate it if someone could enlighten me how to do this. I'd also appreciate any comments on whether my code exposes this functionality in an optimal manner. For instance, is it necessary to manually add source code to QuantLibAddin\qlo\enumerations\constructors\enumeratedpairs.xpp or manually create QuantLibAddin\qlo\enumerations\factories\defaulttermstructuresfactory.hp p rather than auto generate them via python from qlgensrc project. In case anyone wants to compile this code then the installation process is:- Download and install the QuantLib source code stack. The parent directory I used looks like gensrc log4cxx ObjectHandler QuantLib QuantLibAddin QuantLibXL Unzip the attached zip file QuantLibAddinWithDefautlProability.zip to this parent directory. The contents should overwrite some files in the QuantLibAddin sub-directory. Invoke Visual C++ 2008 and open the QuantLibXL\QuantLibXL_full_vc9.sln. Select either Debug (runtime static) or Release (runtime static) solution configuration. Press F7 to build the solution. After successful compilation, the QuantLibXL\xll sub-directory should contain a .xll add in that can be loaded in Excel. Regards Don Stewart don...@fs... 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: Luigi B. <lui...@gm...> - 2010-06-07 16:26:01
|
On Mon, 2010-06-07 at 18:05 +0200, Dima wrote: > I feel kind of bad since I needed so much time to check! After seeing _my_ response times? You're too harsh on yourself :) > Anyways, I checked and everything seems to be ok. I've attached an > example project which uses the contributed class, similar to the other > example projects. You might want to add it to the trunk. Ok, I'll have a look. Thanks, Luigi -- There's no sense in being precise when you don't even know what you're talking about. -- John von Neumann |
|
From: Luigi B. <lui...@gm...> - 2010-06-07 15:22:36
|
On Thu, 2010-05-27 at 01:58 -0500, Kakhkhor Abdijalilov wrote: > If the argument x is close to 0.0 or 1.0, the implementation sets it > exactly to 0.0 or 1.0. > This leads to an attempt to evaluate std::log(0.0) or std::log(1.0). You're right. I wonder why it does it though, since 0 and 1 are outside the domain of the function. If I were to return a value, I'd return the maximum allowed double for 1 and the minimum for 0 (to get an approximation of plus/minus infinity.) But I'd rather throw an exception in that case. Thoughts? Luigi -- Call on God, but row away from the rocks. -- Indian proverb |
|
From: Luigi B. <lui...@gm...> - 2010-06-07 13:01:42
|
On Fri, 2010-05-28 at 10:01 -0400, Joseph Wang wrote: > The one thing that I > might have to rework is how Seasonality is written so that it gets > passed around using boost shared pointers. Done. Luigi -- There are two ways to write error-free programs; only the third one works. -- unknown |
|
From: SourceForge.net <no...@so...> - 2010-06-04 22:27:27
|
Patches item #3011676, was opened at 2010-06-04 18:27 Message generated for change (Tracker Item Submitted) made by pawel3 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312740&aid=3011676&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: Pawel (pawel3) Assigned to: Nobody/Anonymous (nobody) Summary: calculate mean/variance using a numerically-stable method Initial Comment: patch to IncrementalStatistics that uses a numerically stable method for calculating mean and variance ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312740&aid=3011676&group_id=12740 |
|
From: Luigi B. <lui...@gm...> - 2010-06-03 15:13:59
|
On Tue, 2010-06-01 at 16:12 +0530, Deepak wrote: > Can anyone help me that in Garch11, how we calculate alpha, beta and > omega. >From what I see, there's only a stub for the calibration method in the Garch class---no actual code. Anyone wanting to give it a try? Luigi -- Glendower: I can call spirits from the vasty deep. Hotspur: Why, so can I, or so can any man; But will they come when you do call for them? -- King Henry the Fourth Part I, Act III, Scene I |
|
From: Yee M. C. <ym...@ya...> - 2010-06-01 12:25:15
|
I think the Hull book described a way to estimate alpha, beta for GARCH(1,1) using past data. If you need to do anything more than GARCH(1,1), you need a optimization package, e.g. levmar. You can also use Kalman filter to fit these parameters to option prices. But I have never done that though. Good luck! Yee Man --- On Tue, 6/1/10, Deepak <dee...@3i...> wrote: From: Deepak <dee...@3i...> Subject: [Quantlib-dev] GARCH11 Log Likelihood ...... To: qua...@li... Cc: qua...@li... Date: Tuesday, June 1, 2010, 3:42 AM HI Can anyone help me that in Garch11, how we calculate alpha, beta and omega. I’m using QuantLib 0.9.7, is it available in latest version of QuantLib release. Thanks & Regards, Deepak Sharma, Software Engineer , Banking Products Group , 3i Infotech Ltd. Tel. Direct: +91 22 6792 8893 | Cell: + 91 9223513327 | Email: dee...@3i... | www.3i-infotech.com * 3i Infotech wins the "WorldBlu List of Most Democratic Workplaces 2010" Award This e-mail message may contain confidential,proprietary or legally privileged information. It should not be used by anyone who is not the original intended recipient. If you have erroneously received this message, please delete it immediately and notify the sender. The recipient acknowledges that 3i Infotech or its subsidiaries and associated companies,(collectively "3i Infotech"), are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of 3i Infotech. Before opening any attachments please check them for viruses and defects. -----Inline Attachment Follows----- ------------------------------------------------------------------------------ -----Inline Attachment Follows----- _______________________________________________ QuantLib-dev mailing list Qua...@li... https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
|
From: Jorge N. <jor...@mo...> - 2010-05-28 14:24:33
|
Ok.. I will take a look in detail tonight. Jorge Nieves Moore Capital Telephone 212.782.7083 Fax 212.642.7644 -----Original Message----- From: Joseph Wang [mailto:joe...@gm...] Sent: Friday, May 28, 2010 10:01 AM To: Jorge Nieves Cc: qua...@li...; Dirk Eddelbuettel; Jeff Ryan; r-s...@st...; bal...@th... Subject: Re: [R-SIG-Finance] ta-lib & quantlib libraries for R The first thing is to check out Quantlib-SWIG from https://quantlib.svn.sourceforge.net/svnroot/quantlib/trunk/QuantLib-SWIG/ and build the R bindings. There are build instructions in the distribution and test examples. Once you have that done it's a matter of looking at the .hpp file of the objects you want to bind. Find a similar object in the SWIG directory and then transform the .hpp declaration adding it to the file SWIG/inflation.i For example what I did to create the inflation collar instruments is that I cut and paste the non-inflation collar instruments and then modified the signatures to match the .hpp files. The one thing that I might have to rework is how Seasonality is written so that it gets passed around using boost shared pointers. On Fri, May 28, 2010 at 9:48 AM, Jorge Nieves <jor...@mo...> wrote: > If you explain me the process, I think I can help. > > > Jorge Nieves > > > -----Original Message----- > From: Joseph Wang [mailto:joe...@gm...] > Sent: Friday, May 28, 2010 09:47 AM > To: Jorge Nieves > Cc: qua...@li...; Dirk Eddelbuettel; Jeff > Ryan; r-s...@st...; > bal...@th... > Subject: Re: [R-SIG-Finance] ta-lib & quantlib libraries for R > > I just checked in a file inflation.i into Quantlib-SWIG which provides > bindings for some of the inflation based instruments. It's very sparse. > I'll try to add the other instruments over time, but it's likely to be > slow to add (i.e. a few weeks), but if there are any volunteers that > would want to add to the file, let me know and I'll check in any > additions. > > What needs to be done is pretty mechanical (cut and paste) things. > |
|
From: Joseph W. <joe...@gm...> - 2010-05-28 14:01:09
|
The first thing is to check out Quantlib-SWIG from https://quantlib.svn.sourceforge.net/svnroot/quantlib/trunk/QuantLib-SWIG/ and build the R bindings. There are build instructions in the distribution and test examples. Once you have that done it's a matter of looking at the .hpp file of the objects you want to bind. Find a similar object in the SWIG directory and then transform the .hpp declaration adding it to the file SWIG/inflation.i For example what I did to create the inflation collar instruments is that I cut and paste the non-inflation collar instruments and then modified the signatures to match the .hpp files. The one thing that I might have to rework is how Seasonality is written so that it gets passed around using boost shared pointers. On Fri, May 28, 2010 at 9:48 AM, Jorge Nieves <jor...@mo...> wrote: > If you explain me the process, I think I can help. > > > Jorge Nieves > > > -----Original Message----- > From: Joseph Wang [mailto:joe...@gm...] > Sent: Friday, May 28, 2010 09:47 AM > To: Jorge Nieves > Cc: qua...@li...; Dirk Eddelbuettel; Jeff Ryan; > r-s...@st...; bal...@th... > Subject: Re: [R-SIG-Finance] ta-lib & quantlib libraries for R > > I just checked in a file inflation.i into Quantlib-SWIG which provides > bindings for some of the inflation based instruments. It's very sparse. > I'll try to add the other instruments over time, but it's likely to be > slow to add (i.e. a few weeks), but if there are any volunteers that > would want to add to the file, let me know and I'll check in any > additions. > > What needs to be done is pretty mechanical (cut and paste) things. > |
|
From: Luigi B. <lui...@gm...> - 2010-05-28 08:55:26
|
On Thu, 2010-05-27 at 10:04 -0700, Javit Hafizoglu wrote: > I believe Luigi forgot to change the generalized HW code when he made the > change in the parameter class to include the positive constraint. Yes, possibly. > Your point for the "size()" vs "size()+1" is valid. > Luigi, please let me know if you would like me to get involved also. Yes, please. If you could correct the size issue and check that the trunk version calibrates correctly, that would be great. Thanks, Luigi -- Ogden's Law: The sooner you fall behind, the more time you have to catch up. |
|
From: Alexander L. <ale...@go...> - 2010-05-27 17:56:56
|
Hello Javit,
I used this setting:
TimeGrid grid(times.begin(), times.end(), 1);
// defining the models
boost::shared_ptr<G2> modelG2(new G2(rhTermStructure));
boost::shared_ptr<HullWhite> modelHW(new
HullWhite(rhTermStructure));
boost::shared_ptr<HullWhite> modelHW2(new
HullWhite(rhTermStructure));
boost::shared_ptr<BlackKarasinski> modelBK(
new
BlackKarasinski(rhTermStructure));
//------------------ GHW model ---------
std::vector<Date> GHWdates;
GHWdates.push_back(calendar.advance(settlementDate,0,Years));
GHWdates.push_back(calendar.advance(settlementDate,12,Months,floatingLegConvention));
GHWdates.push_back(calendar.advance(settlementDate,73,Months,floatingLegConvention));
std::vector<Real> a(3, 0.04);
std::vector<Real> sigma(3, 0.1);
boost::shared_ptr<GeneralizedHullWhite> generalizedHWmodel(
new GeneralizedHullWhite(rhTermStructure, GHWdates, GHWdates, a, sigma));
Please correct me, if I've forgotten something.
Cheers
Alexander
Javit Hafizoglu wrote:
>
> Alexander,
>
> I believe Luigi forgot to change the generalized HW code when he made the
> change in the parameter class to include the positive constraint. Your
> point for the "size()" vs "size()+1" is valid.
>
> I didn't notice anything because I still use the older version of GHW with
> quantlib 9.7.
>
> Per the tests, I tested the GHW code and it worked when I submitted. I ran
> my tests by adding couple of lines into BermudanSwaption.cpp I used only
> two timepoints for the volatility and the reversion parameters. It takes
> significantly long if you include more time points. I would suggest both
> decreasing the timegrid and the timepoints (let me know if you don't
> understand what I meant here by timepoints) to decrease the optimization
> time. And once optimized, initiate your next search with the most recent
> model parameters.
>
> Luigi, please let me know if you would like me to get involved also.
>
> Thank you,
> Javit
>
>
>
> Alexander Lotter wrote:
>>
>> Hello Luigi,
>>
>> thanks for the quick reply.
>>
>>>The PiecewiseConstantParameter class was modified in revision 17224 to
>>>take an optional constraint, so that's taken care of; the code in the
>>>trunk instantiates it with a PositiveConstraint.
>>
>> I am not sure this is enough. This peace of code in QL causes problems:
>>
>> ----
>> PiecewiseConstantParameter(const std::vector<Time>& times,
>> const Constraint& constraint =
>>
>> NoConstraint())
>> : Parameter(times.size()+1,
>> boost::shared_ptr<Parameter::Impl>(
>> new
>> PiecewiseConstantParameter::Impl(times)),
>> constraint)
>> {}
>> ----
>>
>> should be
>>
>> ----
>> public:
>> PiecewiseConstantParameter(const std::vector<Time>& times,
>> const Constraint& constraint =
>>
>> NoConstraint())
>> : Parameter(times.size(),
>> ----
>>
>> times.size() not times.size() + 1, in this case I get run time exception
>> in the following functions
>>
>> ---
>>
>> boost::function<Real (Time)> GeneralizedHullWhite::speed() const {
>>
>> std::vector<Real> speedvals;
>> speedvals.push_back(a_(0.0001));
>> for (Size i=0;i<a_.size()-1;i++)
>> speedvals.push_back(
>> a_(
>> (speedstructure_[i+1]-speedstructure_[0])/365.0
>> - 0.00001));
>>
>> return PiecewiseLinearCurve(speedperiods_, speedvals);
>> }
>>
>> boost::function<Real (Time)> GeneralizedHullWhite::vol() const {
>>
>> std::vector<Real> volvals;
>> volvals.push_back(sigma_(0.0001));
>> for (Size i=0;i<sigma_.size()-1;i++)
>> volvals.push_back(
>> sigma_(
>> (speedstructure_[i+1]-speedstructure_[0])/365.0
>> - 0.00001));
>>
>> return PiecewiseLinearCurve(volperiods_, volvals);
>> }
>> ---
>>
>> vector subscript out of range
>>
>> a_.size() - 1 and sigma_.size() - 1 are bigger than speedstructure_[i+1]
>>
>>
>
>
--
View this message in context: http://old.nabble.com/Generalized-Hull-White-model-problems-tp28647789p28697741.html
Sent from the quantlib-dev mailing list archive at Nabble.com.
|
|
From: Javit H. <ch...@vi...> - 2010-05-27 17:04:10
|
Alexander,
I believe Luigi forgot to change the generalized HW code when he made the
change in the parameter class to include the positive constraint. Your point
for the "size()" vs "size()+1" is valid.
I didn't notice anything because I still use the older version of GHW with
quantlib 9.7.
Per the tests, I tested the GHW code and it worked when I submitted. I ran
my tests by adding couple of lines into BermudanSwaption.cpp I used only two
timepoints for the volatility and the reversion parameters. It takes
significantly long if you include more time points. I would suggest both
decreasing the timegrid and the timepoints (let me know if you don't
understand what I meant here by timepoints) to decrease the optimization
time. And once optimized, initiate your next search with the most recent
model parameters.
Luigi, please let me know if you would like me to get involved also.
Thank you,
Javit
Alexander Lotter wrote:
>
> Hello Luigi,
>
> thanks for the quick reply.
>
>>The PiecewiseConstantParameter class was modified in revision 17224 to
>>take an optional constraint, so that's taken care of; the code in the
>>trunk instantiates it with a PositiveConstraint.
>
> I am not sure this is enough. This peace of code in QL causes problems:
>
> ----
> PiecewiseConstantParameter(const std::vector<Time>& times,
> const Constraint& constraint =
>
> NoConstraint())
> : Parameter(times.size()+1,
> boost::shared_ptr<Parameter::Impl>(
> new
> PiecewiseConstantParameter::Impl(times)),
> constraint)
> {}
> ----
>
> should be
>
> ----
> public:
> PiecewiseConstantParameter(const std::vector<Time>& times,
> const Constraint& constraint =
>
> NoConstraint())
> : Parameter(times.size(),
> ----
>
> times.size() not times.size() + 1, in this case I get run time exception
> in the following functions
>
> ---
>
> boost::function<Real (Time)> GeneralizedHullWhite::speed() const {
>
> std::vector<Real> speedvals;
> speedvals.push_back(a_(0.0001));
> for (Size i=0;i<a_.size()-1;i++)
> speedvals.push_back(
> a_(
> (speedstructure_[i+1]-speedstructure_[0])/365.0
> - 0.00001));
>
> return PiecewiseLinearCurve(speedperiods_, speedvals);
> }
>
> boost::function<Real (Time)> GeneralizedHullWhite::vol() const {
>
> std::vector<Real> volvals;
> volvals.push_back(sigma_(0.0001));
> for (Size i=0;i<sigma_.size()-1;i++)
> volvals.push_back(
> sigma_(
> (speedstructure_[i+1]-speedstructure_[0])/365.0
> - 0.00001));
>
> return PiecewiseLinearCurve(volperiods_, volvals);
> }
> ---
>
> vector subscript out of range
>
> a_.size() - 1 and sigma_.size() - 1 are bigger than speedstructure_[i+1]
>
>
--
View this message in context: http://old.nabble.com/Generalized-Hull-White-model-problems-tp28647789p28697165.html
Sent from the quantlib-dev mailing list archive at Nabble.com.
|
|
From: Allen K. <all...@ya...> - 2010-05-27 16:26:39
|
Chris: At the time we had this idea (see email below), but then we nixed it and went for the longer version, with the idea we'd eventually try to re-look at the problem. If you do refactor, I think you'll need to create a DiscretizedFixedRateBond (just like the DiscretizedSwap) and the structures would be parallel. At the time, Luigi noted that knowing the underlying was a Bond was not enough, since fixed and floating rate legs get discounted differently on tree engines. ( I later thought to myself- is there really a need for a floating rate callable bond, with little or no interest rate risk ? )
The idea of deriving from option rather than bond is more elegant from the interface perspective (as you know, options are naturally on some sort of underlying and it would be nice to wrap callability around fixed rate bonds and converts and/or whatever instruments) but I think at the time we figured out it would not be feasible underneath it all (I forget why now, perhaps its because of the need to create pretty customized discretized instruments to be rolled back on trees). Maybe you can figure out a way forward now ? I think options on fixed and floating rate Legs are pretty general classes. Also easy ways to transform from Instruments to "DiscretizedInstruments" may help (assuming we're still talking about the tree engines) but I assume that would be deep refactoring of Instrument.
Allen
On 08/01/2006 09:03:20 AM, Allen Kuo wrote:
> I'm trying to build a callable bond class and was wondering what a
> QL preferred design would be. Two possibilities are below. I liked
> the economy of the first method but the ConvertibleBond class is
> designed the second way, so was not sure how to proceed.
>
> (1)
> class CallableBond : public Bond {
> public:
> CallableBond(const boost::shared_ptr<Bond> bond&
> const boost::shared_ptr<PricingEngine>& engine,
> const CallabilitySchedule& callability,
> );
> etc.
> }
I like this one, but the problem is that the engine should know what
kind of bond it's being passed---or at least what kind of coupons it
contains. I.e., if you choose a tree engine, fixed-rate and
floating-rate coupons will be discounted in a different way on the
tree. Therefore, the above mightn't be as generic as it seems.
> (2)
> Analogous to the ConvertibleBond class, we would have three
> explicit constructors for each of three types of bonds (
> CallableZeroCouponBond , CallableFloatingRateBond ,
> CallableFixedCouponBond ).
This might be less nice, but it has the advantage of specifying the
kind of bond to be called. I would go for this one first; after the
code is done, we might try some refactoring to bring it closer to the
first design.
> Doing it this way, in the future though, we
> might need three more constructors for convertible bonds:
No, convertible bonds manage callability already. (By the way, you can
look at the relevant classes---Callability and such---so that you can
reuse them.)
Later,
Luigi
________________________________
From: Chris Kenyon <chr...@ya...>
To: qua...@li...; qua...@li...
Sent: Thu, May 27, 2010 10:06:38 PM
Subject: [Quantlib-users] callable bonds & bond options vs swaptions?
Hi,
the setup for callable bonds is rather different from swaptions, and maybe it can be improved.
Swaption (const boost::shared_ptr< VanillaSwap > &swap, const boost::shared_ptr< Exercise > &exercise, Settlement::Type delivery=Settlement::Physical)
... the Swaption takes a Swap and some data. Swaption is descendant of Option. A callable bond:
CallableFixedRateBond (Natural settlementDays, Real faceAmount, const Schedule &schedule, const std::vector< Rate > &coupons, const DayCounter &accrualDayCounter, BusinessDayConvention paymentConvention=Following, Real redemption=100.0, const Date &issueDate=Date(), const CallabilitySchedule &putCallSchedule=CallabilitySchedule())
... has a complete description and is a descendant of Bond, via CallableBond, not Option.
Now, granted, a swaption is an option on a swap and nothing happens before exercise whereas a bond may be paying coupons. However, it would be more parsimonious to copy the swaption definition idea for callable bonds and bond options, e.g.
CallableBond(const boost::shared_ptr< Bond > &bond, const CallabilitySchedule &putCallSchedule=CallabilitySchedule())
... descendant of Bond - and can define Puttable and Callable versions from the Callability vector. N.B. a CallabilitySchedule is a typedef for std::vector<boost::shared_ptr< Callability > >
BondOption(const boost::shared_ptr< Bond > &bond, const CallabilitySchedule &putCallSchedule=CallabilitySchedule(), Settlement::Type delivery=Settlement::Physical)
... descendant of Option. N.B. we need a Callability not an Exercise because we need the strike (in a swaption the strike is the fixed rate in the swap).
Any comments? This approach could be applied to ConvertibleBond as well.
Regards,
Chris
|
|
From: Chris K. <chr...@ya...> - 2010-05-27 14:06:45
|
Hi, the setup for callable bonds is rather different from swaptions, and maybe it can be improved. Swaption (const boost::shared_ptr< VanillaSwap > &swap, const boost::shared_ptr< Exercise > &exercise, Settlement::Type delivery=Settlement::Physical) ... the Swaption takes a Swap and some data. Swaption is descendant of Option. A callable bond: CallableFixedRateBond (Natural settlementDays, Real faceAmount, const Schedule &schedule, const std::vector< Rate > &coupons, const DayCounter &accrualDayCounter, BusinessDayConvention paymentConvention=Following, Real redemption=100.0, const Date &issueDate=Date(), const CallabilitySchedule &putCallSchedule=CallabilitySchedule()) ... has a complete description and is a descendant of Bond, via CallableBond, not Option. Now, granted, a swaption is an option on a swap and nothing happens before exercise whereas a bond may be paying coupons. However, it would be more parsimonious to copy the swaption definition idea for callable bonds and bond options, e.g. CallableBond(const boost::shared_ptr< Bond > &bond, const CallabilitySchedule &putCallSchedule=CallabilitySchedule()) ... descendant of Bond - and can define Puttable and Callable versions from the Callability vector. N.B. a CallabilitySchedule is a typedef for std::vector<boost::shared_ptr< Callability > > BondOption(const boost::shared_ptr< Bond > &bond, const CallabilitySchedule &putCallSchedule=CallabilitySchedule(), Settlement::Type delivery=Settlement::Physical) ... descendant of Option. N.B. we need a Callability not an Exercise because we need the strike (in a swaption the strike is the fixed rate in the swap). Any comments? This approach could be applied to ConvertibleBond as well. Regards, Chris |
|
From: Nicolai L. <nl...@cb...> - 2010-05-27 09:30:19
|
Kakhkhor Abdijalilov <kabdijalilov <at> gmail.com> writes: > > Bug Report: > > Where: In "normaldistribution.cpp". > What: Undefined behavior or floating point exception. > Severity: Subtle. > Burden: Easy to fix. See below. > > Description. > If the argument x is close to 0.0 or 1.0, the implementation sets it > exactly to 0.0 or 1.0. > This leads to an attempt to evaluate std::log(0.0) or std::log(1.0). > I propose that we cut it at x=1E-12 and x = 1 - 1E-12, which covers > all draws between > plus/minus 7 standard deviations. Any argument value beyond that range > should be considered > as either erroneous or astronomically improbable. > > Regards, > Kakhkhor Abdijalilov. I am currently looking into replacing the Quantlib implementation of statistical distributions with the implementation provided by Boost. The best solution (in my opinion anyway) would be to get totally rid of the Quantlib distribution folder and rely totally on Boost - this would eliminate a layer of indirection but it would break backward compatibility. Therefore I have currently just replaced the internal parts of the Quantlib normaldistribution.xpp with the Boost implementation. Unfortunately these makes some testcases fail, and I am currently looking into why this can be. If someone is interested I can post my modified normaldistribution.xpp files here. Br, Nicolai |
|
From: Kakhkhor A. <kab...@gm...> - 2010-05-27 06:59:17
|
Bug Report:
Where: In "normaldistribution.cpp".
What: Undefined behavior or floating point exception.
Severity: Subtle.
Burden: Easy to fix. See below.
Description.
If the argument x is close to 0.0 or 1.0, the implementation sets it
exactly to 0.0 or 1.0.
This leads to an attempt to evaluate std::log(0.0) or std::log(1.0).
I propose that we cut it at x=1E-12 and x = 1 - 1E-12, which covers
all draws between
plus/minus 7 standard deviations. Any argument value beyond that range
should be considered
as either erroneous or astronomically improbable.
Regards,
Kakhkhor Abdijalilov.
=============================================================
// current implementation
Real InverseCumulativeNormal::operator()(Real x) const {
if (x < 0.0 || x > 1.0) {
// try to recover if due to numerical error
if (close_enough(x, 1.0)) {
x = 1.0;
} else if (std::fabs(x) < QL_EPSILON) {
x = 0.0;
} else {
QL_FAIL("InverseCumulativeNormal(" << x
<< ") undefined: must be 0 < x < 1");
}
}
.........................................
}
// new implementation
Real InverseCumulativeNormal::operator()(Real x) const {
if (x < 1e-12 || x > (1.0 - 1e-12)) {
// try to recover if due to numerical error
if (close_enough(x, 1.0)) {
x = 1.0 - 1e-12;
} else if (std::fabs(x) < QL_EPSILON) {
x = 1e-12;
} else {
QL_FAIL("InverseCumulativeNormal(" << x
<< ") undefined: must be 0 < x < 1");
}
}
.........................................
}
|
|
From: Alexander L. <ale...@go...> - 2010-05-24 18:22:54
|
After this changes I get the project run, but calibration never returns... Playing with TimeGrid didn't help. -- View this message in context: http://old.nabble.com/Generalized-Hull-White-model-problems-tp28647789p28659989.html Sent from the quantlib-dev mailing list archive at Nabble.com. |
|
From: Alexander L. <ale...@go...> - 2010-05-24 18:20:23
|
Hello Luigi,
thanks for the quick reply.
>The PiecewiseConstantParameter class was modified in revision 17224 to
>take an optional constraint, so that's taken care of; the code in the
>trunk instantiates it with a PositiveConstraint.
I am not sure this is enough. This peace of code in QL causes problems:
----
PiecewiseConstantParameter(const std::vector<Time>& times,
const Constraint& constraint =
NoConstraint())
: Parameter(times.size()+1,
boost::shared_ptr<Parameter::Impl>(
new
PiecewiseConstantParameter::Impl(times)),
constraint)
{}
----
should be
----
public:
PiecewiseConstantParameter(const std::vector<Time>& times,
const Constraint& constraint =
NoConstraint())
: Parameter(times.size(),
----
times.size() not times.size() + 1, in this case I get run time exception in
the following functions
---
boost::function<Real (Time)> GeneralizedHullWhite::speed() const {
std::vector<Real> speedvals;
speedvals.push_back(a_(0.0001));
for (Size i=0;i<a_.size()-1;i++)
speedvals.push_back(
a_(
(speedstructure_[i+1]-speedstructure_[0])/365.0
- 0.00001));
return PiecewiseLinearCurve(speedperiods_, speedvals);
}
boost::function<Real (Time)> GeneralizedHullWhite::vol() const {
std::vector<Real> volvals;
volvals.push_back(sigma_(0.0001));
for (Size i=0;i<sigma_.size()-1;i++)
volvals.push_back(
sigma_(
(speedstructure_[i+1]-speedstructure_[0])/365.0
- 0.00001));
return PiecewiseLinearCurve(volperiods_, volvals);
}
---
vector subscript out of range
a_.size() - 1 and sigma_.size() - 1 are bigger than speedstructure_[i+1]
--
View this message in context: http://old.nabble.com/Generalized-Hull-White-model-problems-tp28647789p28659965.html
Sent from the quantlib-dev mailing list archive at Nabble.com.
|
|
From: Luigi B. <lui...@gm...> - 2010-05-24 16:05:22
|
On Sun, 2010-05-23 at 01:27 -0700, Alexander Lotter wrote: > Hello Javit, > > I found the Generalized Hull-White model checked by Luigi into the trunk a > couple of months ago. > > As you told me, the newest version was (see .zip file): > http://old.nabble.com/Generalized-Hull-White-model-with-non-constant-parameters-td26287370.html#a26635940 > > The last version in trunk on sourceforge as far as I know 17226. This > version have some differences to the version you posted in that archive in > december 2009. Yes. The differences are meant to be. > There is also no examples in the current trunk of the QuantLib, which > contains your version of BermudanSwaptions or some code for the test-suite. True, for some reason the example didn't make into the commit. I remember it working, though. > There is no a version of PiecewiseConstantParameter2 as you proposed to > implement. So, without this change, I couldn't get the current trunk version > to run without run-time error (vector subscript out of range). As I added > this class, I got the current version to run, but calibration took me too > long to wait. The PiecewiseConstantParameter class was modified in revision 17224 to take an optional constraint, so that's taken care of; the code in the trunk instantiates it with a PositiveConstraint. Anyway, I'll try to get the example working and get back. Luigi -- Don't let school get in the way of your education. -- Mark Twain |