self.portfolio_value#
- property Strategy.portfolio_value
Returns the last portfolio value (cash + positions value) reported by the broker. Does not query the broker for an updated value. To get the current broker value, use self.get_portfolio_value().
Returns the portfolio value of positions plus cash in US dollars.
Crypto markets will attempt to resove to US dollars as a quote currency.
- Returns:
portfolio_value – The current portfolio value. Includes the actual values of shares held by the current strategy plus the total cash.
- Return type:
float
Example
>>> # Get the last seen portfolio value >>> self.log_message(self.portfolio_value)