pub struct TimeSeriesData {Show 15 fields
pub timestamps: Vec<DateTime<Utc>>,
pub equity_curve: Vec<Decimal>,
pub drawdown_curve: Vec<Decimal>,
pub margin_usage: Vec<Decimal>,
pub position_count: Vec<usize>,
pub delta_exposure: Option<Vec<Decimal>>,
pub gamma_exposure: Option<Vec<Decimal>>,
pub theta_exposure: Option<Vec<Decimal>>,
pub vega_exposure: Option<Vec<Decimal>>,
pub vanna_exposure: Option<Vec<Decimal>>,
pub vomma_exposure: Option<Vec<Decimal>>,
pub veta_exposure: Option<Vec<Decimal>>,
pub charm_exposure: Option<Vec<Decimal>>,
pub color_exposure: Option<Vec<Decimal>>,
pub custom_series: HashMap<String, Vec<Decimal>>,
}Expand description
Represents time-series data for tracking various portfolio metrics over time.
This struct holds vectors of data points, each corresponding to a specific timestamp. It’s used to store the evolution of the equity curve, drawdown, margin usage, position count, and potentially option greeks exposures and custom metrics.
Fields§
§timestamps: Vec<DateTime<Utc>>Timestamps corresponding to each data point in the series.
equity_curve: Vec<Decimal>The value of the portfolio equity at each timestamp.
drawdown_curve: Vec<Decimal>The drawdown percentage or value from the peak equity at each timestamp.
margin_usage: Vec<Decimal>The amount or percentage of margin used at each timestamp.
position_count: Vec<usize>The number of open positions at each timestamp.
delta_exposure: Option<Vec<Decimal>>Optional time series of the portfolio’s delta exposure.
gamma_exposure: Option<Vec<Decimal>>Optional time series of the portfolio’s gamma exposure.
theta_exposure: Option<Vec<Decimal>>Optional time series of the portfolio’s theta exposure.
vega_exposure: Option<Vec<Decimal>>Optional time series of the portfolio’s vega exposure.
vanna_exposure: Option<Vec<Decimal>>Optional time series of the portfolio’s vanna exposure.
vomma_exposure: Option<Vec<Decimal>>Optional time series of the portfolio’s vomma exposure.
veta_exposure: Option<Vec<Decimal>>Optional time series of the portfolio’s veta exposure.
charm_exposure: Option<Vec<Decimal>>Optional time series of the portfolio’s charm exposure.
color_exposure: Option<Vec<Decimal>>Optional time series of the portfolio’s color exposure.
custom_series: HashMap<String, Vec<Decimal>>A map holding custom time series metrics, identified by a string key. Each key maps to a vector of decimal values corresponding to the timestamps.
Trait Implementations§
Source§impl Clone for TimeSeriesData
impl Clone for TimeSeriesData
Source§impl Debug for TimeSeriesData
impl Debug for TimeSeriesData
Source§impl Default for TimeSeriesData
impl Default for TimeSeriesData
Source§impl<'de> Deserialize<'de> for TimeSeriesData
impl<'de> Deserialize<'de> for TimeSeriesData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for TimeSeriesData
impl RefUnwindSafe for TimeSeriesData
impl Send for TimeSeriesData
impl Sync for TimeSeriesData
impl Unpin for TimeSeriesData
impl UnsafeUnpin for TimeSeriesData
impl UnwindSafe for TimeSeriesData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.