|
From: Tawanda G. <tg...@gm...> - 2012-08-28 00:55:08
|
I've solved it.
I needed to say
ff:zeroRate(zDate,daycount,Annual):rate()
I had not realized there was an InterestRate wrapper in interestrate.i.
On Aug 27, 2012, at 10:55 AM, Luigi Ballabio <lui...@gm...> wrote:
> Hi Tawanda,
> I'm not sure what you mean by "I get the same string when I assign".
> Do you mean that if you write "x = ff:zeroRate(zDate,daycount,Annual)"
> (or whatever the syntax for assignment is in Lua) then x holds the
> string instead of an InterestRate instance? If so, it looks like an
> issue of the Lua wrappers to me...
>
> Luigi
>
> On Sun, Aug 26, 2012 at 1:08 AM, Tawanda Gwena <tg...@gm...> wrote:
>> I am working on quantlib-swig and porting it to Lua.
>>
>> I have been working with the interest rate curves. They mostly work except at the output stage. I successfully created the PiecewiseFlatForward object "ff". When I issue the command
>>
>> print(ff:zeroRate(zDate,daycount,Annual)
>>
>> I get the output
>>
>> 0.443772 % Actual/360 Annual compounding
>>
>> Unfortunately I get the same string when I assign, which is generally not easy to work with.
>>
>>
>> I would like to know how the other languages deal with it (Python for instance) and pointers to where I may be able to fix it.
>>
>> Thanks
>> ------------------------------------------------------------------------------
>> 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-dev mailing list
>> Qua...@li...
>> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
|