Commit a5e8402b authored by jichao's avatar jichao

定版

parent 3e1d3c87
...@@ -37,7 +37,7 @@ class MarketRight(BaseRebalanceSignal): ...@@ -37,7 +37,7 @@ class MarketRight(BaseRebalanceSignal):
return self._config['cvar-min-volume'] return self._config['cvar-min-volume']
@property @property
def include_last_type(self): def exclude_last_type(self):
return [ return [
SignalType.CRISIS_ONE, SignalType.CRISIS_ONE,
SignalType.CRISIS_TWO, SignalType.CRISIS_TWO,
...@@ -47,7 +47,7 @@ class MarketRight(BaseRebalanceSignal): ...@@ -47,7 +47,7 @@ class MarketRight(BaseRebalanceSignal):
def is_trigger(self, day, risk: PortfoliosRisk) -> bool: def is_trigger(self, day, risk: PortfoliosRisk) -> bool:
last_re = rrs.get_last_one(risk=risk, max_date=day, effective=True) last_re = rrs.get_last_one(risk=risk, max_date=day, effective=True)
if last_re is not None and SignalType(last_re['type']) in self.include_last_type: if last_re is not None and SignalType(last_re['type']) in self.exclude_last_type:
return False return False
spx = self.load_spx_close_rtns(day) spx = self.load_spx_close_rtns(day)
if spx[-1]['rtn'] > self.min_threshold: if spx[-1]['rtn'] > self.min_threshold:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment