| | |
| | | |
| | | print(f"\n{Color.BOLD}【功能说明】{Color.ENDC}") |
| | | print(" 数据更新用于获取最新的股票市场数据") |
| | | print(" • 支持多种数据源:AKShare、BaoStock") |
| | | print(" • 支持多种数据源:AKShare、BaoStock、腾讯行情") |
| | | print(" • 自动计算技术因子指标") |
| | | print(" • 自动运行增强因子系统") |
| | | print(" • 支持增量更新") |
| | |
| | | print("2. 使用本地模拟数据(仅测试用)") |
| | | print("3. 从AKShare在线获取(需要网络)") |
| | | print("4. 仅重新计算因子(不更新数据)⭐新增") |
| | | print("5. 仅补充北交所历史数据") |
| | | print("0. 返回") |
| | | |
| | | choice = input("\n请选择 (0-4): ").strip() |
| | | choice = input("\n请选择 (0-5): ").strip() |
| | | |
| | | if choice == '1': |
| | | result = fetch_real_data() |
| | |
| | | return result |
| | | elif choice == '4': |
| | | return run_enhanced_factor_system() |
| | | elif choice == '5': |
| | | result = run_script( |
| | | 'data_update_v2.py', |
| | | "补充北交所历史数据并合并现有数据", |
| | | args=['--bse-only', '--n-stocks', 'all'], |
| | | ) |
| | | if result: |
| | | print_info("北交所数据补充完成,正在运行增强因子系统...") |
| | | run_enhanced_factor_system() |
| | | return result |
| | | |
| | | def fetch_real_data(): |
| | | """获取真实数据""" |