fix(HEL-356): restore intraday turnover context
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -541,6 +541,13 @@ class ShenwanIndustryMixin:
|
||||
for item in valid:
|
||||
capital = capital_map.get(str(item.get("ts_code") or ""), {})
|
||||
float_share = _number(capital.get("float_share"))
|
||||
previous = _number(
|
||||
item.get("pre_close")
|
||||
if item.get("pre_close") not in (None, "")
|
||||
else item.get("previous_close")
|
||||
)
|
||||
if not float_share and previous:
|
||||
float_share = _number(capital.get("circ_mv")) / previous
|
||||
volume = _number(item.get("vol"))
|
||||
if float_share and volume:
|
||||
# 免费源成交量为股;daily_basic.float_share 为万股。
|
||||
@@ -549,6 +556,13 @@ class ShenwanIndustryMixin:
|
||||
for item in market_rows:
|
||||
capital = capital_map.get(str(item.get("ts_code") or ""), {})
|
||||
float_share = _number(capital.get("float_share"))
|
||||
previous = _number(
|
||||
item.get("pre_close")
|
||||
if item.get("pre_close") not in (None, "")
|
||||
else item.get("previous_close")
|
||||
)
|
||||
if not float_share and previous:
|
||||
float_share = _number(capital.get("circ_mv")) / previous
|
||||
volume = _number(item.get("vol"))
|
||||
if float_share and volume:
|
||||
market_turnovers.append(volume / float_share / 100)
|
||||
|
||||
Reference in New Issue
Block a user