Re: Getting the latestDate() from a SwapRateHelper object (using C# SWIG Bindings)
Posted by
Ahmad Mahomed on
Nov 01, 2010; 7:30am
URL: http://quantlib.414.s1.nabble.com/Getting-the-latestDate-from-a-SwapRateHelper-object-using-C-SWIG-Bindings-tp8721p8722.html
Having looked into the C++ source, it would seem that the latestDate() function returns the maturityDate of the vanilla swap that is created by the SwapRateHelper.
What I have done as a result, is to expose the underlying VanillaSwap by modifying the related SWIG file ie. 'ratehelper.i' - see attachemment (I have also added another SwapRateHelper constructor).
On 29 October 2010 07:51, Ahmad Mahomed
<[hidden email]> wrote:
Using the C# SWIG bindings, how does one get the value of the `latestDate()` from a SwapRateHelper defined as
var daysTillLast = curveEndDate.serialNumber() - TodaysDate.serialNumber();
var newFwdSwap =
new SwapRateHelper(
swapRate,
new Period(10,TimeUnit.Years),
SouthAfricanCalender,
Frequency.Quarterly,
DayConvention,
Actual365FixedDayCounter,
new Jibar(new Period(Frequency.Quarterly),DiscountingTermStructure),
0 /*zero spread */,
new Period(daysTillLast,TimeUnit.Days) /* fwdStart */
);
The latestDate() is part of the the functionality of the 'RelativeDateBootstrapHelper<YieldTermStructure>' object.
Note: I created the the above ctor since it was not defined in the SWIG files. I need to test this and if it works I will submit a patch for the files if its valid.
--
Ahmad Mahomed
--
Ahmad Mahomed
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users