class_docstr: Base strategy for trading
class_docstr_tok: ["Base","strategy","for","trading"]
docstr: Parameters
  ----------
  outer_trade_decision : BaseTradeDecision, optional
      the trade decision of outer strategy which this strategy relies, and it will be traded in
      [start_time, end_time], by default None
  
      - If the strategy is used to split trade decision, it will be used
      - If the strategy is used for portfolio management, it can be ignored
  level_infra : LevelInfrastructure, optional
      level shared infrastructure for backtesting, including trade calendar
  common_infra : CommonInfrastructure, optional
      common infrastructure for backtesting, including trade_account, trade_exchange, .etc
  
  trade_exchange : Exchange
      exchange that provides market info, used to deal order and generate report
  
      - If `trade_exchange` is None, self.trade_exchange will be set with common_infra
      - It allows different trade_exchanges is used in different executions.
      - For example:
  
          - In daily execution, both daily exchange and minutely are usable, but the daily exchange is
            recommended because it run faster.
          - In minutely execution, the daily exchange is not usable, only the minutely exchange is recommended.
docstr_tok: ["Parameters","--","--","--","--","--","outer_trade_decision",":","BaseTradeDecision",",","optional","the","trade","decision","of","outer","strategy","which","this","strategy","relies",",","and","it","will","be","traded","in","[","start_time",",","end_time","]",",","by","default","None","-","If","the","strategy","is","used","to","split","trade","decision",",","it","will","be","used","-","If","the","strategy","is","used","for","portfolio","management",",","it","can","be","ignored","level_infra",":","LevelInfrastructure",",","optional","level","shared","infrastructure","for","backtesting",",","including","trade","calendar","common_infra",":","CommonInfrastructure",",","optional","common","infrastructure","for","backtesting",",","including","trade_account",",","trade_exchange",",",".etc","trade_exchange",":","Exchange","exchange","that","provides","market","info",",","used","to","deal","order","and","generate","report","-","If","`","trade_exchange","`","is","None",",","self.trade_exchange","will","be","set","with","common_infra","-","It","allows","different","trade_exchanges","is","used","in","different","executions",".","-","For","example",":","-","In","daily","execution",",","both","daily","exchange","and","minutely","are","usable",",","but","the","daily","exchange","is","recommended","because","it","run","faster",".","-","In","minutely","execution",",","the","daily","exchange","is","not","usable",",","only","the","minutely","exchange","is","recommended","."]
code: def __init__(
      self,
      outer_trade_decision: BaseTradeDecision = None,
      level_infra: LevelInfrastructure = None,
      common_infra: CommonInfrastructure = None,
      trade_exchange: Exchange = None,
  ) -> None:
      """
      Parameters
      ----------
      outer_trade_decision : BaseTradeDecision, optional
          the trade decision of outer strategy which this strategy relies, and it will be traded in
          [start_time, end_time], by default None
  
          - If the strategy is used to split trade decision, it will be used
          - If the strategy is used for portfolio management, it can be ignored
      level_infra : LevelInfrastructure, optional
          level shared infrastructure for backtesting, including trade calendar
      common_infra : CommonInfrastructure, optional
          common infrastructure for backtesting, including trade_account, trade_exchange, .etc
  
      trade_exchange : Exchange
          exchange that provides market info, used to deal order and generate report
  
          - If `trade_exchange` is None, self.trade_exchange will be set with common_infra
          - It allows different trade_exchanges is used in different executions.
          - For example:
  
              - In daily execution, both daily exchange and minutely are usable, but the daily exchange is
                recommended because it run faster.
              - In minutely execution, the daily exchange is not usable, only the minutely exchange is recommended.
      """
  
      self._reset(
          level_infra=level_infra,
          common_infra=common_infra,
          outer_trade_decision=outer_trade_decision,
      )
      self._trade_exchange = trade_exchange
  
imports: from __future__ import annotations
  from abc import ABCMeta, abstractmethod
  from typing import Any, Generator, Optional, TYPE_CHECKING, Union
  from typing import Tuple
  from ..backtest.decision import BaseTradeDecision
  from ..backtest.utils import CommonInfrastructure, LevelInfrastructure, TradeCalendarManager
  from ..rl.interpreter import ActionInterpreter, StateInterpreter
  from ..utils import init_instance_by_config
label_desc: Use image node_id 1 to create a new BaseStrategy object  with example: obj = BaseStrategy(outer_trade_decision, level_infra, common_infra, trade_exchange)