23#ifndef quantlib_abcdcalibration_hpp
24#define quantlib_abcdcalibration_hpp
27#include <ql/math/optimization/endcriteria.hpp>
28#include <ql/math/optimization/projectedcostfunction.hpp>
29#include <ql/math/array.hpp>
31#include <ql/shared_ptr.hpp>
39 class OptimizationMethod;
40 class ParametersTransformation;
85 const std::vector<Real>& t,
86 const std::vector<Real>& blackVols,
91 bool aIsFixed =
false,
92 bool bIsFixed =
false,
93 bool cIsFixed =
false,
94 bool dIsFixed =
false,
95 bool vegaWeighted =
false,
96 ext::shared_ptr<EndCriteria>
endCriteria = ext::shared_ptr<EndCriteria>(),
97 ext::shared_ptr<OptimizationMethod> method = ext::shared_ptr<OptimizationMethod>());
99 std::vector<Real>
k(
const std::vector<Real>& t,
100 const std::vector<Real>& blackVols)
const;
Real value(const Array &x) const override
method to overload to compute the cost function value in x
AbcdError(AbcdCalibration *abcd)
Array values(const Array &x) const override
method to overload to compute the cost function values in x
ext::shared_ptr< EndCriteria > endCriteria_
std::vector< Real > blackVols_
EndCriteria::Type endCriteria() const
AbcdCalibration()=default
ext::shared_ptr< ParametersTransformation > transformation_
std::vector< Real > k(const std::vector< Real > &t, const std::vector< Real > &blackVols) const
adjustment factors needed to match Black vols
std::vector< Real > weights_
std::vector< Real > times_
Parameters.
EndCriteria::Type abcdEndCriteria_
ext::shared_ptr< OptimizationMethod > optMethod_
1-D array used in linear algebra.
Cost function abstract class for optimization problem.