class_docstr: Single-asset order execution (SAOE) simulator which is implemented based on Qlib backtest tools.
  
  Parameters
  ----------
  order
      The seed to start an SAOE simulator is an order.
  executor_config
      Executor configuration
  exchange_config
      Exchange configuration
  qlib_config
      Configuration used to initialize Qlib. If it is None, Qlib will not be initialized.
  cash_limit:
      Cash limit.
class_docstr_tok: ["Single-asset","order","execution","(","SAOE",")","simulator","which","is","implemented","based","on","Qlib","backtest","tools",".","Parameters","--","--","--","--","--","order","The","seed","to","start","an","SAOE","simulator","is","an","order",".","executor_config","Executor","configuration","exchange_config","Exchange","configuration","qlib_config","Configuration","used","to","initialize","Qlib",".","If","it","is","None",",","Qlib","will","not","be","initialized",".","cash_limit",":","Cash","limit","."]
docstr: Iterate the _collect_data_loop until we get the next yield SAOEStrategy.
docstr_tok: ["Iterate","the","_collect_data_loop","until","we","get","the","next","yield","SAOEStrategy","."]
code: def _iter_strategy(
      self, action: Optional[float] = None
  ) -> SAOEStrategy:
      """Iterate the _collect_data_loop until we get the next yield SAOEStrategy."""
      assert self._collect_data_loop is not None
  
      obj = (
          next(self._collect_data_loop)
          if action is None
          else self._collect_data_loop.send(action)
      )
      while not isinstance(obj, SAOEStrategy):
          if isinstance(obj, BaseTradeDecision):
              self.decisions.append(obj)
          obj = (
              next(self._collect_data_loop)
              if action is None
              else self._collect_data_loop.send(action)
          )
      assert isinstance(obj, SAOEStrategy)
      return obj
  
file_path: qlib/qlib/rl/order_execution/simulator_qlib.py
imports: from __future__ import annotations
  from typing import Generator, List, Optional
  import pandas
  from qlib.backtest import collect_data_loop, get_strategy_executor
  from qlib.backtest.decision import BaseTradeDecision, Order, TradeRangeByTime
  from qlib.backtest.executor import NestedExecutor
  from qlib.rl.data.integration import init_qlib
  from qlib.rl.simulator import Simulator
  from .state import SAOEState
  from .strategy import SAOEStateAdapter, SAOEStrategy
label_desc: Use image node_id 5 for calling the SingleAssetOrderExecution obj's underlying member method code with example usage: obj._iter_strategy(action) and returns: obj