|
From: Felix L. <ee...@ya...> - 2014-03-11 16:32:22
|
Hi all, I'm new to QuantLib and I'm interested to use it for some trading platform development in java. To get familiar with it, I decided to rewrite the example DiscreteHedging.java I used different approach to rewrite this example, by using SWIG director feature to achieve the PathPricer call back function, and use SWIG "boost_shared_ptr.i" to wrap the boost::shared_ptr<> object in MonteCarloModel class. After a few days of trial and error, finally I manage to get my code compile and run correctly. And my code could run a bit faster than the current code in QuantLib-SWIG-1.4/Java/examples/DiscreteHedging.java. In my old laptop, it took 44sec to complete in the current code, but 28sec in my code. I'd like to post my code for sharing, and see if any interest to use it in the next release version of QuantLib-SWIG. BTW how could I share my code, is it simply attaching the code by email? Thanks, QuantLib is a great project. Felix |