Struct PyCalibration
pub struct PyCalibration {
pub(crate) curve: PyDiscountCurve,
pub(crate) refusal: Option<&'static str>,
pub(crate) solves: Vec<(usize, usize, f64)>,
pub(crate) sweeps: usize,
pub(crate) provenance: Option<Arc<CurveProvenance>>,
}Expand description
A calibrated curve and how it was reached.
Fields§
§curve: PyDiscountCurve§refusal: Option<&'static str>Why no ladder is reported, when none is.
solves: Vec<(usize, usize, f64)>§sweeps: usize§provenance: Option<Arc<CurveProvenance>>Implementations§
§impl PyCalibration
impl PyCalibration
pub(crate) fn from_core(out: Calibrated) -> Self
§impl PyCalibration
impl PyCalibration
pub(crate) fn ladder(&self) -> PyResult<&CurveProvenance>
pub(crate) fn ladder(&self) -> PyResult<&CurveProvenance>
The ladder, or the scheme’s own reason for withholding it.
§impl PyCalibration
impl PyCalibration
pub(crate) fn __repr__(&self) -> String
pub(crate) fn interpolation(&self) -> &'static str
pub(crate) fn interpolation(&self) -> &'static str
The interpolation scheme the ladder solved under.
pub(crate) fn curve(&self) -> PyDiscountCurve
pub(crate) fn curve(&self) -> PyDiscountCurve
The solved curve.
pub(crate) fn solves(&self) -> PyRecords
pub(crate) fn solves(&self) -> PyRecords
One row per rung in solve order: pillar, iterations, residual.
pillar and iterations are counts, and arrive as floats: a column
carries text, a number or a date, and widening that set for two
diagnostic columns would change every producer of a table.
pub(crate) fn sweeps(&self) -> usize
pub(crate) fn sweeps(&self) -> usize
How many full-curve sweeps moved a pillar after the sequential pass.
pub(crate) fn rungs(&self) -> PyResult<PyRecords>
pub(crate) fn rungs(&self) -> PyResult<PyRecords>
The ladder this curve reprices: (maturity, quote) per rung, in solve
order — the same order as the curve’s pillars.
pub(crate) fn jacobian(&self) -> PyResult<Vec<Vec<f64>>>
pub(crate) fn jacobian(&self) -> PyResult<Vec<Vec<f64>>>
∂z/∂q row-major: jacobian[pillar][rung] is how far that pillar’s
parameter moves per unit move in that rung’s quote.
The transform behind a par-basis risk number. A caller rarely needs it
directly — Book.report flips through it — but a desk checking a hedge
ratio by hand does.
pub(crate) fn jacobian_engine(&self) -> PyResult<(&'static str, Option<usize>)>
pub(crate) fn jacobian_engine(&self) -> PyResult<(&'static str, Option<usize>)>
Which engine built jacobian(): ("lanes", None) for the tape-free
forward passes, ("reverse", sweeps) for one reverse recording read
back in sweeps vector sweeps.
Trait Implementations§
§impl Clone for PyCalibration
impl Clone for PyCalibration
§fn clone(&self) -> PyCalibration
fn clone(&self) -> PyCalibration
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 PyCalibration
§impl IntoPy<Py<PyAny>> for PyCalibration
impl IntoPy<Py<PyAny>> for PyCalibration
§impl PyClass for PyCalibration
impl PyClass for PyCalibration
§impl PyClassImpl for PyCalibration
impl PyClassImpl for PyCalibration
§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<PyCalibration>
type ThreadChecker = SendablePyClass<PyCalibration>
§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 PyCalibration
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyCalibration
§impl PyMethods<PyCalibration> for PyClassImplCollector<PyCalibration>
impl PyMethods<PyCalibration> for PyClassImplCollector<PyCalibration>
fn py_methods(self) -> &'static PyClassItems
§impl PyTypeInfo for PyCalibration
impl PyTypeInfo for PyCalibration
§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.