fund-cli 3.1.0__tar.gz → 3.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fund_cli-3.4.0/CHANGELOG.md +273 -0
- fund_cli-3.4.0/CLAUDE.md +102 -0
- fund_cli-3.4.0/CLAUDE_CODE_RESEARCH.md +1096 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/PKG-INFO +20 -2
- fund_cli-3.4.0/PYPI_TRUSTED_PUBLISHING.md +82 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/README.md +19 -1
- {fund_cli-3.1.0 → fund_cli-3.4.0}/pyproject.toml +1 -1
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/__init__.py +1 -1
- fund_cli-3.4.0/src/fund_cli/ai/__init__.py +166 -0
- fund_cli-3.4.0/src/fund_cli/ai/advisor.py +507 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/ai/agent.py +13 -48
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/ai/analyzer.py +6 -6
- fund_cli-3.4.0/src/fund_cli/ai/fund_selector.py +633 -0
- fund_cli-3.4.0/src/fund_cli/ai/market_analyst.py +695 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/ai/memory.py +1 -3
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/ai/nodes.py +10 -17
- fund_cli-3.4.0/src/fund_cli/ai/portfolio_doctor.py +610 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/ai/providers.py +1 -1
- fund_cli-3.4.0/src/fund_cli/ai/recommender.py +506 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/ai/tools.py +909 -640
- fund_cli-3.4.0/src/fund_cli/ai/user_profile.py +616 -0
- fund_cli-3.4.0/src/fund_cli/analysis/__init__.py +99 -0
- fund_cli-3.4.0/src/fund_cli/analysis/market_sentiment.py +682 -0
- fund_cli-3.4.0/src/fund_cli/analysis/money_flow.py +635 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/analysis/performance.py +24 -0
- fund_cli-3.4.0/src/fund_cli/analysis/risk_budget.py +639 -0
- fund_cli-3.4.0/src/fund_cli/analysis/scenario_analysis.py +643 -0
- fund_cli-3.4.0/src/fund_cli/analysis/sector_rotation.py +360 -0
- fund_cli-3.4.0/src/fund_cli/analysis/stress_test.py +576 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/cli.py +3 -0
- fund_cli-3.4.0/src/fund_cli/commands/ai_cmd.py +1114 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/commands/analyze_cmd.py +342 -3
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/commands/config_cmd.py +10 -2
- fund_cli-3.4.0/src/fund_cli/commands/report_cmd.py +202 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/config.py +29 -1
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/ai_analyzer.py +44 -15
- fund_cli-3.4.0/src/fund_cli/core/ai_validator.py +142 -0
- fund_cli-3.4.0/src/fund_cli/core/audit_logger.py +185 -0
- fund_cli-3.4.0/src/fund_cli/core/calc_validator.py +185 -0
- fund_cli-3.4.0/src/fund_cli/core/cross_validator.py +162 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/data_gateway.py +38 -23
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/data_manager.py +47 -24
- fund_cli-3.4.0/src/fund_cli/core/data_quality.py +414 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/monitor.py +167 -7
- fund_cli-3.4.0/src/fund_cli/core/quality_gate.py +118 -0
- fund_cli-3.4.0/src/fund_cli/core/report_validator.py +131 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/reporter.py +1 -1
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/reporters/__init__.py +2 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/reporters/docx_reporter.py +26 -14
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/reporters/html_reporter.py +23 -2
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/reporters/markdown_reporter.py +8 -1
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/reporters/pdf_reporter.py +13 -5
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/reporters/pptx_reporter.py +30 -6
- fund_cli-3.4.0/src/fund_cli/core/reporters/risk_control_reporter.py +264 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/template_engine.py +76 -13
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/data/adapters/__init__.py +11 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/data/adapters/akshare_adapter.py +5 -9
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/data/adapters/mixins.py +6 -18
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/data/adapters/tushare_adapter.py +28 -21
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/data/adapters/wind_adapter.py +2 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/data/base.py +9 -18
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/data/cache.py +49 -3
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/data/normalizer.py +51 -6
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/mcp/__init__.py +2 -2
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/mcp/server.py +20 -44
- fund_cli-3.4.0/src/fund_cli/utils/decorators.py +125 -0
- fund_cli-3.4.0/src/fund_cli/utils/validators.py +139 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/views/reports.py +6 -6
- fund_cli-3.4.0/tests/integration/test_end_to_end.py +131 -0
- fund_cli-3.4.0/tests/unit/test_ai/test_advisor.py +228 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_ai/test_agent.py +2 -2
- fund_cli-3.4.0/tests/unit/test_ai/test_analyzer.py +261 -0
- fund_cli-3.4.0/tests/unit/test_ai/test_fund_selector.py +252 -0
- fund_cli-3.4.0/tests/unit/test_ai/test_market_analyst.py +292 -0
- fund_cli-3.4.0/tests/unit/test_ai/test_portfolio_doctor.py +248 -0
- fund_cli-3.4.0/tests/unit/test_ai/test_recommender.py +142 -0
- fund_cli-3.4.0/tests/unit/test_ai/test_tools.py +71 -0
- fund_cli-3.4.0/tests/unit/test_ai/test_user_profile.py +137 -0
- fund_cli-3.4.0/tests/unit/test_analysis/test_market_sentiment.py +169 -0
- fund_cli-3.4.0/tests/unit/test_analysis/test_money_flow.py +144 -0
- fund_cli-3.4.0/tests/unit/test_analysis/test_risk_budget.py +318 -0
- fund_cli-3.4.0/tests/unit/test_analysis/test_scenario_analysis.py +295 -0
- fund_cli-3.4.0/tests/unit/test_analysis/test_sector_rotation.py +117 -0
- fund_cli-3.4.0/tests/unit/test_analysis/test_stress_test.py +199 -0
- fund_cli-3.4.0/tests/unit/test_cli.py +232 -0
- fund_cli-3.4.0/tests/unit/test_commands/test_ai_cmd.py +288 -0
- fund_cli-3.4.0/tests/unit/test_commands/test_analyze_cmd.py +194 -0
- fund_cli-3.4.0/tests/unit/test_commands/test_compare_cmd.py +239 -0
- fund_cli-3.4.0/tests/unit/test_commands/test_holding_cmd.py +293 -0
- fund_cli-3.4.0/tests/unit/test_commands/test_interactive_cmd.py +40 -0
- fund_cli-3.4.0/tests/unit/test_commands/test_main.py +62 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_commands/test_report_cmd.py +129 -23
- fund_cli-3.4.0/tests/unit/test_core/test_ai_validator.py +103 -0
- fund_cli-3.4.0/tests/unit/test_core/test_audit_logger.py +116 -0
- fund_cli-3.4.0/tests/unit/test_core/test_calc_validator.py +125 -0
- fund_cli-3.4.0/tests/unit/test_core/test_cross_validator.py +109 -0
- fund_cli-3.4.0/tests/unit/test_core/test_monitor.py +248 -0
- fund_cli-3.4.0/tests/unit/test_core/test_quality_gate.py +92 -0
- fund_cli-3.4.0/tests/unit/test_core/test_report_validator.py +130 -0
- fund_cli-3.4.0/tests/unit/test_core/test_risk_control_reporter.py +254 -0
- fund_cli-3.4.0/tests/unit/test_core/test_risk_parity.py +117 -0
- fund_cli-3.4.0//345/220/210/350/247/204/351/243/216/346/216/247/350/264/250/346/243/200/346/267/261/345/272/246/350/260/203/347/240/224/346/212/245/345/221/212.docx +0 -0
- fund_cli-3.4.0//346/225/260/346/215/256/350/264/250/351/207/217/351/243/216/351/231/251/346/262/273/347/220/206/346/267/261/345/272/246/350/260/203/347/240/224/346/212/245/345/221/212.docx +0 -0
- fund_cli-3.1.0/CHANGELOG.md +0 -97
- fund_cli-3.1.0/src/fund_cli/ai/__init__.py +0 -46
- fund_cli-3.1.0/src/fund_cli/analysis/__init__.py +0 -17
- fund_cli-3.1.0/src/fund_cli/commands/ai_cmd.py +0 -594
- fund_cli-3.1.0/src/fund_cli/commands/report_cmd.py +0 -86
- fund_cli-3.1.0/src/fund_cli/core/data_quality.py +0 -162
- fund_cli-3.1.0/src/fund_cli/utils/decorators.py +0 -90
- fund_cli-3.1.0/src/fund_cli/utils/validators.py +0 -77
- fund_cli-3.1.0/tests/integration/test_end_to_end.py +0 -1430
- fund_cli-3.1.0/tests/unit/test_ai/test_analyzer.py +0 -740
- fund_cli-3.1.0/tests/unit/test_ai/test_tools.py +0 -1152
- fund_cli-3.1.0/tests/unit/test_commands/test_analyze_cmd.py +0 -502
- fund_cli-3.1.0/tests/unit/test_commands/test_cli.py +0 -104
- fund_cli-3.1.0/tests/unit/test_commands/test_compare_cmd.py +0 -336
- fund_cli-3.1.0/tests/unit/test_commands/test_holding_cmd.py +0 -30
- fund_cli-3.1.0/tests/unit/test_core/test_monitor.py +0 -122
- {fund_cli-3.1.0 → fund_cli-3.4.0}/.env.example +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/.gitignore +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/.pre-commit-config.yaml +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/.trae/documents/documentation-verification-plan.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/CODE_OF_CONDUCT.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/CONTRIBUTING.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/Dockerfile +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/LICENSE +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/Makefile +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/SECURITY.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/comparison_report.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docker-compose.yml +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/api/ai.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/api/analysis.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/api/core.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/api/data.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/api/optimizers.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/api/reference.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/api/reporters.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/contributing.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/development.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/index.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/installation.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/usage/ai-analysis.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/usage/analysis.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/usage/comparison.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/usage/filter-and-data.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/usage/holding-and-manager.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/usage/index.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/usage/interactive.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/usage/monitoring.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/usage/optimization.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/docs/usage/report-generation.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/examples/basic_analysis.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/examples/batch_processing.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/examples/portfolio_optimization.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/mkdocs.yml +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/report_market_flow_portfolio.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/report_portfolio_portfolio.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/report_risk_control_portfolio.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/report_single_fund_000001.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/report_single_fund_000001.md +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/404.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/api/ai/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/api/analysis/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/api/core/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/api/data/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/api/optimizers/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/api/reference/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/api/reporters/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/_mkdocstrings.css +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/images/favicon.png +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/bundle.79ae519e.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/bundle.79ae519e.min.js.map +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.ar.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.da.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.de.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.du.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.el.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.es.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.fi.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.fr.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.he.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.hi.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.hu.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.hy.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.it.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.ja.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.jp.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.kn.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.ko.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.multi.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.nl.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.no.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.pt.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.ro.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.ru.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.sa.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.stemmer.support.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.sv.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.ta.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.te.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.th.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.tr.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.vi.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/min/lunr.zh.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/tinyseg.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/lunr/wordcut.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/workers/search.2c215733.min.js +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/javascripts/workers/search.2c215733.min.js.map +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/stylesheets/main.484c7ddc.min.css +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/stylesheets/main.484c7ddc.min.css.map +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/stylesheets/palette.ab4e12ef.min.css +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/assets/stylesheets/palette.ab4e12ef.min.css.map +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/contributing/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/development/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/installation/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/objects.inv +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/search/search_index.json +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/sitemap.xml +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/sitemap.xml.gz +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/usage/ai-analysis/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/usage/analysis/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/usage/comparison/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/usage/filter-and-data/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/usage/holding-and-manager/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/usage/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/usage/interactive/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/usage/monitoring/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/usage/optimization/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/site/usage/report-generation/index.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/__main__.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/ai/prompts.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/ai/state.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/analysis/attribution.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/analysis/backtest.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/analysis/holding.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/analysis/manager.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/analysis/portfolio.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/analysis/risk.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/commands/__init__.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/commands/compare_cmd.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/commands/data_cmd.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/commands/filter_cmd.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/commands/holding_cmd.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/commands/interactive_cmd.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/commands/main.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/commands/manager_cmd.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/commands/monitor_cmd.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/commands/optimize_cmd.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/__init__.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/analyzer.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/optimizer.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/optimizers/__init__.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/optimizers/efficient_frontier.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/optimizers/max_sharpe.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/optimizers/mean_variance.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/optimizers/risk_parity.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/core/screener.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/data/__init__.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/data/models.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/templates/base.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/templates/market_flow/report.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/templates/portfolio/report.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/templates/risk_control/report.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/templates/single_fund/report.html +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/utils/__init__.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/utils/helpers.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/views/__init__.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/views/charts.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/src/fund_cli/views/tables.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/test_mvp.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/__init__.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/conftest.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/fixtures/sample_data.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/integration/__init__.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/integration/test_data_flow.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/integration/test_monitoring_flow.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/integration/test_optimization_flow.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/performance/__init__.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/performance/test_performance.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_ai/__init__.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_ai/test_prompts.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_ai/test_providers.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_analysis/test_attribution.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_analysis/test_backtest.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_analysis/test_holding.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_analysis/test_manager.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_analysis/test_performance.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_analysis/test_performance_enhanced.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_base_classes.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_commands/test_config_cmd.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_commands/test_data_cmd.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_commands/test_filter_cmd.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_commands/test_interactive.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_commands/test_manager_cmd.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_commands/test_monitor_cmd.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_commands/test_optimize_cmd.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_core/__init__.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_core/test_ai_analyzer.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_core/test_ai_analyzer_extended.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_core/test_data_gateway.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_core/test_data_manager.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_core/test_data_manager_extended.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_core/test_data_quality.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_core/test_data_quality_extended.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_core/test_docx_pptx_reporter.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_core/test_optimizers.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_core/test_pdf_reporter.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_core/test_reporters.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_core/test_screener.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_core/test_template_engine.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_data/test_akshare_adapter.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_data/test_akshare_adapter_extended.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_data/test_akshare_p0.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_data/test_akshare_p1.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_data/test_akshare_p2.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_data/test_base.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_data/test_cache_extended.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_data/test_mixins.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_data/test_models.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_data/test_models_extended.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_data/test_normalizer.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_data/test_tushare_adapter.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_data/test_wind_adapter.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_utils/__init__.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_utils/test_helpers.py +0 -0
- {fund_cli-3.1.0 → fund_cli-3.4.0}/tests/unit/test_views.py +0 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
所有重要的变更都将记录在此文件中。
|
|
4
|
+
|
|
5
|
+
格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/),
|
|
6
|
+
并且本项目遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
7
|
+
|
|
8
|
+
## [3.4.0] - 2026-05-11
|
|
9
|
+
|
|
10
|
+
### Added - 智能推荐系统(Phase 4)
|
|
11
|
+
|
|
12
|
+
#### 用户画像模块 (user_profile.py)
|
|
13
|
+
- **RiskQuestionnaire**: 风险评估问卷,5道题目评估用户风险承受能力
|
|
14
|
+
- **StyleAnalyzer**: 投资风格分析器,基于交易行为和持仓历史分析投资风格
|
|
15
|
+
- **ProfileManager**: 用户画像管理器,支持创建、存储、查询用户画像
|
|
16
|
+
- **UserProfile**: 用户画像数据类,包含风险评估、投资目标、投资期限、偏好设置
|
|
17
|
+
- **RiskAssessment**: 风险评估结果,包含风险等级、得分、最大回撤容忍度
|
|
18
|
+
- **InvestmentPreferences**: 投资偏好设置,包含基金类型、行业、规模等偏好
|
|
19
|
+
- CLI命令: `fund ai profile show|create|assess`
|
|
20
|
+
|
|
21
|
+
#### 个性化推荐引擎 (recommender.py)
|
|
22
|
+
- **ContentBasedRecommender**: 基于内容的推荐器,基于基金特征匹配用户偏好
|
|
23
|
+
- **CollaborativeRecommender**: 协同过滤推荐器,基于相似用户行为推荐
|
|
24
|
+
- **HybridRecommender**: 混合推荐器,融合内容和协同过滤结果
|
|
25
|
+
- **FundRecommender**: 基金推荐主类,整合多种推荐策略
|
|
26
|
+
- **FundScore**: 基金评分数据类,包含综合得分和细分得分
|
|
27
|
+
- **RecommendationItem**: 推荐结果项,包含推荐理由和风险提示
|
|
28
|
+
- **RecommendationReport**: 推荐报告,包含完整推荐结果和摘要
|
|
29
|
+
- CLI命令: `fund ai recommend --fund 000001 --strategy hybrid`
|
|
30
|
+
|
|
31
|
+
#### 投资建议生成器 (advisor.py)
|
|
32
|
+
- **HoldingAnalyzer**: 持仓分析器,分析持仓结构、集中度、风险匹配度
|
|
33
|
+
- **RebalanceAdvisor**: 调仓建议器,生成调仓建议和目标配置
|
|
34
|
+
- **DCAAdvisor**: 定投建议器,生成定投方案和止盈止损策略
|
|
35
|
+
- **RiskAlerter**: 风险预警器,检测持仓风险并生成预警
|
|
36
|
+
- **InvestmentAdvisor**: 投资建议主类,整合持仓分析、调仓建议、定投方案、风险预警
|
|
37
|
+
- **AdviceItem**: 建议项数据类,包含建议类型、优先级、内容
|
|
38
|
+
- **RebalanceSuggestion**: 调仓建议数据类
|
|
39
|
+
- **DCASuggestion**: 定投建议数据类
|
|
40
|
+
- **InvestmentAdviceReport**: 投资建议报告
|
|
41
|
+
- CLI命令: `fund ai advise --funds 000001,000002 --type all`
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
- AI模块 `__init__.py`: 导出新增的智能推荐系统类
|
|
45
|
+
- `ai_cmd.py`: 新增 profile/recommend/advise 三个CLI命令
|
|
46
|
+
|
|
47
|
+
### Tests
|
|
48
|
+
- 新增 45 个单元测试(Phase 4)
|
|
49
|
+
- 总测试数: 2144 passed
|
|
50
|
+
|
|
51
|
+
## [3.3.0] - 2026-05-11
|
|
52
|
+
|
|
53
|
+
### Added - AI 决策支持能力增强(Phase 1)
|
|
54
|
+
|
|
55
|
+
#### 智能选基助手 (fund_selector.py)
|
|
56
|
+
- **NeedParser**: 自然语言需求解析器,支持解析基金类型、收益目标、风险约束、规模偏好等
|
|
57
|
+
- **FundScorer**: 多因子评分引擎,支持收益/风险/夏普/规模/稳定性五因子评分
|
|
58
|
+
- **RecommendationGenerator**: 推荐理由生成器,自动生成个性化推荐理由和风险提示
|
|
59
|
+
- **FundSelector**: 智能选基主类,整合需求解析、筛选、评分、推荐全流程
|
|
60
|
+
- CLI命令: `fund ai select "稳健的股票型基金,年化收益10%以上"`
|
|
61
|
+
|
|
62
|
+
#### 投资组合诊断 (portfolio_doctor.py)
|
|
63
|
+
- **DiversificationAnalyzer**: 分散度分析器,计算HHI指数和有效持仓数量
|
|
64
|
+
- **ConcentrationAnalyzer**: 集中度分析器,分析Top1/Top3/Top5持仓集中度
|
|
65
|
+
- **CorrelationAnalyzer**: 相关性分析器,计算组合内资产相关性
|
|
66
|
+
- **RiskExposureAnalyzer**: 风险敞口分析器,分析各资产风险贡献
|
|
67
|
+
- **PortfolioDoctor**: 组合诊断主类,生成完整诊断报告
|
|
68
|
+
- CLI命令: `fund ai diagnose 000001,000002,000003 --weights 0.4,0.3,0.3`
|
|
69
|
+
|
|
70
|
+
#### 市场解读助手 (market_analyst.py)
|
|
71
|
+
- **SentimentAnalyzer**: 市场情绪分析器,计算恐慌贪婪指数
|
|
72
|
+
- **SectorRotationAnalyzer**: 行业轮动分析器,识别强势/弱势行业
|
|
73
|
+
- **HotspotTracker**: 热点追踪器,追踪市场热点主题
|
|
74
|
+
- **MarketAnalyst**: 市场解读主类,整合三大分析功能
|
|
75
|
+
- CLI命令: `fund ai market --type sentiment|rotation|hotspot`
|
|
76
|
+
|
|
77
|
+
#### AI Agent 工具扩展
|
|
78
|
+
- `smart_fund_selection`: 智能选基工具
|
|
79
|
+
- `diagnose_portfolio_health`: 组合诊断工具
|
|
80
|
+
- `analyze_market_sentiment`: 市场分析工具
|
|
81
|
+
- `get_fund_recommendation_by_style`: 风格推荐工具
|
|
82
|
+
|
|
83
|
+
### Added - 风险分析深度增强(Phase 2)
|
|
84
|
+
|
|
85
|
+
#### 压力测试模块 (stress_test.py)
|
|
86
|
+
- **HistoricalScenarioEngine**: 历史情景引擎,支持2008金融危机、2015股灾、2020疫情等情景
|
|
87
|
+
- **CustomScenarioEngine**: 自定义情景引擎,支持用户定义的压力情景
|
|
88
|
+
- **SensitivityAnalyzer**: 敏感性分析器,分析基金对各因子的敏感性
|
|
89
|
+
- **StressTester**: 压力测试主类,整合历史情景、自定义情景、敏感性分析
|
|
90
|
+
- CLI命令: `fund analyze stress-test 000001 --scenario "2008金融危机"`
|
|
91
|
+
|
|
92
|
+
#### 情景分析模块 (scenario_analysis.py)
|
|
93
|
+
- **BullBearAnalyzer**: 牛熊市分析器,分析基金在不同市场环境下的表现
|
|
94
|
+
- **RateSensitivityAnalyzer**: 利率敏感度分析器,分析债券基金对利率变动的敏感度
|
|
95
|
+
- **StyleRotationAnalyzer**: 风格轮动分析器,分析不同风格环境下的表现
|
|
96
|
+
- **ProbabilityWeightedAnalyzer**: 概率加权分析器,计算概率加权后的综合指标
|
|
97
|
+
- **ScenarioAnalyzer**: 情景分析主类,整合牛熊市、利率敏感度、风格轮动分析
|
|
98
|
+
- CLI命令: `fund analyze scenario-v2 000001 --type "股票型" --beta 1.2`
|
|
99
|
+
|
|
100
|
+
#### 风险预算模块 (risk_budget.py)
|
|
101
|
+
- **RiskContributionCalculator**: 风险贡献计算器,计算各资产的风险贡献
|
|
102
|
+
- **RiskConcentrationAnalyzer**: 风险集中度分析器,分析风险集中度
|
|
103
|
+
- **TailRiskAnalyzer**: 尾部风险分析器,分析VaR/CVaR贡献
|
|
104
|
+
- **RiskBudgetOptimizer**: 风险预算优化器,支持风险平价、最小方差等优化目标
|
|
105
|
+
- **RiskBudgetAnalyzer**: 风险预算分析主类,整合风险贡献、集中度、尾部风险分析
|
|
106
|
+
- CLI命令: `fund analyze risk-budget 000001,000002,000003 --optimize`
|
|
107
|
+
|
|
108
|
+
### Changed
|
|
109
|
+
- AI模块 `__init__.py`: 导出新增的智能决策支持类
|
|
110
|
+
- `ai_cmd.py`: 新增 select/diagnose/market 三个CLI命令
|
|
111
|
+
- `analyze_cmd.py`: 新增 stress-test/scenario-v2/risk-budget 三个CLI命令
|
|
112
|
+
- 工具总数: 86 → 90
|
|
113
|
+
|
|
114
|
+
### Added - 市场分析能力(Phase 3)
|
|
115
|
+
|
|
116
|
+
#### 资金流向分析 (money_flow.py)
|
|
117
|
+
- **FundFlowAnalyzer**: 基金申赎分析器,分析基金净申购/赎回趋势
|
|
118
|
+
- **SectorFlowAnalyzer**: 板块资金流向分析器,追踪主力/散户资金动向
|
|
119
|
+
- **NorthboundFlowAnalyzer**: 北向资金分析器,分析外资流入流出趋势
|
|
120
|
+
- **MoneyFlowAnalyzer**: 资金流向分析主类,整合三大分析功能
|
|
121
|
+
- CLI命令: `fund analyze money-flow --type fund|sector|northbound`
|
|
122
|
+
|
|
123
|
+
#### 行业轮动分析 (sector_rotation.py)
|
|
124
|
+
- **SectorPerformanceCalculator**: 行业表现计算器,多周期动量排名
|
|
125
|
+
- **RotationSignalDetector**: 轮动信号检测器,识别行业轮动对
|
|
126
|
+
- **SectorRotationAnalyzer**: 行业轮动分析主类,生成行业排名和轮动信号
|
|
127
|
+
- CLI命令: `fund analyze sector-rotation --period "近1月"`
|
|
128
|
+
|
|
129
|
+
#### 市场情绪指标 (market_sentiment.py)
|
|
130
|
+
- **FearGreedCalculator**: 恐慌贪婪指数计算器,6维度综合情绪指数
|
|
131
|
+
- **FundPositionEstimator**: 基金仓位估算器,估算基金整体仓位水平
|
|
132
|
+
- **MarketBreadthCalculator**: 市场宽度计算器,分析涨跌比和市场广度
|
|
133
|
+
- **SentimentAlertGenerator**: 情绪预警生成器,极端情绪自动预警
|
|
134
|
+
- **MarketSentimentAnalyzer**: 市场情绪分析主类,整合情绪、仓位、宽度分析
|
|
135
|
+
- CLI命令: `fund analyze sentiment`
|
|
136
|
+
|
|
137
|
+
### Changed
|
|
138
|
+
- `analysis/__init__.py`: 导出新增的市场分析类
|
|
139
|
+
- `analyze_cmd.py`: 新增 money-flow/sector-rotation/sentiment 三个CLI命令
|
|
140
|
+
|
|
141
|
+
### Tests
|
|
142
|
+
- 新增 55 个单元测试(Phase 3)
|
|
143
|
+
- 总测试数: 2132 passed
|
|
144
|
+
|
|
145
|
+
## [3.2.0] - 2026-05-10
|
|
146
|
+
|
|
147
|
+
### Added - 数据质量风险治理体系(核心特性)
|
|
148
|
+
- 五层数据质量治理架构
|
|
149
|
+
- Layer 1 数据采集层质量门禁: DataManager路由改用Gateway,激活熔断器/重试/降级
|
|
150
|
+
- Layer 2 数据标准化管道: Normalizer集成Pydantic模型验证、重复检测、净值范围校验
|
|
151
|
+
- Layer 3 数据质量检查引擎: Expectation风格8项自动化检查(非空/数据量/列完整/净值非空/净值范围/收益率范围/日期唯一/时效性)
|
|
152
|
+
- Layer 4 计算验证层: 12项指标合理性边界验证、交叉验证(PerformanceAnalyzer vs RiskAnalyzer)
|
|
153
|
+
- Layer 5 输出合规层: 报告完整性验证、免责声明检查、质量徽章
|
|
154
|
+
- 质量门禁 (QualityGate): 分析入口强制执行数据质量检查,不达标拦截
|
|
155
|
+
- 计算结果验证器 (CalcValidator): Sharpe/回撤/波动率/Beta/VaR等12项指标合理性检查
|
|
156
|
+
- 交叉验证器 (CrossValidator): 多引擎计算结果交叉比对
|
|
157
|
+
- AI输出验证器 (AIOutputValidator): AI生成文本与源数据一致性校验、矛盾表述检测
|
|
158
|
+
- 报告验证器 (ReportValidator): 必需字段检查、模板数据完整性、免责声明检查
|
|
159
|
+
- 审计日志 (AuditLogger): 质量检查/分析操作/报告生成日志,支持合规审计和查询
|
|
160
|
+
- 合规风控报告生成器 (RiskControlReporter): 风险概览/集中度分析/合规检查数据填充
|
|
161
|
+
- 质量配置 (QualityConfig): 质量门禁阈值、异常检测参数、审计日志配置
|
|
162
|
+
- Monitor扩展: 支持回撤/波动率/夏普比率监控规则
|
|
163
|
+
- 71个新增单元测试(覆盖全部6个新模块)
|
|
164
|
+
- 总测试数: 2001 passed
|
|
165
|
+
|
|
166
|
+
### Changed
|
|
167
|
+
- DataManager: 关键方法(get_fund_info/nav/holdings/manager/benchmark)路由改用Gateway+Normalizer
|
|
168
|
+
- DataSourceGateway: 激活请求级内存缓存(5min TTL),修复hash碰撞(MD5),print→logging
|
|
169
|
+
- DataCache: 版本控制(CACHE_VERSION)、1GB容量限制、增强统计信息
|
|
170
|
+
- Normalizer: Pydantic模型验证集成、重复行检测、净值范围校验(0<nav<=10000)
|
|
171
|
+
- validators.py: 新增validate_nav_value/validate_daily_return/validate_data_min_rows/validate_date_strict
|
|
172
|
+
- decorators.py: retry增加指数退避+抖动,新增validate_input装饰器
|
|
173
|
+
- report_cmd.py: 修复空数据问题,集成ReportValidator,实现真实数据获取和分析
|
|
174
|
+
- analyze_cmd.py: 集成质量门禁+交叉验证+计算验证,显示质量评分
|
|
175
|
+
|
|
176
|
+
### Fixed
|
|
177
|
+
- DataManager第107行日志变量bug(主数据源切换日志显示错误)
|
|
178
|
+
- report_cmd.py传入空metrics={}的严重问题
|
|
179
|
+
- 风控报告模板(risk_control)无后端数据填充
|
|
180
|
+
- DataQualityChecker孤岛模块(从未被自动调用)
|
|
181
|
+
- Pydantic模型与数据流脱节(11个模型零调用)
|
|
182
|
+
- validators.py/decorators.py死代码(7个工具零调用)
|
|
183
|
+
|
|
184
|
+
## [3.1.0] - 2026-05-09
|
|
185
|
+
|
|
186
|
+
### Added
|
|
187
|
+
- 多数据源架构(v3.1核心特性)
|
|
188
|
+
- TushareAdapter: P0级别18个核心方法,适配Tushare 2025.11 API变更
|
|
189
|
+
- AKShareAdapter: AKShare数据源适配器
|
|
190
|
+
- WindAdapter: Wind金融终端适配器(占位实现)
|
|
191
|
+
- DataSourceGateway: 数据源网关,提供熔断器、降级、重试机制
|
|
192
|
+
- DataNormalizer: 跨数据源数据标准化(字段映射、日期、代码、数值)
|
|
193
|
+
- DataSourceAdapterMixin: 120+抽象方法占位实现
|
|
194
|
+
- 报告引擎增强
|
|
195
|
+
- Reporter基类扩展: render_to_template, export_pdf, export_docx, export_pptx
|
|
196
|
+
- TemplateEngine: Jinja2模板引擎,自定义过滤器(percentage/format_number/color_class)
|
|
197
|
+
- 4类报告模板: 单基金研究、投资组合、市场资金流向、合规风控
|
|
198
|
+
- PdfReporter: WeasyPrint HTML转PDF
|
|
199
|
+
- DocxReporter: python-docx Word报告
|
|
200
|
+
- PptxReporter: python-pptx PPT报告
|
|
201
|
+
- AI分析增强
|
|
202
|
+
- AIAnalyzer: 基金/组合智能分析
|
|
203
|
+
- RuleBasedBackend: 规则引擎(无需API)
|
|
204
|
+
- OpenAIBackend: OpenAI API后端
|
|
205
|
+
- AnalysisResult: 摘要、风险提示、投资建议、亮点、风险点
|
|
206
|
+
- CLI命令扩展
|
|
207
|
+
- fund report: 报告生成命令
|
|
208
|
+
- fund list-templates: 列出可用模板
|
|
209
|
+
|
|
210
|
+
### Changed
|
|
211
|
+
- DataManager集成DataSourceGateway,支持多源自动降级
|
|
212
|
+
- 改进代码质量: ruff lint + mypy类型检查全部通过
|
|
213
|
+
- 新增35个端到端集成测试
|
|
214
|
+
|
|
215
|
+
### Fixed
|
|
216
|
+
- 修复TushareAdapter抽象方法实现问题
|
|
217
|
+
- 修复DataNormalizer类型转换问题
|
|
218
|
+
|
|
219
|
+
## [2.0.1] - 2026-05-08
|
|
220
|
+
|
|
221
|
+
### Fixed
|
|
222
|
+
- 修复PyPI文档链接显示为空的问题
|
|
223
|
+
- 将README.md中的文档链接改为GitHub绝对链接
|
|
224
|
+
- 在README.md中直接包含安装指南、使用教程、API文档、开发指南内容
|
|
225
|
+
|
|
226
|
+
## [2.0.0] - 2026-05-08
|
|
227
|
+
|
|
228
|
+
### Added
|
|
229
|
+
- AI辅助分析功能(V2.0核心特性)
|
|
230
|
+
- 支持OpenAI、阿里云Qwen等LLM提供商
|
|
231
|
+
- 基金摘要生成、对比分析、投资建议、风险评估
|
|
232
|
+
- 可配置API参数,切换方便
|
|
233
|
+
- 持仓分析模块
|
|
234
|
+
- 持仓查询、行业分布分析
|
|
235
|
+
- 重仓股分析、持仓集中度(HHI)
|
|
236
|
+
- 持仓变化追踪、风格分析(九宫格)
|
|
237
|
+
- 基金经理分析
|
|
238
|
+
- 经理信息查询、业绩统计
|
|
239
|
+
- 稳定性评估
|
|
240
|
+
- 组合优化功能
|
|
241
|
+
- 均值-方差优化、最大夏普比率优化
|
|
242
|
+
- 风险平价优化、有效前沿计算
|
|
243
|
+
- 组合回测功能
|
|
244
|
+
- 业绩归因模块
|
|
245
|
+
- Brinson归因模型
|
|
246
|
+
- 收益分解、风险归因
|
|
247
|
+
- 监控预警功能
|
|
248
|
+
- 监控池管理、净值变动监控
|
|
249
|
+
- 预警规则设置、通知功能
|
|
250
|
+
- 交互式模式
|
|
251
|
+
- REPL风格交互界面
|
|
252
|
+
- 命令自动补全
|
|
253
|
+
|
|
254
|
+
### Changed
|
|
255
|
+
- 重构数据层架构,支持多数据源适配器
|
|
256
|
+
- 优化缓存机制,提升数据获取性能
|
|
257
|
+
- 改进CLI界面,使用Rich库增强输出效果
|
|
258
|
+
- 增强基金筛选功能,支持高级表达式
|
|
259
|
+
- 增强基金分析功能,支持滚动窗口、月度分布、情景分析
|
|
260
|
+
|
|
261
|
+
### Fixed
|
|
262
|
+
- 修复大数据集下的内存占用问题
|
|
263
|
+
- 修复时区处理不一致问题
|
|
264
|
+
|
|
265
|
+
## [1.0.0] - 2024-XX-XX
|
|
266
|
+
|
|
267
|
+
### Added
|
|
268
|
+
- 初始版本发布
|
|
269
|
+
- 基础基金筛选功能
|
|
270
|
+
- 业绩分析功能(收益率、夏普比率、最大回撤等)
|
|
271
|
+
- 基金对比功能
|
|
272
|
+
- 数据管理功能(多数据源、缓存、导出)
|
|
273
|
+
- 系统配置功能
|
fund_cli-3.4.0/CLAUDE.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Fund CLI 项目指令
|
|
2
|
+
|
|
3
|
+
## 项目概述
|
|
4
|
+
Fund CLI 是一个专业的基金分析命令行工具,使用 Python 3.10+,基于 Typer 框架。
|
|
5
|
+
版本:3.2.0 | 协议:MIT
|
|
6
|
+
|
|
7
|
+
## 常用命令
|
|
8
|
+
|
|
9
|
+
- 安装依赖:`pip install -e ".[dev]"`
|
|
10
|
+
- 运行测试:`pytest tests/ -q`
|
|
11
|
+
- 运行测试(含覆盖率):`pytest tests/ --cov=src/fund_cli --cov-report=term-missing`
|
|
12
|
+
- 代码检查:`ruff check src/`
|
|
13
|
+
- 代码格式化:`ruff format src/`
|
|
14
|
+
- 类型检查:`mypy src/ --ignore-missing-imports`
|
|
15
|
+
- 全部检查:`ruff check src/ && ruff format src/ --check && mypy src/ --ignore-missing-imports && pytest tests/ -q`
|
|
16
|
+
- 构建发布:`python -m hatch build`
|
|
17
|
+
- 本地安装验证:`pip install dist/fund_cli-*.whl`
|
|
18
|
+
|
|
19
|
+
## 代码风格
|
|
20
|
+
|
|
21
|
+
- 使用 Google 风格 docstring(中文)
|
|
22
|
+
- 行长度 100 字符
|
|
23
|
+
- 使用类型注解
|
|
24
|
+
- 函数不超过 100 行
|
|
25
|
+
- 使用绝对导入
|
|
26
|
+
- 中文注释和文档字符串
|
|
27
|
+
|
|
28
|
+
## 项目架构
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
src/fund_cli/
|
|
32
|
+
├── cli.py # CLI 入口,Typer app
|
|
33
|
+
├── config.py # Pydantic 配置管理
|
|
34
|
+
├── ai/ # AI 模块(LangChain Agent)
|
|
35
|
+
│ ├── agent.py # Agent 定义
|
|
36
|
+
│ ├── analyzer.py # AI 分析器
|
|
37
|
+
│ ├── tools.py # LangChain @tool 工具
|
|
38
|
+
│ ├── memory.py # 对话历史管理
|
|
39
|
+
│ └── providers.py # LLM 提供商
|
|
40
|
+
├── analysis/ # 分析模块
|
|
41
|
+
│ ├── performance.py # PerformanceAnalyzer
|
|
42
|
+
│ ├── risk.py # RiskAnalyzer
|
|
43
|
+
│ ├── holding.py # HoldingAnalyzer
|
|
44
|
+
│ └── attribution.py # 归因分析
|
|
45
|
+
├── commands/ # Typer 命令
|
|
46
|
+
│ ├── analyze_cmd.py # fund analyze
|
|
47
|
+
│ ├── compare_cmd.py # fund compare
|
|
48
|
+
│ ├── optimize_cmd.py # fund optimize
|
|
49
|
+
│ ├── holding_cmd.py # fund holding
|
|
50
|
+
│ ├── ai_cmd.py # fund ai
|
|
51
|
+
│ └── report_cmd.py # fund report
|
|
52
|
+
├── core/ # 核心模块
|
|
53
|
+
│ ├── data_manager.py # DataManager 数据管理
|
|
54
|
+
│ ├── monitor.py # FundMonitor 监控
|
|
55
|
+
│ ├── quality_gate.py # QualityGate 质量门禁
|
|
56
|
+
│ ├── calc_validator.py # CalcValidator 计算验证
|
|
57
|
+
│ ├── cross_validator.py # CrossValidator 交叉验证
|
|
58
|
+
│ ├── ai_validator.py # AIOutputValidator AI验证
|
|
59
|
+
│ ├── report_validator.py # ReportValidator 报告验证
|
|
60
|
+
│ ├── audit_logger.py # AuditLogger 审计日志
|
|
61
|
+
│ └── reporters/ # 报告生成器
|
|
62
|
+
├── data/ # 数据层
|
|
63
|
+
│ ├── adapters/ # 数据适配器(akshare/tushare/wind)
|
|
64
|
+
│ ├── base.py # 适配器基类
|
|
65
|
+
│ ├── cache.py # 缓存管理
|
|
66
|
+
│ └── normalizer.py # 数据标准化
|
|
67
|
+
└── utils/ # 工具函数
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 测试规范
|
|
71
|
+
|
|
72
|
+
- 测试目录镜像 src/ 结构:tests/unit/test_core/, tests/unit/test_commands/
|
|
73
|
+
- 使用 pytest + unittest.mock
|
|
74
|
+
- AAA 模式:Arrange-Act-Assert
|
|
75
|
+
- 测试文件命名:test_<module>.py
|
|
76
|
+
- 测试类命名:Test<Feature>
|
|
77
|
+
- 优先运行单个测试文件:`pytest tests/unit/test_core/test_data_manager.py -v`
|
|
78
|
+
- 不修改测试来通过实现,修改实现来通过测试
|
|
79
|
+
|
|
80
|
+
## 数据质量治理(v3.2.0 核心特性)
|
|
81
|
+
|
|
82
|
+
五层架构:
|
|
83
|
+
1. **数据采集层**:Gateway 路由 + 熔断器/重试/降级
|
|
84
|
+
2. **数据标准化管道**:Pydantic 验证 + 重复检测
|
|
85
|
+
3. **质量检查引擎**:8 项 Expectation 自动化检查
|
|
86
|
+
4. **计算验证层**:CalcValidator 12 项指标验证
|
|
87
|
+
5. **输出合规层**:ReportValidator + 免责声明
|
|
88
|
+
|
|
89
|
+
IMPORTANT:所有分析操作必须通过 QualityGate 检查,不合格数据不得进入计算流程。
|
|
90
|
+
|
|
91
|
+
## Git 规范
|
|
92
|
+
|
|
93
|
+
- Conventional Commits:feat/fix/docs/refactor/test/chore
|
|
94
|
+
- 分支命名:feature/xxx、fix/xxx
|
|
95
|
+
- 不直接推送到 main,使用 PR
|
|
96
|
+
|
|
97
|
+
## 注意事项
|
|
98
|
+
|
|
99
|
+
- AI 模块依赖 LangChain,修改 tools.py 时注意 @tool 装饰器
|
|
100
|
+
- 数据适配器层有熔断机制,测试时需要 mock 网络请求
|
|
101
|
+
- 报告生成器支持 html/pdf/docx/pptx/markdown 格式
|
|
102
|
+
- 配置通过 .env 文件或环境变量,参考 .env.example
|