original_docstring: 
          Calculate total market value according to all current positions.
          NOTE for now this func only support stocks.
  
          Parameters
          ----------
          ref_prices : dict of {symbol: price}
              The prices we refer to to get symbol price.
          suspensions : list of securities
              Securities that are suspended.
  
          Returns
          -------
          market_value : float
  
          
docstring: Calculate total market value according to all current positions.
  NOTE for now this func only support stocks.
  
  Parameters
  
  ref_prices : dict of {symbol: price}
  The prices we refer to to get symbol price.
  suspensions : list of securities
  Securities that are suspended.
  
  Returns
  
  
docstring_tokens: Calculate total market value according to all current positions . NOTE for now this func only support stocks . Parameters ref_prices : dict of { symbol : price } The prices we refer to to get symbol price . suspensions : list of securities Securities that are suspended . Returns
code: def market_value(self, ref_prices, suspensions=None):
          """
          Calculate total market value according to all current positions.
          NOTE for now this func only support stocks.
  
          Parameters
          ----------
          ref_prices : dict of {symbol: price}
              The prices we refer to to get symbol price.
          suspensions : list of securities
              Securities that are suspended.
  
          Returns
          -------
          market_value : float
  
          """
          # TODO some securities could not be able to be traded
          if suspensions is None:
              suspensions = []
          
          market_value_float = 0.0
          market_value_frozen = 0.0  # suspended or high/low limit
          for sec in self.holding_securities:
              size = self.get_position(sec).current_size
              # TODO PortfolioManager object should not access price
              price = ref_prices[sec]
              mv_sec = price * size
              if sec in suspensions:
                  market_value_frozen += mv_sec
              else:
                  market_value_float += mv_sec
          
          return market_value_float, market_value_frozen
code_tokens: def market_value ( self , ref_prices , suspensions = None ) : if suspensions is None : suspensions = [ ] market_value_float = 0.0 market_value_frozen = 0.0 for sec in self . holding_securities : size = self . get_position ( sec ) . current_size price = ref_prices [ sec ] mv_sec = price * size if sec in suspensions : market_value_frozen += mv_sec else : market_value_float += mv_sec return market_value_float , market_value_frozen
short_docstring: Calculate total market value according to all current positions.
short_docstring_tokens: Calculate total market value according to all current positions .
comment: """
          Calculate total market value according to all current positions.
          NOTE for now this func only support stocks.
  
          Parameters
          ----------
          ref_prices : dict of {symbol: price}
              The prices we refer to to get symbol price.
          suspensions : list of securities
              Securities that are suspended.
  
          Returns
          -------
          market_value : float
  
          """$SEP$# TODO some securities could not be able to be traded$SEP$# suspended or high/low limit$SEP$# TODO PortfolioManager object should not access price