Posted by
Kim Kuen Tang on
URL: http://quantlib.414.s1.nabble.com/Hull-White-with-fixed-parameter-tp7179p7180.html
Hi Francesco,
Francesco Perissin schrieb:
> Hi all,
> I need to calibrate the HullWhite model keeping fixed the a parameter.
>
> In order to do that, I think that I have to develop a
> FixedAlphaHullWhite class, derived from HullWhite, with a modification
> in the FittingParamater::Impl class, in order to
Vasicek is the class that you need to modify. The class FittingParamater
is there to fit the termstructure (yield curve). In the current
implementation a_ is initialized with arguments_[0], which is a member
in the class model (ql\models\model.hpp). This is how it tells quantlib
that a_ is a calibration parameter.
Take a look at the constructor:
Vasicek::Vasicek(Rate r0, Real a, Real b, Real sigma, Real lambda)
: OneFactorAffineModel(4), r0_(r0),
a_(arguments_[0]), b_(arguments_[1]), sigma_(arguments_[2]),
lambda_(arguments_[3]) {
a_ = ConstantParameter(a, PositiveConstraint());
b_ = ConstantParameter(b, NoConstraint());
sigma_ = ConstantParameter(sigma, PositiveConstraint());
lambda_ = ConstantParameter(lambda, NoConstraint());
}
What you need to do, is to tell Vasicek that there are only three
parameters to calibrate , instead of four. Then you need to decouple a_
from the calibration process which is straightforward.
HTH
Cheers
Kim
> have only sigma as fitting parameter, and erediting alpha from the
> FixedAlphaHullWhite class.
>
> I am not so keen in C++, so I have some trouble in doing this.
>
> Any suggestions?
>
> Many thanks
> Francesco
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> QuantLib-users mailing list
>
[hidden email]
>
https://lists.sourceforge.net/lists/listinfo/quantlib-users>
------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users