Quiero crear am LmFixedVolatilityModel
como se define en http://www.jquantlib.com/en/latest/_static/javadocs/0.2.6-SNAPSHOT/jquantlib/index.html?org/jquantlib/pricingengines/swap/DiscountingSwapEngine.html
Abajo está mi código -
#include <iostream>
#include <cstring>
#include <ql/quantlib.hpp>
int main()
{
using namespace QuantLib;
std::vector<QuantLib::Date> voldays;
std::vector<QuantLib::Real> volvalues;
voldays = TARGET().businessDayList(Date(29, March, 2019), Date(29, April, 2019));
for (int i = 0; i < voldays.size(); i++) volvalues.push_back(0.10);
ext::shared_ptr<LmVolatilityModel> volModel(new LmFixedVolatilityModel(volvalues, voldays);
}
Sin embargo, con esta implementación, estoy recibiendo el siguiente error -
aa.cpp:17:50: error: no matching constructor for initialization of 'QuantLib::LmFixedVolatilityModel'
ext::shared_ptr<LmVolatilityModel> volModel(new LmFixedVolatilityModel(volvalues, voldays));
^ ~~~~~~~~~~~~~~~~~~
/usr/local/include/ql/legacy/libormarketmodels/lmfixedvolmodel.hpp:33:9: note: candidate constructor not viable: no known conversion from 'std::vector<QuantLib::Real>'
(aka 'vector<double>') to 'const QuantLib::Array' for 1st argument
LmFixedVolatilityModel(const Array& volatilities,
^
/usr/local/include/ql/legacy/libormarketmodels/lmfixedvolmodel.hpp:31:11: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2
were provided
class LmFixedVolatilityModel : public LmVolatilityModel {
Podrían por favor ayudarme con la forma correcta de crear un LmFixedVolatilityModel
¿Objeto?
Muchas gracias por su tiempo y ayuda.