apple-quant-algorithmic 0.4.0

Apple Quant's algorithmic library.
Documentation
use crate::{
	volume::{DirectionlessVolume, RestingVolume},
	instrument::InstrumentSpec,
};

use super::AbsolutePrice;

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct PriceVolumeLevel<IS: InstrumentSpec> {
	pub price: AbsolutePrice<IS>,
	pub resting_volume: RestingVolume<IS>,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct BidPriceVolumeLevel<IS: InstrumentSpec> {
	pub price: AbsolutePrice<IS>,

	/// Total volume as transactions.
	pub directionless_volume: DirectionlessVolume<IS>,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct AskPriceVolumeLevel<IS: InstrumentSpec> {
	pub price: AbsolutePrice<IS>,

	/// Total volume as transactions.
	pub directionless_volume: DirectionlessVolume<IS>,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct BidAskPriceSpread<IS: InstrumentSpec> {
	pub bid_price: AbsolutePrice<IS>,
	pub ask_price: AbsolutePrice<IS>,
}