class_docstr: The financial simulations in catalyst depend on information
  about the benchmark index and the risk free rates of return.
  The benchmark index defines the benchmark returns used in
  the calculation of performance metrics such as alpha/beta. Many
  components, including risk, performance, transforms, and
  batch_transforms, need access to a calendar of trading days and
  market hours. The TradingEnvironment maintains two time keeping
  facilities:
    - a DatetimeIndex of trading days for calendar calculations
    - a timezone name, which should be local to the exchange
      hosting the benchmark index. All dates are normalized to UTC
      for serialization and storage, and the timezone is used to
     ensure proper rollover through daylight savings and so on.
  
  User code will not normally need to use TradingEnvironment
  directly. If you are extending catalyst's core financial
  components and need to use the environment, you must import the module and
  build a new TradingEnvironment object, then pass that TradingEnvironment as
  the 'env' arg to your TradingAlgorithm.
  
  Parameters
  ----------
  load : callable, optional
      The function that returns benchmark returns and treasury curves.
      The treasury curves are expected to be a DataFrame with an index of
      dates and columns of the curve names, e.g. '10year', '1month', etc.
  bm_symbol : str, optional
      The benchmark symbol
  exchange_tz : tz-coercable, optional
      The timezone of the exchange.
  trading_calendar : TradingCalendar, optional
      The trading calendar to work with in this environment.
  asset_db_path : str or sa.engine.Engine, optional
      The path to the assets db or sqlalchemy Engine object to use to
      construct an AssetFinder.
class_docstr_tok: ["The","financial","simulations","in","catalyst","depend","on","information","about","the","benchmark","index","and","the","risk","free","rates","of","return",".","The","benchmark","index","defines","the","benchmark","returns","used","in","the","calculation","of","performance","metrics","such","as","alpha\/beta",".","Many","components",",","including","risk",",","performance",",","transforms",",","and","batch_transforms",",","need","access","to","a","calendar","of","trading","days","and","market","hours",".","The","TradingEnvironment","maintains","two","time","keeping","facilities",":","-","a","DatetimeIndex","of","trading","days","for","calendar","calculations","-","a","timezone","name",",","which","should","be","local","to","the","exchange","hosting","the","benchmark","index",".","All","dates","are","normalized","to","UTC","for","serialization","and","storage",",","and","the","timezone","is","used","to","ensure","proper","rollover","through","daylight","savings","and","so","on",".","User","code","will","not","normally","need","to","use","TradingEnvironment","directly",".","If","you","are","extending","catalyst","'s","core","financial","components","and","need","to","use","the","environment",",","you","must","import","the","module","and","build","a","new","TradingEnvironment","object",",","then","pass","that","TradingEnvironment","as","the","'env","'","arg","to","your","TradingAlgorithm",".","Parameters","--","--","--","--","--","load",":","callable",",","optional","The","function","that","returns","benchmark","returns","and","treasury","curves",".","The","treasury","curves","are","expected","to","be","a","DataFrame","with","an","index","of","dates","and","columns","of","the","curve","names",",","e.g",".","'10year","'",",","'1month","'",",","etc",".","bm_symbol",":","str",",","optional","The","benchmark","symbol","exchange_tz",":","tz-coercable",",","optional","The","timezone","of","the","exchange",".","trading_calendar",":","TradingCalendar",",","optional","The","trading","calendar","to","work","with","in","this","environment",".","asset_db_path",":","str","or","sa.engine.Engine",",","optional","The","path","to","the","assets","db","or","sqlalchemy","Engine","object","to","use","to","construct","an","AssetFinder","."]
docstr: Write data into the asset_db.
  
  Parameters
  ----------
  **kwargs
      Forwarded to AssetDBWriter.write
docstr_tok: ["Write","data","into","the","asset_db",".","Parameters","--","--","--","--","--","*","*","kwargs","Forwarded","to","AssetDBWriter.write"]
code: def write_data(self, **kwargs):
      """Write data into the asset_db.
  
      Parameters
      ----------
      **kwargs
          Forwarded to AssetDBWriter.write
      """
      AssetDBWriter(self.engine).write(**kwargs)
  
imports: from functools import partial
  import logbook
  import pandas
  from pandas.tslib import normalize_date
  from six import string_types
  from sqlalchemy import create_engine
  from catalyst.assets import AssetDBWriter, AssetFinder
  from catalyst.assets.continuous_futures import CHAIN_PREDICATES
  from catalyst.data.loader import load_market_data
  from catalyst.utils.calendars import get_calendar
  from catalyst.utils.memoize import remember_last
  from catalyst.constants import LOG_LEVEL
label_desc: Use image node_id 2 for calling the TradingEnvironment obj's underlying member method code with example usage: obj.write_data() without return types