pub struct Divergence {
pub fills: u32,
pub unfilled: u32,
pub mean_slippage_bps: f64,
pub worst_slippage_bps: f64,
pub mean_latency_ms: f64,
pub worst_latency_ms: i64,
pub assumed_slippage_bps: Option<f64>,
}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.
Measured against assumed, over a session’s fills so far (#18).
Fields§
§fills: u32§unfilled: u32Approved orders that never filled. Never averaged into the slippage: a backtest assumes every order fills, so this has nothing to compare to.
mean_slippage_bps: f64Mean adverse slippage across the fills, in basis points; positive is worse than the decision price, whichever way the order went.
worst_slippage_bps: f64§mean_latency_ms: f64Signal to fill.
worst_latency_ms: i64§assumed_slippage_bps: Option<f64>What the finding’s cost model assumed, so the difference is readable.
Implementations§
Source§impl Divergence
impl Divergence
Sourcepub fn assumed_slippage_bps(&self) -> f64
pub fn assumed_slippage_bps(&self) -> f64
Returns the value of assumed_slippage_bps, or the default value if assumed_slippage_bps is unset.
Trait Implementations§
Source§impl Clone for Divergence
impl Clone for Divergence
impl Copy for Divergence
Source§impl Debug for Divergence
impl Debug for Divergence
Source§impl Default for Divergence
impl Default for Divergence
Source§impl<'de> Deserialize<'de> for Divergence
impl<'de> Deserialize<'de> for Divergence
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 Divergence
impl Message for Divergence
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 Divergence
impl PartialEq for Divergence
Source§impl Serialize for Divergence
impl Serialize for Divergence
impl StructuralPartialEq for Divergence
Auto Trait Implementations§
impl Freeze for Divergence
impl RefUnwindSafe for Divergence
impl Send for Divergence
impl Sync for Divergence
impl Unpin for Divergence
impl UnsafeUnpin for Divergence
impl UnwindSafe for Divergence
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