pub struct MFPerformance {Show 13 fields
pub trading_symbol: String,
pub name: String,
pub nav: f64,
pub nav_date: NaiveDate,
pub return_1d: Option<f64>,
pub return_1w: Option<f64>,
pub return_1m: Option<f64>,
pub return_3m: Option<f64>,
pub return_6m: Option<f64>,
pub return_1y: Option<f64>,
pub return_3y: Option<f64>,
pub return_5y: Option<f64>,
pub return_inception: Option<f64>,
}
Expand description
MF fund performance data
Fields§
§trading_symbol: String
Trading symbol
name: String
Fund name
Current NAV
NAV date
return_1d: Option<f64>
1 day return
return_1w: Option<f64>
1 week return
return_1m: Option<f64>
1 month return
return_3m: Option<f64>
3 months return
return_6m: Option<f64>
6 months return
return_1y: Option<f64>
1 year return
return_3y: Option<f64>
3 years return
return_5y: Option<f64>
5 years return
return_inception: Option<f64>
Since inception return
Implementations§
Source§impl MFPerformance
impl MFPerformance
Sourcepub fn best_return(&self) -> Option<f64>
pub fn best_return(&self) -> Option<f64>
Get the best performing period return
Sourcepub fn worst_return(&self) -> Option<f64>
pub fn worst_return(&self) -> Option<f64>
Get the worst performing period return
Sourcepub fn is_consistently_positive(&self) -> bool
pub fn is_consistently_positive(&self) -> bool
Check if fund is consistently performing (positive returns across periods)
Sourcepub fn volatility_indicator(&self) -> Option<f64>
pub fn volatility_indicator(&self) -> Option<f64>
Get volatility indicator based on return spread
Trait Implementations§
Source§impl Clone for MFPerformance
impl Clone for MFPerformance
Source§fn clone(&self) -> MFPerformance
fn clone(&self) -> MFPerformance
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MFPerformance
impl Debug for MFPerformance
Source§impl<'de> Deserialize<'de> for MFPerformance
impl<'de> Deserialize<'de> for MFPerformance
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MFPerformance
impl RefUnwindSafe for MFPerformance
impl Send for MFPerformance
impl Sync for MFPerformance
impl Unpin for MFPerformance
impl UnwindSafe for MFPerformance
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