Re: addFixings example needed

Posted by Simon Ibbotson-2 on
URL: http://quantlib.414.s1.nabble.com/addFixings-example-needed-tp6083p6088.html

Why would you expect a Fixed Leg NPV of over 21mm?
 
4.415% x 16825000 x 23 = 17mm approx. (23 is approx. number of years left which would be much greater than the PV01). Therefore the Fixed Leg NPV must be less than this number.
 
Where are you getting the other number from? Bloomberg? If so, be careful that it is not including a back-end notional...
 


From: Christian Bøhlke [mailto:[hidden email]]
Sent: 20 October 2011 16:41
To: [hidden email]
Cc: [hidden email]
Subject: Re: [Quantlib-users] addFixings example needed

Thanks Luigi, it works!
 
My approach in pricing the swaps is as follows:

My problem is that I get NPVs that are way off.

I get

NPV           | fixedNPV       | floatingNPV
-------------------------------------------------------------
5,426,635.41 | 13,476,292.14  | -8,049,656.74  
  
where I would expect something like
 
NPV           | fixedNPV       | floatingNPV
-------------------------------------------------------------
4,624,679   | 21,463,334     | -16.838.654
 
 
Can someone help me on what I am conceptually doing wrong?
 
Thanks in advance,
 
Christian Bohlke
 
 
 
On Thu, Oct 20, 2011 at 4:06 PM, Luigi Ballabio <[hidden email]> wrote:

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, <A href="tel:2011-10-20" value="+4520111020">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





This communication and any attachments contains information which is confidential and may be subject to legal privilege. It is for intended recipients only. If you are not the intended recipient you must not copy, distribute, publish, rely on or otherwise use it without our consent. Some of our communications may contain confidential information which it could be a criminal offence for you to disclose or use without authority. If you have received this email in error please notify [hidden email] immediately and delete the email from your computer.

The FSA reserves the right to monitor all email communications for compliance with legal, regulatory and professional standards.

This email is not intended to nor should it be taken to create any legal relations or contractual relationships. This email has originated from

The Financial Services Authority (FSA)
25 The North Colonnade,
Canary Wharf,
London
E14 5HS
United Kingdom

Registered as a Limited Company in England and Wales No.1920623.
Registered Office as above

Switchboard: 020 7066 1000
Web Site: http://www.fsa.gov.uk
*****************************************************************


------------------------------------------------------------------------------
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