Callability Type problem, QuantLib SWIG R

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Callability Type problem, QuantLib SWIG R

jjjkkk
This post was updated on .
Hi,

I have created a QuantLib-SWIG R (1.7) on linux. It can be used to price options and fixed rate bonds. However, when I am trying to price a callable bond, I have the following issue:

> myPrice <- CallabilityPrice(100.0, "Clean")  # no problem
> Callability(myPrice, "Call", callableDate)  # having issue:

Error in get(paste(".__E__", type, sep = "")) :
  object '.__E___Callability__Type' not found

What's is the syntax for Callability::Type::Call in R?

Thank for your help.

jk.
Reply | Threaded
Open this post in threaded view
|

Re: Callability Type problem, QuantLib SWIG R

Luigi Ballabio
I'm not familiar with the R bindings, but from the code generated by SWIG is seems that the constructor expects the integer corresponding to the enumeration value. (This also holds for CallabilityPrice::Type, so I have no idea why "Clean" works in that case.)

Luigi


On Wed, Mar 23, 2016 at 6:08 PM jjjkkk <[hidden email]> wrote:
Hi, I have created a QuantLib-SWIG R (1.7) on linux. It can be used to price options and fixed rate bonds. However, when I am trying to price a callable bond, I have the following issue: > myPrice <- CallabilityPrice(100.0, "Clean") # no problem > Callability(myPrice, "Call", callableDate) # having issue: Error in get(paste(".__E__", type, sep = "")) : object '.__E___Callability__Type' not found What's is the syntax for Callability::Type::Call in R? Thank for your help. jk.

View this message in context: Callability Type problem, QuantLib SWIG R
Sent from the quantlib-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users