Hello,I'm afraid that's not possible at this time. You'll have to extend the SWIG bindings and recompile them; specifically, you'll have to:1) extend the VanillaSwap bindings so that they export the fixedLeg and floatingLeg methods.2) extend the CashFlows bindings so that they export the accruedAmount method.Once you have these, you can extract the legs from the swap and get the accrued amount of either.Both the additions should not be difficult, given that the classes are already exported and you have other methods that you can use as models. However, let me know if you get stuck. Also, I'll be glad to merge your changes to the main repository if you want.LuigiOn Tue, Mar 18, 2014 at 11:07 AM, John Orford <[hidden email]> wrote:
------------------------------------------------------------------------------Hi All,I am trying to figure out how to calculate the accrued amount for vanilla swaps using the Python bindings.Could anyone give me some pointers?
As an aside, are there any clean / dirty conventions around swap pricing? I have seen many cases of both, but perhaps there's some logic to it which'd be useful to know for future reference.Thanks!John
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
--
<https://implementingquantlib.blogspot.com>
<https://twitter.com/lballabio>
| Free forum by Nabble | Edit this page |