pub struct Costs {
pub spread_frac: f64,
pub min_spread_of_spot: f64,
pub commission_of_spot: f64,
}Expand description
Trading costs per share, per leg, per side.
Histories are dividend-adjusted, so a 2003 share of AAPL “costs” $0.30. Fixed-cent costs would be absurd on that scale, so every cost is a fraction of either the option’s price or the stock’s price. The defaults match a $100 stock: a 1-cent (ETF) or 3-cent (single stock) minimum half-spread and $0.65 per contract.
Fields§
§spread_frac: f64Half-spread as a fraction of the option’s price.
min_spread_of_spot: f64Minimum half-spread as a fraction of the stock price.
commission_of_spot: f64Commission per share as a fraction of the stock price.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Costs
impl RefUnwindSafe for Costs
impl Send for Costs
impl Sync for Costs
impl Unpin for Costs
impl UnsafeUnpin for Costs
impl UnwindSafe for Costs
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