pub struct PricePathOptions {
pub periods_per_year: f64,
pub years: Option<f64>,
pub risk_free_rate: f64,
pub sortino_target: f64,
pub return_kind: ReturnKind,
}Expand description
Options for price_path_solution.
Fields§
§periods_per_year: f64Periods per year for annualizing volatility (e.g. 252, 12, 1).
years: Option<f64>Calendar years spanned by the full path (for CAGR). If None, CAGR uses
(prices.len() - 1) / periods_per_year.
risk_free_rate: f64Per-period risk-free rate for Sharpe (same units as period returns).
sortino_target: f64Target / MAR for Sortino (default 0.0).
return_kind: ReturnKindWhich return series drives mean/vol/Sharpe.
Implementations§
Source§impl PricePathOptions
impl PricePathOptions
pub fn new(periods_per_year: f64) -> Self
pub fn with_years(self, years: f64) -> Self
pub fn with_risk_free(self, risk_free_rate: f64) -> Self
pub fn with_sortino_target(self, target: f64) -> Self
pub fn with_return_kind(self, kind: ReturnKind) -> Self
Trait Implementations§
Source§impl Clone for PricePathOptions
impl Clone for PricePathOptions
Source§fn clone(&self) -> PricePathOptions
fn clone(&self) -> PricePathOptions
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 Copy for PricePathOptions
Source§impl Debug for PricePathOptions
impl Debug for PricePathOptions
Auto Trait Implementations§
impl Freeze for PricePathOptions
impl RefUnwindSafe for PricePathOptions
impl Send for PricePathOptions
impl Sync for PricePathOptions
impl Unpin for PricePathOptions
impl UnsafeUnpin for PricePathOptions
impl UnwindSafe for PricePathOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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 more