1caveats(3) QuantLib caveats(3)
2
3
4
6 caveats - .TH "caveats" 3 "Thu Aug 19 2010" "Version 1.0.1" "QuantLib"
7
9 caveats -
10
11 Class Actual365Fixed
12 According to ISDA, 'Actual/365' (without 'Fixed') is an alias for
13 'Actual/Actual (ISDA)' (see ActualActual.) If Actual/365 is not
14 explicitly specified as fixed in an instrument specification, you
15 might want to double-check its meaning.
16
17 Class AssetSwap
18 bondCleanPrice must be the (forward) price at the floatSchedule
19 start date
20
21 Member BarrierOption::impliedVolatility(Real price, const
22 boost::shared_ptr< GeneralizedBlackScholesProcess > &process, Real
23 accuracy=1.0e-4, Size maxEvaluations=100, Volatility minVol=1.0e-7,
24 Volatility maxVol=4.0) const
25 see VanillaOption for notes on implied-volatility calculation.
26
27 Member BespokeCalendar::BespokeCalendar(const std::string &name='')
28 different bespoke calendars created with the same name (or
29 different bespoke calendars created with no name) will compare as
30 equal.
31
32 Member BlackAtmVolCurve::BlackAtmVolCurve(const Calendar
33 &cal=Calendar(), BusinessDayConvention bdc=Following, const DayCounter
34 &dc=DayCounter())
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 BlackCallableFixedRateBondEngine
40 This class has yet to be tested
41
42 Class BlackCallableZeroCouponBondEngine
43 This class has yet to be tested.
44
45 Class BlackCdsOptionEngine
46 The engine assumes that the exercise date equals the start date of
47 the passed CDS.
48
49 Class BlackSwaptionEngine
50 The engine assumes that the exercise date equals the start date of
51 the passed swap.
52
53 Member BlackVarianceTermStructure::BlackVarianceTermStructure(const
54 Calendar &cal=Calendar(), BusinessDayConvention bdc=Following, const
55 DayCounter &dc=DayCounter())
56 term structures initialized by means of this constructor must
57 manage their own reference date by overriding the referenceDate()
58 method.
59
60 Member BlackVolatilityTermStructure::BlackVolatilityTermStructure(const
61 Calendar &cal=Calendar(), BusinessDayConvention bdc=Following, const
62 DayCounter &dc=DayCounter())
63 term structures initialized by means of this constructor must
64 manage their own reference date by overriding the referenceDate()
65 method.
66
67 Member BlackVolSurface::BlackVolSurface(const Calendar &cal=Calendar(),
68 BusinessDayConvention bdc=Following, const DayCounter &dc=DayCounter())
69 term structures initialized by means of this constructor must
70 manage their own reference date by overriding the referenceDate()
71 method.
72
73 Member BlackVolTermStructure::BlackVolTermStructure(const Calendar
74 &cal=Calendar(), BusinessDayConvention bdc=Following, const DayCounter
75 &dc=DayCounter())
76 term structures initialized by means of this constructor must
77 manage their own reference date by overriding the referenceDate()
78 method.
79
80 Class Bond
81 Most methods assume that the cash flows are stored sorted by date,
82 the redemption(s) being after any cash flow at the same date. In
83 particular, if there's one single redemption, it must be the last
84 cash flow,
85
86 Member Bond::Bond(Natural settlementDays, const Calendar &calendar,
87 Real faceAmount, const Date &maturityDate, const Date
88 &issueDate=Date(), const Leg &cashflows=Leg())
89 The last passed cash flow must be the bond redemption. No other
90 cash flow can have a date later than the redemption date.
91
92 Member Bond::cleanPrice() const
93 the theoretical price calculated from a flat term structure might
94 differ slightly from the price calculated from the corresponding
95 yield by means of the other overload of this function. If the price
96 from a constant yield is desired, it is advisable to use such other
97 overload.
98
99 Member Bond::dirtyPrice() const
100 the theoretical price calculated from a flat term structure might
101 differ slightly from the price calculated from the corresponding
102 yield by means of the other overload of this function. If the price
103 from a constant yield is desired, it is advisable to use such other
104 overload.
105
106 Class BondHelper
107 This class assumes that the reference date does not change between
108 calls of setTermStructure().
109
110 Member BondHelper::BondHelper(const Handle< Quote > &cleanPrice, const
111 boost::shared_ptr< Bond > &bond)
112 Setting a pricing engine to the passed bond from external code will
113 cause the bootstrap to fail or to give wrong results. It is advised
114 to discard the bond after creating the helper, so that the helper
115 has sole ownership of it.
116
117 Member BootstrapHelper< TS >::setTermStructure(TS *)
118 Being a pointer and not a shared_ptr, the term structure is not
119 guaranteed to remain allocated for the whole life of the rate
120 helper. It is responsibility of the programmer to ensure that the
121 pointer remains valid. It is advised that this method is called
122 only inside the term structure being bootstrapped, setting the
123 pointer to this, i.e., the term structure itself.
124
125 Class CADLibor
126 This is the rate fixed in London by BBA. Use CDOR if you're
127 interested in the Canadian fixing by IDA.
128
129 Member Calendar::name() const
130 This method is used for output and comparison between calendars. It
131 is not meant to be used for writing switch-on-type code.
132
133 Member
134 CallableBondVolatilityStructure::CallableBondVolatilityStructure(const
135 DayCounter &dc=DayCounter(), BusinessDayConvention bdc=Following)
136 term structures initialized by means of this constructor must
137 manage their own reference date by overriding the referenceDate()
138 method.
139
140 Member
141 CapFloorTermVolatilityStructure::CapFloorTermVolatilityStructure(const
142 Calendar &cal, BusinessDayConvention bdc, const DayCounter
143 &dc=DayCounter())
144 term structures initialized by means of this constructor must
145 manage their own reference date by overriding the referenceDate()
146 method.
147
148 Class Cdor
149 This is the rate fixed in Canada by IDA. Use CADLibor if you're
150 interested in the London fixing by BBA.
151
152 Class CHFLibor
153 This is the rate fixed in London by BBA. Use ZIBOR if you're
154 interested in the Zurich fixing.
155
156 Class CmsCoupon
157 This class does not perform any date adjustment, i.e., the start
158 and end date passed upon construction should be already rolled to a
159 business day.
160
161 Class CompositeInstrument
162 Methods that drive the calculation directly (such as recalculate(),
163 freeze() and others) might not work correctly.
164
165 Group Constructors
166 registerAsObserver is left as a backdoor in case the programmer
167 cannot guarantee that the object pointed to will remain alive for
168 the whole lifetime of the handle---namely, it should be set to
169 false when the passed shared pointer does not own the pointee (this
170 should only happen in a controlled environment, so that the
171 programmer is aware of it). Failure to do so can very likely result
172 in a program crash. If the programmer does want the handle to
173 register as observer of such a shared pointer, it is his
174 responsibility to ensure that the handle gets destroyed before the
175 pointed object does.
176
177 Class ConvertibleFixedCouponBond
178 Most methods inherited from Bond (such as yield or the yield-based
179 dirtyPrice and cleanPrice) refer to the underlying plain-vanilla
180 bond and do not take convertibility and callability into account.
181
182 Class ConvertibleFloatingRateBond
183 Most methods inherited from Bond (such as yield or the yield-based
184 dirtyPrice and cleanPrice) refer to the underlying plain-vanilla
185 bond and do not take convertibility and callability into account.
186
187 Class ConvertibleZeroCouponBond
188 Most methods inherited from Bond (such as yield or the yield-based
189 dirtyPrice and cleanPrice) refer to the underlying plain-vanilla
190 bond and do not take convertibility and callability into account.
191
192 Member Coupon::Coupon(const Date &paymentDate, Real nominal, const Date
193 &accrualStartDate, const Date &accrualEndDate, const Date
194 &refPeriodStart=Date(), const Date &refPeriodEnd=Date())
195 the coupon does not adjust the payment date which must already be a
196 business day.
197
198 Class CrankNicolson< Operator >
199 The differential operator must be linear for this evolver to work.
200
201 Class CreditDefaultSwap
202 if Settings::includeReferenceDateCashFlows() is set to true,
203 payments occurring at the settlement date of the swap might be
204 included in the NPV and therefore affect the fair-spread
205 calculation. This might not be what you want.
206
207 Class CubicBSplinesFitting
208 "The results are extremely sensitive to the number and location of
209 the knot points, and there is no optimal way of selecting them.'
210 James, J. and
211 N. Webber, 'Interest Rate Modelling" John Wiley,
212 2000, pp. 440.
213
214 Class DailyTenorEURLibor
215 This is the rate fixed in London by BBA. Use Eonia if you're
216 interested in the fixing by the ECB.
217
218 Member DayCounter::name() const
219 This method is used for output and comparison between day counters.
220 It is not meant to be used for writing switch-on-type code.
221
222 Member DefaultDensityStructure::survivalProbabilityImpl(Time) const
223 This default implementation uses numerical integration, which might
224 be inefficient and inaccurate. Derived classes should override it
225 if a more efficient implementation is available.
226
227 Class DiscretizedOption
228 it is advised that derived classes take care of creating and
229 initializing themselves an instance of the underlying.
230
231 Class Disposable< T >
232 In order to avoid copies in code such as shown above, the
233 conversion from T to Disposable<T> is destructive, i.e., it does
234 not preserve the state of the original object. Therefore, it is
235 necessary for the developer to avoid code such as
236
237 Member DividendVanillaOption::impliedVolatility(Real price, const
238 boost::shared_ptr< GeneralizedBlackScholesProcess > &process, Real
239 accuracy=1.0e-4, Size maxEvaluations=100, Volatility minVol=1.0e-7,
240 Volatility maxVol=4.0) const
241 see VanillaOption for notes on implied-volatility calculation.
242
243 Member ECB::code(const Date &ecbDate)
244 It raises an exception if the input date is not an ECB date
245
246 Member ECB::date(const std::string &ecbCode, const Date
247 &referenceDate=Date())
248 It raises an exception if the input string is not an ECB code
249
250 Member EquityFXVolSurface::EquityFXVolSurface(const Calendar
251 &cal=Calendar(), BusinessDayConvention bdc=Following, const DayCounter
252 &dc=DayCounter())
253 term structures initialized by means of this constructor must
254 manage their own reference date by overriding the referenceDate()
255 method.
256
257 Class Euribor
258 This is the rate fixed by the ECB. Use EurLibor if you're
259 interested in the London fixing by BBA.
260
261 Class EURLibor
262 This is the rate fixed in London by BBA. Use Euribor if you're
263 interested in the fixing by the ECB.
264
265 Member ExchangeRateManager::lookup(const Currency &source, const
266 Currency &target, Date date=Date(), ExchangeRate::Type
267 type=ExchangeRateDerived) const
268 if two or more exchange-rate chains are possible which allow to
269 specify a requested rate, it is unspecified which one is returned.
270
271 Class ExponentialSplinesFitting
272 convergence may be slow
273
274 Member FiniteDifferenceModel< Evolver >::rollback(array_type &a, Time
275 from, Time to, Size steps)
276 being this a rollback, from must be a later time than to.
277
278 Member FiniteDifferenceModel< Evolver >::rollback(array_type &a, Time
279 from, Time to, Size steps, const condition_type &condition)
280 being this a rollback, from must be a later time than to.
281
282 Class FittedBondDiscountCurve
283 The method can be slow if there are many bonds to fit. Speed also
284 depends on the particular choice of fitting method chosen and its
285 convergence properties under optimization. See also todo list for
286 BondDiscountCurveFittingMethod.
287
288 Class FittedBondDiscountCurve::FittingMethod
289 some parameters to the Simplex optimization method may need to be
290 tweaked internally to the class, depending on the fitting method
291 used, in order to get proper/reasonable/faster convergence.
292
293 Class FixedRateBondForward
294 This class still needs to be rigorously tested
295
296 Class Forward
297 This class still needs to be rigorously tested
298
299 Member ForwardRateStructure::zeroYieldImpl(Time) const
300 This default implementation uses an highly inefficient and possibly
301 wildly inaccurate numerical integration. Derived classes should
302 override it if a more efficient implementation is available.
303
304 Class G2SwaptionEngine
305 The engine assumes that the exercise date equals the start date of
306 the passed swap.
307
308 Class GapPayoff
309 this payoff can be negative depending on the strikes
310
311 Member GeneralizedBlackScholesProcess::expectation(Time t0, Real x0,
312 Time dt) const
313 raises a 'not implemented' exception. It should be rewritten to
314 return the expectation E(S) of the process, not exp(E(log S)).
315
316 Member HazardRateStructure::survivalProbabilityImpl(Time) const
317 This default implementation uses numerical integration, which might
318 be inefficient and inaccurate. Derived classes should override it
319 if a more efficient implementation is available.
320
321 Class HimalayaOption
322 This implementation still does not manage seasoned options.
323
324 Member IMM::code(const Date &immDate)
325 It raises an exception if the input date is not an IMM date
326
327 Member IMM::date(const std::string &immCode, const Date
328 &referenceDate=Date())
329 It raises an exception if the input string is not an IMM code
330
331 Class ImpliedVolTermStructure
332 It doesn't make financial sense to have an asset-dependant implied
333 Vol Term Structure. This class should be used with term structures
334 that are time dependant only.
335
336 Class IncrementalStatistics
337 high moments are numerically unstable for high
338 average/standardDeviation ratios.
339
340 Class Index
341 this class performs no check that the provided/requested fixings
342 are for dates in the past, i.e. for dates less than or equal to the
343 evaluation date. It is up to the client code to take care of
344 possible inconsistencies due to 'seeing in the
345 future'
346
347 Member Index::name() const =0
348 This method is used for output and comparison between indexes. It
349 is not meant to be used for writing switch-on-type code.
350
351 Member Instrument::setPricingEngine(const boost::shared_ptr<
352 PricingEngine > &)
353 calling this method will have no effects in case the
354 performCalculation method was overridden in a derived class.
355
356 Member InterestRate::compoundFactor(Time t) const
357 Time must be measured using InterestRate's own day counter.
358
359 Member InterestRate::discountFactor(Time t) const
360 Time must be measured using InterestRate's own day counter.
361
362 Member InterestRate::equivalentRate(Compounding comp, Frequency freq,
363 Time t) const
364 Time must be measured using the InterestRate's own day counter.
365
366 Member InterestRate::impliedRate(Real compound, const DayCounter
367 &resultDC, Compounding comp, Frequency freq, Time t)
368 Time must be measured using the day-counter provided as input.
369
370 Member InterestRateVolSurface::InterestRateVolSurface(const
371 boost::shared_ptr< InterestRateIndex > &, const Calendar
372 &cal=Calendar(), BusinessDayConvention bdc=Following, const DayCounter
373 &dc=DayCounter())
374 term structures initialized by means of this constructor must
375 manage their own reference date by overriding the referenceDate()
376 method.
377
378 Class JamshidianSwaptionEngine
379 The engine assumes that the exercise date equals the start date of
380 the passed swap.
381
382 Class JPYLibor
383 This is the rate fixed in London by BBA. Use TIBOR if you're
384 interested in the Tokio fixing.
385
386 Class JuQuadraticApproximationEngine
387 Barone-Adesi-Whaley critical commodity price calculation is used,
388 it has not been modified to see whether the method of Ju is faster.
389 Ju does not say how he solves the equation for the critical stock
390 price, e.g. Newton method. He just gives the solution. The method
391 of BAW gives answers to the same accuracy as in Ju (1999).
392
393 Member Lattice::partialRollback(DiscretizedAsset &, Time to) const =0
394 In version 0.3.7 and earlier, this method was called rollAlmostBack
395 method and performed pre-adjustment. This is no longer true; when
396 migrating your code, you'll have to replace calls such as:
397
398 Member LazyObject::calculate() const
399 Objects cache the results of the previous calculation. Such results
400 will be returned upon later invocations of calculate. When the
401 results depend on arguments which could change between invocations,
402 the lazy object must register itself as observer of such objects
403 for the calculations to be performed again when they change.
404
405 Should this method be redefined in derived classes,
406 LazyObject::calculate() should be called in the overriding method.
407
408 Should this method be redefined in derived classes,
409 LazyObject::calculate() should be called in the overriding method.
410
411 Class LiborForwardModelProcess
412 this class does not work correctly with Visual C++ 6.
413
414 Member LocalVolTermStructure::LocalVolTermStructure(const Calendar
415 &cal=Calendar(), BusinessDayConvention bdc=Following, const DayCounter
416 &dc=DayCounter())
417 term structures initialized by means of this constructor must
418 manage their own reference date by overriding the referenceDate()
419 method.
420
421 Class MCAmericanBasketEngine< RNG >
422 This method is intrinsically weak for out-of-the-money options.
423
424 Class MCAmericanPathEngine< RNG >
425 This method is intrinsically weak for out-of-the-money options.
426
427 Class MCDiscreteAveragingAsianEngine< RNG, S >
428 control-variate calculation is disabled under VC++6.
429
430 Class MixedScheme< Operator >
431 The differential operator must be linear for this evolver to work.
432
433 Class MultiplicativePriceSeasonality
434 Multi-year seasonality (i.e. non-stationary) is fragile: the user
435 must ensure that corrections at whole years before and after the
436 inflation term structure base date are the same. Otherwise there
437 can be an inconsistency with quoted rates. This is enforced if the
438 frequency is lower than daily. This is not enforced for daily
439 seasonality because this will always be inconsistent due to
440 weekends, holidays, leap years, etc. If you use multi-year daily
441 seasonality it is up to you to check.
442
443 Class NeumannBC
444 The value passed must not be the value of the derivative. Instead,
445 it must be comprehensive of the grid step between the first two
446 points--i.e., it must be the difference between f[0] and f[1].
447
448 Member Observable::operator=(const Observable &)
449 notification is sent before the copy constructor has a chance of
450 actually change the data members. Therefore, observers whose
451 update() method tries to use their observables will not see the
452 updated values. It is suggested that the update() method just raise
453 a flag in order to trigger a later recalculation.
454
455 Member OptionletVolatilityStructure::OptionletVolatilityStructure(const
456 Calendar &cal, BusinessDayConvention bdc, const DayCounter
457 &dc=DayCounter())
458 term structures initialized by means of this constructor must
459 manage their own reference date by overriding the referenceDate()
460 method.
461
462 Member OvernightIndexedSwapIndex::underlyingSwap(const Date
463 &fixingDate) const
464 Relinking the term structure underlying the index will not have
465 effect on the returned swap.
466
467 Class PagodaOption
468 This implementation still does not manage seasoned options.
469
470 Member PathPayoff::name() const =0
471 This method is used for output and comparison between payoffs. It
472 is not meant to be used for writing switch-on-type code.
473
474 Member Payoff::name() const =0
475 This method is used for output and comparison between payoffs. It
476 is not meant to be used for writing switch-on-type code.
477
478 Class PiecewiseDefaultCurve< Traits, Interpolator, Bootstrap >
479 The bootstrapping algorithm will raise an exception if any two
480 instruments have the same maturity date.
481
482 Class PiecewiseYieldCurve< Traits, Interpolator, Bootstrap >
483 The bootstrapping algorithm will raise an exception if any two
484 instruments have the same maturity date.
485
486 Member Problem::reset()
487 it does not reset the current minumum to any initial value
488
489 Member pseudoSqrt
490 Higham algorithm only works for correlation matrices.
491
492 Class QuantoEngine< Instr, Engine >
493 for the time being, this engine will only work with simple Black-
494 Scholes processes (i.e., no Merton.)
495
496 Class RandomizedLDS< LDS, PRS >
497 Inverting LDS and PRS is possible, but it doesn't make sense.
498
499 Class RandomSequenceGenerator< RNG >
500 do not use with low-discrepancy sequence generator.
501
502 Class RelinkableHandle< T >
503 see the Handle documentation for issues relatives to
504 registerAsObserver.
505
506 Member Rounding::Type
507 the names of the Floor and Ceiling methods might be misleading.
508 Check the provided reference.
509
510 Member Settings::evaluationDate()
511 a notification is not sent when the evaluation date changes for
512 natural causes---i.e., a date was not explicitly set (which results
513 in today's date being used for pricing) and the current date
514 changes as the clock strikes midnight.
515
516 Class SimpleDayCounter
517 this day counter should be used together with NullCalendar, which
518 ensures that dates at whole-month distances share the same day of
519 month. It is not guaranteed to work with any other calendar.
520
521 Member SurvivalProbabilityStructure::defaultDensityImpl(Time) const
522 This implementation uses numerical differentiation, which might be
523 inefficient and inaccurate. Derived classes should override it if a
524 more efficient implementation is available.
525
526 Member SwapIndex::underlyingSwap(const Date &fixingDate) const
527 Relinking the term structure underlying the index will not have
528 effect on the returned swap.
529
530 Class SwaptionVolatilityCube
531 this class is not finalized and its interface might change in
532 subsequent releases.
533
534 Member SwaptionVolatilityStructure::SwaptionVolatilityStructure(const
535 Calendar &calendar, BusinessDayConvention bdc, const DayCounter
536 &dc=DayCounter())
537 term structures initialized by means of this constructor must
538 manage their own reference date by overriding the referenceDate()
539 method.
540
541 Member TermStructure::TermStructure(const DayCounter &dc=DayCounter())
542 term structures initialized by means of this constructor must
543 manage their own reference date by overriding the referenceDate()
544 method.
545
546 Class Tibor
547 This is the rate fixed in Tokio by JBA. Use JPYLibor if you're
548 interested in the London fixing by BBA.
549
550 Class TreeSwaptionEngine
551 This engine is not guaranteed to work if the underlying swap has a
552 start date in the past, i.e., before today's date. When using this
553 engine, prune the initial part of the swap so that it starts at $ t
554 q 0 $.
555
556 Class TridiagonalOperator
557 to use real time-dependant algebra, you must overload the
558 corresponding operators in the inheriting time-dependent class.
559
560 Class TrinomialTree
561 The diffusion term of the SDE must be independent of the underlying
562 process.
563
564 Member VanillaOption::impliedVolatility(Real price, const
565 boost::shared_ptr< GeneralizedBlackScholesProcess > &process, Real
566 accuracy=1.0e-4, Size maxEvaluations=100, Volatility minVol=1.0e-7,
567 Volatility maxVol=4.0) const
568 currently, this method returns the Black-Scholes implied volatility
569 using analytic formulas for European options and a finite-
570 difference method for American and Bermudan options. It will give
571 unconsistent results if the pricing was performed with any other
572 methods (such as jump-diffusion models.)
573
574 options with a gamma that changes sign (e.g., binary options) have
575 values that are not monotonic in the volatility. In these cases, the
576 calculation can fail and the result (if any) is almost meaningless.
577 Another possible source of failure is to have a target value that is
578 not attainable with any volatility, e.g., a target value lower than the
579 intrinsic value in the case of American options.
580
581 Class VanillaSwap
582 if Settings::includeReferenceDateCashFlows() is set to true,
583 payments occurring at the settlement date of the swap might be
584 included in the NPV and therefore affect the fair-rate and fair-
585 spread calculation. This might not be what you want.
586
587 Class VarianceOption
588 This class does not manage seasoned variance options.
589
590 Class VarianceSwap
591 This class does not manage seasoned variance swaps.
592
593 Member VolatilityTermStructure::VolatilityTermStructure(const Calendar
594 &cal, BusinessDayConvention bdc, const DayCounter &dc=DayCounter())
595 term structures initialized by means of this constructor must
596 manage their own reference date by overriding the referenceDate()
597 method.
598
599 Member YieldTermStructure::forwardRate(const Date &d, const Period &p,
600 const DayCounter &resultDayCounter, Compounding comp, Frequency
601 freq=Annual, bool extrapolate=false) const
602 dates are not adjusted for holidays
603
604 Member YoYInflationIndex::fixing(const Date &fixingDate, bool
605 forecastTodaysFixing=false) const
606 the forecastTodaysFixing parameter (required by the Index
607 interface) is currently ignored.
608
609 Member ZeroInflationIndex::fixing(const Date &fixingDate, bool
610 forecastTodaysFixing=false) const
611 the forecastTodaysFixing parameter (required by the Index
612 interface) is currently ignored.
613
614 Class Zibor
615 This is the rate fixed in Zurich by BBA. Use CHFLibor if you're
616 interested in the London fixing by BBA.
617
618Version 1.0.1 Thu Aug 19 2010 caveats(3)