class_docstr: The correctness of the metrics of Account in nested execution depends on the shallow copy of `trade_account` in
  qlib/backtest/executor.py:NestedExecutor
  Different level of executor has different Account object when calculating metrics. But the position object is
  shared cross all the Account object.
docstr: the trade account of backtest.
  
  Parameters
  ----------
  init_cash : float, optional
      initial cash, by default 1e9
  position_dict : Dict[
                      stock_id,
                      Union[
                          int,  # it is equal to {"amount": int}
                          {"amount": int, "price"(optional): float},
                      ]
                  ]
      initial stocks with parameters amount and price,
      if there is no price key in the dict of stocks, it will be filled by _fill_stock_value.
      by default {}.
docstr_tok: ["the","trade","account","of","backtest",".","Parameters","--","--","--","--","--","init_cash",":","float",",","optional","initial","cash",",","by","default","1e9","position_dict",":","Dict","[","stock_id",",","Union","[","int",",","#","it","is","equal","to","{","``","amount","''",":","int","}","{","``","amount","''",":","int",",","``","price","''","(","optional",")",":","float","}",",","]","]","initial","stocks","with","parameters","amount","and","price",",","if","there","is","no","price","key","in","the","dict","of","stocks",",","it","will","be","filled","by","_fill_stock_value",".","by","default","{","}","."]
code: def __init__(
      self,
      init_cash: float = 1e9,
      position_dict: dict = {},
      freq: str = "day",
      benchmark_config: dict = {},
      pos_type: str = "Position",
      port_metr_enabled: bool = True,
  ) -> None:
      """the trade account of backtest.
  
      Parameters
      ----------
      init_cash : float, optional
          initial cash, by default 1e9
      position_dict : Dict[
                          stock_id,
                          Union[
                              int,  # it is equal to {"amount": int}
                              {"amount": int, "price"(optional): float},
                          ]
                      ]
          initial stocks with parameters amount and price,
          if there is no price key in the dict of stocks, it will be filled by _fill_stock_value.
          by default {}.
      """
  
      self._pos_type = pos_type
      self._port_metr_enabled = port_metr_enabled
      self.benchmark_config: dict = {}  # avoid no attribute error
      self.init_vars(init_cash, position_dict, freq, benchmark_config)
  
imports: from __future__ import annotations
  import copy
  from typing import Dict, List, Optional, Tuple, cast
  import pandas
  from qlib.utils import init_instance_by_config
  from .decision import BaseTradeDecision, Order
  from .exchange import Exchange
  from .high_performance_ds import BaseOrderIndicator
  from .position import BasePosition
  from .report import Indicator, PortfolioMetrics
label_desc: Use image node_id 1 to create a new Account object  with example: obj = Account(init_cash, position_dict, freq, benchmark_config, pos_type, port_metr_enabled)