refactor stock pool selection order and set default to 沪深300

This commit is contained in:
Your Name 2025-10-08 12:00:12 +08:00
parent 8f74525875
commit 8f7738d8b4
2 changed files with 13 additions and 5 deletions

View File

@ -370,10 +370,17 @@ def _check_data_availability(
) )
return False return False
return ( # 获取收盘价数据并做最终检查
bool(basic_data.get("daily.close")) and close_price = latest_fields.get("daily.close")
len(close_check) >= min_days 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( def _detect_and_handle_outliers(

View File

@ -83,7 +83,8 @@ def render_stock_evaluation() -> None:
st.markdown("##### 股票池范围") st.markdown("##### 股票池范围")
pool_type = st.radio( pool_type = st.radio(
"选择股票池", "选择股票池",
["全部A股", "沪深300", "中证500", "中证1000", "自定义"], ["沪深300", "中证500", "中证1000", "全部A股", "自定义"],
index=0, # 默认选择沪深300
horizontal=True horizontal=True
) )