public LiborForwardModel(LiborForwardModelProcess process, LmVolatilityModel volaModel, LmCorrelationModel corrModel) : base(volaModel.parameters().Count + corrModel.parameters().Count) { f_ = new InitializedList <double>(process.size()); accrualPeriod_ = new InitializedList <double>(process.size()); covarProxy_ = new LfmCovarianceProxy(volaModel, corrModel); process_ = process; int k = volaModel.parameters().Count; for (int j = 0; j < k; j++) { arguments_[j] = volaModel.parameters()[j]; } for (int j = 0; j < corrModel.parameters().Count; j++) { arguments_[j + k] = corrModel.parameters()[j]; } for (int i = 0; i < process.size(); ++i) { accrualPeriod_[i] = process.accrualEndTimes()[i] - process.accrualStartTimes()[i]; f_[i] = 1.0 / (1.0 + accrualPeriod_[i] * process_.initialValues()[i]); } }
public VarProxy_Helper(LfmCovarianceProxy proxy, int i, int j) { i_ = i; j_ = j; volaModel_ = proxy.volaModel_; corrModel_ = proxy.corrModel_; }
public LiborForwardModel(LiborForwardModelProcess process, LmVolatilityModel volaModel, LmCorrelationModel corrModel) : base(volaModel.parameters().Count() + corrModel.parameters().Count()) { f_ = new InitializedList<double>(process.size()); accrualPeriod_ = new InitializedList<double>(process.size()); covarProxy_=new LfmCovarianceProxy(volaModel, corrModel); process_=process; /*copy(volaModel.parameters().begin(), volaModel.parameters().end(), arguments_.begin()); copy(corrModel.parameters().begin(), corrModel.parameters().end(), arguments_.begin()+k);*/ int k=volaModel.parameters().Count; for (int j = 0; j < k; j++) arguments_[j] = volaModel.parameters()[j]; for (int j = 0; j < corrModel.parameters().Count; j++) arguments_[j+k] = corrModel.parameters()[j]; for (int i=0; i < process.size(); ++i) { accrualPeriod_[i] = process.accrualEndTimes()[i] - process.accrualStartTimes()[i]; f_[i] = 1.0/(1.0+accrualPeriod_[i]*process_.initialValues()[i]); } }
public LfmCovarianceProxy(LmVolatilityModel volaModel, LmCorrelationModel corrModel) : base(corrModel.size(), corrModel.factors()) { volaModel_ = volaModel; corrModel_ = corrModel; Utils.QL_REQUIRE(volaModel_.size() == corrModel_.size(), () => "different size for the volatility (" + volaModel_.size() + ") and correlation (" + corrModel_.size() + ") models"); }
public LfmCovarianceProxy(LmVolatilityModel volaModel, LmCorrelationModel corrModel) : base(corrModel.size(), corrModel.factors()){ volaModel_=volaModel; corrModel_=corrModel ; if(!(volaModel_.size() == corrModel_.size())) throw new ArgumentException("different size for the volatility (" + volaModel_.size() + ") and correlation (" + corrModel_.size() + ") models"); }
public LfmCovarianceProxy(LmVolatilityModel volaModel, LmCorrelationModel corrModel) : base(corrModel.size(), corrModel.factors()) { volaModel_ = volaModel; corrModel_ = corrModel; if (!(volaModel_.size() == corrModel_.size())) { throw new ArgumentException("different size for the volatility (" + volaModel_.size() + ") and correlation (" + corrModel_.size() + ") models"); } }
public LmConstWrapperCorrelationModel(LmCorrelationModel corrModel) : base(corrModel.size(), 0) { corrModel_=corrModel; }
public VarProxy_Helper(LfmCovarianceProxy proxy, int i, int j) { i_=i; j_=j; volaModel_=proxy.volaModel_; corrModel_=proxy.corrModel_; }
public LmConstWrapperCorrelationModel(LmCorrelationModel corrModel) : base(corrModel.size(), 0) { corrModel_ = corrModel; }