Struct PyHullWhiteFit
pub struct PyHullWhiteFit {
pub(crate) inner: CalibratedSigma,
}Expand description
A fitted Hull–White volatility and what the fit knows about it.
Fields§
§inner: CalibratedSigmaImplementations§
§impl PyHullWhiteFit
impl PyHullWhiteFit
pub(crate) fn __repr__(&self) -> String
pub(crate) fn sigma(&self, py: Python<'_>) -> PyObject
pub(crate) fn sigma(&self, py: Python<'_>) -> PyObject
The fitted volatility: a float for a flat fit, a Records of end
and sigma — one row per piece — for a piecewise one.
pub(crate) fn mean_reversion(&self) -> f64
pub(crate) fn mean_reversion(&self) -> f64
The mean reversion the fit held fixed.
pub(crate) fn evaluations(&self) -> usize
pub(crate) fn evaluations(&self) -> usize
How many objective evaluations the Gauss–Newton search took.
pub(crate) fn surface_points(&self) -> Vec<(NaiveDate, NaiveDate)>
pub(crate) fn surface_points(&self) -> Vec<(NaiveDate, NaiveDate)>
The strip points read at the money off the currency’s swaption surface,
because no flat vol was pinned for them, as (expiry, end) pairs. They
carry no quote sensitivity: there is no quote to move.
pub(crate) fn fits(&self) -> PyRecords
pub(crate) fn fits(&self) -> PyRecords
One row per strip point: (expiry, end, market, model, vol_misfit).
pub(crate) fn quote_sensitivities(&self) -> PyRecords
pub(crate) fn quote_sensitivities(&self) -> PyRecords
How the fitted σ moves with each quote, from the optimality condition
rather than a re-calibration: one row per quote, expiry, end,
d_sigma_d_vol for a flat fit; one row per (piece, quote) pair, with
the piece’s end date first as piece, for a piecewise one. A point read
off the swaption surface (surface_points) has no quote and no row.
Trait Implementations§
§impl Clone for PyHullWhiteFit
impl Clone for PyHullWhiteFit
§fn clone(&self) -> PyHullWhiteFit
fn clone(&self) -> PyHullWhiteFit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl DerefToPyAny for PyHullWhiteFit
§impl IntoPy<Py<PyAny>> for PyHullWhiteFit
impl IntoPy<Py<PyAny>> for PyHullWhiteFit
§impl PyClass for PyHullWhiteFit
impl PyClass for PyHullWhiteFit
§impl PyClassImpl for PyHullWhiteFit
impl PyClassImpl for PyHullWhiteFit
§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
§type ThreadChecker = SendablePyClass<PyHullWhiteFit>
type ThreadChecker = SendablePyClass<PyHullWhiteFit>
§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild
§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyHullWhiteFit
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyHullWhiteFit
§impl PyMethods<PyHullWhiteFit> for PyClassImplCollector<PyHullWhiteFit>
impl PyMethods<PyHullWhiteFit> for PyClassImplCollector<PyHullWhiteFit>
fn py_methods(self) -> &'static PyClassItems
§impl PyTypeInfo for PyHullWhiteFit
impl PyTypeInfo for PyHullWhiteFit
§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.§fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type.