diff --git a/app/features/factors.py b/app/features/factors.py index 9378305..619d1ed 100644 --- a/app/features/factors.py +++ b/app/features/factors.py @@ -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( diff --git a/app/ui/views/stock_eval.py b/app/ui/views/stock_eval.py index dbfbc99..5574d7c 100644 --- a/app/ui/views/stock_eval.py +++ b/app/ui/views/stock_eval.py @@ -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 )