pub struct OptionInstrumentPair {
pub call: Option<OptionInstrument>,
pub put: Option<OptionInstrument>,
}Expand description
A pair of option instruments representing both call and put options for the same underlying asset
This structure groups together the call and put options for a specific underlying asset, allowing for easy access to both sides of an option strategy. Both options are optional, meaning you can have just a call, just a put, or both.
Fields§
§call: Option<OptionInstrument>Call option instrument data, if available
put: Option<OptionInstrument>Put option instrument data, if available
Implementations§
Source§impl OptionInstrumentPair
impl OptionInstrumentPair
pub fn expiration(&self) -> Option<DateTime<Utc>>
pub fn instrument(&self) -> Option<Instrument>
pub fn ticker(&self) -> Option<TickerData>
pub fn volume(&self) -> f64
pub fn open_interest(&self) -> f64
pub fn interest_rate(&self) -> f64
pub fn value(&self) -> Option<Value>
pub fn call_spread(&self) -> Spread
pub fn put_spread(&self) -> Spread
pub fn iv(&self) -> (Option<f64>, Option<f64>)
pub fn greeks(&self) -> BasicGreeks
pub fn data(&self) -> BasicOptionData
Trait Implementations§
Source§impl Clone for OptionInstrumentPair
impl Clone for OptionInstrumentPair
Source§fn clone(&self) -> OptionInstrumentPair
fn clone(&self) -> OptionInstrumentPair
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OptionInstrumentPair
impl Debug for OptionInstrumentPair
Source§impl<'de> Deserialize<'de> for OptionInstrumentPair
impl<'de> Deserialize<'de> for OptionInstrumentPair
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 Display for OptionInstrumentPair
impl Display for OptionInstrumentPair
Auto Trait Implementations§
impl Freeze for OptionInstrumentPair
impl RefUnwindSafe for OptionInstrumentPair
impl Send for OptionInstrumentPair
impl Sync for OptionInstrumentPair
impl Unpin for OptionInstrumentPair
impl UnwindSafe for OptionInstrumentPair
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