|
From: Andrea <mar...@go...> - 2009-11-01 21:02:22
|
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. |