Posted by
Ballabio Gerardo-4 on
Jun 22, 2012; 3:15pm
URL: http://quantlib.414.s1.nabble.com/How-to-get-the-legs-of-a-swap-in-QuantLibXL-tp8525.html
Hi all,
could you please tell me if there is a way in QuantLibXL to access the
underlying Leg objects of a swap?
For example, let's say I want to know the current accrued days for the
floating leg. If I have built the legs first, and then the swap from the
legs (with qlFixedRateLeg, qlIborLeg, qlSwap), then I can call
qlLegAccruedDays on the floating leg object to get the number that I
want. But what if I have built the swap without creating the legs first,
for example with qlVanillaSwap or qlAssetSwap? Then the legs are inside
the VanillaSwap or AssetSwap object but, unless there's a way which
escapes me, I can't get to them.
There are quite many functions which operate on Legs and lack an
equivalent for Swaps: qlLegAccrualStartDate, qlLegAccrualEndDate,
qlLegDuration, qlLegNextCashFlowDate, qlLegNextCashFlowAmount,
qlLegNextCouponRate... Duplicating (actually, triplicating) all of them
would be a lot of work and not really a neat solution.
I see that QuantLib does have a Swap::leg accessor method, so it's
QuantLibXL which lacks equivalent functionality. I don't know whether it
would be simple to add.
Thank you
Gerardo
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head></head>
<body>
<div style="font-family:Calibri;font-size:10px">
Banca Profilo S.p.A.
Corso Italia, 49 - 20122 Milano - Tel. 02 58408.1, Fax 02 5831 6057
Capitale Sociale Euro 136.794.106,00 i.v.
Iscrizione al Registro Imprese di Milano, C.F. e P.IVA 09108700155 -
[hidden email]
Iscritta all’Albo delle Banche e dei Gruppi bancari
Aderente al Fondo Interbancario di Tutela dei depositi
Aderente al Conciliatore Bancario Finanziario e all’Arbitro Bancario Finanziario
Appartenente al Gruppo bancario Banca Profilo e soggetta all’attività di direzione e coordinamento di Arepo BP S.p.A.
DISCLAIMER:
The information transmitted may contain confidential and/or privileged material.
Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient is prohibited.
If you received this in error, please contact the sender and delete the material from any computer.
</div>
</body>
</html>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users