public void Populate(IStochasticProcess container, EstimationResult estimate)
{
bool found;
this.s0 = new ModelParameter(PopulateHelper.GetValue("S0", estimate.Names, estimate.Values, out found), this.s0.Description);
bool errors = RetrieveCurve(container.Context, false);
if (!errors)
{
PFunction rFunc = estimate.Objects[0] as PFunction;
PFunction rFuncDest = this.r.fVRef() as PFunction;
rFuncDest.Expr = rFunc.Expr;
PFunction qFunc = estimate.Objects[1] as PFunction;
PFunction qFuncDest = this.q.fVRef() as PFunction;
qFuncDest.Expr = qFunc.Expr;
//Calibrator assumes dividend yield is a step constant function, the simulation model must be coherent with that assumption.
qFuncDest.m_Function.iType = DVPLUtils.EInterpolationType.ZERO_ORDER_LEFT;
PFunction2D.PFunction2D localVolSrc = estimate.Objects[2] as PFunction2D.PFunction2D;
PFunction2D.PFunction2D localVolDest = this.localVol.fVRef() as PFunction2D.PFunction2D;
localVolDest.Expr = localVolSrc.Expr;
localVolDest.Interpolation = localVolSrc.Interpolation;
}
}