Quotes¶
Observable market quotes.
quotes
¶
Runtime source shim for the native itofin.quotes submodule.
The real itofin.quotes is a compiled submodule registered into
sys.modules by the extension; it wins at import time, so nothing here
runs. This file exists only so static type checkers resolve
from itofin.quotes import ... from quotes/__init__.pyi without a
reportMissingModuleSource warning.
Auto-generated by scripts/gen_submodule_shims.py from quotes/__init__.pyi; do not edit or delete by hand.
CompositeQuote
¶
CompositeQuote(q1: Quote, q2: Quote, op: CompositeOp)
Bases: Quote
A read-only quote combining two quotes that follows both.
Build the composite quote.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q1
|
Quote
|
The first source; may itself be dependent. |
required |
q2
|
Quote
|
The second source; may be q1 itself. |
required |
op
|
CompositeOp
|
The function applied; Subtract is q1 - q2. |
required |
value
¶
Return op(q1, q2) for the sources' current values.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The combined value. |
DerivedQuote
¶
DerivedQuote(source: Quote, a: float = 1.0, b: float = 0.0)
Bases: Quote
A read-only quote worth a * source + b that follows its source.
Covers QuantLib DerivedQuote for affine functions; other functions are not bound because a Python callable cannot cross into the core.
Build the derived quote.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
Quote
|
The quote followed; may itself be dependent. |
required |
a
|
float
|
The slope applied to the source value. |
1.0
|
b
|
float
|
The offset added after scaling. |
0.0
|
value
¶
Return a * source + b for the source's current value.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The derived value. |
Quote
¶
A read-only market quote: the base of SimpleQuote, DerivedQuote and CompositeQuote.
Inputs that only read a quote, such as FlatForward.from_quote, accept any subclass and observe it, so changing a source SimpleQuote reprices them. Not constructible directly.
value
¶
Return the current value.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The quote's current market value. |
SimpleQuote
¶
Bases: Quote
A mutable, observable market element (D1).
Wraps a single value that pricing inputs observe; setting a new value notifies dependents so any cached valuation recomputes lazily.
Initialize the quote.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float
|
The initial market value. |
required |
value
¶
Return the current value.
Fallible: a quote whose value was never set raises ItofinError.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The quote's current market value. |
set_value
¶
Set a new value and notify observers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float
|
The new value; observers are notified when it actually changes, so dependent valuations recompute on next access. |
required |
AtmType
¶
ATM conventions. Null is invalid for calculation; PutCall50 requires Fwd.
CompositeOp
¶
The function a CompositeQuote applies to its two sources.
Divide and power are not bound; a square is Multiply with the same quote twice.
DeltaType
¶
Spot, forward and premium-adjusted delta conventions.