各位大神 PositionHolding 这个是干嘛用的,做股票量化 这个需要用到吗?
class PositionHolding:
""""""
def __init__(self, contract: ContractData):
""""""
self.vt_symbol: str = contract.vt_symbol
self.exchange: Exchange = contract.exchange
self.active_orders: Dict[str, OrderData] = {}
self.long_pos: float = 0
self.long_yd: float = 0
self.long_td: float = 0
self.short_pos: float = 0
self.short_yd: float = 0
self.short_td: float = 0
self.long_pos_frozen: float = 0
self.long_yd_frozen: float = 0
self.long_td_frozen: float = 0
self.short_pos_frozen: float = 0
self.short_yd_frozen: float = 0
self.short_td_frozen: float = 0