original_docstring: Determine how much inventory goods to sell based on market conditions
docstring: Determine how much inventory goods to sell based on market conditions
docstring_tokens: Determine how much inventory goods to sell based on market conditions
code: def determine_sell_quantity(self, good):
          "Determine how much inventory goods to sell based on market conditions"
          mean = self.market.avg_historial_price(good, 15)
          trading_range = self.trading_range_extremes(good)
  
          favoribility = position_in_range(mean, trading_range.low, trading_range.high)
          amount_to_sell = round(favoribility * self.inventory.surplus(good))
          if amount_to_sell < 1:
              amount_to_sell = 1
          return amount_to_sell
code_tokens: def determine_sell_quantity ( self , good ) : mean = self . market . avg_historial_price ( good , 15 ) trading_range = self . trading_range_extremes ( good ) favoribility = position_in_range ( mean , trading_range . low , trading_range . high ) amount_to_sell = round ( favoribility * self . inventory . surplus ( good ) ) if amount_to_sell < 1 : amount_to_sell = 1 return amount_to_sell
short_docstring: Determine how much inventory goods to sell based on market conditions
short_docstring_tokens: Determine how much inventory goods to sell based on market conditions
comment: "Determine how much inventory goods to sell based on market conditions"