stock-trek 0.4.13

Stock Trek time-series analysis
Documentation
1
2
3
4
5
6
7
8
9
10
11
use digdigdig3::{Asset, ExchangeId};

pub type Portfolio = Box<dyn PortfolioTrait>;

pub trait PortfolioTrait {
    fn has_account_in_exchange(&self, exchange: &ExchangeId) -> bool;
    fn owns_asset(&self, asset: &Asset) -> bool;
    fn owns_asset_in_exchange(&self, asset: &Asset, exchange: &ExchangeId) -> bool;
    fn asset_total(&self, asset: &Asset) -> f64;
    fn asset_in_exchange(&self, asset: &Asset, exchange: &ExchangeId) -> f64;
}