Posted by
andrea-110 on
URL: http://quantlib.414.s1.nabble.com/QuantLib-SWING-is-it-possible-to-use-polymorphism-tp13142p13149.html
On 31/10/09 14:15, Tito Ingargiola wrote:
>
>
> Hi Andrea,
>
> Another approach you may consider is illustrated in the DiscreteHedging.java example.
> Here I wanted to use Quantlib's MC capabilities but wanted the pricer to be implemented in java.
> By pulling the MonteCarloModel impl into java I was able to use a pathpricer implemented in java.
When you say "pulling", you mean you have rewritten it in Java, mirroring the PathPricer->JPathPricer.
What I am trying to do is to have the JPathPricer automatically generated by swig.
This is actually easy since JPathPricer only returns a double.
My problem is the class "Option" that usually returns a shared_ptr to a "Payoff" and here I have
problems.
> Not sure if this is applicable to your problem, but it's an approach I've used in a number of cases to integrate quantlib and java.
> You may also implement your Payoff in C++ and then expose it yourself via swig to your java....
This is certanly possible, but I would like to avoid writing any C++ and only use Java.
>
> Best,
>
> Tito.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev