This function calibrates the Hull-White trinomial tree. to the swaption premiums implied by the swaption market (Black's) market volatility matrix.
% This function produces the calibrated parameters for the HW model in the extended Vasicek specification.
% The reference basket is assumed to be the ATM swaption volatility matrix (Black76 model).
% The Volatility surface matrix V is assumed to be 10y X 10y of Expiry X Maturity.
% The model parameter vector a contains the levels of a straight line volatility function
% ranging from 0 to 20y. The mean reversion parameters is held constant across the time domain.
% Curve : interest rate curve object
% V : volatility matrix
% Period : frequency of payments of the underlying swaps
% coin : initial condition for the model parameters