Re: QL for MMA

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

Re: QL for MMA

Niels Elken Sønderby
Hi Mark,

You are right. The sentence that you quote
> "[The objective of] QuantLib for Mathematica is that it should give
> Mathematica users easy access to the functionality in QuantLib rather than
> giving QuantLib users and developers a front-end for QuantLib."
should probably be totally rewritten. It is easy to misunderstand. The main
point
is that I want to make an interface which feel natural for a Mathematica
user.

I find it important that the QuantLib-bindings aren't made as a simple
one-to-one
mapping of C++-functions to Mathematica-functions, but rather go with the
idea
and conventions of Mma. I cannot say it more clear than the following quote:

"You are creating an interface to a suite of functionality, so keep in mind
the primary goal of interface design: usability. The usability of your
package will be enhanced by adhering to two simple principles: make it "look
and feel" like Mathematica, and make it mesh well with the rest of the
system."
http://library.wolfram.com/infocenter/Conferences/184/

But you're right in your point, that the extensibility and adaptability
should be
on both sides. If functions are added to QuantLib, they should be easily
added
to QuantLibMma, and similarly it should be possible to combine and enhance
QLMma functions. The exportation of Mma-functions to QL is not technically
possible though, unless we want the QL-project to take a totally different
direction and become dependent on Mma (a quite costy product, I may add).

You have some good points about the text on the main page and moving
"Design principles" somewhere else. I'll do these changes the next time,
I come around to make changes to the web site.

I have sent this reply to the QuantLib users mailing list. You can sign up
here:
http://lists.sourceforge.net/lists/listinfo/quantlib-users

I look forward to your comments, when you've had a closer look a the
sources.

Cheers... Niels

----- Original Message -----
From: "Mark Van De Vyver" <[hidden email]>
To: "'Niels Elken Sønderby'" <[hidden email]>
Sent: Wednesday, May 14, 2003 2:34 AM
Subject: RE: QL for MMA


Hi Neils,

Thanks for the positive response.
I've downloaded a copy of the package and sources, and browsed through the
nice demo youy prepared.
I found out that I'll be moving to Sydeny University in the next few weeks
so things will be a bit hectic before I go and after I arrive....
Unfortunately it is quite possible that I won't get to give you source files
a good look until I've settled in Sydney.

I'll place a link to your page once I'm in Sydney.  Overall you page looks
nice, clean and to the point, so no real suggestions there.
The Demonstartion page is also nice.

Some suggestions.
- On the main page I'd move the opening paragraph to a history page, and
place a link to this under References.
- in para 2: 'which exports some of the QuantLib functionality to
Mathematica' could be changed to
'which translates some of the QuantLib functionality to Mathematica style
functions, and implements specfic models' (?)
- I'd add a 'Operating Systems Supported' subsection & bookmark to the main
page listing the Windows OS and asking for contributions for other os's
- I'd add an installation page and link to this from the main page, have
subsections/bookmarks for diffferent os's - in anticipation :)
- I'd add an 'Objectives and Pricinples' subsection to the main page, and
move the 'Design principles and the naming of things' from the demo page to
this section.
- I'd move make the following [edited] sentence from the demo page to the
first paragraph on the main page:

"[The objective of] QuantLib for Mathematica is that it should give
Mathematica users easy access to the functionality in QuantLib rather than
giving QuantLib users and developers a front-end for QuantLib."

I think the following, and any follow up discussion, might be productively
moved to the QL discussion list?  I'll leave that decision up to you :)

The last point tells visitors upfront what they are looking at.  To be
honest this is not what I was expecting and others may be the same?  I was
expecting that this project would give QL devlopers access to the mma front
end and other mma functions.
As I mentioned before I'm not that experienced so am not fully aware of
whether it is possible to 'expose' QL to MMA in this way.

I think this has several advantages:

- Once the basic 'exposure' work has been done it should be possible to
write specific mma functions such as you have in the demo, this would allow
people to develop/edit these functions to suit their personal/organisation
conventions.

- This separates the exposure of the QL classes to MMA from the MMA to QL
interface.  Now, if QL or MMA changes in some way, the effect on QL4MMA can
be identified as MMA to QL interface changes and QL to MMA exposure changes.

- This seperation allows QL 'experts' to make some contriibutions without
having to delve into MMA and some MMA experts to make contributions without
having to be QL experts.  Obviously such a pure seperation is probably not
possible....

- Giving QL developers a MMA frontend may allow allow non-MMA experts to
validate the QL results against MMA results.  I think this validation is
important in terms of QL quality asurance.  In fact I'd expect that QL QA
qould involve validation against one than one package?

- Keeping the QL structure and syntax (as much as possible) reduces the
barriers to entry of the "QL but not-MMA" experts.  As I mentioned the nuts
and bolts QL syntax/structure can still be hidden via another MMA layer and,
as you point out, this second layer could possibly be readily altered to
interface to other libraries.

My 2c worth.

Anyway let me know what you think - if you post some of this and reply on
the QL list just give me a heads up, and I'll look there.

All the best
Regards
Mark

> -----Original Message-----
> From: Niels Elken Sønderby [mailto:[hidden email]]
> Sent: Wednesday, May 14, 2003 7:11 AM
> To: [hidden email]
> Subject: Re: QL for MMA
>
>
> Hi Mark,
>
> sorry that it took a while for me to get back to you, but I
> figured, that I would tidy up my code and make it ready for a
> first release, before coming back to you.
>
> So now I've made my source code available at my web site:
> http://www.nielses.dk/quantlib/mma
>
> I would be great, if you are interested in helping adding
> features to my very modest binding between QuantLib and
> Mathematica. I guess the next thing to do is to add american
> options and make a setup to make it possible to specify
> calculation method. Like:
>
> Value[Option[110, 0.25, CallOption, AmericanExercise],
>           BlackScholes[100, 0.10, 0.01, 0.15],
>           Method -> FiniteDifference]
>
> Method -> Analytic
> Method -> MonteCarlo
>
> Don't worry that you're not that experienced. I'm not
> neither. I'm a student who fell in love with Mathematica, and
> now that I'm starting to work in a bank, where they use C++,
> I see great oppurtunities in combining the two.
>
> Anyway, try downloading the files, try the demonstration
> notebook and see if you can compile the files (I know that
> the instructions are not really that good).
>
> Then tell me what part of QuantLib, you could be interested
> in making bindings for, and let's coordinate how it should be
> done. I'm really exciting about my first, very humble Open
> Source project attracting developers!
>
> Also, I would appreciate a lot, if you made a link from your
> homepage to http://www.nielses.dk/quantlib/mma The more links
> out there, the higher the chance, that someone starts using
> it, and then perhaps with time attracts new developers.
>
> Also any comments on my home page design and package content
> would be very welcome.
>
> BTW... Just out of curiosity. How did you find the
> QuantLibMma project? QuantLib-users mailing list? Google?
>
> Cheers... Niels
>
> ----- Original Message -----
> From: "Mark Van De Vyver" <[hidden email]>
> To: <[hidden email]>
> Sent: Monday, May 12, 2003 4:09 AM
> Subject: QL for MMA
>
>
> > Hi Niels,
> >
> > I was interested to see your QL post re a mma interface for the
> > QuantLib library. I am interested in helping out - if I
> can.... I add
> > the last qualification since I should forwarn you that I am not a
> > professional programmer, rather I'm (at best) a C and mma
> hacker :)
> > Nontheless, this seems to be a good project to improve my
> skills and
> > to make some contribution via somone who can filter any nonsense I
> > generate. If you think you can tolerate a novice on board then I'm
> > glad to help
> where
> > I can.
> > Like you I am not able to devote myself full time to this
> project but
> > it lines up with my current work so I would expect to make some
> > progress from time to time.
> >
> > Let me know what you think, and if positive could you update me on
> > what stage you are at, and send the viual Studio project you
> > mentioned?
> >
> > Thanks in advance.
> >
> > Mark Van De Vyver
> >
> > mailto:[hidden email]
> > http://www.bigfoot.com/~mvdv
> >
> >
> >
>




Reply | Threaded
Open this post in threaded view
|

Re: Re: QL for MMA

Luigi Ballabio-2
At 09:03 PM 5/14/03 +0200, Niels Elken Sønderby wrote:
>I find it important that the QuantLib-bindings aren't made as a simple
>one-to-one mapping of C++-functions to Mathematica-functions, but rather
>go with the idea and conventions of Mma.

I'm not a Mathematica user, but I second that. I'm doing the same with the
Python/Ruby/Scheme bindings I'm exporting through SWIG---for instance,
foo.size() is exported so that in Python one can write len(foo), and
Calendar::isBusinessDay is exported to Ruby as "isBusinessDay?" with the
question mark, and to Scheme as "is-business-day?" as hyphens are used to
separate words.

And by the way, I just had a look at your notebook with the MathReader you
link to. It looks awesome.

Bye,
         Luigi



Reply | Threaded
Open this post in threaded view
|

Re: Re: QL for MMA

Niels Elken Sønderby
> And by the way, I just had a look at your notebook with the MathReader you
> link to. It looks awesome.

Thanks! Mathematica _is_ awesome. And QuantLib _will_be_ awesome. You
have a very solid foundation in there!

Niels