Posted by
Lucio Dinoto on
URL: http://quantlib.414.s1.nabble.com/Building-with-Microsoft-Visual-C-2010-tp8402p8408.html
Guys,
I have found that by creating a simple schedule as following:
QuantLib::Schedule schedule = QuantLib::Schedule (dates, QuantLib::NullCalendar(), QuantLib::Unadjusted);
The lib fails after:
QuantLib::FixedRateLeg(schedule)
As the isRegular was never initialized. I think the solution could be to initialize in the constructor:
Schedule(const std::vector<Date>&,
const Calendar& calendar = NullCalendar(),
BusinessDayConvention convention = Unadjusted);
ERROR:
FixedRateLeg::operator Leg() const {
QL_REQUIRE(!couponRates_.empty(), "no coupon rates given");
QL_REQUIRE(!notionals_.empty(), "no notional given");
Leg leg;
// the following is not always correct
Calendar calendar = schedule_.calendar();
// first period might be short or long
Date start = schedule_.date(0), end = schedule_.date(1);
Date paymentDate = calendar.adjust(end, paymentAdjustment_);
InterestRate rate = couponRates_[0];
Real nominal = notionals_[0];
---->>>> if (schedule_.isRegular(1)) {
Este e-mail puede contener información privilegiada o confidencial y concierne únicamente a la persona a la que está dirigido.
Si este mensaje no está dirigido a usted, por favor notifique al remitente, bórrelo y no lo lea, no actúe en base a él, no lo imprima, no lo divulgue, no lo copie, no lo retenga ni lo distribuya. En el siguiente link encontrará otros términos importantes relacionados con este e-mail:
http://www.luminaamericas.com/email_terms.htmThis E-mail may contain privileged or confidential information and it is intended only for the
use of the named recipient.
If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. In the following link you will find important additional terms related to this E-mail:
http://www.luminaamericas.com/email_terms.htm------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users