Position

class czsc.objects.Position(symbol: str, events: List[Event], hold_a: float = 0.5, hold_b: float = 0.8, hold_c: float = 1.0, min_interval: Optional[int] = None, cost: float = 0.003, T0: bool = False)[source]

Bases: object

Attributes Summary

pos

返回状态对应的仓位

Methods Summary

update(s)

更新持仓状态

Attributes Documentation

pos

返回状态对应的仓位

Methods Documentation

update(s: dict)[source]

更新持仓状态

Parameters

s – 最新信号字典

Returns