Checked in quantlib-perl

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

Checked in quantlib-perl

Joseph Wang
I've checked in code into QuantLib-SWIG to integrate perl with quantlib
through SWIG as well as a sample test program that calculates European
option values.  Seems to work.....




Reply | Threaded
Open this post in threaded view
|

Re: Checked in quantlib-perl

Luigi Ballabio
On Oct 1, 2005, at 2:56 AM, Joseph Wang wrote:

> I've checked in code into QuantLib-SWIG to integrate perl with
> quantlib through SWIG as well as a sample test program that calculates
> European option values.  Seems to work.....

Joe,
        do you think it is ready for release? I've been thinking of creating a
branch for the 0.3.11 release, but I can wait a bit if you still have
to work on it.

Luigi



Reply | Threaded
Open this post in threaded view
|

Re: Checked in quantlib-perl

Joseph Wang
Luigi Ballabio wrote:

>
> 1) there's a few SWIG warnings due to its not wrapping operator(). Is  
> there any special way in Perl to call function objects, or should we  
> just rename to methods such as "value"?
>
There doesn't seem to be any convention so we can probably invent one.  
value seems alright.

> 2) With some guesswork, I modified the European option example so
> that  it uses the generated shadow classes rather than the low-level  
> QuantLibc functions---I just committed it. But since I don't know
> Perl,  I couldn't figure out how to avoid having to write QuantLib::  
> everywhere. may you have a look at it?

I know perl, but I'm trying to figure out SWIG :-(

The trouble is that in perl QuantLib and QuantLib::Date are both symbols
that have nothing to do with each other.  There may some clever SWIG way
of solving this, but it's not immediately obvious.

Linking in perl with quantlib was remarkable easy.

Now for something really challenging.....

I see there are experimental SWIG interfaces for clisp and R.  Now
maxima works in clisp......


>
> Later,
>     Luigi
>
> ----------------------------------------
>
> Call on God, but row away from the rocks.
> -- Indian proverb




Reply | Threaded
Open this post in threaded view
|

Re: Checked in quantlib-perl

Dirk Eddelbuettel
On 4 October 2005 at 00:09, Joseph Wang wrote:
| Luigi Ballabio wrote:
|
| >
| > 1) there's a few SWIG warnings due to its not wrapping operator(). Is  
| > there any special way in Perl to call function objects, or should we  
| > just rename to methods such as "value"?
| >
| There doesn't seem to be any convention so we can probably invent one.  
| value seems alright.
|
| > 2) With some guesswork, I modified the European option example so
| > that  it uses the generated shadow classes rather than the low-level  
| > QuantLibc functions---I just committed it. But since I don't know
| > Perl,  I couldn't figure out how to avoid having to write QuantLib::  
| > everywhere. may you have a look at it?
|
| I know perl, but I'm trying to figure out SWIG :-(
|
| The trouble is that in perl QuantLib and QuantLib::Date are both symbols
| that have nothing to do with each other.  There may some clever SWIG way
| of solving this, but it's not immediately obvious.
|
| Linking in perl with quantlib was remarkable easy.
|
| Now for something really challenging.....
|
| I see there are experimental SWIG interfaces for clisp and R.  Now
| maxima works in clisp......

Do you know who is behind the R interface for Swig? I haven't heard anything
about that from the R upstream folks (but am of course not privy to all their
conversations either).

Dirk

--
Statistics: The (futile) attempt to offer certainty about uncertainty.
         -- Roger Koenker, 'Dictionary of Received Ideas of Statistics'


Reply | Threaded
Open this post in threaded view
|

Re: Checked in quantlib-perl

Luigi Ballabio
On 10/05/2005 04:22:15 AM, Dirk Eddelbuettel wrote:
>
> Do you know who is behind the R interface for Swig?

Googling gives me <http://www.omegahat.org/RSWIG/>, but that's all.
For what matters, there's still no R-related code in the official SWIG  
repository.

Luigi


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

There are two ways of constructing a software design. One way is to
make it so simple that there are obviously no deficiencies. And the
other way is to make it so complicated that there are no obvious
deficiencies.
-- C. A. R. Hoare



Reply | Threaded
Open this post in threaded view
|

Re: Checked in quantlib-perl

Dirk Eddelbuettel
On 5 October 2005 at 09:27, Luigi Ballabio wrote:
|
| On 10/05/2005 04:22:15 AM, Dirk Eddelbuettel wrote:
| >
| > Do you know who is behind the R interface for Swig?
|
| Googling gives me <http://www.omegahat.org/RSWIG/>, but that's all.
| For what matters, there's still no R-related code in the official SWIG  
| repository.

Good man, thanks. Joseph had sent me this in private mail too.

Omegahat once was meant to be the extension / successor / ... to R, but is
these days mostly the repository for the various activities of Duncan. He is
insanely creative, but doesn't always drive things to their conclusion. His
code typically is a little harder to install etc pp. His Java and Python
binding are examples of that...  So his code could linger in this for a
while, or it could make a quantum leap and get into SWIG upstream. Hard to
tell.

Something to keep an eye on, as opposed to holding one's breath, I suppose.

Cheers, Dirk

--
Statistics: The (futile) attempt to offer certainty about uncertainty.
         -- Roger Koenker, 'Dictionary of Received Ideas of Statistics'


Reply | Threaded
Open this post in threaded view
|

Re: Checked in quantlib-perl

Ferdinando M. Ametrano-3
In reply to this post by Joseph Wang


On 10/4/05, Joseph Wang <[hidden email]> wrote:
I see there are experimental SWIG interfaces for clisp and R.

this would be VERY interesting for me. Any pointers to R SWIG stuff?

thank you

ciao-- Nando
Reply | Threaded
Open this post in threaded view
|

Re: Checked in quantlib-perl

Dirk Eddelbuettel
On 8 October 2005 at 23:11, Ferdinando Ametrano wrote:
| On 10/4/05, Joseph Wang <[hidden email]> wrote:
| >
| > I see there are experimental SWIG interfaces for clisp and R.
| >
|
| this would be VERY interesting for me. Any pointers to R SWIG stuff?

Scroll forward two or three messages and you see me asking the same question,
Luigi (who else :) answering and me giving two more cents worth of comments
based on that find.  

Short answer:  http://www.omegahat.org/RSWIG/ and you'll to patch Swig.

Dirk

--
Statistics: The (futile) attempt to offer certainty about uncertainty.
         -- Roger Koenker, 'Dictionary of Received Ideas of Statistics'