Schedule Class constructors

Posted by Ramon Lozano on
URL: http://quantlib.414.s1.nabble.com/Schedule-Class-constructors-tp545.html

Hi,

     I am initializing a Schedule class using the following contructor:

    Schedule::Schedule(const std::vector<Date>& dates,
                       const Calendar& calendar,
                       BusinessDayConvention convention)
    : fullInterface_(false),
      tenor_(Period()), calendar_(calendar),
      convention_(convention),
      terminationDateConvention_(convention),
      rule_(DateGeneration::Forward), endOfMonth_(false),
      finalIsRegular_(true),
      dates_(dates) {}

However, when I pass it to the constructor of a VanillaSwap, i get the following exception: "full interface not available"

I notice that in the Schedule constructor above, fullInterface is set to false while in the other available Schedule constructor, fullInterface is set to true.
In the Schedule::isRegular(Size i) function, code below, I notice that there is an assert checking if fullInterface is true/false.

 bool Schedule::isRegular(Size i) const {
        QL_REQUIRE(fullInterface_, "full interface not available");
        QL_REQUIRE(i<=isRegular_.size() && i>0,
                   "index (" << i << ") must be in [1, " <<
                   isRegular_.size() <<"]");
        return isRegular_[i-1];
    }

My question is, is there a reason why fullInterface is set to false in one of the Schedule constructors?

thanks
ramon




------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users