class_docstr: Signal With pandas with based Cache
  SignalWCache will store the prepared signal as a attribute and give the according signal based on input query
class_docstr_tok: ["Signal","With","pandas","with","based","Cache","SignalWCache","will","store","the","prepared","signal","as","a","attribute","and","give","the","according","signal","based","on","input","query"]
docstr: Parameters
  ----------
  signal : Union[pd.Series, pd.DataFrame]
      The expected format of the signal is like the data below (the order of index is not important and can be
      automatically adjusted)
  
          instrument datetime
          SH600000   2008-01-02  0.079704
                     2008-01-03  0.120125
                     2008-01-04  0.878860
                     2008-01-07  0.505539
                     2008-01-08  0.395004
docstr_tok: ["Parameters","--","--","--","--","--","signal",":","Union","[","pd.Series",",","pd.DataFrame","]","The","expected","format","of","the","signal","is","like","the","data","below","(","the","order","of","index","is","not","important","and","can","be","automatically","adjusted",")","instrument","datetime","SH600000","2008-01-02","0.079704","2008-01-03","0.120125","2008-01-04","0.878860","2008-01-07","0.505539","2008-01-08","0.395004"]
code: def __init__(self, signal: Union[pd.Series, pd.DataFrame]) -> None:
      """
  
      Parameters
      ----------
      signal : Union[pd.Series, pd.DataFrame]
          The expected format of the signal is like the data below (the order of index is not important and can be
          automatically adjusted)
  
              instrument datetime
              SH600000   2008-01-02  0.079704
                         2008-01-03  0.120125
                         2008-01-04  0.878860
                         2008-01-07  0.505539
                         2008-01-08  0.395004
      """
      self.signal_cache = convert_index_format(signal, level="datetime")
  
file_path: qlib/qlib/backtest/signal.py
imports: import abc
  from typing import Dict, List, Text, Tuple, Union
  import pandas
  from qlib.utils import init_instance_by_config
  from ..data.dataset import Dataset
  from ..data.dataset.utils import convert_index_format
  from ..model.base import BaseModel
  from ..utils.resam import resam_ts_data
label_desc: Use image node_id 1 to create a new SignalWCache object from inherited base classes: Signal with example: obj = SignalWCache(signal)