pub struct MetricsView {
pub total_return: f64,
pub cagr: f64,
pub max_drawdown: f64,
pub volatility: f64,
pub sharpe: Option<f64>,
pub sortino: Option<f64>,
pub calmar: Option<f64>,
pub psr: Option<f64>,
pub trades: u32,
}Expand description
Every shape at the root as well, because a window names a view on nearly
every line and arvo_api::research::StudyView would be noise. The names
do not collide: proto has no overloading and neither does this.
Every shape at the root as well, because a window names a view on nearly
every line and arvo_api::research::StudyView would be noise. The names
do not collide: proto has no overloading and neither does this.
Every shape at the root as well, because a window names a view on nearly
every line and arvo_api::research::StudyView would be noise. The names
do not collide: proto has no overloading and neither does this.
Fields§
§total_return: f64§cagr: f64§max_drawdown: f64§volatility: f64§sharpe: Option<f64>§sortino: Option<f64>§calmar: Option<f64>§psr: Option<f64>Probability the true Sharpe is above zero, given the sample.
The second number a Sharpe needs. 1.2 from forty returns and 1.2 from four thousand print identically and are not the same finding.
trades: u32Implementations§
Source§impl MetricsView
impl MetricsView
Sourcepub fn sharpe(&self) -> f64
pub fn sharpe(&self) -> f64
Returns the value of sharpe, or the default value if sharpe is unset.
Sourcepub fn sortino(&self) -> f64
pub fn sortino(&self) -> f64
Returns the value of sortino, or the default value if sortino is unset.
Trait Implementations§
Source§impl Clone for MetricsView
impl Clone for MetricsView
impl Copy for MetricsView
Source§impl Debug for MetricsView
impl Debug for MetricsView
Source§impl Default for MetricsView
impl Default for MetricsView
Source§impl<'de> Deserialize<'de> for MetricsView
impl<'de> Deserialize<'de> for MetricsView
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>,
Source§impl Message for MetricsView
impl Message for MetricsView
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.