Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Returning-multiple-values-from-a-Monte-Carlo-pricing-engine-tp9175p9178.html
On Fri, 2010-12-03 at 15:57 +0000, Simon Ibbotson wrote:
> The problem is that MonteCarloModel::addSamples(Size samples) does some
> simple arithmetic operations on the result_type. Also,
> McSimulation::value() and McSimulation::calculate() do some other simple
> operations.
Right, I overlooked those. Hmm. As far as I see,
MonteCarloModel::addSamples would work if one used Array as the result
type (it has algebra, and SequenceStatistics:add takes any container
regardless of what it uses internally.) I don't see the calculations
in McSimulation::value(), apart from the call to maxError that should
work on any container. Does the thing work if you use just use Array as
the result type, without other modifications?
Luigi
--
Better to have an approximate answer to the right question than a
precise answer to the wrong question.
-- John Tukey as quoted by John Chambers
------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:
WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev