class_docstr: The ledger tracks all orders and transactions as well as the current
  state of the portfolio and positions.
  
  Attributes
  ----------
  portfolio : zipline.protocol.Portfolio
      The updated portfolio being managed.
  account : zipline.protocol.Account
      The updated account being managed.
  position_tracker : PositionTracker
      The current set of positions.
  todays_returns : float
      The current day's returns. In minute emission mode, this is the partial
      day's returns. In daily emission mode, this is
      ``daily_returns[session]``.
  daily_returns_series : pd.Series
      The daily returns series. Days that have not yet finished will hold
      a value of ``np.nan``.
  daily_returns_array : np.ndarray
      The daily returns as an ndarray. Days that have not yet finished will
      hold a value of ``np.nan``.
class_docstr_tok: ["The","ledger","tracks","all","orders","and","transactions","as","well","as","the","current","state","of","the","portfolio","and","positions",".","Attributes","--","--","--","--","--","portfolio",":","zipline.protocol.Portfolio","The","updated","portfolio","being","managed",".","account",":","zipline.protocol.Account","The","updated","account","being","managed",".","position_tracker",":","PositionTracker","The","current","set","of","positions",".","todays_returns",":","float","The","current","day","'s","returns",".","In","minute","emission","mode",",","this","is","the","partial","day","'s","returns",".","In","daily","emission","mode",",","this","is","``","daily_returns","[","session","]","``",".","daily_returns_series",":","pd.Series","The","daily","returns","series",".","Days","that","have","not","yet","finished","will","hold","a","value","of","``","np.nan","``",".","daily_returns_array",":","np.ndarray","The","daily","returns","as","an","ndarray",".","Days","that","have","not","yet","finished","will","hold","a","value","of","``","np.nan","``","."]
docstr: Compute the current portfolio.
  
  Notes
  -----
  This is cached, repeated access will not recompute the portfolio until
  the portfolio may have changed.
docstr_tok: ["Compute","the","current","portfolio",".","Notes","--","--","-","This","is","cached",",","repeated","access","will","not","recompute","the","portfolio","until","the","portfolio","may","have","changed","."]
code: def portfolio(self):
      """Compute the current portfolio.
  
      Notes
      -----
      This is cached, repeated access will not recompute the portfolio until
      the portfolio may have changed.
      """
      self.update_portfolio()
      return self._immutable_portfolio
  
imports: from __future__ import division
  from collections import namedtuple, OrderedDict
  from functools import partial
  from math import isnan
  import logbook
  import numpy
  import pandas
  from six import iteritems, itervalues, PY2
  from zipline.assets import Future
  from zipline.finance.transaction import Transaction
  import zipline.protocol
  from zipline.utils.sentinel import sentinel
  from .position import Position
  from ._finance_ext import PositionStats, calculate_position_tracker_stats, update_position_last_sale_prices
label_desc: Use image node_id 23 for calling the Ledger obj's underlying member method code with example usage: obj.portfolio() and returns: self