Struct PyRiskFrame
pub struct PyRiskFrame {
pub(crate) npv: f64,
pub(crate) risk: RiskVector,
pub(crate) market: MarketContext,
}Expand description
One risk pass and the market it was taken against: what a measure resolves against, read as many ways as a desk needs.
Fields§
§npv: f64§risk: RiskVector§market: MarketContextImplementations§
§impl PyRiskFrame
impl PyRiskFrame
pub(crate) fn read(
&self,
axis: Named<RiskAxis>,
basis: Named<Basis>,
aggregation: Named<Aggregation>,
scale: Named<Scale>,
buckets: Option<Vec<Tenor>>,
) -> PyResult<PyRecords>
pub(crate) fn read( &self, axis: Named<RiskAxis>, basis: Named<Basis>, aggregation: Named<Aggregation>, scale: Named<Scale>, buckets: Option<Vec<Tenor>>, ) -> PyResult<PyRecords>
The reading on axis: label, curve, date, value per
row.
basis is zero (the curve nodes’ own quotes) or par (flipped
through each curve’s ladder); aggregation is total, bucketed,
by-curve or ladder; scale is unit, bp, pct, volpt or
x<factor>. Each takes its class or its spelling.
buckets buckets the reading on the caller’s own edges (["18M", "3Y"], each a tenor or a Period) rather than the fixed ladder: a
bucket up to each edge, labelled by it, then one past the last
(3Y+). It is the bucketed aggregation on those edges, so any other
aggregation beside it is refused, as are no edges, or edges not
positive and rising.
pub(crate) fn __repr__(&self) -> String
pub(crate) fn valuation_date(&self) -> Option<NaiveDate>
pub(crate) fn valuation_date(&self) -> Option<NaiveDate>
The valuation date of the market the pass was taken against.
Trait Implementations§
impl DerefToPyAny for PyRiskFrame
§impl IntoPy<Py<PyAny>> for PyRiskFrame
impl IntoPy<Py<PyAny>> for PyRiskFrame
§impl PyClass for PyRiskFrame
impl PyClass for PyRiskFrame
§impl PyClassImpl for PyRiskFrame
impl PyClassImpl for PyRiskFrame
§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<PyRiskFrame>
type ThreadChecker = SendablePyClass<PyRiskFrame>
§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 PyRiskFrame
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyRiskFrame
§impl PyMethods<PyRiskFrame> for PyClassImplCollector<PyRiskFrame>
impl PyMethods<PyRiskFrame> for PyClassImplCollector<PyRiskFrame>
fn py_methods(self) -> &'static PyClassItems
§impl PyTypeInfo for PyRiskFrame
impl PyTypeInfo for PyRiskFrame
§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.