class_docstr: Backtest data for simple simulator
class_docstr_tok: ["Backtest","data","for","simple","simulator"]
code: def __init__(
      self,
      data_dir: Path | str,
      stock_id: str,
      date: pd.Timestamp,
      deal_price: DealPriceType = "close",
      order_dir: int | None = None,
  ) -> None:
      super(SimpleIntradayBacktestData, self).__init__()
  
      backtest = _read_pickle(
          (data_dir if isinstance(data_dir, Path) else Path(data_dir))
          / stock_id
      )
      backtest = backtest.loc[pd.IndexSlice[stock_id, :, date]]
  
      # No longer need for pandas >= 1.4
      # backtest = backtest.droplevel([0, 2])
  
      self.data: pd.DataFrame = backtest
      self.deal_price_type: DealPriceType = deal_price
      self.order_dir = order_dir
  
imports: from __future__ import annotations
  from functools import lru_cache
  from pathlib import Path
  from typing import List, Sequence, cast
  import cachetools
  import numpy
  import pandas
  from cachetools.keys import hashkey
  from qlib.backtest.decision import Order, OrderDir
  from qlib.rl.data.base import BaseIntradayBacktestData, BaseIntradayProcessedData, ProcessedDataProvider
  from qlib.typehint import Literal
label_desc: Use image node_id 1 to create a new SimpleIntradayBacktestData object from inherited base classes: BaseIntradayBacktestData with example: obj = SimpleIntradayBacktestData(data_dir, stock_id, date, deal_price, order_dir)