On Fri, 2007-10-05 at 10:02 -0400, Zhonghua Guo wrote:
> Hi: When I do the following, the output is: "no-frequency", whereas I
> would have expected "Once". Is this correct ?
>
> Schedule sch(Date(1,January,2000), Date(1,January,2002),
> Period(Once), NullCalendar(),
> Unadjusted, Unadjusted,
> true, false);
>
> cout << sch.tenor().frequency() << endl;
Kind of. The frequency returned from the Period::frequency() method is
not stored in the period; it's just deduced from the length of the
period. The problem is, both Period(Once) and Period(NoFrequency) build
a null period---which, when asked for the frequency, has no memory of
the initial parameter and just picks one.
So in a way it's wrong, since it doesn't return the original frequency.
However, this has no effect on the calculations performed inside the
schedule---they're done correctly.
Luigi
--
What is written without effort is, in general, read without pleasure.
-- Samuel Johnson
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>
http://get.splunk.com/_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users