code: def initialize(context):
      # This initialize function sets any data or variables that you'll use in
      # your algorithm.  For instance, you'll want to define the trading pair (or
      # trading pairs) you want to backtest.  You'll also want to define any
      # parameters or values you're going to use.
  
      # In our example, we're looking at Neo in Ether.
      df = get_dataset("testmarketcap2")  # type: pd.DataFrame
  
      # Picking a specific date in our DataFrame
      first_dt = df.index.get_level_values(0)[0]
      # Since we use a MultiIndex with date / symbol, picking a date will
      # result in a new DataFrame for the selected date with a single
      # symbol index
      df = df.xs(first_dt, level=0)
      # Keep only the top coins by market cap
      df = df.loc[
          df["market_cap_usd"].isin(df["market_cap_usd"].nlargest(100))
      ]
  
      set_print_settings()
  
      df.sort_values(
          by=["market_cap_usd"], ascending=True, inplace=True
      )
      print("the marketplace data:\n{}".format(df))
  
      # Pick the 5 assets with the lowest market cap for trading
      quote_currency = "eth"
      exchange = context.exchanges[next(iter(context.exchanges))]
      symbols = [
          a.symbol
          for a in exchange.assets
          if a.start_date < context.datetime
      ]
      context.assets = []
      for currency, price in df["market_cap_usd"].iteritems():
          if len(context.assets) >= 5:
              break
  
          s = "{}_{}".format(currency.decode("utf-8"), quote_currency)
          if s in symbols:
              context.assets.append(symbol(s))
  
      context.base_price = None
      context.current_day = None
  
      context.RSI_OVERSOLD = 55
      context.RSI_OVERBOUGHT = 60
      context.CANDLE_SIZE = "5T"
  
      context.start_time = time.time()
  
file_path: catalyst/catalyst/examples/marketplace/mean_reversion_by_marketcap.py
imports: import os
  import tempfile
  import time
  import pandas
  import talib
  from logbook import Logger
  from catalyst import run_algorithm
  from catalyst.api import symbol, record, order_target_percent, get_dataset
  from catalyst.exchange.utils.stats_utils import set_print_settings, get_pretty_stats
  from catalyst.utils.paths import ensure_directory
label_desc: Use image node_id 1 for calling a global function with example usage: initialize(context) without return types