input: Write a python function to predict the future value of stocks based on given parameters.
  assert isinstance(predict_stock_value({'market_condition': 'bullish', 'news': 'positive', 'historical_data': [100, 105, 102, 108]}), float)
  assert predict_stock_value({'market_condition': 'bearish', 'news': 'negative', 'historical_data': [200, 195, 190, 185]}) > 0
  assert predict_stock_value({'market_condition': 'stable', 'news': 'neutral', 'historical_data': [150, 155, 160, 158]}) != None
output: def predict_stock_value(params):
      market_condition = params.get('market_condition')
      news = params.get('news')
      historical_data = params.get('historical_data')
      
      if not historical_data or not isinstance(historical_data, list) or not all(isinstance(i, (int, float)) for i in historical_data):
          raise ValueError("Invalid historical data")
      
      # Basic weight settings
      market_weight = 0.5
      news_weight = 0.3
      historical_weight = 0.2
      
      # Market condition impact
      if market_condition == 'bullish':
          market_impact = 1.1
      elif market_condition == 'bearish':
          market_impact = 0.9
      else: # stable or any other conditions
          market_impact = 1.0
      
      # News impact
      if news == 'positive':
          news_impact = 1.05
      elif news == 'negative':
          news_impact = 0.95
      else: # neutral or any other news
          news_impact = 1.0
      
      # Historical data impact
      historical_avg = sum(historical_data) / len(historical_data)
      
      # Predict future value
      future_value = (historical_avg * historical_weight) + \
                     (historical_avg * market_weight * market_impact) + \
                     (historical_avg * news_weight * news_impact)
      
      return future_value