fix: 重评算不出RR时保留原值(rr_ratio清零bug,300668教训)
This commit is contained in:
@@ -2083,7 +2083,7 @@ def reassess_with_context(code, name, price, cost, shares, current_action,
|
||||
fundamentals=fund,
|
||||
news_sentiment=news_sentiment,
|
||||
portfolio_context=_get_portfolio_risk_state(),
|
||||
rr_ratio=result.get("rr_ratio", 0),
|
||||
rr_ratio=(result.get("rr_ratio") or 0),
|
||||
market_regime=market_regime,
|
||||
)
|
||||
result["timing_signal"] = enriched
|
||||
@@ -2444,7 +2444,7 @@ def regenerate_all(stdout=True):
|
||||
is_new_entry=(source == "watchlist"),
|
||||
fundamentals=fund,
|
||||
news_sentiment=news_sentiment,
|
||||
rr_ratio=result.get("rr_ratio", 0),
|
||||
rr_ratio=(result.get("rr_ratio") or 0),
|
||||
market_regime=(market_regime_hk if (market_regime_hk and _mkt_of(code) == 'hk') else market_regime),
|
||||
)
|
||||
result["timing_signal"] = enriched
|
||||
|
||||
Reference in New Issue
Block a user