Re: addFixings example needed

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/addFixings-example-needed-tp6083p6084.html


You can use the begin() and end() methods to extract iterators from C++
containers such as std::vector.

vector<Date> dates;
vector<Real> fixings;

... (fill the vectors)

index.addFixings(dates.begin(), dates.end(), fixings.begin());


Regards,
        Luigi


On Thu, 2011-10-20 at 15:50 +0200, Christian Bøhlke wrote:

> Hi
>  
> I am trying to implement the
> swapexample included in
> the quantlib library on some "real"
> data.
>  
> I can figure out how to manually
> add a fixing day to an index via
> addFixing. However, due to
> my limited knowledge of templated
> classes, I can not deduce how to
> approach the addFixings method.
>  
> That is using template<class
> DateIterator, class ValueIterator>
> on the method
>  
> void
> addFixings (DateIterator dBegin,
> DateIterator dEnd, ValueIterator
> vBegin)
>  
> If someone could provide an example on how to approach the addFixings
> method I would be very happy.
>  
> Thanks in advance,
>  
> Christian Bohlke
> ------------------------------------------------------------------------------
> The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning@Ciosco Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-dev2dev
> _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users

--

It is better to know some of the questions than all of the answers.
-- James Thurber



------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Ciosco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users