|
From: Klaus S. <kl...@sp...> - 2007-09-17 21:41:26
|
Hi=20 the idea to specify new pay-offs and price them without code recompilation = by=20 using a script language is floating around for some time.=20 To achieve this goal I used an interpreter for a C / Fortron90 like languag= e=20 two colleagues and I have written some time ago. As an example I've connect= ed=20 this interpreter with the MonteCarlo pricing engine.=20 The interpreter itself is running in a "Sandbox" with a C++ interface.=20 Therefore one has full control over the interpreter during the runtime (e.g= =2E=20 reading/modifiying the variable stack, run self defined functions etc.). If you are interest in this little project please feel free to download it= =20 from=20 www.spanderen.de/PayoffInterpreter.zip or www.spanderen.de/PayoffInterpreter.tar.gz Makefiles for Linux/Unix and VC++ are included. My colleagues have given=20 permission to put the interpreter under the Quantlib licence. =46eedback whether this project is off any use and should be developed furt= her=20 on are welcome. cheers content of the tar ball: =A0langauge/=A0 =A0: the interpreter incl. Bison/Flex files =A0math/ =A0 =A0 =A0 : multi dimensional array and index array =A0util/ =A0 =A0 =A0 : utils =A0docu/ =A0 =A0 =A0 : html documentation of the language =A0testsuite/ =A0: small C++ testsuite using the Sandbox =A0examples/ =A0 : QuantLib MonteCarlo pricer using the PayoffInterpreter =A0pilib/ =A0 =A0 =A0: PayoffInterpreter example programs and tests =A0console/ =A0 =A0: simple console for the PayoffInterpreter =2D-=20 Klaus Spanderen Ludwig Erhard Str. 12 48734 Reken (Germany) Email: kl...@NO... (remove NOSPAM from the address) |
|
Re: [Quantlib-dev] PayoffInterpreter: specify new pay-offs and
price them without code recompilation
From: Ferdinando A. <na...@am...> - 2007-09-18 08:46:02
|
Hi Klaus > If you are interest in this little project please feel free to download it I don't have time enough to take a look at it, but it would surely an interesting addition. I know others have been working on similar projects and I wonder if anybody knowledgeable about payoff scripting could summarize the current consensus on this issue I would be interested in knowing what are the approaches used on the street by commercial or proprietary parsers, any ad-hoc open source library which could help, design decisions, etc ciao -- nando |
|
Re: [Quantlib-dev] PayoffInterpreter: specify new pay-offs and
price them without code recompilation
From: Klaus S. <kl...@sp...> - 2007-09-19 19:38:18
|
Hi Nando, the language itself is quite comprehensive C derivative with some MatLab/ Fortran90 extensions, e.g. vector/matrix as build-in types and the interpreter has a C++ interface. The "problem" is that the project consists of +20K lines of code and I don't want to blow up QL until I know that a PayoffInterpreter is of any use for other users;-). The parser itself is written using GNU Flex/Bison. On Tuesday 18 September 2007 10:45 am, Ferdinando Ametrano wrote: > I would be interested in knowing what are the approaches used on the > street by commercial or proprietary parsers, any ad-hoc open source > library which could help, design decisions, etc At least on the equity side stucturer are using script/interpreter languages together with MonteCarlo scenorio engines.(e.g. Reech). cheers -- Klaus Spanderen Ludwig Erhard Str. 12 48734 Reken (Germany) E-Mail: kl...@NO... (remove NOSPAM from the address) |
|
Re: [Quantlib-dev] PayoffInterpreter: specify new pay-offs and
price them without code recompilation
From: Luigi B. <lui...@gm...> - 2007-09-19 19:50:45
|
On Sep 19, 2007, at 9:39 PM, Klaus Spanderen wrote: > the language itself is quite comprehensive C derivative with some > MatLab/ > Fortran90 extensions, e.g. vector/matrix as build-in types and the > interpreter has a C++ interface. The "problem" is that the project > consists > of +20K lines of code and I don't want to blow up QL until I know that > a > PayoffInterpreter is of any use for other users;-). Well, I wouldn't put in into the core library anyway; it would be great to have it available as an additional module. The point is that I wouldn't commit to that one as "the" payoff interpreter. People using, say, the Python or Ruby bindings might want to define such an interpreter in their native language---it could be done easily enough using SWIG. Luigi |
|
Re: [Quantlib-dev] PayoffInterpreter: specify new pay-offs and
price them without code recompilation
From: newbie73 <lui...@av...> - 2007-09-19 20:37:46
|
Apologies if this seems to be off topic, though this is somewhat related to a pipe dream I had regarding QuantLib. If it is possible to allow some external scripting language to define a new payoff structure, why not go ahead and allow the interpreter to extend QuantLib in general? Perhaps an embedded version of Python could work or some other method of allowing "add-in" style hooks/call backs. :-) ------------------------------------------- Well, I wouldn't put in into the core library anyway; it would be great to have it available as an additional module. The point is that I wouldn't commit to that one as "the" payoff interpreter. People using, say, the Python or Ruby bindings might want to define such an interpreter in their native language---it could be done easily enough using SWIG. Luigi ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ QuantLib-dev mailing list Qua...@li... https://lists.sourceforge.net/lists/listinfo/quantlib-dev -- View this message in context: http://www.nabble.com/PayoffInterpreter%3A-specify-new-pay-offs-and-price-them-without-code-recompilation-tf4470210.html#a12785707 Sent from the quantlib-dev mailing list archive at Nabble.com. |
|
Re: [Quantlib-dev] PayoffInterpreter: specify new pay-offs and
price them without code recompilation
From: HFQuant <mar...@mo...> - 2007-09-20 15:20:18
|
Hi,=20 i tried to you your tool and running the example EquityOption.cpp. It compiles but crashes at run time.=20 Did you have such a feedback before ? thanks Klaus Spanderen-2 wrote: >=20 > Hi=20 >=20 > the idea to specify new pay-offs and price them without code recompilatio= n > by=20 > using a script language is floating around for some time.=20 >=20 > To achieve this goal I used an interpreter for a C / Fortron90 like > language=20 > two colleagues and I have written some time ago. As an example I've > connected=20 > this interpreter with the MonteCarlo pricing engine.=20 >=20 > The interpreter itself is running in a "Sandbox" with a C++ interface.=20 > Therefore one has full control over the interpreter during the runtime > (e.g.=20 > reading/modifiying the variable stack, run self defined functions etc.). >=20 > If you are interest in this little project please feel free to download i= t=20 > from=20 >=20 > www.spanderen.de/PayoffInterpreter.zip > or > www.spanderen.de/PayoffInterpreter.tar.gz >=20 > Makefiles for Linux/Unix and VC++ are included. My colleagues have given= =20 > permission to put the interpreter under the Quantlib licence. >=20 > Feedback whether this project is off any use and should be developed > further=20 > on are welcome. >=20 > cheers >=20 > content of the tar ball: > =C2=A0langauge/=C2=A0 =C2=A0: the interpreter incl. Bison/Flex files > =C2=A0math/ =C2=A0 =C2=A0 =C2=A0 : multi dimensional array and index arra= y > =C2=A0util/ =C2=A0 =C2=A0 =C2=A0 : utils > =C2=A0docu/ =C2=A0 =C2=A0 =C2=A0 : html documentation of the language > =C2=A0testsuite/ =C2=A0: small C++ testsuite using the Sandbox > =C2=A0examples/ =C2=A0 : QuantLib MonteCarlo pricer using the PayoffInter= preter > =C2=A0pilib/ =C2=A0 =C2=A0 =C2=A0: PayoffInterpreter example programs and= tests > =C2=A0console/ =C2=A0 =C2=A0: simple console for the PayoffInterpreter > --=20 > Klaus Spanderen > Ludwig Erhard Str. 12 > 48734 Reken (Germany) > Email: kl...@NO... (remove NOSPAM from the address) >=20 > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev >=20 >=20 --=20 View this message in context: http://www.nabble.com/PayoffInterpreter%3A-sp= ecify-new-pay-offs-and-price-them-without-code-recompilation-tf4470210.html= #a12799336 Sent from the quantlib-dev mailing list archive at Nabble.com. |
|
Re: [Quantlib-dev] PayoffInterpreter: specify new pay-offs and
price them without code recompilation
From: Klaus S. <kl...@sp...> - 2007-09-21 19:26:35
|
On Thursday 20 September 2007 5:21 pm, HFQuant wrote: > Hi, > > i tried to you your tool and running the example EquityOption.cpp. It > compiles but crashes at run time. > Did you have such a feedback before ? (0xC0000005: Access violation reading > location 0x2183120a.) > > thanks > arrg. No hadn't had this feedback before;-(. What operating system are you using? On windows you might want to include the payoff interpreter project into your quantlib project to avoid any parameter clashes. I checked the source code on Linux using g++-4.1 and on Windows with Visual Studio Express. On Linux the memory checker valgrind didn't report a memery leak or any access violation. I'm compiling against a recent QL version from the SVN head. I cheers -- Klaus Spanderen Ludwig Erhard Str. 12 48734 Reken (Germany) E-Mail: kl...@NO... (remove NOSPAM from the address) |
|
Re: [Quantlib-dev] PayoffInterpreter: specify new pay-offs and
price them without code recompilation
From: Klaus S. <kl...@sp...> - 2007-09-21 19:26:35
|
Hi Luigi, > Well, I wouldn't put in into the core library anyway; it would be great > to have it available as an additional module. The point is that I > wouldn't commit to that one as "the" payoff interpreter. The intention is/was to have "a" payoff interpreter at hand to be able to do some prototyping when playing around with new payoffs. > People using, > say, the Python or Ruby bindings might want to define such an > interpreter in their native language---it could be done easily enough > using SWIG. BTW: I know that one can call QL functions from Python etc. via. SWIG. Is it also possible to call a Python-Script (which might define a payoff) from C++? regards -- Klaus Spanderen Ludwig Erhard Str. 12 48734 Reken (Germany) E-Mail: kl...@NO... (remove NOSPAM from the address) |
|
Re: [Quantlib-dev] PayoffInterpreter: specify new pay-offs and
price them without code recompilation
From: Luigi B. <lui...@gm...> - 2007-09-21 19:31:53
|
Hi Klaus, On Sep 21, 2007, at 7:51 PM, Klaus Spanderen wrote: >> Well, I wouldn't put in into the core library anyway; it would be >> great >> to have it available as an additional module. The point is that I >> wouldn't commit to that one as "the" payoff interpreter. > > The intention is/was to have "a" payoff interpreter at hand to be able > to do > some prototyping when playing around with new payoffs. Don't worry, I'm aware of the good intention. > BTW: I know that one can call QL functions from Python etc. via. SWIG. > Is it > also possible to call a Python-Script (which might define a payoff) > from C++? Yes, with some code in the SWIG interface files. I'll try and send an example when I get some time. Luigi |
|
Re: [Quantlib-dev] PayoffInterpreter: specify new pay-offs and
price them without code recompilation
From: HFQuant <mar...@mo...> - 2007-09-24 09:34:19
|
Hi, I am using VS 2005 professional edition and the last Quantlib version 0.8.1. So i changed your include statements in the EquityOption.cpp file, basically including QuantLib.hpp and deleting the others. thks Klaus Spanderen-2 wrote: > > On Thursday 20 September 2007 5:21 pm, HFQuant wrote: >> Hi, >> >> i tried to you your tool and running the example EquityOption.cpp. It >> compiles but crashes at run time. >> Did you have such a feedback before ? (0xC0000005: Access violation >> reading >> location 0x2183120a.) >> >> thanks >> > > arrg. No hadn't had this feedback before;-(. What operating system are you > using? On windows you might want to include the payoff interpreter > project > into your quantlib project to avoid any parameter clashes. > > I checked the source code on Linux using g++-4.1 and on Windows with > Visual > Studio Express. On Linux the memory checker valgrind didn't report a > memery > leak or any access violation. I'm compiling against a recent QL version > from > the SVN head. I > > cheers > > -- > Klaus Spanderen > Ludwig Erhard Str. 12 > 48734 Reken (Germany) > E-Mail: kl...@NO... (remove NOSPAM from the address) > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > -- View this message in context: http://www.nabble.com/PayoffInterpreter%3A-specify-new-pay-offs-and-price-them-without-code-recompilation-tf4470210.html#a12856683 Sent from the quantlib-dev mailing list archive at Nabble.com. |
|
Re: [Quantlib-dev] PayoffInterpreter: specify new pay-offs and
price them without code recompilation
From: Klaus S. <kl...@sp...> - 2007-09-24 19:31:23
|
Hi strange. Do you compile it (the whole project) as part of the quantlib? If you want I'll send you me VS project. On Monday 24 September 2007 11:34 am, HFQuant wrote: > Hi, > > I am using VS 2005 professional edition and the last Quantlib version > 0.8.1. > > So i changed your include statements in the EquityOption.cpp file, > basically including QuantLib.hpp and deleting the others. > > > thks > > Klaus Spanderen-2 wrote: > > On Thursday 20 September 2007 5:21 pm, HFQuant wrote: > >> Hi, > >> > >> i tried to you your tool and running the example EquityOption.cpp. It > >> compiles but crashes at run time. > >> Did you have such a feedback before ? (0xC0000005: Access violation > >> reading > >> location 0x2183120a.) > >> > >> thanks > > > > arrg. No hadn't had this feedback before;-(. What operating system are > > you using? On windows you might want to include the payoff interpreter > > project > > into your quantlib project to avoid any parameter clashes. > > > > I checked the source code on Linux using g++-4.1 and on Windows with > > Visual > > Studio Express. On Linux the memory checker valgrind didn't report a > > memery > > leak or any access violation. I'm compiling against a recent QL version > > from > > the SVN head. I > > > > cheers > > > > -- > > Klaus Spanderen > > Ludwig Erhard Str. 12 > > 48734 Reken (Germany) > > E-Mail: kl...@NO... (remove NOSPAM from the address) > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2005. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > QuantLib-dev mailing list > > Qua...@li... > > https://lists.sourceforge.net/lists/listinfo/quantlib-dev -- Klaus Spanderen Ludwig Erhard Str. 12 48734 Reken (Germany) E-Mail: kl...@NO... (remove NOSPAM from the address) |