use crate::{core::instrument::Instrument, time::date::Date};
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Side {
PayShort,
LongReceive,
}
impl Side {
#[must_use]
pub const fn sign(&self) -> f64 {
match self {
Self::PayShort => -1.0,
Self::LongReceive => 1.0,
}
}
}
pub trait Trade<I: Instrument>: Send + Sync {
fn instrument(&self) -> &I;
fn trade_date(&self) -> Date;
fn side(&self) -> Side;
}