pub struct PathOutcome {
pub pnl: Option<Decimal>,
pub holding_period: usize,
pub exit_reason: ExitPolicy,
pub hit_take_profit: bool,
pub hit_stop_loss: bool,
pub expired: bool,
pub max_premium: Decimal,
pub min_premium: Decimal,
pub avg_premium: Decimal,
pub expiration_premium: Option<Decimal>,
}Expand description
Outcome of evaluating one simulated price path.
Every field is a core type, so the record can be produced by any
evaluator and summarised by PathStatistics without knowing what was
traded along the path. Premium fields are the marks observed while the
position was open, in the quote currency of the instrument.
Fields§
§pnl: Option<Decimal>Total P&L of the path, in quote currency. None when the path
could not be evaluated (an empty walk yields no P&L); summaries
count such a path as zero.
holding_period: usizeNumber of steps the position was held before exit or expiry.
exit_reason: ExitPolicyPolicy that closed the position (Expiration when none fired).
hit_take_profit: boolWhether the take-profit threshold was reached at exit.
hit_stop_loss: boolWhether the stop-loss threshold was reached at exit.
expired: boolWhether the position ran to expiry without an exit trigger.
Highest premium mark observed along the path.
Lowest premium mark observed along the path.
Arithmetic mean of the premium marks observed along the path.
Premium mark at expiry; None when the position exited early.
Trait Implementations§
Source§impl Clone for PathOutcome
impl Clone for PathOutcome
Source§impl Debug for PathOutcome
impl Debug for PathOutcome
Source§impl Default for PathOutcome
impl Default for PathOutcome
Source§impl<'de> Deserialize<'de> for PathOutcome
impl<'de> Deserialize<'de> for PathOutcome
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>,
impl Eq for PathOutcome
Source§impl PartialEq for PathOutcome
impl PartialEq for PathOutcome
Source§impl Serialize for PathOutcome
impl Serialize for PathOutcome
impl StructuralPartialEq for PathOutcome
Auto Trait Implementations§
impl Freeze for PathOutcome
impl RefUnwindSafe for PathOutcome
impl Send for PathOutcome
impl Sync for PathOutcome
impl Unpin for PathOutcome
impl UnsafeUnpin for PathOutcome
impl UnwindSafe for PathOutcome
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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
impl<T> Scalar 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.