1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//! Market quotes.
//!
//! Port of `ql/quote.hpp`: the [`Quote`] trait is the purely virtual base
//! class for market observables. QuantLib's `Quote` inherits `Observable`;
//! here the trait exposes the embedded observable through its
//! [`AsObservable`] supertrait, which is also what lets a
//! [`Handle`](crate::handle::Handle) forward pointee changes to its
//! observers.
//!
//! `handleFromVariant` (a `std::variant<Real, Handle<Quote>>` convenience for
//! C++ term-structure constructors) has no caller in the core yet and is not
//! ported.
//!
//! The remaining `ql/quotes/` classes depend on layers not yet ported and
//! follow with them: `ForwardValueQuote` and `LastFixingQuote` (Index),
//! `ForwardSwapQuote` (SwapIndex/VanillaSwap), `FuturesConvAdjustmentQuote`
//! (IborIndex), `ImpliedStdDevQuote` and
//! `EurodollarFuturesImpliedStdDevQuote` (`blackFormulaImpliedStdDev`).
pub use CompositeQuote;
pub use ;
pub use DerivedQuote;
pub use MultiCompositeQuote;
pub use ;
use Cell;
use crateQlResult;
use crate;
use crate;
use crateReal;
/// Purely virtual base class for market observables.
///
/// Mirrors QuantLib's `Quote`. Implementors embed an
/// [`Observable`](crate::patterns::observable::Observable) and notify it when
/// their value changes; observers of a quote register through
/// [`observable`](AsObservable::observable).
/// Builds the empty cache, the quote's observable and the invalidating
/// listener wired to both - the shared construction step of every derived
/// quote (the C++ `update()` of `DerivedQuote` and friends drops the cached
/// value and passes the notification on).
///
/// Derived quotes register the listener with their source handle(s) and hold
/// the strong reference; the observer registry keeps only a weak one.