apple_quant_algorithmic/instrument/kind.rs
1#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
2pub enum InstrumentKind {
3 Future,
4 FutureOption,
5 Equity,
6 EquityOption,
7 ETF,
8 ETFOption,
9}
10
11impl InstrumentKind {
12 pub fn as_str(&self) -> &'static str {
13 match self {
14 Self::Future => "FUT",
15 Self::FutureOption => "FUT_OPT",
16 Self::Equity => "EQ",
17 Self::EquityOption => "EQ_OPT",
18 Self::ETF => "ETF",
19 Self::ETFOption => "ETF_OPT",
20 }
21 }
22}