1caveats(3) QuantLib caveats(3)
2
3
4
6 caveats - Caveats
7
8
9 Class Actual365Fixed
10 According to ISDA, 'Actual/365' (without 'Fixed') is an alias for
11 'Actual/Actual (ISDA)' (see ActualActual.) If Actual/365 is not
12 explicitly specified as fixed in an instrument specification, you
13 might want to double-check its meaning.
14
15 Class BlackSwaptionEngine
16 The engine assumes that the exercise date equals the start date of
17 the passed swap.
18
19 Member
20 QuantLib::BlackVarianceTermStructure::BlackVarianceTermStructure(const
21 DayCounter &dc=Actual365Fixed())
22 term structures initialized by means of this constructor must
23 manage their own reference date by overriding the referenceDate()
24 method.
25
26 Member
27 QuantLib::BlackVolatilityTermStructure::BlackVolatilityTermStructure(const
28 DayCounter &dc=Actual365Fixed())
29 term structures initialized by means of this constructor must
30 manage their own reference date by overriding the referenceDate()
31 method.
32
33 Member QuantLib::BlackVolTermStructure::BlackVolTermStructure(const
34 DayCounter &dc=Actual365Fixed())
35 term structures initialized by means of this constructor must
36 manage their own reference date by overriding the referenceDate()
37 method.
38
39 Class Bond
40 Most methods assume that the cashflows are stored sorted by date,
41 the redemption being the last one.
42
43 Member QuantLib::Bond::cashflows() const
44 the returned vector includes the redemption as the last cash flow.
45
46 Member QuantLib::Bond::cleanPrice() const
47 the theoretical price calculated from a flat term structure might
48 differ slightly from the price calculated from the corresponding
49 yield by means of the other overload of this function. If the price
50 from a constant yield is desired, it is advisable to use such other
51 overload.
52
53 Member QuantLib::Bond::dirtyPrice() const
54 the theoretical price calculated from a flat term structure might
55 differ slightly from the price calculated from the corresponding
56 yield by means of the other overload of this function. If the price
57 from a constant yield is desired, it is advisable to use such other
58 overload.
59
60 Class CADLibor
61 This is the rate fixed in London by BBA. Use CDOR if you're
62 interested in the Canadian fixing by IDA.
63
64 Member QuantLib::Calendar::name() const
65 This method is used for output and comparison between calendars. It
66 is not meant to be used for writing switch-on-type code.
67
68 Member
69 QuantLib::CapletVolatilityStructure::CapletVolatilityStructure(const
70 DayCounter &dc=Actual365Fixed())
71 term structures initialized by means of this constructor must
72 manage their own reference date by overriding the referenceDate()
73 method.
74
75 Member QuantLib::CapVolatilityStructure::CapVolatilityStructure(const
76 DayCounter &dc=Actual365Fixed())
77 term structures initialized by means of this constructor must
78 manage their own reference date by overriding the referenceDate()
79 method.
80
81 Class Cdor
82 This is the rate fixed in Canada by IDA. Use CADLibor if you're
83 interested in the London fixing by BBA.
84
85 Class CHFLibor
86 This is the rate fixed in London by BBA. Use ZIBOR if you're
87 interested in the Zurich fixing.
88
89 Class CmsCoupon
90 This class does not perform any date adjustment, i.e., the start
91 and end date passed upon construction should be already rolled to a
92 business day.
93
94 Class CompositeInstrument
95 Methods that drive the calculation directly (such as recalculate(),
96 freeze() and others) might not work correctly.
97
98 Class ConvertibleFixedCouponBond
99 Most methods inherited from Bond (such as yield or the yield-based
100 dirtyPrice and cleanPrice) refer to the underlying plain-vanilla
101 bond and do not take convertibility and callability into account.
102
103 Class ConvertibleFloatingRateBond
104 Most methods inherited from Bond (such as yield or the yield-based
105 dirtyPrice and cleanPrice) refer to the underlying plain-vanilla
106 bond and do not take convertibility and callability into account.
107
108 Class ConvertibleZeroCouponBond
109 Most methods inherited from Bond (such as yield or the yield-based
110 dirtyPrice and cleanPrice) refer to the underlying plain-vanilla
111 bond and do not take convertibility and callability into account.
112
113 Member QuantLib::Coupon::Coupon(Real nominal, const Date &paymentDate,
114 const Date &accrualStartDate, const Date &accrualEndDate, const Date
115 &refPeriodStart=Date(), const Date &refPeriodEnd=Date())
116 the coupon does not adjust the payment date which must already be a
117 business day.
118
119 Class CrankNicolson
120 The differential operator must be linear for this evolver to work.
121
122 Member QuantLib::DayCounter::name() const
123 This method is used for output and comparison between day counters.
124 It is not meant to be used for writing switch-on-type code.
125
126 Class DiscretizedOption
127 it is advised that derived classes take care of creating and
128 initializing themselves an instance of the underlying.
129
130 Class Disposable
131 In order to avoid copies in code such as shown above, the
132 conversion from T to Disposable<T> is destructive, i.e., it does
133 not preserve the state of the original object. Therefore, it is
134 necessary for the developer to avoid code such as
135
136 Class Euribor
137 This is the rate fixed by the ECB. Use EurLibor if you're
138 interested in the London fixing by BBA.
139
140 Class EURLibor
141 This is the rate fixed in London by BBA. Use Euribor if you're
142 interested in the fixing by the ECB.
143
144 Class EURLibor
145 This is not a valid base class for the O/N index
146
147 Member QuantLib::ExchangeRateManager::lookup(const Currency &source,
148 const Currency &target, Date date=Date(), ExchangeRate::Type
149 type=ExchangeRateDerived) const
150 if two or more exchange-rate chains are possible which allow to
151 specify a requested rate, it is unspecified which one is returned.
152
153 Member QuantLib::FiniteDifferenceModel::rollback(array_type &a, Time
154 from, Time to, Size steps)
155 being this a rollback, from must be a later time than to.
156
157 Member QuantLib::FiniteDifferenceModel::rollback(array_type &a, Time
158 from, Time to, Size steps, const condition_type &condition)
159 being this a rollback, from must be a later time than to.
160
161 Class FixedCouponBondHelper
162 This class assumes that the reference date does not change between
163 calls of setTermStructure().
164
165 Class FixedRateBondForward
166 This class still needs to be rigorously tested
167
168 Class Forward
169 This class still needs to be rigorously tested
170
171 Class ForwardRateAgreement
172 This class still needs to be rigorously tested
173
174 Member QuantLib::ForwardRateStructure::zeroYieldImpl(Time) const
175 This is just a default, highly inefficient and possibly wildly
176 inaccurate implementation. Derived classes should implement their
177 own zeroYield method.
178
179 Class G2SwaptionEngine
180 The engine assumes that the exercise date equals the start date of
181 the passed swap.
182
183 Class GapPayoff
184 this payoff can be negative depending on the strikes
185
186 Member QuantLib::Handle::Handle(const boost::shared_ptr< T >
187 &h=boostshared_ptr< T >(), bool registerAsObserver=true)
188 registerAsObserver is left as a backdoor in case the programmer
189 cannot guarantee that the object pointed to will remain alive for
190 the whole lifetime of the handle---namely, it should be set to
191 false when the passed shared pointer does not own the pointee (this
192 should only happen in a controlled environment, so that the
193 programmer is aware of it). Failure to do so can very likely result
194 in a program crash. If the programmer does want the handle to
195 register as observer of such a shared pointer, it is his
196 responsibility to ensure that the handle gets destroyed before the
197 pointed object does.
198
199 Member QuantLib::IMM::code(const Date &immDate)
200 It raises an exception if the input date is not an IMM date
201
202 Member QuantLib::IMM::date(const std::string &immCode, const Date
203 &referenceDate=Date())
204 It raises an exception if the input string is not an IMM code
205
206 Class ImpliedVolTermStructure
207 It doesn't make financial sense to have an asset-dependant implied
208 Vol Term Structure. This class should be used with term structures
209 that are time dependant only.
210
211 Class IncrementalStatistics
212 high moments are numerically unstable for high
213 average/standardDeviation ratios.
214
215 Member QuantLib::Index::name() const=0
216 This method is used for output and comparison between indexes. It
217 is not meant to be used for writing switch-on-type code.
218
219 Member QuantLib::Instrument::setPricingEngine(const boost::shared_ptr<
220 PricingEngine > &)
221 calling this method will have no effects in case the
222 performCalculation method was overridden in a derived class.
223
224 Member QuantLib::InterestRate::discountFactor(Time t) const
225 Time must be measured using InterestRate's own day counter.
226
227 Member QuantLib::InterestRate::compoundFactor(Time t) const
228 Time must be measured using InterestRate's own day counter.
229
230 Member QuantLib::InterestRate::equivalentRate(Time t, Compounding comp,
231 Frequency freq=Annual) const
232 Time must be measured using the InterestRate's own day counter.
233
234 Member QuantLib::InterestRate::impliedRate(Real compound, Time t, const
235 DayCounter &resultDC, Compounding comp, Frequency freq=Annual)
236 Time must be measured using the day-counter provided as input.
237
238 Class JamshidianSwaptionEngine
239 The engine assumes that the exercise date equals the start date of
240 the passed swap.
241
242 Class JPYLibor
243 This is the rate fixed in London by BBA. Use TIBOR if you're
244 interested in the Tokio fixing.
245
246 Class JuQuadraticApproximationEngine
247 Barone-Adesi-Whaley critical commodity price calculation is used,
248 it has not been modified to see whether the method of Ju is faster.
249 Ju does not say how he solves the equation for the critical stock
250 price, e.g. Newton method. He just gives the solution. The method
251 of BAW gives answers to the same accuracy as in Ju (1999).
252
253 Member QuantLib::Lattice::partialRollback(DiscretizedAsset &, Time to)
254 const=0
255 In version 0.3.7 and earlier, this method was called rollAlmostBack
256 method and performed pre-adjustment. This is no longer true; when
257 migrating your code, you'll have to replace calls such as:
258
259 method->rollAlmostBack(asset,t);
260
261
262 with the two statements:
263
264 method->partialRollback(asset,t);
265 asset->preAdjustValues();
266
267
268 Member QuantLib::LazyObject::calculate() const
269 Objects cache the results of the previous calculation. Such results
270 will be returned upon later invocations of calculate. When the
271 results depend on arguments which could change between invocations,
272 the lazy object must register itself as observer of such objects
273 for the calculations to be performed again when they change.
274
275 Member QuantLib::LazyObject::calculate() const
276 Should this method be redefined in derived classes,
277 LazyObject::calculate() should be called in the overriding method.
278
279 Class Libor
280 This is not a valid base class for the O/N, S/N index
281
282 Class LiborForwardModelProcess
283 this class does not work correctly with Visual C++ 6.
284
285 Member QuantLib::LocalVolTermStructure::LocalVolTermStructure(const
286 DayCounter &dc=Actual365Fixed())
287 term structures initialized by means of this constructor must
288 manage their own reference date by overriding the referenceDate()
289 method.
290
291 Member pseudoSqrt
292 Higham algorithm only works for correlation matrices.
293
294 Class MCAmericanBasketEngine
295 This method is intrinsically weak for out-of-the-money options.
296
297 Class MCDiscreteAveragingAsianEngine
298 control-variate calculation is disabled under VC++6.
299
300 Class MixedScheme
301 The differential operator must be linear for this evolver to work.
302
303 Class NeumannBC
304 The value passed must not be the value of the derivative. Instead,
305 it must be comprehensive of the grid step between the first two
306 points--i.e., it must be the difference between f[0] and f[1].
307
308 Member QuantLib::Observable::operator=(const Observable &)
309 notification is sent before the copy constructor has a chance of
310 actually change the data members. Therefore, observers whose
311 update() method tries to use their observables will not see the
312 updated values. It is suggested that the update() method just raise
313 a flag in order to trigger a later recalculation.
314
315 Member QuantLib::OneAssetOption::impliedVolatility(Real price, Real
316 accuracy=1.0e-4, Size maxEvaluations=100, Volatility minVol=1.0e-7,
317 Volatility maxVol=4.0) const
318 currently, this method returns the Black-Scholes implied
319 volatility. It will give unconsistent results if the pricing was
320 performed with any other methods (such as jump-diffusion models.)
321
322 Member QuantLib::OneAssetOption::impliedVolatility(Real price, Real
323 accuracy=1.0e-4, Size maxEvaluations=100, Volatility minVol=1.0e-7,
324 Volatility maxVol=4.0) const
325 options with a gamma that changes sign have values that are not
326 monotonic in the volatility, e.g binary options. In these cases the
327 calculation can fail and the result (if any) is almost meaningless.
328 Another possible source of failure is to have a target value that
329 is not attainable with any volatility, e.g., a target value lower
330 than the intrinsic value in the case of American options.
331
332 Member QuantLib::Payoff::name() const=0
333 This method is used for output and comparison between payoffs. It
334 is not meant to be used for writing switch-on-type code.
335
336 Class PiecewiseYieldCurve
337 The bootstrapping algorithm will raise an exception if any two
338 instruments have the same maturity date.
339
340 Member QuantLib::Problem::reset()
341 it does not reset the current minumum to any initial value
342
343 Class QuantoEngine
344 for the time being, this engine will only work with simple Black-
345 Scholes processes (i.e., no Merton.)
346
347 Class RandomizedLDS
348 Inverting LDS and PRS is possible, but it doesn't make sense.
349
350 Class RandomSequenceGenerator
351 do not use with low-discrepancy sequence generator.
352
353 Member QuantLib::RateHelper::setTermStructure(YieldTermStructure *)
354 Being a pointer and not a shared_ptr, the term structure is not
355 guaranteed to remain allocated for the whole life of the rate
356 helper. It is responsibility of the programmer to ensure that the
357 pointer remains valid. It is advised that rate helpers be used only
358 in term structure constructors, setting the term structure to this,
359 i.e., the one being constructed.
360
361 Member QuantLib::RelinkableHandle::RelinkableHandle(const
362 boost::shared_ptr< T > &h=boostshared_ptr< T >(), bool
363 registerAsObserver=true)
364 see the Handle documentation for issues relatives to
365 registerAsObserver.
366
367 Member QuantLib::RelinkableHandle::linkTo(const boost::shared_ptr< T >
368 &, bool registerAsObserver=true)
369 see the Handle documentation for issues relatives to
370 registerAsObserver.
371
372 Member QuantLib::Rounding::Type
373 the names of the Floor and Ceiling methods might be misleading.
374 Check the provided reference.
375
376 Member QuantLib::Settings::evaluationDate()
377 a notification is not sent when the evaluation date changes for
378 natural causes---i.e., a date was not explicitly set (which results
379 in today's date being used for pricing) and the current date
380 changes as the clock strikes midnight.
381
382 Class SimpleDayCounter
383 this day counter should be used together with NullCalendar, which
384 ensures that dates at whole-month distances share the same day of
385 month. It is not guaranteed to work with any other calendar.
386
387 Member QuantLib::SingleAssetOption::impliedVolatility(Real targetValue,
388 Real accuracy=1e-4, Size maxEvaluations=100, Volatility minVol=1.0e-7,
389 Volatility maxVol=4.0) const
390 Options with a gamma that changes sign have values that are not
391 monotonic in the volatility, e.g binary options. In these cases
392 impliedVolatility can fail and in any case is meaningless. Another
393 possible source of failure is to have a targetValue that is not
394 attainable with any volatility, e.g. a targetValue lower than the
395 intrinsic value in the case of American options.
396
397 Member QuantLib::SwapIndex::underlyingSwap(const Date &fixingDate)
398 const
399 Relinking the term structure underlying the index will not have
400 effect on the returned swap.
401
402 Class SwaptionVolatilityCube
403 this class is not finalized and its interface might change in
404 subsequent releases.
405
406 Member
407 QuantLib::SwaptionVolatilityStructure::SwaptionVolatilityStructure(const
408 DayCounter &dc=Actual365Fixed(), BusinessDayConvention bdc=Following)
409 term structures initialized by means of this constructor must
410 manage their own reference date by overriding the referenceDate()
411 method.
412
413 Member QuantLib::TermStructure::TermStructure(const DayCounter
414 &dc=Actual365Fixed())
415 term structures initialized by means of this constructor must
416 manage their own reference date by overriding the referenceDate()
417 method.
418
419 Class Tibor
420 This is the rate fixed in Tokio by JBA. Use JPYLibor if you're
421 interested in the London fixing by BBA.
422
423 Class TreeSwaptionEngine
424 This engine is not guaranteed to work if the underlying swap has a
425 start date in the past, i.e., before today's date. When using this
426 engine, prune the initial part of the swap so that it starts at $ t
427 q 0 $.
428
429 Class TridiagonalOperator
430 to use real time-dependant algebra, you must overload the
431 corresponding operators in the inheriting time-dependent class.
432
433 Class TrinomialTree
434 The diffusion term of the SDE must be independent of the underlying
435 process.
436
437 Class VarianceSwap
438 This class does not manage seasoned variance swaps.
439
440 Member QuantLib::YieldTermStructure::YieldTermStructure(const
441 DayCounter &dc=Actual365Fixed())
442 term structures initialized by means of this constructor must
443 manage their own reference date by overriding the referenceDate()
444 method.
445
446 Member QuantLib::YieldTermStructure::forwardRate(const Date &d, const
447 Period &p, const DayCounter &resultDayCounter, Compounding comp,
448 Frequency freq=Annual, bool extrapolate=false) const
449 dates are not adjusted for holidays
450
451 Class Zibor
452 This is the rate fixed in Zurich by BBA. Use CHFLibor if you're
453 interested in the London fixing by BBA.
454
455Version 0.8.1 29 Oct 2007 caveats(3)