def update_params(self, params): JPRule.update_params(self, params) self.period = params.get('period', 10) self.rate = params.get('rate', 1) self.value = params.get('value', 0) self.start = params.get('start_date', [11, 15]) self.end = params.get('end_date', [12, 30])
def update_params(self, params): JPRule.update_params(self, params) self.day = params.get('day', 60) # 默认两个月 self.trading_day = params.get('trading_day', 44) # 默认两个月 self.dir = params.get('dir', None) self.percentage = params.get('percentage', 10) pass
def __init__(self, params): JPRule.__init__(self, params) self.day = params.get('day', -1) # 默认两个月 self.trading_day = params.get('trading_day', 44) # 默认两个月 self.dir = params.get('dir') self.percentage = params.get('percentage', 10) pass
def update_params(self, params): JPRule.update_params(self, params) self.buy_min_money = params.get('buy_min_money', 10000) self.benchmark = params.get('benchmark', '000300.XSHG') self.slippage = params.get('slippage', {}) self.slip_value = self.slippage.get('value', 0.04) self.slip_type = self.slippage.get('type', JPSlippageType.fixed) pass
def update_params(self, params): JPRule.update_params(self, params) self.time = params.get('time', self.time) pass
def __init__(self, params): JPRule.__init__(self, params) # 配置调仓时间 times为二维数组,示例[[10,30],[14,30]] 表示 10:30和14:30分调仓 self.time = params.get('time', [])
def __init__(self, params): JPRule.__init__(self, params)
def update_params(self, params): JPRule.update_params(self, params) self.is_send_message = params.get('is_send_message', False) pass
def update_params(self, params): JPRule.__init__(self, params) self.index = params.get('index', ['000010.XSHG', '399678.XSHE']) self.min_rate = params.get('min_rate', [0.6, 0.6]) self.period = params.get('period', 20) self.smart = params.get('smart', False)
def update_params(self, params): JPRule.update_params(self, params) self.index = params.get('index', '000001.XSHG') self.period = params.get('period', 160) self.multiple = params.get('multiple', 2.2) self.is_clear_position = False
def update_params(self, params): JPRule.update_params(self, params) self.reset_params(params)
def __init__(self, params): JPRule.__init__(self, params) self.reset_params(params)
def update_params(self, params): JPRule.update_params(self, params) self.is_limit_up = params.get('is_limit_up', True) pass
def __init__(self, params): JPRule.__init__(self, params) self.is_limit_up = params.get('is_limit_up', True) pass
def __init__(self, params): JPRule.__init__(self, params) self.n = params.get('day') self.p = params.get('rate') pass
def __init__(self, params): JPRule.__init__(self, params) # 调仓日计数器,单位:日 self.period = params.get('period', 3) self.hold_days = 0
def update_params(self, params): JPRule.update_params(self, params) self.period = params.get('period', self.period)
def before(self): JPRule.after(self) pass
def __init__(self, params): JPRule.__init__(self, params) self.is_send_message = params.get('is_send_message', False) pass
def __init__(self, params): JPRule.__init__(self, params) self.gain_rate = params.get('gain_rate', 0) self.loss_rate = params.get('loss_rate', 0) self.black_day = params.get('black_day', 10)
def __init__(self, params): JPRule.__init__(self, params) self.op_sell_stocks = [] self.op_buy_stocks = []
def update_params(self, params): JPRule.update_params(self, params) self.gain_rate = params.get('gain_rate', 0) self.loss_rate = params.get('loss_rate', 0) self.black_day = params.get('black_day', 10)