39 const std::vector< PiecewiseConstantAbcdVariance>& originalVariances,
40 const std::vector<Time>& timesForSmallRates,
46 interpolatedVariances_(timesForSmallRates.size()-1),
47 originalVariances_(originalVariances.size()),
48 originalABCDVariances_(originalVariances),
49 originalABCDVariancesScaled_(originalVariances),
50 lastCapletVol_(lastCapletVol),
51 timesForSmallRates_(timesForSmallRates),
52 scalingFactors_(originalVariances.size(),1.0),
53 noBigRates_(originalVariances.size()),
54 noSmallRates_(timesForSmallRates.size()-1)
60 QL_REQUIRE(
originalVariances[i].rateTimes()[j] == timesForSmallRates[offset+j*period],
"rate times in variances passed in don't match small times in VolatilityInterpolationSpecifierabcd");
75 QL_REQUIRE(
scalingFactors_.size() == scales.size(),
"inappropriate number of scales passed in to VolatilityInterpolationSpecifierabcd::setScalingFactors ");
Size getNoSmallRates() const override
std::vector< PiecewiseConstantAbcdVariance > originalABCDVariances_
std::vector< Time > timesForSmallRates_
VolatilityInterpolationSpecifierabcd(Size period, Size offset, const std::vector< PiecewiseConstantAbcdVariance > &originalVariances, const std::vector< Time > ×ForSmallRates, Real lastCapletVol=0.0)
Size getPeriod() const override
Size getNoBigRates() const override
void setScalingFactors(const std::vector< Real > &scales) override
std::vector< PiecewiseConstantAbcdVariance > originalABCDVariancesScaled_
void setLastCapletVol(Real vol) override
std::vector< ext::shared_ptr< PiecewiseConstantVariance > > interpolatedVariances_
std::vector< Real > scalingFactors_
Size getOffset() const override
const std::vector< ext::shared_ptr< PiecewiseConstantVariance > > & interpolatedVariances() const override
const std::vector< ext::shared_ptr< PiecewiseConstantVariance > > & originalVariances() const override
std::vector< ext::shared_ptr< PiecewiseConstantVariance > > originalVariances_
Classes and functions for error handling.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
ext::function< Real(Real)> b
std::size_t Size
size of a container
Maps shared_ptr to either the boost or std implementation.