from enum import IntEnum


class StopType(IntEnum):
    """止盈/止损类型"""

    NOTSTOP = 0  # 不止盈/止损
    TAKEPROFIT = 1  # 止盈
    STOPLOSS = 2  # 止损


class RebalanceType(IntEnum):
    """调仓类型"""

    TRADEDAY = 0  # 每交易日
    WEEKDAY = 1  # 每星期


class RotationType(IntEnum):
    """换仓类型"""

    BCSC = 1  # buy on close; sell on close 收盘换仓
    BNOSNO = 2  # buy on next open; sell on next open 次日开盘换仓
    BNCBNO = 3  # buy on next close; sell on next close 次日收盘换仓
