Struct PyRepoSpreadCurve
pub struct PyRepoSpreadCurve {
pub(crate) inner: Arc<Curve>,
}Expand description
A repo spread: the simple spreads a desk marks — GC against the overnight
curve, a special against GC — at dated pillars, linear between them and
flat outside, accruing on a money-market basis. Pinned with
MarketContext.with_repo_spread over a base, it adds in simple-rate space,
1/P = 1/P_base + s·τ, and its pillars report risk on the repo axis.
Fields§
§inner: Arc<Curve>Implementations§
§impl PyRepoSpreadCurve
impl PyRepoSpreadCurve
fn spread_curve(&self) -> &RepoSpread
§impl PyRepoSpreadCurve
impl PyRepoSpreadCurve
fn __repr__(&self) -> String
pub(crate) fn new(
reference: NaiveDate,
pillars: Vec<(NaiveDate, f64)>,
day_count: Named<DayCountFraction>,
) -> PyResult<Self>
pub(crate) fn new( reference: NaiveDate, pillars: Vec<(NaiveDate, f64)>, day_count: Named<DayCountFraction>, ) -> PyResult<Self>
A repo spread from (date, spread) pillars after reference, accruing
on day_count (ACT/360 for USD and EUR, ACT/365.FIXED for GBP).
fn from_term_rates(
base: &PyDiscountCurve,
quotes: Vec<(NaiveDate, f64)>,
day_count: Named<DayCountFraction>,
) -> PyResult<Self>
fn from_term_rates( base: &PyDiscountCurve, quotes: Vec<(NaiveDate, f64)>, day_count: Named<DayCountFraction>, ) -> PyResult<Self>
The spread over base that reprices term repos quoted from its
reference date, quotes as (maturity, simple rate) on day_count:
each pillar is the rate less the base’s simple rate to that date.
fn reference_date(&self) -> NaiveDate
fn reference_date(&self) -> NaiveDate
The date the spread is measured from.
Trait Implementations§
§impl Clone for PyRepoSpreadCurve
impl Clone for PyRepoSpreadCurve
§fn clone(&self) -> PyRepoSpreadCurve
fn clone(&self) -> PyRepoSpreadCurve
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl DerefToPyAny for PyRepoSpreadCurve
§impl IntoPy<Py<PyAny>> for PyRepoSpreadCurve
impl IntoPy<Py<PyAny>> for PyRepoSpreadCurve
§impl PyClass for PyRepoSpreadCurve
impl PyClass for PyRepoSpreadCurve
§impl PyClassImpl for PyRepoSpreadCurve
impl PyClassImpl for PyRepoSpreadCurve
§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
§type ThreadChecker = SendablePyClass<PyRepoSpreadCurve>
type ThreadChecker = SendablePyClass<PyRepoSpreadCurve>
This handles following two situations: Read more
§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild
Immutable or mutable
§type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
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 PyClassNewTextSignature<PyRepoSpreadCurve> for PyClassImplCollector<PyRepoSpreadCurve>
impl PyClassNewTextSignature<PyRepoSpreadCurve> for PyClassImplCollector<PyRepoSpreadCurve>
fn new_text_signature(self) -> Option<&'static str>
§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyRepoSpreadCurve
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyRepoSpreadCurve
§impl PyMethods<PyRepoSpreadCurve> for PyClassImplCollector<PyRepoSpreadCurve>
impl PyMethods<PyRepoSpreadCurve> for PyClassImplCollector<PyRepoSpreadCurve>
fn py_methods(self) -> &'static PyClassItems
§impl PyTypeInfo for PyRepoSpreadCurve
impl PyTypeInfo for PyRepoSpreadCurve
§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
Returns the safe abstraction over the type object.
§fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
Checks if
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
Checks if
object is an instance of this type.Auto Trait Implementations§
impl Freeze for PyRepoSpreadCurve
impl RefUnwindSafe for PyRepoSpreadCurve
impl Send for PyRepoSpreadCurve
impl Sync for PyRepoSpreadCurve
impl Unpin for PyRepoSpreadCurve
impl UnsafeUnpin for PyRepoSpreadCurve
impl UnwindSafe for PyRepoSpreadCurve
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more