#include <qle/models/carrmadanarbitragecheck.hpp>
◆ CarrMadanSurface()
CarrMadanSurface |
( |
const std::vector< Real > & |
times, |
|
|
const std::vector< Real > & |
moneyness, |
|
|
const Real |
spot, |
|
|
const std::vector< Real > & |
forwards, |
|
|
const std::vector< std::vector< Real > > & |
callPrices |
|
) |
| |
The moneyness is defined as K / F, K = strike, F = forward at the relevant time. The times and moneyness should be strictly increasing. The outer vectors for call prices and the calendarAbritrage() result represent times, the inner strikes.
Definition at line 181 of file carrmadanarbitragecheck.cpp.
184
185
186
188 "CarrMadanSurface: times size (" <<
times_.size() <<
") does not match callPrices outer vector size ("
191 << ") does not match forwards size ("
193
194 QL_REQUIRE(!
times_.empty(),
"CarrMadanSurface: times are empty");
195
196 for (Size i = 1; i <
times_.size(); ++i) {
198 "CarrMadanSurface: times not increasing at index " << (i - 1) <<
", " << i <<
": " <<
times_[i - 1]
200 }
201
203 "CarrMadanSurface: all input times must be positive or zero, got " <<
times_.front());
204
205 for (Size i = 0; i <
times_.size(); ++i) {
208 << ") should match moneyness size ("
210 }
211
212
213
215 for (Size i = 0; i <
times_.size(); ++i) {
223 }
224
225
226
228 for (Size i = 0; i <
moneyness_.size(); ++i) {
229 for (Size j = 0; j <
times_.size() - 1; ++j) {
233 if (!af) {
237 }
238 }
239 }
240}
std::vector< CarrMadanMarginalProbability > timeSlices_
const std::vector< Real > & times() const
std::vector< std::vector< bool > > butterflyArbitrage_
std::vector< std::vector< bool > > calendarArbitrage_
std::vector< std::vector< Real > > callPrices_
bool surfaceIsArbitrageFree_
const std::vector< std::vector< Real > > & callPrices() const
std::vector< Real > forwards_
std::vector< std::vector< bool > > callSpreadArbitrage_
std::vector< Real > times_
const std::vector< Real > & forwards() const
std::vector< Real > moneyness_
const std::vector< Real > & moneyness() const
Filter close_enough(const RandomVariable &x, const RandomVariable &y)
◆ times()
const std::vector< Real > & times |
( |
| ) |
const |
◆ moneyness()
const std::vector< Real > & moneyness |
( |
| ) |
const |
◆ spot()
◆ forwards()
const std::vector< Real > & forwards |
( |
| ) |
const |
◆ callPrices()
const std::vector< std::vector< Real > > & callPrices |
( |
| ) |
const |
◆ arbitrageFree()
bool arbitrageFree |
( |
| ) |
const |
◆ timeSlices()
◆ callSpreadArbitrage()
const std::vector< std::vector< bool > > & callSpreadArbitrage |
( |
| ) |
const |
◆ butterflyArbitrage()
const std::vector< std::vector< bool > > & butterflyArbitrage |
( |
| ) |
const |
◆ calendarArbitrage()
const std::vector< std::vector< bool > > & calendarArbitrage |
( |
| ) |
const |
◆ times_
◆ moneyness_
std::vector<Real> moneyness_ |
|
private |
◆ spot_
◆ forwards_
std::vector<Real> forwards_ |
|
private |
◆ callPrices_
std::vector<std::vector<Real> > callPrices_ |
|
private |
◆ timeSlices_
◆ surfaceIsArbitrageFree_
bool surfaceIsArbitrageFree_ |
|
private |
◆ callSpreadArbitrage_
std::vector<std::vector<bool> > callSpreadArbitrage_ |
|
private |
◆ butterflyArbitrage_
std::vector<std::vector<bool> > butterflyArbitrage_ |
|
private |
◆ calendarArbitrage_
std::vector<std::vector<bool> > calendarArbitrage_ |
|
private |