Struct PySchedule
pub(crate) struct PySchedule {
inner: Schedule,
}Expand description
A generated set of calculation-period boundary dates.
Fields§
§inner: ScheduleImplementations§
§impl PySchedule
impl PySchedule
§impl PySchedule
impl PySchedule
fn __repr__(&self) -> String
fn __len__(&self) -> usize
fn from_dates(dates: Vec<NaiveDate>) -> PyResult<Self>
fn from_dates(dates: Vec<NaiveDate>) -> PyResult<Self>
A schedule from boundary dates stated verbatim — no calendar, no roll, no business-day adjustment.
A stated boundary has already had all three applied by whoever stated
it, so this is the entry point for a schedule read off a confirm or
another system’s output, where schedule() is the one for a schedule
generated from conventions.
Unconventional dates are not refused — a boundary on a weekend, or
periods of unequal length, are what stating dates is for. Raises
ValueError only where the list is ill-formed: fewer than two dates, a
descending pair, or a repeated date.
fn paying(
&self,
lag_days: i32,
calendar: &PyCalendar,
business_day_convention: Named<BusinessDayConvention>,
) -> Vec<NaiveDate>
fn paying( &self, lag_days: i32, calendar: &PyCalendar, business_day_convention: Named<BusinessDayConvention>, ) -> Vec<NaiveDate>
The payment date of every period under a lag_days business-day lag on
calendar — one date per period, so one fewer than dates().
The schedule carries no lag of its own. When a period pays belongs to the coupon: two legs sharing one schedule may pay under different lags against different calendars, so the lag is given here rather than stored. A lag of 0 returns each period’s accrual end.
This is the same operation a leg computes its payment dates by, so these are the dates an instrument on this schedule and this lag reports in its cashflow records.
Trait Implementations§
impl DerefToPyAny for PySchedule
§impl IntoPy<Py<PyAny>> for PySchedule
impl IntoPy<Py<PyAny>> for PySchedule
§impl PyClass for PySchedule
impl PyClass for PySchedule
§impl PyClassImpl for PySchedule
impl PyClassImpl for PySchedule
§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<PySchedule>
type ThreadChecker = SendablePyClass<PySchedule>
§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 PySchedule
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PySchedule
§impl PyMethods<PySchedule> for PyClassImplCollector<PySchedule>
impl PyMethods<PySchedule> for PyClassImplCollector<PySchedule>
fn py_methods(self) -> &'static PyClassItems
§impl PyTypeInfo for PySchedule
impl PyTypeInfo for PySchedule
§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.