class_docstr: Object providing read-only access to current portfolio state.
  
  Parameters
  ----------
  start_date : pd.Timestamp
      The start date for the period being recorded.
  capital_base : float
      The starting value for the portfolio. This will be used as the starting
      cash, current cash, and portfolio value.
  
  Attributes
  ----------
  positions : zipline.protocol.Positions
      Dict-like object containing information about currently-held positions.
  cash : float
      Amount of cash currently held in portfolio.
  portfolio_value : float
      Current liquidation value of the portfolio's holdings.
      This is equal to ``cash + sum(shares * price)``
  starting_cash : float
      Amount of cash in the portfolio at the start of the backtest.
class_docstr_tok: ["Object","providing","read-only","access","to","current","portfolio","state",".","Parameters","--","--","--","--","--","start_date",":","pd.Timestamp","The","start","date","for","the","period","being","recorded",".","capital_base",":","float","The","starting","value","for","the","portfolio",".","This","will","be","used","as","the","starting","cash",",","current","cash",",","and","portfolio","value",".","Attributes","--","--","--","--","--","positions",":","zipline.protocol.Positions","Dict-like","object","containing","information","about","currently-held","positions",".","cash",":","float","Amount","of","cash","currently","held","in","portfolio",".","portfolio_value",":","float","Current","liquidation","value","of","the","portfolio","'s","holdings",".","This","is","equal","to","``","cash","+","sum","(","shares","*","price",")","``","starting_cash",":","float","Amount","of","cash","in","the","portfolio","at","the","start","of","the","backtest","."]
docstr: Compute each asset's weight in the portfolio by calculating its held
  value divided by the total value of all positions.
  
  Each equity's value is its price times the number of shares held. Each
  futures contract's value is its unit price times number of shares held
  times the multiplier.
docstr_tok: ["Compute","each","asset","'s","weight","in","the","portfolio","by","calculating","its","held","value","divided","by","the","total","value","of","all","positions",".","Each","equity","'s","value","is","its","price","times","the","number","of","shares","held",".","Each","futures","contract","'s","value","is","its","unit","price","times","number","of","shares","held","times","the","multiplier","."]
code: def current_portfolio_weights(self):
      """
      Compute each asset's weight in the portfolio by calculating its held
      value divided by the total value of all positions.
  
      Each equity's value is its price times the number of shares held. Each
      futures contract's value is its unit price times number of shares held
      times the multiplier.
      """
      position_values = pd.Series(
          {
              asset: (
                  position.last_sale_price
                  * position.amount
                  * asset.price_multiplier
              )
              for asset, position in self.positions.items()
          }
      )
      return position_values / self.portfolio_value
  
imports: from warnings import warn
  import pandas
  from .assets import Asset
  from .utils.enum import enum
  from ._protocol import BarData, InnerPosition
label_desc: Use image node_id 5 for calling the Portfolio obj's underlying member method code with example usage: obj.current_portfolio_weights() and returns: unknown