pub struct ComparisonRowView {Show 14 fields
pub id: String,
pub subject: String,
pub kind: String,
pub strategy_name: String,
pub verdict: String,
pub recorded_at: String,
pub total_return: f64,
pub excess_return: f64,
pub sharpe: Option<f64>,
pub max_drawdown: f64,
pub trades: u32,
pub win_rate: Option<f64>,
pub profit_factor: Option<f64>,
pub stale: Option<bool>,
}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.
One finding in a side-by-side comparison.
Fields§
§id: String§subject: String§kind: String§strategy_name: String§verdict: String§recorded_at: String§total_return: f64§excess_return: f64§sharpe: Option<f64>§max_drawdown: f64§trades: u32§win_rate: Option<f64>§profit_factor: Option<f64>§stale: Option<bool>Whether the data behind it has changed since it was recorded.
Implementations§
Source§impl ComparisonRowView
impl ComparisonRowView
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 win_rate(&self) -> f64
pub fn win_rate(&self) -> f64
Returns the value of win_rate, or the default value if win_rate is unset.
Sourcepub fn profit_factor(&self) -> f64
pub fn profit_factor(&self) -> f64
Returns the value of profit_factor, or the default value if profit_factor is unset.
Trait Implementations§
Source§impl Clone for ComparisonRowView
impl Clone for ComparisonRowView
Source§impl Debug for ComparisonRowView
impl Debug for ComparisonRowView
Source§impl Default for ComparisonRowView
impl Default for ComparisonRowView
Source§impl<'de> Deserialize<'de> for ComparisonRowView
impl<'de> Deserialize<'de> for ComparisonRowView
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
Source§impl Message for ComparisonRowView
impl Message for ComparisonRowView
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
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,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
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,
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
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,
Decodes a length-delimited instance of the message from the buffer.
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,
Decodes an instance of the message from a buffer, and merges it into
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,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for ComparisonRowView
impl PartialEq for ComparisonRowView
Source§impl Serialize for ComparisonRowView
impl Serialize for ComparisonRowView
impl StructuralPartialEq for ComparisonRowView
Auto Trait Implementations§
impl Freeze for ComparisonRowView
impl RefUnwindSafe for ComparisonRowView
impl Send for ComparisonRowView
impl Sync for ComparisonRowView
impl Unpin for ComparisonRowView
impl UnsafeUnpin for ComparisonRowView
impl UnwindSafe for ComparisonRowView
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