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: Alan K. <ki...@us...> - 2006-09-05 15:59:43
|
<br><font size=2 face="sans-serif">At Dirk's suggestion I am moving this discussion to the dev list.</font> <br> <br> <br><tt><font size=2>Dirk Eddelbuettel <ed...@de...> wrote on 09/01/2006 08:09:14 PM:<br> <br> > <br> > Alan,<br> > <br> > On 1 September 2006 at 17:11, Alan King wrote:<br> > | <br> > | <br><font size=2 face="sans-serif">Most banks and computer companies look<br> > | to SPECfp2000 in order to rate computer and networking equipment for financial<br> > | computations. &nbsp;But there are no financial codes in SPECfp2000. &nbsp;</font><br> > | <br><br> > | <br><font size=2 face="sans-serif">Now, it takes a big effort to get a<br> > | proof of concept performed on a bank's proprietary software. &nbsp;IMHO<br> > | this inhibits progress in the financial industry. &nbsp;A project based<br> > | on QuantLib would leverage the open source community to get over this problem.<br> > | &nbsp;</font><br> > <br> > Yup and yup.<br> > <br> > | <br><font size=2 face="sans-serif">For these reasons, we are building a<br> > | benchmark based on QuantLib. &nbsp;We will run it on a variety of platforms,<br> > | including IBM's Blue Gene. &nbsp;I can't *guarantee* that IBM would contribute<br> > | this code, but our recent history suggests that IBM is very open to doing<br> > | that (Apache, COIN-OR, etc). &nbsp; </font><br> > | <br><br> > | <br><font size=2 face="sans-serif">So --- is there any community interest<br> > | in a QuantLib Benchmark Project? &nbsp; &nbsp;</font><br> > <br> > Nice idea! [ I also tend to run the bermudan swap pricer as an openMosix test<br> > on my Quantian (http://dirk.eddelbuettel.com/quantian/) builds. ]<br> </font></tt> <br><tt><font size=2>Yes I have run the Bermudan Swap pricer on various nodes. For a benchmark</font></tt> <br><tt><font size=2>we should run multiple instruments through the pricing portion of BSwap. Also,</font></tt> <br><tt><font size=2>it would be good to run instruments with a representative number of cashflows.</font></tt> <br> <br><tt><font size=2>> <br> > As a first approximation, building QL and running the unit tests should work.<br> > <br> > It may make sense to continue this on the QL developer (rather than user)<br> > list. And, if I may, please don't post html mail.<br> ></font></tt> <br> <br><tt><font size=2>My apologies for the html mail -- I thought html was an option on the reader side. As</font></tt> <br><tt><font size=2>far as I can tell my Notes client is sending mime format.</font></tt> <br> <br><tt><font size=2>> <br> > Cheers, Dirk<br> > <br> > -- <br> > Hell, there are no rules here - we're trying to accomplish something. <br> > -- Thomas A. Edison<br> </font></tt> <br><tt><font size=2>Alan</font></tt> |
|
From: Ferdinando A. <na...@am...> - 2006-09-04 10:21:03
|
> > * 360/360 -> shown as 30/360
> > * ACT/365 -> shown as ACT/ACT (ISDA)
this is correct, as per ISDA definitions. I.e. Act/365 is the same as
ACT/ACT. You might be interested to knoe that "Act/365 (Fixed)" is the
daycounter to use if you want a denominator always equal to 365.
Similar argument for 360/360.
> =qlDayCounterName("Actual/360")
> which returns "act/360"
this has been fixed in the CVS: qlDayCounterName now returns a valid
string that can be used later on as input paramet. It can be a string
litterally different from the one it has been used instantiating the
object, but it should always be an ISDA equivalent string.
> Perhaps we need some mechanism whereby the day counter returns the
> same string used to create it e.g.
> =qlDayCounterName("Actual/360") -> "Actual/360"
> =qlDayCounterName("Act/360") -> "Act/360"
I don't think so, as long as the returned string is ISDA equivalent.
> > On a separate note, I am wondering if the ACT/ACT here
> > is the same as ACT/nACT which is used in US
> > Treasuries. Anyone can confirm that?
please point to an ATC/nACT definition.
> > 2.) I have found that qlFrequency() also cannot
> > display any frequency shorter than 1 month. Again is
> > this just a display problem
yes it is. I don't remember if it was already available in 0.3.13 but
you should/will use qlInterestRateIndexTenor() instead, which will
properly return 3M, 6M, etc and will also work for tenor as 5M, 7M
which are not defined as frequency. qlFrequency() will probably be
deprecated.
ciao -- Nando
|
|
From: eric e. <eri...@gm...> - 2006-09-04 09:02:25
|
Hi Wilkie,
On 9/3/06, Wilkie Lai <inf...@ya...> wrote:
> Hi Eric and all,
> 1.) After defining an Xibor object and retrieving its
> name by qlIndexName() I have found that the name
> contains a day counter that is different from what has
> been specified during object creation. It seems to
> suggest the object is actually making use of a
> different day count and can cause problem later on in
> calculation. After further investigation the problem
> seems to be limited in scope to the following day
> count type:
> * 360/360 -> shown as 30/360
> * ACT/365 -> shown as ACT/ACT (ISDA)
> Is it just a displayed problem? Is there any function
> which can actually retrieve the day count setting?
This is a display problem, you can see it more directly with
=qlDayCounterName("Actual/360")
which returns "act/360"
Perhaps we need some mechanism whereby the day counter returns the
same string used to create it e.g.
=qlDayCounterName("Actual/360") -> "Actual/360"
=qlDayCounterName("Act/360") -> "Act/360"
Regarding the two cases you mentioned, please see
http://www.quantlibaddin.org/auto/enums.html
Note for example that the following strings
30/360
30/360BondBasis
360/360
Thirty360::EurobondBasis
Are synonymous and all point to the same underlying object.
> On a separate note, I am wondering if the ACT/ACT here
> is the same as ACT/nACT which is used in US
> Treasuries. Anyone can confirm that?
I don't know, I can't find a reference anywhere to "ACT/nACT". Here
is the documentation for QL's implementation of ACT/ACT including a
pointer to the source documentation:
http://quantlib.org/reference/class_quant_lib_1_1_actual_actual.html
> 2.) I have found that qlFrequency() also cannot
> display any frequency shorter than 1 month. Again is
> this just a display problem, or the object is not
> defaulting the refix frequency to be same as the
> tenor? If it's the latter case than how can rate like
> Overnight Index (as in OIS) can be handled?
At first glance this appears to me to be a display problem, a glitch
in the underlying code (QuantLib::Xibor::frequency) - the method
returns "undefined frequency" for frequencies shorter than one month,
even when the Xibor object contains a perfectly valid tenor of, say,
1W.
Regards,
Eric
|
|
From: Wilkie L. <inf...@ya...> - 2006-09-03 13:13:30
|
Hi Eric and all, 1.) After defining an Xibor object and retrieving its name by qlIndexName() I have found that the name contains a day counter that is different from what has been specified during object creation. It seems to suggest the object is actually making use of a different day count and can cause problem later on in calculation. After further investigation the problem seems to be limited in scope to the following day count type: * 360/360 -> shown as 30/360 * ACT/365 -> shown as ACT/ACT (ISDA) Is it just a displayed problem? Is there any function which can actually retrieve the day count setting? On a separate note, I am wondering if the ACT/ACT here is the same as ACT/nACT which is used in US Treasuries. Anyone can confirm that? 2.) I have found that qlFrequency() also cannot display any frequency shorter than 1 month. Again is this just a display problem, or the object is not defaulting the refix frequency to be same as the tenor? If it's the latter case than how can rate like Overnight Index (as in OIS) can be handled? Wilkie Lai __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
|
From: eric e. <eri...@gm...> - 2006-08-29 14:00:20
|
Hello On 8/25/06, Wilkie Lai <inf...@ya...> wrote: > Hi, > I am new to QuantlibXL but based on the posts I have > read and instructions previously given, I have tried > to call QuantLib functions from VBA using > Application.Run() method. However in version 0.3.13 > Excel always crashed when the ql method is called and 1) The crash is caused by a bug in Objecthandler, you need to patch the bug and rebuild ObjectHandler/QuantLibXL from source. 2) The sample VBA code is changed for QuantLibAddin 0.3.13. I've documented both of these items in the FAQ: http://www.quantlibaddin.org/faq.html Sorry for the inconvenience. Regards, Eric |
|
From: Ferdinando A. <na...@am...> - 2006-08-28 08:25:10
|
Hi Theo > Has the to do list for marketmodels project been sorted out so that one can > work whats completed and outstanding on the project. yes, please see ql/MarketModels/TODO.txt, also attached below > One can then look out > the outstanding and then > contribute to it after agreement with you guys. As far as I'm concerned I would keep the agreement part as light as possible: the project is going on and as soon as resources in my dev team are available they work on whatever is high priority or suit them best. My suggestion is take a look at the todo list and just scratch your itch, in the best open source tradition ciao -- Nando ======================= priority in first parenthesis, extimated complexity in the second one Path generation - (1) Sobol with Brownian bridging (multiple methods of variate allocation) (MEDIUM) - (4) antithetic sampling (EASY) - (4) moment matching (EASY) Drift - (1) Computation with rapid algorithm for reduced factor models (MEDIUM) - (4) Glasserman Zhao spot measure approximation (MEDIUM) - (4) capc, cani, and PPR terminal measure approximations (MEDIUM TO HARD) Statistics - (2) convergence tables (EASY) Termination criteria - (3) ability to terminate on time passed and select termination criterion (EASY) Pseudo-roots\calibration - (1) make rankReducedMatrix work - (1) a,b,c,d form (EASY) - (2) calibrator to produce abcd form from market data, with displacements (MEDIUM to HARD) - (2) swaption calibration using Z matrix with displacements (MEDIUM) - (2) different correlation structures (VARIABLE) - (2) alignment with covariance structures in legacy code (?) Curve state - (4) Set on coterminal swaps. (MEDIUM) Products - (1) composite instrument - (3) floorlets with one or many steps. (EASY) - (1) (coterminal) swaps - (1) coterminal European swaptions (EASY) - (1) Some real products! (MEDIUM) Quantlib - (1) Get LMM code in the same use format as other code via instrument classes creating objects from new hierarchy as necessary (MEDIUM) - (3) check why Duff's device is ineffective - (?) relevantRates TEST - (1) payment date different from reset dates ============================ Early Callability - Lower bounds for early exercise - Longstaff-schwartz\Amin (time consuming but not hard) - Anderson method for Bermudan swaptions (time consuming but not hard) - Jackel method for Bermudan swaptions (time consuming but not hard) - Rogers\anderson-Broadie\Joshi methods for upper bounds (time consuming ) - Jamshidian method for upper bounds (MEDIUM ) - Upper bounds for early exercise Evolvers - Coterminal Swap-rate market model (MEDIUM TO HARD) - Coinitial Swap-rate market model (MEDIUM TO HARD) - CMS swap rate market model (MEDIUM TO HARD) - Normal Forward-Rate Market Models (?) Scripting - Ability to specify new pay-offs and price them without code recompilation. (HARD) Variance reduction - Control variates, importance sampling (MEDIUM) - Randomized QMC (HARD) Greeks - More sophisticated Greek methods (HARD) Calibration - Simultaneous calibration to caplets and swaptions (HARD) |
|
From: eric e. <eri...@gm...> - 2006-08-25 15:47:49
|
Hi TRS, On 8/15/06, Story, Todd <tod...@wa...> wrote: > > Hello all: > > Where can I find instructions for installying Python and then on using it to > generate my own excel addins? Just to clarify, QuantLibAddin relies on gensrc, a Python application, to build addins for various platforms including Excel. Adding additional functionality to the QuantLibAddin Excel build (aka QuantLibXL) is relatively straightforward. Extending the framework to implement a new addin altogether is certainly doable but would require development on your part. See this link for a tutorial on building QuantLibAddin for Excel - this includes instructions for installing python and gensrc: http://www.quantlibaddin.org/build_tutorial.html The link below explains how to extend QuantLibAddin's gensrc configuration to support new functions. Some details are out of date but in general the approach is unchanged: http://www.quantlibaddin.org/extending.html Regards, Eric |
|
From: eric e. <eri...@gm...> - 2006-08-25 14:05:18
|
Hello, On 8/15/06, Dirk Eddelbuettel <ed...@de...> wrote: > > QuantLib'ers, > > Did anybody notice that build times seem to have increased quite a bit under > gcc/g++/binutils 4.1? Yes. > I am trying to update RQuantLib and the final link > step [ for the comparatively small RQuantLib ] alone is running five or more > minutes on my home development machine (which us is a few years old, but has > plenty of ram). I get a similar problem when compiling QuantLibAddin - the final link takes several times longer than it used to. > Are there any known shortcuts, other than 'downgrade to g++ 4.0 or earlier' ? I'm not aware of a solution but if you discover one I'd love to hear about it. Regards, Eric |
|
From: eric e. <eri...@gm...> - 2006-08-25 14:01:26
|
Hello, On 8/25/06, Wilkie Lai <inf...@ya...> wrote: > > Hi, > I am new to QuantlibXL but based on the posts I have > read and instructions previously given, I have tried > to call QuantLib functions from VBA using > Application.Run() method. However in version 0.3.13 > Excel always crashed when the ql method is called and > I think when ObjectHandler is accessed. I have > already tried on 2 different Excel versions (both > 2002, different lauguages) on different machines, both > crashed in similar way and debug message is pointing > to QuantLibXL-vc80-mt-s-0_3_13. > Can someone please confirm if this is a known bug > with 0.3.13, or there is a new way to call ql > functions from VBA with 0.3.13? This is not a known bug (at least, not yet known to me :-) ) and there should be no change to the procedure for calling the addin from VBA. I'll try to recreate the problem and I'll let you know. Thanks, Eric |
|
From: <TB...@ao...> - 2006-08-25 08:41:16
|
Hi Nando/Luigi, Has the to do list for marketmodels project been sorted out so that one can work whats completed and outstanding on the project. One can then look out the outstanding and then contribute to it after agreement with you guys. Regards Theo |
|
From: Wilkie L. <inf...@ya...> - 2006-08-25 03:49:11
|
Hi, I am new to QuantlibXL but based on the posts I have read and instructions previously given, I have tried to call QuantLib functions from VBA using Application.Run() method. However in version 0.3.13 Excel always crashed when the ql method is called and I think when ObjectHandler is accessed. I have already tried on 2 different Excel versions (both 2002, different lauguages) on different machines, both crashed in similar way and debug message is pointing to QuantLibXL-vc80-mt-s-0_3_13. Can someone please confirm if this is a known bug with 0.3.13, or there is a new way to call ql functions from VBA with 0.3.13? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
|
From: Ferdinando A. <na...@am...> - 2006-08-24 12:19:29
|
Hi Dmitry, Market Model stuff have not been released in 0.3.13, and should not be needed to build 0.3.13. As for the current cvs: marketmodels.cpp in QuantLibXL is an autogenerated file, so you need to use gensrc. Check the QuantLibAddin.sln solution. ciao -- Nando On 8/24/06, Dmitry Goryunov <dm...@ma...> wrote: > Hi, > I am trying to build QuantlibXl. Unfortunately neither in the release > (0.3.13) nor in CVS I can find fle marketmodels.cpp . How do I get this > one? > Thanks, Dmitry > > -- > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
|
From: Luigi B. <lui...@gm...> - 2006-08-24 09:25:04
|
On 08/14/2006 07:39:19 PM, Ryan Smulktis wrote: > What is the best/recommended way to learn the QuantLib monte-carlo > framework? [Administrator note: please see the FAQ item at <http://quantlib.org/reference/faq.html#faq_lists_new_topic> about replying to an existing message to start a new topic. Thanks.] Ryan, apologies for the delay---I was on vacation. The documentation =20 has been a sore spot in the project for a long time. At this moment, =20 your best bet is tracing the code. The long-term solution is to start =20 lobbying me to write some documentation... Later, Luigi ---------------------------------------- It is better to know some of the questions than all of the answers. -- James Thurber |
|
From: Klaus S. <kla...@fr...> - 2006-08-21 21:29:25
|
Hi=20 I've checked the second solution by defining typedef boost::numeric::ublas::vector<double> Array; typedef boost::numeric::ublas::matrix<double> Matrix; and porting the rest of the QuantLib. (This breaks quite a lot interfaces=20 within the QL;-). The resulting performance is disappointing. Using normal= =20 compiler switches the ublas version is 20% slower than the original=20 implementation. When using more aggressive compiler optimization switches t= he=20 ublas can only match the original performance but is not faster. =46YI: I got 10% more performance for the test-suite without changing inter= faces=20 by using the slightly improved version of array.hpp and matrix.hpp enclosed= =20 in the attachment (I haven't checked this version too much;-) cheers=20 Klaus =20 On Thursday 22 June 2006 5:07 pm, Fran=E7ois du Vignaud wrote: > Hi all, > I'm hesitating between two solutions for the uBlas migration : Embedding > all uBlas code in the existing Array and Matrix classes. The main advanta= ge > is that no other file would be altered. However it seems really tedious to > expose all the nice features of uBlas using this architecture. Replacing > completely all Array and Matrix in the QuantLib code. > I tend to prefer the second solution because it is much neater in my > opinion even if it is not the simplest one in the short run. I'm aware th= at > uBlas is not the most efficient linear algebra library available, however > profiling shows that it is sufficient for the LFM case (sheer linera > algebra operations accounts for a small part of the computation time). Mo= re > complex operations can be performed using ATLAS through uBlas bindings. A= ny > suggestion/advice are more than welcome. > Thanks for your attention, > best regards, > Fran=E7ois |
|
From: Kurt L. <kur...@gm...> - 2006-08-18 02:10:44
|
Hi there, I am working as a Quantitative Researcher in a European asset management company in Korea. I have two questions to ask for your help. 1) C# Wrapper I am currently integrating QuantLib into my personal quant tool that is written in C# by using interoperability of .NET framework. Since the SWIG version of QuantLib for C# doesn't seem enough to use, I decided to use the interoperability of .NET. I wonder whether I am thinking right or not. Quite a big number of classes and functions are sometimes not implemented in SWIG wrapper for C#. Even worse, some classes and functions have different names in the wrapper, too. Therefore it took pretty long time to find it that it is very very difficult to use the SWIG wrapper to integrate the QuantLib into my application. Now I am integrating QuantLib by using the following architecture: [My Quant Tool written in C#] <-> [Bridge code for interoperability written in C++/CLI] <-> [pure QuantLib in native C++] Please let me know if I know something wrong or if there is any better way to integrate QuantLib or to utilize the SWIG wrapper. 2) Mean-Variance Optimization I am also currently working on Mean-Variance Optimization by using Markowitz model. I tried to use the Optimization Classes in QuantLib in order to optimize the Markowitz model and tried the Conjugate Gradient, Simplex and etc. in the QuantLib. But after giving the Constraint of it that the sum of the weights should be 1.0 and the average return of the portfolio should be larger than given expected return, "update" method in LineSearch class fails its search after 200 times of tries. Hence I replaced the break out condition of the number of maximum iterations which is given as 200 in the while loop of LineSearch class with the condition to break out the while loop when the diff factor becomes smaller than a very small value, but it seems that the solution doesn't converge into a global minima. It's true that I have a very shallow knowledge of the optimization methodologies such as LP, QP, NLP and so on. Can anyone help me to let me know if I can still use the optimization in QuantLib for MVO problem or not and if so, how to do that? 3) Optimization Methogologies in Excel The solver in Excel seems to be really powerful and I found the name of the representative logic of the solver is called as GRG2(Generalized Reduced Gradient 2) I tried to look for some papers describing the algorithm of the GRG2 in internet, but in vain. GRG2 seems to be derived from one sort of gradient descent methodologies. Isn't it? But simple gradient descent seems not good enough for solving MVO problem. Any comments about it? Or any good open source library or algorithm for it? Thank you for your help in advance and happy Friday. Regards, Kurt CB Lee |
|
From: Story, T. <tod...@wa...> - 2006-08-15 12:59:16
|
Hello all:=20 Where can I find instructions for installying Python and then on using it to generate my own excel addins? TRS |
|
From: Ryan S. <rs...@gm...> - 2006-08-15 12:22:59
|
Arnaud, I will send along any responses that I think will be helpful. On 8/14/06, Ryan Smulktis <rs...@gm...> wrote: > > What is the best/recommended way to learn the QuantLib monte-carlo > framework? I would like to ultimately use the monte-carlo framework in some > development I'm doing. At this point I'm just trying to figure out how it > works and what I will need to do to use the framework. I can obviously trace > my way through one of the more simple examples (say some flavor of a > VanillaOption? or other) but it would also be nice if there was a > description of the different classes and their responsibilities. I didn't > find the help file especially useful for this. Is there more detailed > documentation some place that could help me? Or, should I just stick to > tracing through the code? Thanks for any suggestions, > > Ryan > |
|
From: Dirk E. <ed...@de...> - 2006-08-15 04:02:18
|
QuantLib'ers,
Did anybody notice that build times seem to have increased quite a bit under
gcc/g++/binutils 4.1? I am trying to update RQuantLib and the final link
step [ for the comparatively small RQuantLib ] alone is running five or more
minutes on my home development machine (which us is a few years old, but has
plenty of ram).
Are there any known shortcuts, other than 'downgrade to g++ 4.0 or earlier' ?
It also appears that the gcc/g++ bug we noticed on hppa following the QL
0.3.13 release is now present in Debian testing. Until that bug is fixed I
can't even build RQL on testing, see below for the link errors. Luckily, the
problem is fixed in unstable and g++ upstream, but I can't currently install
the Debian unstable toolchain on testing (due to conflicts with other
packages which we'll need to sort out first).
Thanks, Dirk
* Installing *source* package 'RQuantLib' ...
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for quantlib-config... yes
Building libRcpp.a in RcppSrc...
g++ -I/usr/share/R/include -I/usr/share/R/include -DUSING_QUANTLIB -I/usr/include -fpic -g -O2 -c Rcpp.cpp -o Rcpp.o
ar crs libRcpp.a Rcpp.o
checking for Boost development files... yes
checking Boost version... yes
configure: creating ./config.status
config.status: creating src/Makevars
Completed configuration and ready to build.
** libs
g++ -I/usr/share/R/include -I/usr/share/R/include -g -O2 -DUSING_QUANTLIB -I/usr/include -I../RcppSrc -fpic -g -O2 -c barrier_binary.cpp -o barrier_binary.o
g++ -I/usr/share/R/include -I/usr/share/R/include -g -O2 -DUSING_QUANTLIB -I/usr/include -I../RcppSrc -fpic -g -O2 -c bermudan.cpp -o bermudan.o
g++ -I/usr/share/R/include -I/usr/share/R/include -g -O2 -DUSING_QUANTLIB -I/usr/include -I../RcppSrc -fpic -g -O2 -c curves.cpp -o curves.o
g++ -I/usr/share/R/include -I/usr/share/R/include -g -O2 -DUSING_QUANTLIB -I/usr/include -I../RcppSrc -fpic -g -O2 -c discount.cpp -o discount.o
g++ -I/usr/share/R/include -I/usr/share/R/include -g -O2 -DUSING_QUANTLIB -I/usr/include -I../RcppSrc -fpic -g -O2 -c implieds.cpp -o implieds.o
g++ -I/usr/share/R/include -I/usr/share/R/include -g -O2 -DUSING_QUANTLIB -I/usr/include -I../RcppSrc -fpic -g -O2 -c utils.cpp -o utils.o
g++ -I/usr/share/R/include -I/usr/share/R/include -g -O2 -DUSING_QUANTLIB -I/usr/include -I../RcppSrc -fpic -g -O2 -c vanilla.cpp -o vanilla.o
g++ -shared -o RQuantLib.so barrier_binary.o bermudan.o curves.o discount.o implieds.o utils.o vanilla.o -L../RcppSrc -lRcpp -L/usr/lib -lQuantLib-0.3.13 -L/usr/lib/R/lib -lR
bermudan.o:(.data+0x0): multiple definition of `_ZN8QuantLib8McPricerIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x0): first defined here
bermudan.o:(.data+0x4): multiple definition of `_ZN8QuantLib12McSimulationIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x4): first defined here
curves.o:(.data+0x0): multiple definition of `_ZN8QuantLib8McPricerIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x0): first defined here
curves.o:(.data+0x4): multiple definition of `_ZN8QuantLib12McSimulationIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x4): first defined here
discount.o:(.data+0x0): multiple definition of `_ZN8QuantLib8McPricerIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x0): first defined here
discount.o:(.data+0x4): multiple definition of `_ZN8QuantLib12McSimulationIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x4): first defined here
implieds.o:(.data+0x0): multiple definition of `_ZN8QuantLib8McPricerIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x0): first defined here
implieds.o:(.data+0x4): multiple definition of `_ZN8QuantLib12McSimulationIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x4): first defined here
utils.o:(.data+0x0): multiple definition of `_ZN8QuantLib8McPricerIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x0): first defined here
utils.o:(.data+0x4): multiple definition of `_ZN8QuantLib12McSimulationIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x4): first defined here
vanilla.o:(.data+0x0): multiple definition of `_ZN8QuantLib8McPricerIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x0): first defined here
vanilla.o:(.data+0x4): multiple definition of `_ZN8QuantLib12McSimulationIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x4): first defined here
../RcppSrc/libRcpp.a(Rcpp.o):(.data+0x0): multiple definition of `_ZN8QuantLib8McPricerIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x0): first defined here
../RcppSrc/libRcpp.a(Rcpp.o):(.data+0x4): multiple definition of `_ZN8QuantLib12McSimulationIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x4): first defined here
collect2: ld returned 1 exit status
make: *** [RQuantLib.so] Error 1
chmod: cannot access `/var/autofs/net/chibud/home/edd/src/progs/R/RQuantLib/RQuantLib.Rcheck/RQuantLib/libs/*': No such file or directory
ERROR: compilation failed for package 'RQuantLib'
** Removing '/var/autofs/net/chibud/home/edd/src/progs/R/RQuantLib/RQuantLib.Rcheck/RQuantLib'
--
Hell, there are no rules here - we're trying to accomplish something.
-- Thomas A. Edison
|
|
From: Ryan S. <rs...@gm...> - 2006-08-14 17:54:22
|
What is the best/recommended way to learn the QuantLib monte-carlo framework? I would like to ultimately use the monte-carlo framework in some development I'm doing. At this point I'm just trying to figure out how it works and what I will need to do to use the framework. I can obviously trace my way through one of the more simple examples (say some flavor of a VanillaOption? or other) but it would also be nice if there was a description of the different classes and their responsibilities. I didn't find the help file especially useful for this. Is there more detailed documentation some place that could help me? Or, should I just stick to tracing through the code? Thanks for any suggestions, Ryan |
|
From: SourceForge.net <no...@so...> - 2006-08-11 21:02:15
|
Bugs item #1538952, was opened at 2006-08-11 14:02 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=1538952&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 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: CRR Binomial Negative Probability Error Initial Comment: When calculating impliedVolatility for an american call using the Cox-Ross-Rubinstein Binomial vanilla engine, I receive the following error: "negative probability" (this also occurs for the "tian" binomial model) See attached source code, contains parameters and the code I'm using (C# via SWIG) However, when I change to other Binomial models (eg: "jr" or "eqp" instead of "crr") this error does not occur, and the implied vol is calculated at approximately 37.47% ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=1538952&group_id=12740 |
|
From: eric e. <eri...@gm...> - 2006-08-10 01:13:52
|
Hi All Here are the prerelease tarballs for QuantLibAddin and related projects: http://quantlib.org/prerelease/oh-qla.html I'd be grateful to anyone who could test the files and let me know how it goes. For the latest build instructions, please see the QuantLibAddin documentation under "build tutorial". The release will ship on Friday morning. I mentioned previously that QuantLibAddin/ObjectHandler and related projects were factored out of QuantLib into into separate SourceForge projects. Unfortunately that move led to logistical problems so in the coming weeks we'll be moving that code back into QuantLib. For now the projects remain separated - and any prerelease fixes should be made to the branches as noted below - but the release will be posted to the QuantLib downloads page. Regards, Eric gensrc - SF project - http://sourceforge.net/projects/gensrc module - gensrc branch - R000104f0-branch log4cxx - SF project - http://sourceforge.net/projects/objecthandler module - log4cxx-0.9.7 branch - none ObjectHandler - SF project - http://sourceforge.net/projects/objecthandler module - ObjectHandler branch - R000104f0-branch QuantLibAddin - SF project - http://sourceforge.net/projects/quantlibaddin module - QuantLibAddin branch - R000313f0-branch QuantLibXL - SF project - http://sourceforge.net/projects/quantlibxl module - QuantLibXL branch - R000313f0-branch |
|
From: Dirk E. <ed...@de...> - 2006-08-06 18:22:12
|
Luigi, On 3 August 2006 at 11:57, Luigi Ballabio wrote: | | On 07/28/2006 11:48:14 PM, Dirk Eddelbuettel wrote: | > it failed on hppa with an actual error. | | Dirk, | apologies for the delay. You might try to patch the source for | hppa only (can you do this?) I'm attaching the (untested) patch to | this message. That's didn't do it, and my poking around didn't help either. So I cried for help in front of Debian's hppa crowd, and Randolph had mercy with me. Better still, he also had the smarts of figuring out that it is a genuine g++ bug by bisecting back to version 4.0 first. He now filed this upstream at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28620 with title [4.1 regression] static const member in template class \ leads to multiple definitions at linktime Thanks to Randolph for all the help. I guess I have to wait til this is fixed in a g++ revision as Debian has g++ 4.1 as a release goal so I can't really backtrack to g++. Or well maybe now for a while but I probably have to go to 4.1 anyway (which appens to build QuantLib on all other platforms). Cheers, Dirk | Later, | Luigi | | | ---------------------------------------- | | Steinbach's Guideline for Systems Programming: | Never test for an error condition you don't know how to handle. | Index: ql/Pricers/mcpricer.hpp | =================================================================== | RCS file: //cvsroot/quantlib/QuantLib/ql/Pricers/mcpricer.hpp,v | retrieving revision 1.37 | diff -C3 -r1.37 mcpricer.hpp | *** ql/Pricers/mcpricer.hpp 18 Mar 2005 09:14:10 -0000 1.37 | --- ql/Pricers/mcpricer.hpp 3 Aug 2006 09:58:11 -0000 | *************** | *** 53,65 **** | protected: | McPricer() {} | mutable boost::shared_ptr<MonteCarloModel<MC,S> > mcModel_; | ! static const Size minSample_; | }; | | | - template<class MC, class S> | - const Size McPricer<MC,S>::minSample_ = 1023; | - | // inline definitions | template<class MC, class S> | inline Real McPricer<MC,S>::value(Real tolerance, | --- 53,62 ---- | protected: | McPricer() {} | mutable boost::shared_ptr<MonteCarloModel<MC,S> > mcModel_; | ! static const Size minSample_ = 1023; | }; | | | // inline definitions | template<class MC, class S> | inline Real McPricer<MC,S>::value(Real tolerance, | | ------------------------------------------------------------------------- | Take Surveys. Earn Cash. Influence the Future of IT | Join SourceForge.net's Techsay panel and you'll get the chance to share your | opinions on IT & business topics through brief surveys -- and earn cash | http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________ | QuantLib-dev mailing list | Qua...@li... | https://lists.sourceforge.net/lists/listinfo/quantlib-dev -- Hell, there are no rules here - we're trying to accomplish something. -- Thomas A. Edison |
|
From: Dirk E. <ed...@de...> - 2006-08-04 02:42:59
|
On 3 August 2006 at 11:57, Luigi Ballabio wrote:
|
| On 07/28/2006 11:48:14 PM, Dirk Eddelbuettel wrote:
| > it failed on hppa with an actual error.
|
| Dirk,
| apologies for the delay. You might try to patch the source for
| hppa only (can you do this?)
Nope. Source is generic. But #ifdef could be my friend ...
| I'm attaching the (untested) patch to
| this message.
Thanks. Hppa tried the 0.3.13-2 today and failed, so I will need to fix this.
Hm, looking at the patch -- Why wouldn't we want the patch on all arches?
Dirk
| Later,
| Luigi
|
|
| ----------------------------------------
|
| Steinbach's Guideline for Systems Programming:
| Never test for an error condition you don't know how to handle.
| Index: ql/Pricers/mcpricer.hpp
| ===================================================================
| RCS file: //cvsroot/quantlib/QuantLib/ql/Pricers/mcpricer.hpp,v
| retrieving revision 1.37
| diff -C3 -r1.37 mcpricer.hpp
| *** ql/Pricers/mcpricer.hpp 18 Mar 2005 09:14:10 -0000 1.37
| --- ql/Pricers/mcpricer.hpp 3 Aug 2006 09:58:11 -0000
| ***************
| *** 53,65 ****
| protected:
| McPricer() {}
| mutable boost::shared_ptr<MonteCarloModel<MC,S> > mcModel_;
| ! static const Size minSample_;
| };
|
|
| - template<class MC, class S>
| - const Size McPricer<MC,S>::minSample_ = 1023;
| -
| // inline definitions
| template<class MC, class S>
| inline Real McPricer<MC,S>::value(Real tolerance,
| --- 53,62 ----
| protected:
| McPricer() {}
| mutable boost::shared_ptr<MonteCarloModel<MC,S> > mcModel_;
| ! static const Size minSample_ = 1023;
| };
|
|
| // inline definitions
| template<class MC, class S>
| inline Real McPricer<MC,S>::value(Real tolerance,
|
| -------------------------------------------------------------------------
| Take Surveys. Earn Cash. Influence the Future of IT
| Join SourceForge.net's Techsay panel and you'll get the chance to share your
| opinions on IT & business topics through brief surveys -- and earn cash
| http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
| QuantLib-dev mailing list
| Qua...@li...
| https://lists.sourceforge.net/lists/listinfo/quantlib-dev
--
Hell, there are no rules here - we're trying to accomplish something.
-- Thomas A. Edison
|
|
From: Allen K. <all...@ya...> - 2006-08-03 12:39:46
|
Toyin: Yes, it will definitely be useful. Thanks.
I will try to put in the Callability schedule and wrap the whole thing up nicely- will let you know how it goes.
Best,
A
Toyin Akin <toy...@ho...> wrote:
Hi,
I've just ripped some code out of my current framework which prices callable
or puttable fixed coupon bonds.
I've assumed that callability can only take place on coupon dates.
As I've just stripped out the code pertaining to my infrastructure, you may
find that it doesn't immediatly compile, but the logic is there.
I've tested some prices against FinancialCAD and they match.
It doesn't use some of the latest framework code as this was written towards
the end of last year.
Hope it's useful,
Toy out...
>From: Luigi Ballabio
>To: Allen Kuo
>CC: qua...@li...
>Subject: Re: [Quantlib-dev] callable bonds
>Date: Thu, 03 Aug 2006 11:48:12 +0200
>
>
>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&
> > const boost::shared_ptr
& 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
>
>
>----------------------------------------
>
>Cogito ergo I'm right and you're wrong.
>-- Blair Houghton
>
>-------------------------------------------------------------------------
>Take Surveys. Earn Cash. Influence the Future of IT
>Join SourceForge.net's Techsay panel and you'll get the chance to share
>your
>opinions on IT & business topics through brief surveys -- and earn cash
>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>_______________________________________________
>QuantLib-dev mailing list
>Qua...@li...
>https://lists.sourceforge.net/lists/listinfo/quantlib-dev
#include
#include <../QuantLib-0.3.8/ql/option.hpp>
namespace QuantLib {
DiscretizedCallableBond::DiscretizedCallableBond(const
CallableBond::arguments& args)
: arguments_(args)
{
}
void DiscretizedCallableBond::reset(Size size)
{
values_ = Array(size, 0.0);
adjustValues();
}
std::vector DiscretizedCallableBond::mandatoryTimes() const
{
std::vector times;
Time t;
Size i;
times.push_back(0.0);
for (i=0; i {
t = arguments_.fixedResetTimes[i];
if (t >= 0.0)
times.push_back(t);
}
for (i=0; i {
t = arguments_.fixedPayTimes[i];
if (t >= 0.0)
times.push_back(t);
}
return times;
}
void DiscretizedCallableBond::preAdjustValuesImpl()
{
Size i, nTotalSize;
double dAccured = arguments_.accuredAmount;
// fixed payments
nTotalSize = arguments_.fixedPayTimes.size();
for (i=0; i {
Time t = arguments_.fixedPayTimes[i];
Time reset = arguments_.fixedResetTimes[i];
if (t >= 0.0 && isOnTime(t))
{
Real fixedCoupon = arguments_.fixedCoupons[i];
// Process the remdeption payment.
if (i == nTotalSize-1)
{
for (Size j=0; j {
double redemption = arguments_.redemption;
values_[j] += redemption;
}
}
// Test if we should replace
bool bTest = false;
double dStrike = 0.0;
Option::Type OptionType;
for (Size j=0; j {
if (arguments_.stoppingTimes[j] == t)
{
dStrike = arguments_.arrStrikes[j];
OptionType = arguments_.arrOptionType[j];
bTest = true;
break;
}
}
// Should we apply callability...
if (bTest == true)
{
for (Size j=0; j {
if (OptionType == Option::Type::Call)
values_[j] = std::min(values_[j], dStrike);
else if (OptionType == Option::Type::Put)
values_[j] = std::max(values_[j], dStrike);
}
}
// Now add on the coupons
values_ += fixedCoupon;
}
}
}
void DiscretizedCallableBond::postAdjustValuesImpl()
{
}
}
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/
#ifndef quantlib_pricers_ctbondoption_pricer_hpp
#define quantlib_pricers_ctbondoption_pricer_hpp
#include
#include <../QuantLib-0.3.8/ql/discretizedasset.hpp>
namespace QuantLib {
class DiscretizedCallableBond : public DiscretizedAsset {
public:
DiscretizedCallableBond(const CallableBond::arguments&);
void reset(Size size);
std::vector mandatoryTimes() const;
protected:
void preAdjustValuesImpl();
void postAdjustValuesImpl();
private:
CallableBond::arguments arguments_;
};
}
#endif
#include
#include
namespace QuantLib {
TreeCallableBondEngine::TreeCallableBondEngine(
const boost::shared_ptr&
model,
Size timeSteps)
: LatticeShortRateModelEngineCallableBond::results>
(model, timeSteps)
{
}
TreeCallableBondEngine::TreeCallableBondEngine(
const boost::shared_ptr&
model,
const TimeGrid& timeGrid)
: LatticeShortRateModelEngineCallableBond::results>
(model, timeGrid)
{
}
void TreeCallableBondEngine::calculate() const {
QL_REQUIRE(model_, "no model specified");
DiscretizedCallableBond callableBond(arguments_);
boost::shared_ptr lattice;
std::vector times = callableBond.mandatoryTimes();
if (lattice_)
{
lattice = lattice_;
}
else
{
TimeGrid timeGrid(times.begin(), times.end(), timeSteps_);
lattice = model_->tree(timeGrid);
}
callableBond.initialize(lattice, times.back());
callableBond.rollback(0.0);
CallableBond::results* results =
dynamic_cast(&results_);
QL_ENSURE(results != 0,
"no results returned from pricing engine");
results->callPrice_ = callableBond.presentValue();
}
}
#ifndef quantlib_pricers_ct_tree_bondoption_hpp
#define quantlib_pricers_ct_tree_bondoption_hpp
#include
#include
<../QuantLib-0.3.8/ql/PricingEngines/latticeshortratemodelengine.hpp>
namespace QuantLib {
class TreeCallableBondEngine
: public LatticeShortRateModelEngine CallableBond::results> {
public:
TreeCallableBondEngine(const boost::shared_ptr&,
Size timeSteps);
TreeCallableBondEngine(const boost::shared_ptr&,
const TimeGrid& timeGrid) ;
void calculate() const;
};
}
#endif
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. |
|
From: Toyin A. <toy...@ho...> - 2006-08-03 12:06:55
|
Hi,
I've just ripped some code out of my current framework which prices callable
or puttable fixed coupon bonds.
I've assumed that callability can only take place on coupon dates.
As I've just stripped out the code pertaining to my infrastructure, you may
find that it doesn't immediatly compile, but the logic is there.
I've tested some prices against FinancialCAD and they match.
It doesn't use some of the latest framework code as this was written towards
the end of last year.
Hope it's useful,
Toy out...
>From: Luigi Ballabio <lui...@gm...>
>To: Allen Kuo <all...@ya...>
>CC: qua...@li...
>Subject: Re: [Quantlib-dev] callable bonds
>Date: Thu, 03 Aug 2006 11:48:12 +0200
>
>
>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
>
>
>----------------------------------------
>
>Cogito ergo I'm right and you're wrong.
>-- Blair Houghton
>
>-------------------------------------------------------------------------
>Take Surveys. Earn Cash. Influence the Future of IT
>Join SourceForge.net's Techsay panel and you'll get the chance to share
>your
>opinions on IT & business topics through brief surveys -- and earn cash
>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>_______________________________________________
>QuantLib-dev mailing list
>Qua...@li...
>https://lists.sourceforge.net/lists/listinfo/quantlib-dev
|