Struct GreeksData

Source
pub struct GreeksData {
Show 20 fields pub ts_init: UnixNanos, pub ts_event: UnixNanos, pub instrument_id: InstrumentId, pub is_call: bool, pub strike: f64, pub expiry: i32, pub expiry_in_years: f64, pub multiplier: f64, pub quantity: f64, pub underlying_price: f64, pub interest_rate: f64, pub cost_of_carry: f64, pub vol: f64, pub pnl: f64, pub price: f64, pub delta: f64, pub gamma: f64, pub vega: f64, pub theta: f64, pub itm_prob: f64,
}

Fields§

§ts_init: UnixNanos§ts_event: UnixNanos§instrument_id: InstrumentId§is_call: bool§strike: f64§expiry: i32§expiry_in_years: f64§multiplier: f64§quantity: f64§underlying_price: f64§interest_rate: f64§cost_of_carry: f64§vol: f64§pnl: f64§price: f64§delta: f64§gamma: f64§vega: f64§theta: f64§itm_prob: f64

Implementations§

Source§

impl GreeksData

Source

pub fn new( ts_init: UnixNanos, ts_event: UnixNanos, instrument_id: InstrumentId, is_call: bool, strike: f64, expiry: i32, expiry_in_years: f64, multiplier: f64, quantity: f64, underlying_price: f64, interest_rate: f64, cost_of_carry: f64, vol: f64, pnl: f64, price: f64, delta: f64, gamma: f64, vega: f64, theta: f64, itm_prob: f64, ) -> Self

Source

pub fn from_delta( instrument_id: InstrumentId, delta: f64, multiplier: f64, ts_event: UnixNanos, ) -> Self

Trait Implementations§

Source§

impl Clone for GreeksData

Source§

fn clone(&self) -> GreeksData

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GreeksData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GreeksData

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for GreeksData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<GreeksData> for PortfolioGreeks

Source§

fn from(greeks: GreeksData) -> Self

Converts to this type from the input type.
Source§

impl GetTsInit for GreeksData

Source§

impl Mul<&GreeksData> for f64

Source§

type Output = GreeksData

The resulting type after applying the * operator.
Source§

fn mul(self, greeks: &GreeksData) -> GreeksData

Performs the * operation. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Separable for T
where T: Display,

Source§

fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String

Adds separators according to the given SeparatorPolicy. Read more
Source§

fn separate_with_commas(&self) -> String

Inserts a comma every three digits from the right. Read more
Source§

fn separate_with_spaces(&self) -> String

Inserts a space every three digits from the right. Read more
Source§

fn separate_with_dots(&self) -> String

Inserts a period every three digits from the right. Read more
Source§

fn separate_with_underscores(&self) -> String

Inserts an underscore every three digits from the right. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> Ungil for T
where T: Send,