class_docstr: Trade decisions are made by strategy and executed by executor
  
  Motivation:
      Here are several typical scenarios for `BaseTradeDecision`
  
      Case 1:
      1. Outer strategy makes a decision. The decision is not available at the start of current interval
      2. After a period of time, the decision are updated and become available
      3. The inner strategy try to get the decision and start to execute the decision according to `get_range_limit`
      Case 2:
      1. The outer strategy's decision is available at the start of the interval
      2. Same as `case 1.3`
class_docstr_tok: ["Trade","decisions","are","made","by","strategy","and","executed","by","executor","Motivation",":","Here","are","several","typical","scenarios","for","`","BaseTradeDecision","`","Case","1",":","1",".","Outer","strategy","makes","a","decision",".","The","decision","is","not","available","at","the","start","of","current","interval","2",".","After","a","period","of","time",",","the","decision","are","updated","and","become","available","3",".","The","inner","strategy","try","to","get","the","decision","and","start","to","execute","the","decision","according","to","`","get_range_limit","`","Case","2",":","1",".","The","outer","strategy","'s","decision","is","available","at","the","start","of","the","interval","2",".","Same","as","`","case","1.3","`"]
docstr: Be called at the **start** of each step.
  
  This function is design for following purpose
  1) Leave a hook for the strategy who make `self` decision to update the decision itself
  2) Update some information from the inner executor calendar
  
  Parameters
  ----------
  trade_calendar : TradeCalendarManager
      The calendar of the **inner strategy**!!!!!
  
  Returns
  -------
  BaseTradeDecision:
      New update, use new decision. If no updates, return None (use previous decision (or unavailable))
code: def update(
      self, trade_calendar: TradeCalendarManager
  ) -> Optional[BaseTradeDecision]:
      """
      Be called at the **start** of each step.
  
      This function is design for following purpose
      1) Leave a hook for the strategy who make `self` decision to update the decision itself
      2) Update some information from the inner executor calendar
  
      Parameters
      ----------
      trade_calendar : TradeCalendarManager
          The calendar of the **inner strategy**!!!!!
  
      Returns
      -------
      BaseTradeDecision:
          New update, use new decision. If no updates, return None (use previous decision (or unavailable))
      """
      # purpose 1)
      self.total_step = trade_calendar.get_trade_len()
  
      # purpose 2)
      return self.strategy.update_trade_decision(self, trade_calendar)
  
imports: from __future__ import annotations
  from abc import abstractmethod
  from datetime import time
  from enum import IntEnum
  from typing import TYPE_CHECKING, Any, ClassVar, Generic, List, Optional, Tuple, TypeVar, Union, cast
  from qlib.backtest.utils import TradeCalendarManager
  from qlib.data.data import Cal
  from qlib.log import get_module_logger
  from qlib.utils.time import concat_date_time, epsilon_change
  from dataclasses import dataclass
  import numpy
  import pandas
label_desc: Use image node_id 3 for calling the BaseTradeDecision obj's underlying member method code with example usage: obj.update(trade_calendar) and returns: self