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: Luigi B. <lui...@gm...> - 2009-09-21 09:19:19
|
On Fri, 2009-09-18 at 18:31 -0300, Piter Dias wrote: > I made a patch (just XML changes) in order to exposure to below > functions to QuantLibXL. [...] > > * qlInterestRateImpliedRate - Returns the implied rate between > two dates based on the given a compound factor > * qlInterestRateDiscountFactor - Returns the discount factor > between two dates based on the given InterestRate object > * qlInterestRateCompoundFactor - Returns the compound factor > between two dates based on the given InterestRate object > > I hope it is useful enough to go to trunk. I think so, but I'll leave that to the QuantLibXL people. Thanks, Luigi -- Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away. -- Antoine de Saint-Exupery |
|
From: Yan K. <yan...@we...> - 2009-09-21 03:09:34
|
Sorry, wrong mailing list. Yan Kuang <yan...@we...> wrote on 21/09/2009 11:39:35 AM: > > Hi All, > > Can anyone confirm that Date::serialNumber_ is same as Excel date > (1900 based double)? > > Can I: > > Date aDate(BigInteger(xDate)); > > where xDate is a double I get it from Exel Addin api. > > Thanks, > Yan Please consider our environment before printing this email. WARNING - This email and any attachments may be confidential. If received in error, please delete and inform us by return email. Because emails and attachments may be interfered with, may contain computer viruses or other defects and may not be successfully replicated on other systems, you must be cautious. Westpac cannot guarantee that what you receive is what we sent. If you have any doubts about the authenticity of an email by Westpac, please contact us immediately. It is also important to check for viruses and defects before opening or using attachments. Westpac's liability is limited to resupplying any affected attachments. This email and its attachments are not intended to constitute any form of financial advice or recommendation of, or an offer to buy or offer to sell, any security or other financial product. We recommend that you seek your own independent legal or financial advice before proceeding with any investment decision. Westpac Institutional Bank is a division of Westpac Banking Corporation, a company registered in New South Wales in Australia under the Corporations Act 2001 (Cth). Westpac is authorised and regulated in the United Kingdom by the Financial Services Authority and is registered at Cardiff in the United Kingdom as Branch No. BR 106. Westpac operates in the United States of America as a federally chartered branch, regulated by the Office of the Comptroller of the Currency. Westpac Banking Corporation ABN 33 007 457 141. |
|
From: Yan K. <yan...@we...> - 2009-09-21 02:39:58
|
Hi All, Can anyone confirm that Date::serialNumber_ is same as Excel date (1900 based double)? Can I: Date aDate(BigInteger(xDate)); where xDate is a double I get it from Exel Addin api. Thanks, Yan Please consider our environment before printing this email. WARNING - This email and any attachments may be confidential. If received in error, please delete and inform us by return email. Because emails and attachments may be interfered with, may contain computer viruses or other defects and may not be successfully replicated on other systems, you must be cautious. Westpac cannot guarantee that what you receive is what we sent. If you have any doubts about the authenticity of an email by Westpac, please contact us immediately. It is also important to check for viruses and defects before opening or using attachments. Westpac's liability is limited to resupplying any affected attachments. This email and its attachments are not intended to constitute any form of financial advice or recommendation of, or an offer to buy or offer to sell, any security or other financial product. We recommend that you seek your own independent legal or financial advice before proceeding with any investment decision. Westpac Institutional Bank is a division of Westpac Banking Corporation, a company registered in New South Wales in Australia under the Corporations Act 2001 (Cth). Westpac is authorised and regulated in the United Kingdom by the Financial Services Authority and is registered at Cardiff in the United Kingdom as Branch No. BR 106. Westpac operates in the United States of America as a federally chartered branch, regulated by the Office of the Comptroller of the Currency. Westpac Banking Corporation ABN 33 007 457 141. |
|
From: Ferdinando A. <qf...@am...> - 2009-09-19 11:40:23
|
On Fri, Sep 18, 2009 at 4:11 PM, <pla...@us...> wrote: > Revision: 16482 > http://quantlib.svn.sourceforge.net/quantlib/?rev=16482&view=rev > Author: plamen_neykov > Date: 2009-09-18 14:11:08 +0000 (Fri, 18 Sep 2009) > > Log Message: > ----------- > serialisation of Groups is now supported - a flag in ohObjectSave determines whether Groups are serialised too (the old impl. did ignore Groups in the serialisation code). mmm... I cannot remember exactly why, but there was a reason Eric disable Group serialization. It might have been just a quick patch... maybe one of those unreasonable request of mine Anyway what is actually serialized? The elements inside the Group or the Group object itself? good to see you back in action... Any chance you might tackle object aliases? They would be especially helpful for enumerated types, e.g. to declare at runtime aliases for DayCounter / Calendar easing the interfacing with other xll/systems ciao -- Nando -- RSS feed: http://www.google.com/reader/shared/ferdinando.ametrano |
|
From: <s.i...@gm...> - 2009-09-19 07:34:29
|
Hi folks, I've contributed a few things before to QuantLib and find myself with a little spare time on my hands. Is there anything that someone would like to see added to QuantLib? My background is as a quant with 8 years experience - in fixed-income, credit and especially hybrids... Any of that sound interesting? Cheers, Simon Sent from my BlackBerry® wireless device |
|
From: Piter D. <pit...@pi...> - 2009-09-18 21:31:39
|
Index: QuantLibAddin/gensrc/metadata/functions/leg.xml
===================================================================
--- QuantLibAddin/gensrc/metadata/functions/leg.xml (revision 16482)
+++ QuantLibAddin/gensrc/metadata/functions/leg.xml (working copy)
@@ -1074,6 +1074,130 @@
</ReturnValue>
</Member>
+ <Member name='qlInterestRateCompoundFactor' type='QuantLib::InterestRate' superType='libraryClass'>
+ <description>Returns the compound factor between two dates based on the given InterestRate object.</description>
+ <libraryFunction>compoundFactor</libraryFunction>
+ <SupportedPlatforms>
+ <!--SupportedPlatform name='Excel' calcInWizard='false'/-->
+ <SupportedPlatform name='Excel'/>
+ <!--SupportedPlatform name='Cpp'/-->
+ </SupportedPlatforms>
+ <ParameterList>
+ <Parameters>
+ <Parameter name='StartDate' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>start date: start date for compound factor calculation.</description>
+ </Parameter>
+ <Parameter name='EndDate' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>end date: end date for compound factor calculation.</description>
+ </Parameter>
+ <Parameter name='RefPeriodStart' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>ref period start date: only needed for few daycounters (ex. Actual/Actual).</description>
+ </Parameter>
+ <Parameter name='RefPeriodEnd' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>ref period end date: only needed for few daycounters (ex. Actual/Actual).</description>
+ </Parameter>
+ </Parameters>
+ </ParameterList>
+ <ReturnValue>
+ <type>QuantLib::Real</type>
+ <tensorRank>scalar</tensorRank>
+ </ReturnValue>
+ </Member>
+
+ <Member name='qlInterestRateDiscountFactor' type='QuantLib::InterestRate' superType='libraryClass'>
+ <description>Returns the discount factor between two dates based on the given InterestRate object.</description>
+ <libraryFunction>discountFactor</libraryFunction>
+ <SupportedPlatforms>
+ <!--SupportedPlatform name='Excel' calcInWizard='false'/-->
+ <SupportedPlatform name='Excel'/>
+ <!--SupportedPlatform name='Cpp'/-->
+ </SupportedPlatforms>
+ <ParameterList>
+ <Parameters>
+ <Parameter name='StartDate' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>start date: start date for compound factor calculation.</description>
+ </Parameter>
+ <Parameter name='EndDate' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>end date: end date for compound factor calculation.</description>
+ </Parameter>
+ <Parameter name='RefPeriodStart' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>ref period start date: only needed for few daycounters (ex. Actual/Actual).</description>
+ </Parameter>
+ <Parameter name='RefPeriodEnd' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>ref period end date: only needed for few daycounters (ex. Actual/Actual).</description>
+ </Parameter>
+ </Parameters>
+ </ParameterList>
+ <ReturnValue>
+ <type>QuantLib::Real</type>
+ <tensorRank>scalar</tensorRank>
+ </ReturnValue>
+ </Member>
+
+ <Procedure name='qlInterestRateImpliedRate'>
+ <description>Returns the implied rate between two dates based on the given a compound factor.</description>
+ <alias>QuantLib::InterestRate::impliedRate</alias>
+ <SupportedPlatforms>
+ <!--SupportedPlatform name='Excel' calcInWizard='false'/-->
+ <SupportedPlatform name='Excel'/>
+ <!--SupportedPlatform name='Cpp'/-->
+ </SupportedPlatforms>
+ <ParameterList>
+ <Parameters>
+ <Parameter name='Compound' default='1.'>
+ <type>QuantLib::Real</type>
+ <tensorRank>scalar</tensorRank>
+ <description>compound: compound factor used to extract the rate.</description>
+ </Parameter>
+ <Parameter name='StartDate' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>start date: start date of rate calculation.</description>
+ </Parameter>
+ <Parameter name='EndDate' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>end date: end date of rate calculation.</description>
+ </Parameter>
+ <Parameter name='DayCounter' default='"Actual/365 (Fixed)"'>
+ <type>QuantLib::DayCounter</type>
+ <tensorRank>scalar</tensorRank>
+ <description>rate DayCounter ID.</description>
+ </Parameter>
+ <Parameter name='Compounding' default='"Continuous"' const='False'>
+ <type>QuantLib::Compounding</type>
+ <tensorRank>scalar</tensorRank>
+ <description>interest rate coumpounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}).</description>
+ </Parameter>
+ <Parameter name='Frequency' default='"Annual"' const='False'>
+ <type>QuantLib::Frequency</type>
+ <tensorRank>scalar</tensorRank>
+ <description>frequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly).</description>
+ </Parameter>
+ </Parameters>
+ </ParameterList>
+ <ReturnValue>
+ <type>QuantLib::Real</type>
+ <tensorRank>scalar</tensorRank>
+ </ReturnValue>
+ </Procedure>
+
<Constructor name='qlInterestRate'>
<libraryFunction>InterestRate</libraryFunction>
<SupportedPlatforms> |
|
From: Piter D. <pit...@pi...> - 2009-09-18 21:29:00
|
Index: QuantLibAddin/gensrc/metadata/functions/leg.xml
===================================================================
--- QuantLibAddin/gensrc/metadata/functions/leg.xml (revision 16482)
+++ QuantLibAddin/gensrc/metadata/functions/leg.xml (working copy)
@@ -1074,6 +1074,130 @@
</ReturnValue>
</Member>
+ <Member name='qlInterestRateCompoundFactor' type='QuantLib::InterestRate' superType='libraryClass'>
+ <description>Returns the compound factor between two dates based on the given InterestRate object.</description>
+ <libraryFunction>compoundFactor</libraryFunction>
+ <SupportedPlatforms>
+ <!--SupportedPlatform name='Excel' calcInWizard='false'/-->
+ <SupportedPlatform name='Excel'/>
+ <!--SupportedPlatform name='Cpp'/-->
+ </SupportedPlatforms>
+ <ParameterList>
+ <Parameters>
+ <Parameter name='StartDate' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>start date: start date for compound factor calculation.</description>
+ </Parameter>
+ <Parameter name='EndDate' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>end date: end date for compound factor calculation.</description>
+ </Parameter>
+ <Parameter name='RefPeriodStart' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>ref period start date: only needed for few daycounters (ex. Actual/Actual).</description>
+ </Parameter>
+ <Parameter name='RefPeriodEnd' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>ref period end date: only needed for few daycounters (ex. Actual/Actual).</description>
+ </Parameter>
+ </Parameters>
+ </ParameterList>
+ <ReturnValue>
+ <type>QuantLib::Real</type>
+ <tensorRank>scalar</tensorRank>
+ </ReturnValue>
+ </Member>
+
+ <Member name='qlInterestRateDiscountFactor' type='QuantLib::InterestRate' superType='libraryClass'>
+ <description>Returns the discount factor between two dates based on the given InterestRate object.</description>
+ <libraryFunction>discountFactor</libraryFunction>
+ <SupportedPlatforms>
+ <!--SupportedPlatform name='Excel' calcInWizard='false'/-->
+ <SupportedPlatform name='Excel'/>
+ <!--SupportedPlatform name='Cpp'/-->
+ </SupportedPlatforms>
+ <ParameterList>
+ <Parameters>
+ <Parameter name='StartDate' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>start date: start date for compound factor calculation.</description>
+ </Parameter>
+ <Parameter name='EndDate' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>end date: end date for compound factor calculation.</description>
+ </Parameter>
+ <Parameter name='RefPeriodStart' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>ref period start date: only needed for few daycounters (ex. Actual/Actual).</description>
+ </Parameter>
+ <Parameter name='RefPeriodEnd' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>ref period end date: only needed for few daycounters (ex. Actual/Actual).</description>
+ </Parameter>
+ </Parameters>
+ </ParameterList>
+ <ReturnValue>
+ <type>QuantLib::Real</type>
+ <tensorRank>scalar</tensorRank>
+ </ReturnValue>
+ </Member>
+
+ <Procedure name='qlInterestRateImpliedRate'>
+ <description>Returns the implied rate between two dates based on the given a compound factor.</description>
+ <alias>QuantLib::InterestRate::impliedRate</alias>
+ <SupportedPlatforms>
+ <!--SupportedPlatform name='Excel' calcInWizard='false'/-->
+ <SupportedPlatform name='Excel'/>
+ <!--SupportedPlatform name='Cpp'/-->
+ </SupportedPlatforms>
+ <ParameterList>
+ <Parameters>
+ <Parameter name='Compound' default='1.'>
+ <type>QuantLib::Real</type>
+ <tensorRank>scalar</tensorRank>
+ <description>compound: compound factor used to extract the rate.</description>
+ </Parameter>
+ <Parameter name='StartDate' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>start date: start date of rate calculation.</description>
+ </Parameter>
+ <Parameter name='EndDate' default='QuantLib::Date()'>
+ <type>QuantLib::Date</type>
+ <tensorRank>scalar</tensorRank>
+ <description>end date: end date of rate calculation.</description>
+ </Parameter>
+ <Parameter name='DayCounter' default='"Actual/365 (Fixed)"'>
+ <type>QuantLib::DayCounter</type>
+ <tensorRank>scalar</tensorRank>
+ <description>rate DayCounter ID.</description>
+ </Parameter>
+ <Parameter name='Compounding' default='"Continuous"' const='False'>
+ <type>QuantLib::Compounding</type>
+ <tensorRank>scalar</tensorRank>
+ <description>interest rate coumpounding rule (Simple:1+rt, Compounded:(1+r)^t, Continuous:e^{rt}).</description>
+ </Parameter>
+ <Parameter name='Frequency' default='"Annual"' const='False'>
+ <type>QuantLib::Frequency</type>
+ <tensorRank>scalar</tensorRank>
+ <description>frequency (e.g. Annual, Semiannual, Every4Month, Quarterly, Bimonthly, Monthly).</description>
+ </Parameter>
+ </Parameters>
+ </ParameterList>
+ <ReturnValue>
+ <type>QuantLib::Real</type>
+ <tensorRank>scalar</tensorRank>
+ </ReturnValue>
+ </Procedure>
+
<Constructor name='qlInterestRate'>
<libraryFunction>InterestRate</libraryFunction>
<SupportedPlatforms> |
|
From: Dima <dim...@go...> - 2009-09-18 14:05:33
|
I had a closer look at it and would like to propose some changes. The first
thing
that I think is worth discussing is the comparison against
std::numeric_limits<T>::max.
So the following code:
Real myReal=(std::numeric_limits<float>::max)();
bool realIsNull=(myReal==Null<Real>());
would set the boolean to true. But myReal is actually a Real number, the
largest one
which can be represented on the system. I agree that this will work most of
the time,
but I think it would make more sense to compare it against
std::numeric_limits<float>::quiet_isNaN
Comparing any real against this object type will return false, exactly what
we want. The second
thing that I'd like to mention is that for the class
class Foo{
private:
Real var_;
public:
Foo():var_(10.0){}
bool operator==(const Foo& rhs) {
return var_==rhs.var_;
}
};
which has a standard constructor, the following will yield a boolean which
is true
Foo myFoo;
bool myFooIsNull=(myFoo==Null<Foo>());
In this case, we are comparing against a standard constructor, which is not
really a Null object,
since some member variables are initialized. I propose something similar too
#include<limits>
#include <boost/static_assert.hpp>
template <class Type> class NullNew {
public:
NullNew() {}
operator Type() const {
BOOST_STATIC_ASSERT(std::numeric_limits<Type>::has_quiet_NaN);
return std::numeric_limits<Type>::quiet_NaN();
}
bool operator==(const NullNew<Type>&) {
return true;
}
};
The following happens here: first of all, we don't need a template
definition for all types
like int, double, long int.... Second: we are checking against quiet_NaN.
Third: I disable
any casting of anything which doesn't have the quiet_NaN implementation.
Boost static
assert lets the compilation fail in this case. I don't know whether we are
using Null<Foo>
for any other objects than Real, Natural.. In case we do, this will not
work. Until we have
something better, e.g. a isNull implementation for all objects (which could
then be incorporated
easily in the class above), we should prevent the cast operator from
returning a standard
instance.
What do you think?
|
|
From: Luigi B. <lui...@gm...> - 2009-09-18 10:12:20
|
On Fri, 2009-09-18 at 11:46 +0200, Ferdinando Ametrano wrote: > On Wed, Sep 16, 2009 at 4:21 PM, Luigi Ballabio > <lui...@gm...> wrote: > >> switched from vector<InterestRate> to vector<shared_prt<InterestRate> > > > > > Good grief. Why? > > I was plannig to restore vector<InterestRate> along with > vector<shared_prt<InterestRate> >, but I've seen you already reverted > my changes. > Any objection if I add back vector<shared_prt<InterestRate> > ? Yes, InterestRate is not polymorphic. It would make as little sense as vector<shared_ptr<Date> >. I'd rather fix QuantLibAddin so that the generated code expects the correct type (or, as Piter did, modify the qla-object constructor so that it performs the conversion.) Luigi -- It is better to know some of the questions than all of the answers. -- James Thurber |
|
From: Ferdinando A. <qf...@am...> - 2009-09-18 09:46:44
|
On Wed, Sep 16, 2009 at 4:21 PM, Luigi Ballabio <lui...@gm...> wrote: >> switched from vector<InterestRate> to vector<shared_prt<InterestRate> > > > Good grief. Why? I was plannig to restore vector<InterestRate> along with vector<shared_prt<InterestRate> >, but I've seen you already reverted my changes. Any objection if I add back vector<shared_prt<InterestRate> > ? ciao -- Nando |
|
From: Piter D. <pit...@pi...> - 2009-09-18 02:19:16
|
Luigi/Nando/Eric, >> Author: nando >> Date: 2009-09-16 14:14:43 +0000 (Wed, 16 Sep 2009) >> >> Log Message: >> ----------- >> switched from vector<InterestRate> to vector<shared_prt<InterestRate> > > > Good grief. Why? I believe Nando made this change because QuantLibAddin auto-generated code expects vector<shared_prt<InterestRate> > instead of vector<InterestRate>. It was used to implement FixedRateLeg2 function. Based on latest trunk code, I implemented the FixedRateBond2 function for QuantLibXL that is able to handle a vector of InterestRate objects and included also a spreadsheet that matches the QuantLib testsuite (seems to be a good idea having the same test in both tools). You can see in the patch that I kept the vector<InterestRate> once it made mode sense for me making the conversion inside QuantLibAddin. The idea behind it is making the QuantLib code more stable (change fewer times) than QuantLibXL (pretty like a third party library). I hope you find the patch and spreadsheet useful. Regards, ------------------------- Piter Dias pit...@pi... |
|
From: Luigi B. <lui...@gm...> - 2009-09-16 14:22:21
|
On Wed, 2009-09-16 at 14:14 +0000, na...@us... wrote: > Revision: 16477 > http://quantlib.svn.sourceforge.net/quantlib/?rev=16477&view=rev > Author: nando > Date: 2009-09-16 14:14:43 +0000 (Wed, 16 Sep 2009) > > Log Message: > ----------- > switched from vector<InterestRate> to vector<shared_prt<InterestRate> > Good grief. Why? Luigi -- Zawinski's Law: Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can. |
|
From: Ferdinando A. <qf...@am...> - 2009-09-16 07:16:26
|
On Wed, Sep 16, 2009 at 7:36 AM, Eric Ehlers <eri...@na...> wrote: > [...] using coercion as a kind of hack to simulate function overloading - one excel > function, one function name, two signatures i.e. two different datatypes allowed for > a given parameter. one of the greatest feature available, even if I'm quite lost on how to add/extend coercion. It would be great if you could provide even a quick how-to ciao -- Nando -- RSS feed: http://www.google.com/reader/shared/ferdinando.ametrano |
|
From: Eric E. <eri...@na...> - 2009-09-16 05:37:19
|
Quoting Ferdinando Ametrano <qf...@am...>: > On Tue, Sep 15, 2009 at 1:42 PM, Piter Dias <pit...@pi...> wrote: >> May you help me? > > Basically you won't be able to coerce between Rate and InterestRate, I wasn't suggesting he do that. I was thinking of using coercion as a kind of hack to simulate function overloading - one excel function, one function name, two signatures i.e. two different datatypes allowed for a given parameter. Regards, Eric |
|
From: Piter D. <pit...@pi...> - 2009-09-16 03:25:53
|
Nando/Eric, > Could you provide an example: ISIN and expected cash flow schedule? Find attached a spreadsheet that replicates schedule and pricing given the ISIN, yield and calculation date. The QuantLib patch file is included as well. > btw I'm going to commit a fix removing the unused dayCounter parameter > in the FixedRateCoupon InterestRate-based constructor, which should > make my point above more evident. We were working in the same direction but I included a FixedRateBond constructor that accepts a vector of QuantLib::InterestRate as well. The Brazilian bonds test was changed to use it because it is much more clear than the old one (using QuantLib::Bond class). I included a patch for QuantLibXL just in case you are interest in my experiments. I created qlnewFixedRateBond (includes Compounding and Frequency qlFixedRateBond) and qlnew2FixedRateBond (changes the coupon paramenter of qlFixedRateBond ot accept a vector of QuantLib::InterestRate). The qlnew2FixedRateBond is pretty cool but should have the DayCounter parameter removed once it is implicit in the coupons (it is proof of concept). I have no idea how it could be included in QuantLibXL. There is a spreadsheet included showing how the function perform well generating the cash flows. Regards, ------------------------- Piter Dias pit...@pi... |
|
From: Piter D. <pit...@pi...> - 2009-09-15 17:20:03
|
Nando, > and Frequency. While Simple and Annual might be sensible default > values for Compounding and Frequency, a default value for DayCount is > implausible. You are right. My problem was not just understand but make it get DayCount from somewhere but it seems this technic should be used when we are sure about defaults (for most of markets Compounding = Simple and Frequency = Annual solves the problem), right? Find below some samples I got from Central Bank page. Sadly the technical documents are all in Portuguese but you would be able to check them using Bloomberg (BNTNF code). Selic Maturity Referece Date Issue Date Term Coupon Rate ISIN 950199 01/01/2010 02/02/2005 02/02/2005 1794 10.000000 BRSTNCNTF055 950199 01/07/2010 09/02/2007 09/02/2007 1238 10.000000 BRSTNCNTF0H7 950199 01/01/2011 06/07/2007 06/07/2007 1275 10.000000 BRSTNCNTF0I5 950199 01/01/2012 01/06/2005 01/06/2005 2405 10.000000 BRSTNCNTF063 950199 01/01/2013 06/07/2007 06/07/2007 2006 10.000000 BRSTNCNTF0J3 950199 01/01/2014 05/05/2006 05/05/2006 2798 10.000000 BRSTNCNTF071 950199 01/01/2017 05/01/2007 05/01/2007 3649 10.000000 BRSTNCNTF0G9 Let's do this way. As soon as I come home I send some samples using regular Excel functions and how I did it using QuantLibXL (I created a qlnewFixedRateBond function). The QuantLib samples (using Bonds, not FixedRateBond) are already available in the current testsuite version. I am pretty that sharing the current code and spreadsheet I have would help everyone. Regards, ------------------------- Piter Dias pit...@pi... |
|
From: Ferdinando A. <qf...@am...> - 2009-09-15 13:14:10
|
On Tue, Sep 15, 2009 at 1:42 PM, Piter Dias <pit...@pi...> wrote: > May you help me? Basically you won't be able to coerce between Rate and InterestRate, because InterestRate also takes into account DayCount, Compounding, and Frequency. While Simple and Annual might be sensible default values for Compounding and Frequency, a default value for DayCount is implausible. btw I'm going to commit a fix removing the unused dayCounter parameter in the FixedRateCoupon InterestRate-based constructor, which should make my point above more evident. Anyway you're not lost. I've just read the other thread where you write about the problem you're having with Brazilian bonds. Could you provide an example: ISIN and expected cash flow schedule? I'm pretty sure you can have the correct bond in Excel using the FixedLeg constructor and then the generic Bond constructor. ciao -- Nando |
|
From: Piter D. <pit...@pi...> - 2009-09-15 11:42:57
|
> what would you coerce it to? I would like to enhance the qlFixedRateBond Excel function in order to model some Brazilian bonds but I was just able in two ways that is not backward compatible: 1) Creating two new fields (Compounding and Frequency) but it would break current spreadsheets because the automatic code generation makes the fields Permanent and Trigger always as the last ones. So my new fields would be created between the IssueDate and Permanent fields, 2) Change the coupons vector from QuantLib:Rates to QuantLib::InterestRate. It breaks backward compatibility because, currently, it just accepts a handle created by qlInterestRate. When I send a Rate it crashes. A third way is create a new Excel function, the way I am doing the test, but the second way seems to be much better. Eric told that Coercion would help me on this (so I can use to convert QuantLib:Rates to QuantLib::InterestRate) but I am not sure if I got all the steps to make it. > it escapes me how you could make it backward compatible; I might > suggest to just add another signature if needed. I believe it won't work for Excel because it only accepts two functions with different names, doesn't matter if the signature is different. May you help me? Regards, ------------------------- Piter Dias pit...@pi... |
|
From: Ferdinando A. <qf...@am...> - 2009-09-15 07:53:02
|
On Tue, Sep 15, 2009 at 12:36 AM, Piter Dias <pit...@pi...> wrote: > I implemented InterestRate as coupon parameter (in an new > qlnew2FixedRateBond class, just for while) and want to make use of Coercion > in order to make it backward compatible (so I can use the qlFixedRateBond). what would you coerce it to? it escapes me how you could make it backward compatible; I might suggest to just add another signature if needed. ciao -- Nando |
|
From: Piter D. <pit...@pi...> - 2009-09-14 22:37:03
|
Eric, I implemented InterestRate as coupon parameter (in an new qlnew2FixedRateBond class, just for while) and want to make use of Coercion in order to make it backward compatible (so I can use the qlFixedRateBond). The idea of Coercion is clear but I didn't fully understand the implementation. Must I (let take Quote as example): Create the proper conversions in QuantLibAddinqloconversions * Edit QuantLibAddingensrccodecodedict.py to include the conversion rules * Edit QuantLibAddingensrcmetadatarulesexcel.xml (and may be cpp.xml) in order to setup the conversions in the code generation * Edit QuantLibAddingensrcmetadatatypessupertypes.xml (and types.xml as well) including new types for this conversion * And... I am pretty sure that I am missing something Do you mind giving some directions so I could do it? Regards, -- ------------------------- Piter Dias pit...@pi... |
|
From: Dima <dim...@go...> - 2009-09-13 11:10:28
|
I'm not sure. I'm not happy with the whole setup, I think it is to tightlycoupled. I'd prefer a design which is similar to the root solvers: you don't need a class for an optimizer whith a "value" function. As in the root solver, it should be a template that has an operator(...), e.g. a functor or a boost function. Anything. Makes it much more convenient to use. The optimizing criteria could go into the constructor, which takes only the criteria which it really uses. The start value could go into a optimize function, which takes a template. If we have a multidimensional setup as in the LM case, the template should return a std::vector<Real> 2009/9/11 Luigi Ballabio <lui...@gm...> > > On Sep 11, 2009, at 8:13 PM, Dima wrote: > > Why exception? It has its use when LM is used. Or do you >> want to make it virtual and throw an exception if its not >> overwritten? >> > > The latter. > > Luigi > > |
|
From: Piter D. <pit...@pi...> - 2009-09-11 23:38:53
|
Eric, I am trying to make a sample Brazilian treasuries spreadsheet and started with NTNF bond. It has a 10% Annual 30/360 coupon rate paid Semi-annual, which means that it pays around 4.880884817% each semester. > the argument "Coupons" is not a scalar, it is a vector of doubles. Yes, you are right by I would like to include Compounding and Frequency as well. This should be easy using InterestRate object or including two more inputs. In order to test it, I created a qlnewFixedRateBond function with two extra inputs (Compounding and Frequency) but this is far from a good solution because of lack of backward compatibility. However, it generated the correct cash flows. > If so, this could be accomplished using coercion: > > http://quantlib.org/quantlibxl/coercion.html This is new for me and should do exactly what I want. I will try to do the same spreadsheet using it. Thanks a lot, ------------------------- Piter Dias pit...@pi... |
|
From: Eric E. <eri...@na...> - 2009-09-11 21:02:09
|
Hi Piter,
I don't understand your question, can you elaborate?
> * Change coupons from scalar to InterestRate object -
> it means that any current spreadsheet will fail because it is a new type
> for the field
You say "Change coupons *from scalar*", I don't understand. In the
latest version of QuantLibXL (0.9.7), for function qlFixedRateBond(),
the argument "Coupons" is not a scalar, it is a vector of doubles.
Do you want a setup where
1) old spreadsheets call function qlFixedRateBond() and pass to
argument Coupon a value of type vector<double>, and
2) new spreadsheets call the same function and pass to the same
argument a value of type InterestRate?
If so, this could be accomplished using coercion:
http://quantlib.org/quantlibxl/coercion.html
Regards,
Eric
|
|
From: Luigi B. <lui...@gm...> - 2009-09-11 18:57:06
|
On Sep 11, 2009, at 8:13 PM, Dima wrote: > Why exception? It has its use when LM is used. Or do you > want to make it virtual and throw an exception if its not > overwritten? The latter. Luigi |
|
From: Dima <dim...@go...> - 2009-09-11 18:13:23
|
Why exception? It has its use when LM is used. Or do youwant to make it virtual and throw an exception if its not overwritten? Had a look at the optimizers. Just a few End-Criterias are really checked. 2009/9/11 Luigi Ballabio <lui...@gm...> > On Sat, 2009-09-05 at 13:07 +0200, Dima wrote: > > 1: CostFunction::values() > > > > As far as I see, the values function is not needed anywhere, except in > > the Levenberg Marquardt optimizer. Can we change it from a pure > > virtual function to a virtual which by default returns a one > > dimensional array with values(x)? > > Possibly, but I'd rather change it to a function which by default throws > an exception. Also because it wouldn't be easy for LM to check that > it's been overridden. > > > 2. EndCriteria: > > > > Most of the functions do not use all of the passed values. [...] > > I think it might be better to make this clean such that the user > > doesn't have a wrong impression, that actually everything is checked. > > Yes, we should document that. Have you looked at the solvers already? > Do you have a list of what's checked in what solver? > > Later, > Luigi > > > -- > > Hanlon's Razor: > Never attribute to malice that which is adequately explained > by stupidity. > > > |