Re: [QuantLib-svn] SF.net SVN: quantlib:[15947] trunk/QuantLib

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Re-QuantLib-svn-SF-net-SVN-quantlib-15947-trunk-QuantLib-tp12578.html

On Fri, 2009-02-20 at 13:37 +0000, [hidden email] wrote:

> Log Message:
> -----------
> removed redundant parameter
>
> Modified: trunk/QuantLib/ql/instruments/assetswap.cpp
> ===================================================================
> --- trunk/QuantLib/ql/instruments/assetswap.cpp 2009-02-20 13:36:45 UTC (rev 15946)
> +++ trunk/QuantLib/ql/instruments/assetswap.cpp 2009-02-20 13:37:51 UTC (rev 15947)
> @@ -35,16 +35,14 @@
>                           Real bondCleanPrice,
>                           const boost::shared_ptr<IborIndex>& index,
>                           Spread spread,
> -                         const Date& settlementDate,
>                           const Schedule& floatSch,
>                           const DayCounter& floatingDayCounter,
>                           bool parSwap)
> -    : Swap(2), spread_(spread), bondCleanPrice_(bondCleanPrice),
> -      settlementDate_(settlementDate) {
> +    : Swap(2), spread_(spread), bondCleanPrice_(bondCleanPrice) {
>  
>          Schedule schedule = floatSch;
>          if (floatSch.empty()) {
> -            schedule = Schedule(bond->settlementDate(settlementDate),
> +            schedule = Schedule(bond->settlementDate(),
>                                  bond->maturityDate(),
>                                  index->tenor(),
>                                  index->fixingCalendar(),


Not entirely redundant---before the change, if the reference date for
the term structure was 2 days from today, the schedule would start 5
days from today. Now it starts 3 days from today, so there was some
information in that parameter that cannot be retrieved elsewhere. The
question is, was the past behavior the correct one, or is the new one?

Luigi


--

Just remember what ol' Jack Burton does when the earth quakes, the
poison arrows fall from the sky, and the pillars of Heaven shake. Yeah,
Jack Burton just looks that big old storm right in the eye and says,
"Give me your best shot. I can take it."
-- Jack Burton, "Big trouble in Little China"



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev