[][src]Struct investments::broker_statement::BrokerStatement

pub struct BrokerStatement {
    pub broker: BrokerInfo,
    pub period: (Date, Date),
    pub cash_assets: MultiCurrencyCashAccount,
    pub historical_cash_assets: BTreeMap<Date, MultiCurrencyCashAccount>,
    pub fees: Vec<Fee>,
    pub cash_flows: Vec<CashAssets>,
    pub idle_cash_interest: Vec<IdleCashInterest>,
    pub forex_trades: Vec<ForexTrade>,
    pub stock_buys: Vec<StockBuy>,
    pub stock_sells: Vec<StockSell>,
    pub dividends: Vec<Dividend>,
    pub stock_splits: StockSplitController,
    pub open_positions: HashMap<String, Decimal>,
    // some fields omitted
}

Fields

broker: BrokerInfoperiod: (Date, Date)cash_assets: MultiCurrencyCashAccounthistorical_cash_assets: BTreeMap<Date, MultiCurrencyCashAccount>fees: Vec<Fee>cash_flows: Vec<CashAssets>idle_cash_interest: Vec<IdleCashInterest>forex_trades: Vec<ForexTrade>stock_buys: Vec<StockBuy>stock_sells: Vec<StockSell>dividends: Vec<Dividend>stock_splits: StockSplitControlleropen_positions: HashMap<String, Decimal>

Implementations

impl BrokerStatement[src]

pub fn read(
    broker: BrokerInfo,
    statement_dir_path: &str,
    symbol_remapping: &HashMap<String, String>,
    instrument_names: &HashMap<String, String>,
    tax_remapping: TaxRemapping,
    strict_mode: bool
) -> GenericResult<BrokerStatement>
[src]

pub fn last_date(&self) -> Date[src]

pub fn check_date(&self)[src]

pub fn check_period_against_tax_year(&self, year: i32) -> EmptyResult[src]

pub fn get_instrument_name(&self, symbol: &str) -> String[src]

pub fn batch_quotes(&self, quotes: &Quotes)[src]

pub fn emulate_sell(
    &mut self,
    symbol: &str,
    quantity: Decimal,
    price: Cash,
    commission_calc: &mut CommissionCalc
) -> EmptyResult
[src]

pub fn emulate_commissions(
    &mut self,
    commission_calc: CommissionCalc
) -> MultiCurrencyCashAccount
[src]

pub fn process_trades(&mut self) -> EmptyResult[src]

pub fn merge_symbols(
    &mut self,
    symbols_to_merge: &HashMap<String, HashSet<String>>
) -> EmptyResult
[src]

Trait Implementations

impl Debug for BrokerStatement[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoSql for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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