refactor stock pool selection order and set default to 沪深300
This commit is contained in:
parent
8f74525875
commit
8f7738d8b4
@ -370,10 +370,17 @@ def _check_data_availability(
|
||||
)
|
||||
return False
|
||||
|
||||
return (
|
||||
bool(basic_data.get("daily.close")) and
|
||||
len(close_check) >= min_days
|
||||
)
|
||||
# 获取收盘价数据并做最终检查
|
||||
close_price = latest_fields.get("daily.close")
|
||||
if close_price is None or float(close_price) <= 0:
|
||||
LOGGER.debug(
|
||||
"收盘价数据无效 ts_code=%s date=%s price=%s",
|
||||
ts_code, trade_date, close_price,
|
||||
extra=LOG_EXTRA
|
||||
)
|
||||
return False
|
||||
|
||||
return True # 所有检查都通过
|
||||
|
||||
|
||||
def _detect_and_handle_outliers(
|
||||
|
||||
@ -83,7 +83,8 @@ def render_stock_evaluation() -> None:
|
||||
st.markdown("##### 股票池范围")
|
||||
pool_type = st.radio(
|
||||
"选择股票池",
|
||||
["全部A股", "沪深300", "中证500", "中证1000", "自定义"],
|
||||
["沪深300", "中证500", "中证1000", "全部A股", "自定义"],
|
||||
index=0, # 默认选择沪深300
|
||||
horizontal=True
|
||||
)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user