Commit 92cd4d49 authored by 纪超's avatar 纪超

去除警告

parent 9e7d4cec
...@@ -34,7 +34,7 @@ class CurveDrift(BaseRebalanceSignal): ...@@ -34,7 +34,7 @@ class CurveDrift(BaseRebalanceSignal):
normal_weight = round(sum([x[1] for x in normal_portfolio.items() if x[0] in datum_ids]), 2) normal_weight = round(sum([x[1] for x in normal_portfolio.items() if x[0] in datum_ids]), 2)
hold_portfolio = self._hold.get_portfolios_weight(day, risk) hold_portfolio = self._hold.get_portfolios_weight(day, risk)
hold_weight = round(sum([x[1] for x in hold_portfolio.items() if x[0] in datum_ids]), 2) hold_weight = round(sum([x[1] for x in hold_portfolio.items() if x[0] in datum_ids]), 2)
return normal_weight - hold_weight >= self._solver.get_drift(day, risk) # TODO 左边应该加绝对值 return normal_weight - hold_weight >= self._solver.get_drift(day, risk) # TODO 左边应该加绝对值
@property @property
def signal_type(self) -> SignalType: def signal_type(self) -> SignalType:
......
...@@ -48,7 +48,7 @@ class HighBuySignal(BaseRebalanceSignal): ...@@ -48,7 +48,7 @@ class HighBuySignal(BaseRebalanceSignal):
class LowBuySignal(HighBuySignal): class LowBuySignal(HighBuySignal):
@property @property
def include_last_type(self): # TODO 回头看看要不要假如drift买入 def include_last_type(self): # TODO 回头看看要不要假如drift买入
return [ return [
SignalType.CRISIS_ONE, SignalType.CRISIS_ONE,
SignalType.CRISIS_TWO, SignalType.CRISIS_TWO,
......
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