Re: Accrued Amount for Vanilla Swaps
Posted by
John Orford on
URL: http://quantlib.414.s1.nabble.com/Accrued-Amount-for-Vanilla-Swaps-tp15068p15223.html
Hey Luigi,
I tried to add the fixedLeg() and floatingLeg() vanilla swap methods, without much success (failed to build the Debian package each time).
Instead, I put some effort into exporting another function, which I got further with.
From the Debian source code directory, I inserted the following code.
Everything compiles, but see this error:
AttributeError: 'module' object had no attribute 'VanillaSwap_floatingLegNPV'
Any pointers would be fantastic.
Hope once am up and running i can add more to the package.
Thanks,
John
File SWIG/swap.i
Real fixedLegNPV() {
return boost::dynamic_pointer_cast<VanillaSwap>(*self)
->fixedLegNPV();
}
File: Python/QuantLib.py
def fixedLegNPV(self): return _QuantLib.VanillaSwap_fixedLegNPV(self)
File:
Python/quantlib_wrap.cpp
SWIGINTERN Real VanillaSwapPtr_fixedLegNPV(VanillaSwapPtr *self){
return boost::dynamic_pointer_cast<VanillaSwap>(*self)
->fixedLegNPV();
}
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos. Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users