Enum DeltaQuote
pub enum DeltaQuote {
Put(f64),
Atm,
Call(f64),
}Expand description
Where a node sits on a delta-quoted smile: the option the market names
and the delta it names it at. Spelled as the market does — 25P is the
25-delta put, ATM the delta-neutral straddle, 25C the 25-delta call.
Two quotes are the same quote when they name the same option at the same delta to the basis point, so a quote is a usable key.
Variants§
Put(f64)
A put at this unsigned delta, in (0, 1).
Atm
The delta-neutral at-the-money straddle.
Call(f64)
A call at this unsigned delta, in (0, 1).
Implementations§
§impl DeltaQuote
impl DeltaQuote
fn key(self) -> (u8, i64)
fn key(self) -> (u8, i64)
The comparable form: the side, then the delta in basis points signed so that the order runs from the lowest strike to the highest — deep puts, nearer puts, ATM, nearer calls, deep calls.
pub fn signed_delta(self) -> Option<f64>
pub fn signed_delta(self) -> Option<f64>
The signed delta the quote names — puts negative — None at the
money.
fn is_well_formed(self) -> bool
Trait Implementations§
§impl Clone for DeltaQuote
impl Clone for DeltaQuote
§fn clone(&self) -> DeltaQuote
fn clone(&self) -> DeltaQuote
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DeltaQuote
§impl Debug for DeltaQuote
impl Debug for DeltaQuote
§impl Display for DeltaQuote
impl Display for DeltaQuote
impl Eq for DeltaQuote
§impl FromStr for DeltaQuote
impl FromStr for DeltaQuote
§impl Hash for DeltaQuote
impl Hash for DeltaQuote
§impl Ord for DeltaQuote
impl Ord for DeltaQuote
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
§impl PartialEq for DeltaQuote
impl PartialEq for DeltaQuote
Auto Trait Implementations§
impl Freeze for DeltaQuote
impl RefUnwindSafe for DeltaQuote
impl Send for DeltaQuote
impl Sync for DeltaQuote
impl Unpin for DeltaQuote
impl UnsafeUnpin for DeltaQuote
impl UnwindSafe for DeltaQuote
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