fund-cli 2.0.1__tar.gz → 3.1.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-2.0.1 → fund_cli-3.1.0}/.gitignore +12 -0
- fund_cli-3.1.0/.trae/documents/documentation-verification-plan.md +55 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/CHANGELOG.md +35 -0
- fund_cli-3.1.0/CODE_OF_CONDUCT.md +45 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/CONTRIBUTING.md +34 -1
- fund_cli-3.1.0/Dockerfile +57 -0
- fund_cli-3.1.0/Makefile +41 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/PKG-INFO +117 -6
- fund_cli-3.1.0/README.md +365 -0
- fund_cli-3.1.0/SECURITY.md +62 -0
- fund_cli-3.1.0/comparison_report.md +10 -0
- fund_cli-3.1.0/docker-compose.yml +33 -0
- fund_cli-3.1.0/docs/api/ai.md +21 -0
- fund_cli-3.1.0/docs/api/analysis.md +19 -0
- fund_cli-3.1.0/docs/api/core.md +25 -0
- fund_cli-3.1.0/docs/api/data.md +24 -0
- fund_cli-3.1.0/docs/api/optimizers.md +13 -0
- fund_cli-3.1.0/docs/api/reference.md +40 -0
- fund_cli-3.1.0/docs/api/reporters.md +16 -0
- fund_cli-3.1.0/docs/contributing.md +133 -0
- fund_cli-3.1.0/docs/development.md +353 -0
- fund_cli-3.1.0/docs/index.md +109 -0
- fund_cli-3.1.0/docs/installation.md +222 -0
- fund_cli-3.1.0/docs/usage/ai-analysis.md +264 -0
- fund_cli-3.1.0/docs/usage/analysis.md +213 -0
- fund_cli-3.1.0/docs/usage/comparison.md +136 -0
- fund_cli-3.1.0/docs/usage/filter-and-data.md +205 -0
- fund_cli-3.1.0/docs/usage/holding-and-manager.md +186 -0
- fund_cli-3.1.0/docs/usage/index.md +88 -0
- fund_cli-3.1.0/docs/usage/interactive.md +166 -0
- fund_cli-3.1.0/docs/usage/monitoring.md +165 -0
- fund_cli-3.1.0/docs/usage/optimization.md +184 -0
- fund_cli-3.1.0/docs/usage/report-generation.md +145 -0
- fund_cli-3.1.0/mkdocs.yml +96 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/pyproject.toml +50 -9
- fund_cli-3.1.0/report_market_flow_portfolio.html +19 -0
- fund_cli-3.1.0/report_portfolio_portfolio.html +19 -0
- fund_cli-3.1.0/report_risk_control_portfolio.html +19 -0
- fund_cli-3.1.0/report_single_fund_000001.html +19 -0
- fund_cli-3.1.0/report_single_fund_000001.md +16 -0
- fund_cli-3.1.0/site/404.html +1183 -0
- fund_cli-3.1.0/site/api/ai/index.html +6960 -0
- fund_cli-3.1.0/site/api/analysis/index.html +10367 -0
- fund_cli-3.1.0/site/api/core/index.html +14513 -0
- fund_cli-3.1.0/site/api/data/index.html +46601 -0
- fund_cli-3.1.0/site/api/optimizers/index.html +2937 -0
- fund_cli-3.1.0/site/api/reference/index.html +1409 -0
- fund_cli-3.1.0/site/api/reporters/index.html +3393 -0
- fund_cli-3.1.0/site/assets/_mkdocstrings.css +237 -0
- fund_cli-3.1.0/site/assets/images/favicon.png +0 -0
- fund_cli-3.1.0/site/assets/javascripts/bundle.79ae519e.min.js +16 -0
- fund_cli-3.1.0/site/assets/javascripts/bundle.79ae519e.min.js.map +7 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.ar.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.da.min.js +18 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.de.min.js +18 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.du.min.js +18 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.el.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.es.min.js +18 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.fi.min.js +18 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.fr.min.js +18 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.he.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.hi.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.hu.min.js +18 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.hy.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.it.min.js +18 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.ja.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.jp.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.kn.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.ko.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.multi.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.nl.min.js +18 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.no.min.js +18 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.pt.min.js +18 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.ro.min.js +18 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.ru.min.js +18 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.sa.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.stemmer.support.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.sv.min.js +18 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.ta.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.te.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.th.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.tr.min.js +18 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.vi.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/min/lunr.zh.min.js +1 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/tinyseg.js +206 -0
- fund_cli-3.1.0/site/assets/javascripts/lunr/wordcut.js +6708 -0
- fund_cli-3.1.0/site/assets/javascripts/workers/search.2c215733.min.js +42 -0
- fund_cli-3.1.0/site/assets/javascripts/workers/search.2c215733.min.js.map +7 -0
- fund_cli-3.1.0/site/assets/stylesheets/main.484c7ddc.min.css +1 -0
- fund_cli-3.1.0/site/assets/stylesheets/main.484c7ddc.min.css.map +1 -0
- fund_cli-3.1.0/site/assets/stylesheets/palette.ab4e12ef.min.css +1 -0
- fund_cli-3.1.0/site/assets/stylesheets/palette.ab4e12ef.min.css.map +1 -0
- fund_cli-3.1.0/site/contributing/index.html +1661 -0
- fund_cli-3.1.0/site/development/index.html +2313 -0
- fund_cli-3.1.0/site/index.html +1790 -0
- fund_cli-3.1.0/site/installation/index.html +2073 -0
- fund_cli-3.1.0/site/objects.inv +0 -0
- fund_cli-3.1.0/site/search/search_index.json +1 -0
- fund_cli-3.1.0/site/sitemap.xml +87 -0
- fund_cli-3.1.0/site/sitemap.xml.gz +0 -0
- fund_cli-3.1.0/site/usage/ai-analysis/index.html +1801 -0
- fund_cli-3.1.0/site/usage/analysis/index.html +1600 -0
- fund_cli-3.1.0/site/usage/comparison/index.html +1546 -0
- fund_cli-3.1.0/site/usage/filter-and-data/index.html +1778 -0
- fund_cli-3.1.0/site/usage/holding-and-manager/index.html +1592 -0
- fund_cli-3.1.0/site/usage/index.html +1444 -0
- fund_cli-3.1.0/site/usage/interactive/index.html +1537 -0
- fund_cli-3.1.0/site/usage/monitoring/index.html +1572 -0
- fund_cli-3.1.0/site/usage/optimization/index.html +1638 -0
- fund_cli-3.1.0/site/usage/report-generation/index.html +1728 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/__init__.py +10 -2
- fund_cli-3.1.0/src/fund_cli/ai/__init__.py +46 -0
- fund_cli-3.1.0/src/fund_cli/ai/agent.py +345 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/ai/analyzer.py +1 -1
- fund_cli-3.1.0/src/fund_cli/ai/memory.py +497 -0
- fund_cli-3.1.0/src/fund_cli/ai/nodes.py +200 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/ai/providers.py +1 -1
- fund_cli-3.1.0/src/fund_cli/ai/state.py +93 -0
- fund_cli-3.1.0/src/fund_cli/ai/tools.py +3608 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/analysis/attribution.py +1 -1
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/analysis/holding.py +1 -1
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/analysis/performance.py +2 -2
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/analysis/portfolio.py +2 -2
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/analysis/risk.py +3 -3
- fund_cli-3.1.0/src/fund_cli/cli.py +252 -0
- fund_cli-3.1.0/src/fund_cli/commands/__init__.py +29 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/commands/ai_cmd.py +136 -6
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/commands/analyze_cmd.py +4 -2
- fund_cli-3.1.0/src/fund_cli/commands/config_cmd.py +296 -0
- fund_cli-3.1.0/src/fund_cli/commands/report_cmd.py +86 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/config.py +41 -0
- fund_cli-3.1.0/src/fund_cli/core/__init__.py +21 -0
- fund_cli-3.1.0/src/fund_cli/core/ai_analyzer.py +267 -0
- fund_cli-3.1.0/src/fund_cli/core/data_gateway.py +329 -0
- fund_cli-3.1.0/src/fund_cli/core/data_manager.py +835 -0
- fund_cli-3.1.0/src/fund_cli/core/reporter.py +111 -0
- fund_cli-3.1.0/src/fund_cli/core/reporters/__init__.py +15 -0
- fund_cli-3.1.0/src/fund_cli/core/reporters/docx_reporter.py +85 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/core/reporters/html_reporter.py +1 -1
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/core/reporters/markdown_reporter.py +1 -1
- fund_cli-3.1.0/src/fund_cli/core/reporters/pdf_reporter.py +87 -0
- fund_cli-3.1.0/src/fund_cli/core/reporters/pptx_reporter.py +125 -0
- fund_cli-3.1.0/src/fund_cli/core/template_engine.py +84 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/data/adapters/__init__.py +7 -1
- fund_cli-3.1.0/src/fund_cli/data/adapters/akshare_adapter.py +3846 -0
- fund_cli-3.1.0/src/fund_cli/data/adapters/mixins.py +533 -0
- fund_cli-3.1.0/src/fund_cli/data/adapters/tushare_adapter.py +845 -0
- fund_cli-3.1.0/src/fund_cli/data/adapters/wind_adapter.py +98 -0
- fund_cli-3.1.0/src/fund_cli/data/base.py +1147 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/data/cache.py +1 -1
- fund_cli-3.1.0/src/fund_cli/data/normalizer.py +295 -0
- fund_cli-3.1.0/src/fund_cli/mcp/__init__.py +33 -0
- fund_cli-3.1.0/src/fund_cli/mcp/server.py +724 -0
- fund_cli-3.1.0/src/fund_cli/templates/base.html +40 -0
- fund_cli-3.1.0/src/fund_cli/templates/market_flow/report.html +50 -0
- fund_cli-3.1.0/src/fund_cli/templates/portfolio/report.html +48 -0
- fund_cli-3.1.0/src/fund_cli/templates/risk_control/report.html +52 -0
- fund_cli-3.1.0/src/fund_cli/templates/single_fund/report.html +73 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/utils/decorators.py +3 -1
- fund_cli-3.1.0/tests/conftest.py +72 -0
- fund_cli-3.1.0/tests/integration/__init__.py +6 -0
- fund_cli-3.1.0/tests/integration/test_end_to_end.py +1430 -0
- fund_cli-3.1.0/tests/performance/__init__.py +3 -0
- fund_cli-3.1.0/tests/performance/test_performance.py +235 -0
- fund_cli-3.1.0/tests/unit/test_ai/test_agent.py +2506 -0
- fund_cli-3.1.0/tests/unit/test_ai/test_analyzer.py +740 -0
- fund_cli-3.1.0/tests/unit/test_ai/test_providers.py +748 -0
- fund_cli-3.1.0/tests/unit/test_ai/test_tools.py +1152 -0
- fund_cli-3.1.0/tests/unit/test_commands/test_analyze_cmd.py +502 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_commands/test_cli.py +1 -1
- fund_cli-3.1.0/tests/unit/test_commands/test_compare_cmd.py +336 -0
- fund_cli-3.1.0/tests/unit/test_commands/test_config_cmd.py +50 -0
- fund_cli-3.1.0/tests/unit/test_commands/test_data_cmd.py +282 -0
- fund_cli-3.1.0/tests/unit/test_commands/test_filter_cmd.py +408 -0
- fund_cli-3.1.0/tests/unit/test_commands/test_manager_cmd.py +435 -0
- fund_cli-3.1.0/tests/unit/test_commands/test_monitor_cmd.py +284 -0
- fund_cli-3.1.0/tests/unit/test_commands/test_optimize_cmd.py +507 -0
- fund_cli-3.1.0/tests/unit/test_commands/test_report_cmd.py +331 -0
- fund_cli-3.1.0/tests/unit/test_core/test_ai_analyzer.py +133 -0
- fund_cli-3.1.0/tests/unit/test_core/test_ai_analyzer_extended.py +630 -0
- fund_cli-3.1.0/tests/unit/test_core/test_data_gateway.py +1032 -0
- fund_cli-3.1.0/tests/unit/test_core/test_data_manager.py +757 -0
- fund_cli-3.1.0/tests/unit/test_core/test_data_manager_extended.py +884 -0
- fund_cli-3.1.0/tests/unit/test_core/test_data_quality_extended.py +326 -0
- fund_cli-3.1.0/tests/unit/test_core/test_docx_pptx_reporter.py +1132 -0
- fund_cli-3.1.0/tests/unit/test_core/test_pdf_reporter.py +185 -0
- fund_cli-3.1.0/tests/unit/test_core/test_reporters.py +489 -0
- fund_cli-3.1.0/tests/unit/test_core/test_template_engine.py +419 -0
- fund_cli-3.1.0/tests/unit/test_data/test_akshare_adapter.py +417 -0
- fund_cli-3.1.0/tests/unit/test_data/test_akshare_adapter_extended.py +597 -0
- fund_cli-3.1.0/tests/unit/test_data/test_akshare_p0.py +737 -0
- fund_cli-3.1.0/tests/unit/test_data/test_akshare_p1.py +873 -0
- fund_cli-3.1.0/tests/unit/test_data/test_akshare_p2.py +1161 -0
- fund_cli-3.1.0/tests/unit/test_data/test_base.py +932 -0
- fund_cli-3.1.0/tests/unit/test_data/test_mixins.py +362 -0
- fund_cli-3.1.0/tests/unit/test_data/test_normalizer.py +856 -0
- fund_cli-3.1.0/tests/unit/test_data/test_tushare_adapter.py +971 -0
- fund_cli-3.1.0/tests/unit/test_data/test_wind_adapter.py +425 -0
- fund_cli-2.0.1/GITHUB_MANUAL_RELEASE.md +0 -139
- fund_cli-2.0.1/GITHUB_RELEASE_INSTRUCTIONS.md +0 -155
- fund_cli-2.0.1/README.md +0 -268
- fund_cli-2.0.1/RELEASE_INSTRUCTIONS.md +0 -267
- fund_cli-2.0.1/docs/api/reference.md +0 -63
- fund_cli-2.0.1/docs/development.md +0 -54
- fund_cli-2.0.1/docs/index.md +0 -25
- fund_cli-2.0.1/docs/installation.md +0 -46
- fund_cli-2.0.1/docs/usage/tutorial.md +0 -60
- fund_cli-2.0.1/src/fund_cli/ai/__init__.py +0 -21
- fund_cli-2.0.1/src/fund_cli/cli.py +0 -98
- fund_cli-2.0.1/src/fund_cli/commands/__init__.py +0 -9
- fund_cli-2.0.1/src/fund_cli/commands/config_cmd.py +0 -97
- fund_cli-2.0.1/src/fund_cli/core/__init__.py +0 -8
- fund_cli-2.0.1/src/fund_cli/core/data_manager.py +0 -231
- fund_cli-2.0.1/src/fund_cli/core/reporter.py +0 -67
- fund_cli-2.0.1/src/fund_cli/core/reporters/__init__.py +0 -6
- fund_cli-2.0.1/src/fund_cli/data/adapters/akshare_adapter.py +0 -442
- fund_cli-2.0.1/src/fund_cli/data/adapters/tushare_adapter.py +0 -254
- fund_cli-2.0.1/src/fund_cli/data/adapters/wind_adapter.py +0 -78
- fund_cli-2.0.1/src/fund_cli/data/base.py +0 -209
- fund_cli-2.0.1/tests/conftest.py +0 -116
- fund_cli-2.0.1/tests/unit/test_ai/test_analyzer.py +0 -238
- fund_cli-2.0.1/tests/unit/test_ai/test_providers.py +0 -256
- fund_cli-2.0.1/tests/unit/test_commands/test_compare_cmd.py +0 -25
- fund_cli-2.0.1/tests/unit/test_commands/test_config_cmd.py +0 -30
- fund_cli-2.0.1/tests/unit/test_core/test_reporters.py +0 -69
- {fund_cli-2.0.1 → fund_cli-3.1.0}/.env.example +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/.pre-commit-config.yaml +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/LICENSE +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/examples/basic_analysis.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/examples/batch_processing.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/examples/portfolio_optimization.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/__main__.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/ai/prompts.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/analysis/__init__.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/analysis/backtest.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/analysis/manager.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/commands/compare_cmd.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/commands/data_cmd.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/commands/filter_cmd.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/commands/holding_cmd.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/commands/interactive_cmd.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/commands/main.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/commands/manager_cmd.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/commands/monitor_cmd.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/commands/optimize_cmd.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/core/analyzer.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/core/data_quality.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/core/monitor.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/core/optimizer.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/core/optimizers/__init__.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/core/optimizers/efficient_frontier.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/core/optimizers/max_sharpe.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/core/optimizers/mean_variance.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/core/optimizers/risk_parity.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/core/screener.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/data/__init__.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/data/models.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/utils/__init__.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/utils/helpers.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/utils/validators.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/views/__init__.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/views/charts.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/views/reports.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/src/fund_cli/views/tables.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/test_mvp.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/__init__.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/fixtures/sample_data.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/integration/test_data_flow.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/integration/test_monitoring_flow.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/integration/test_optimization_flow.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_ai/__init__.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_ai/test_prompts.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_analysis/test_attribution.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_analysis/test_backtest.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_analysis/test_holding.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_analysis/test_manager.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_analysis/test_performance.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_analysis/test_performance_enhanced.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_base_classes.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_commands/test_holding_cmd.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_commands/test_interactive.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_core/__init__.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_core/test_data_quality.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_core/test_monitor.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_core/test_optimizers.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_core/test_screener.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_data/test_cache_extended.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_data/test_models.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_data/test_models_extended.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_utils/__init__.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_utils/test_helpers.py +0 -0
- {fund_cli-2.0.1 → fund_cli-3.1.0}/tests/unit/test_views.py +0 -0
|
@@ -87,6 +87,17 @@ dmypy.json
|
|
|
87
87
|
.DS_Store
|
|
88
88
|
Thumbs.db
|
|
89
89
|
|
|
90
|
+
# Docker
|
|
91
|
+
.dockerignore
|
|
92
|
+
|
|
93
|
+
# CI/CD
|
|
94
|
+
.github/
|
|
95
|
+
|
|
96
|
+
# Build
|
|
97
|
+
build/
|
|
98
|
+
dist/
|
|
99
|
+
*.egg-info/
|
|
100
|
+
|
|
90
101
|
# Project specific
|
|
91
102
|
*.log
|
|
92
103
|
*.tmp
|
|
@@ -101,3 +112,4 @@ data/cache/
|
|
|
101
112
|
*.key
|
|
102
113
|
secrets.yaml
|
|
103
114
|
secrets.json
|
|
115
|
+
coverage.json
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# 文档验证与修复计划
|
|
2
|
+
|
|
3
|
+
## 摘要
|
|
4
|
+
|
|
5
|
+
文档改进计划(P0-P5)已全部执行完毕,当前处于验证阶段。本计划旨在完成最后的验证工作,修复发现的 3 个问题,确保文档站点可以正确构建。
|
|
6
|
+
|
|
7
|
+
## 当前状态分析
|
|
8
|
+
|
|
9
|
+
### 已完成的工作
|
|
10
|
+
- **P0**: mkdocs.yml 配置、占位符 URL 替换
|
|
11
|
+
- **P1**: 首页重写、安装指南扩展、10 个使用教程
|
|
12
|
+
- **P2**: API 参考文档(7 个页面,含 mkdocstrings 自动 API 生成)
|
|
13
|
+
- **P3**: 开发指南扩展(架构图、新数据源指南、CI/CD 流程)
|
|
14
|
+
- **P4**: SECURITY.md、CODE_OF_CONDUCT.md、GitHub Issue/PR 模板
|
|
15
|
+
- **P5**: README.md 增强(v3.0 特性、Docker)、CONTRIBUTING.md 增强
|
|
16
|
+
|
|
17
|
+
### 发现的问题
|
|
18
|
+
|
|
19
|
+
| 优先级 | 问题 | 文件 | 影响 |
|
|
20
|
+
|--------|------|------|------|
|
|
21
|
+
| **高** | `docs/contributing.md` 不存在,但 mkdocs.yml nav 引用了它 | mkdocs.yml 第 99 行 | `mkdocs build --strict` 会失败 |
|
|
22
|
+
| **低** | CODE_OF_CONDUCT.md 第 37 行 `[在此处插入联系邮箱]` 未填写 | CODE_OF_CONDUCT.md | 不影响构建,但不够专业 |
|
|
23
|
+
| **低** | `docs/usage/tutorial.md` 存在但未被 mkdocs.yml 引用 | docs/usage/tutorial.md | 孤立文件,不影响构建 |
|
|
24
|
+
|
|
25
|
+
## 修复步骤
|
|
26
|
+
|
|
27
|
+
### 步骤 1: 创建 docs/contributing.md
|
|
28
|
+
- **文件**: `/workspace/fund-cli/docs/contributing.md`
|
|
29
|
+
- **内容**: 基于 MkDocs 格式创建贡献指南页面,内容从根目录 `CONTRIBUTING.md` 提炼,适配文档站风格
|
|
30
|
+
- **原因**: mkdocs.yml nav 第 99 行引用了 `contributing.md`,缺失会导致构建失败
|
|
31
|
+
|
|
32
|
+
### 步骤 2: 修复 CODE_OF_CONDUCT.md 占位符
|
|
33
|
+
- **文件**: `/workspace/fund-cli/CODE_OF_CONDUCT.md` 第 37 行
|
|
34
|
+
- **修改**: `[在此处插入联系邮箱]` → `fund-cli-security@googlegroups.com`(使用 Google Groups 通用项目邮箱格式)
|
|
35
|
+
- **原因**: 消除最后一个占位符,提升专业度
|
|
36
|
+
|
|
37
|
+
### 步骤 3: 处理 docs/usage/tutorial.md 孤立文件
|
|
38
|
+
- **文件**: `/workspace/fund-cli/docs/usage/tutorial.md`
|
|
39
|
+
- **操作**: 删除该文件(内容与 `usage/index.md` 重复)
|
|
40
|
+
- **原因**: 避免混淆,保持文档目录整洁
|
|
41
|
+
|
|
42
|
+
### 步骤 4: 运行 mkdocs build --strict 验证
|
|
43
|
+
- **命令**: `cd /workspace/fund-cli && mkdocs build --strict`
|
|
44
|
+
- **预期**: 构建成功,无错误或警告
|
|
45
|
+
- **原因**: 确认文档站点可以正确构建
|
|
46
|
+
|
|
47
|
+
### 步骤 5: 最终占位符检查
|
|
48
|
+
- **搜索**: 在所有 .md 和 .yml 文件中搜索 `TODO`、`FIXME`、`CHANGE_ME`、`REPLACE`、`在此处`、`placeholder` 等关键词
|
|
49
|
+
- **预期**: 无匹配结果
|
|
50
|
+
- **原因**: 确保无残留占位符
|
|
51
|
+
|
|
52
|
+
## 验证步骤
|
|
53
|
+
1. `mkdocs build --strict` 构建成功(0 错误 0 警告)
|
|
54
|
+
2. 全文搜索无残留占位符
|
|
55
|
+
3. mkdocs.yml nav 结构与实际文件完全一致
|
|
@@ -5,6 +5,41 @@
|
|
|
5
5
|
格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/),
|
|
6
6
|
并且本项目遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
7
7
|
|
|
8
|
+
## [3.1.0] - 2026-05-09
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- 多数据源架构(v3.1核心特性)
|
|
12
|
+
- TushareAdapter: P0级别18个核心方法,适配Tushare 2025.11 API变更
|
|
13
|
+
- AKShareAdapter: AKShare数据源适配器
|
|
14
|
+
- WindAdapter: Wind金融终端适配器(占位实现)
|
|
15
|
+
- DataSourceGateway: 数据源网关,提供熔断器、降级、重试机制
|
|
16
|
+
- DataNormalizer: 跨数据源数据标准化(字段映射、日期、代码、数值)
|
|
17
|
+
- DataSourceAdapterMixin: 120+抽象方法占位实现
|
|
18
|
+
- 报告引擎增强
|
|
19
|
+
- Reporter基类扩展: render_to_template, export_pdf, export_docx, export_pptx
|
|
20
|
+
- TemplateEngine: Jinja2模板引擎,自定义过滤器(percentage/format_number/color_class)
|
|
21
|
+
- 4类报告模板: 单基金研究、投资组合、市场资金流向、合规风控
|
|
22
|
+
- PdfReporter: WeasyPrint HTML转PDF
|
|
23
|
+
- DocxReporter: python-docx Word报告
|
|
24
|
+
- PptxReporter: python-pptx PPT报告
|
|
25
|
+
- AI分析增强
|
|
26
|
+
- AIAnalyzer: 基金/组合智能分析
|
|
27
|
+
- RuleBasedBackend: 规则引擎(无需API)
|
|
28
|
+
- OpenAIBackend: OpenAI API后端
|
|
29
|
+
- AnalysisResult: 摘要、风险提示、投资建议、亮点、风险点
|
|
30
|
+
- CLI命令扩展
|
|
31
|
+
- fund report: 报告生成命令
|
|
32
|
+
- fund list-templates: 列出可用模板
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
- DataManager集成DataSourceGateway,支持多源自动降级
|
|
36
|
+
- 改进代码质量: ruff lint + mypy类型检查全部通过
|
|
37
|
+
- 新增35个端到端集成测试
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
- 修复TushareAdapter抽象方法实现问题
|
|
41
|
+
- 修复DataNormalizer类型转换问题
|
|
42
|
+
|
|
8
43
|
## [2.0.1] - 2026-05-08
|
|
9
44
|
|
|
10
45
|
### Fixed
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# 贡献者行为准则
|
|
2
|
+
|
|
3
|
+
## 我们的承诺
|
|
4
|
+
|
|
5
|
+
作为开源社区的成员、贡献者和维护者,我们承诺让参与我们的项目和社区的每个人都能获得无骚扰的体验,无论其经验水平、性别、性别认同与表达、性取向、残疾状况、外貌、体型、种族、民族、年龄、宗教或国籍。
|
|
6
|
+
|
|
7
|
+
## 我们的标准
|
|
8
|
+
|
|
9
|
+
有助于营造积极环境的行为包括:
|
|
10
|
+
|
|
11
|
+
- 使用欢迎和包容的语言
|
|
12
|
+
- 尊重不同的观点和经验
|
|
13
|
+
- 优雅地接受建设性批评
|
|
14
|
+
- 关注对社区最有利的事情
|
|
15
|
+
- 对其他社区成员表示同理心
|
|
16
|
+
|
|
17
|
+
参与者不可接受的行为包括:
|
|
18
|
+
|
|
19
|
+
- 使用性暗示语言或图像
|
|
20
|
+
- 挑衅、侮辱或贬损性评论,以及人身或政治攻击
|
|
21
|
+
- 公开或私下骚扰
|
|
22
|
+
- 未经明确许可发布他人的私人信息(如物理地址或电子地址)
|
|
23
|
+
- 在专业环境中可能被合理认为不适当的其他行为
|
|
24
|
+
|
|
25
|
+
## 我们的职责
|
|
26
|
+
|
|
27
|
+
项目维护者负责阐明可接受行为的标准,并期望对任何不可接受行为采取适当和公平的纠正措施。
|
|
28
|
+
|
|
29
|
+
项目维护者有权利和责任删除、编辑或拒绝与本行为准则不符的评论、提交、代码、Wiki 编辑、Issue 和其他贡献,或暂时或永久禁止任何他们认为不适当、具有威胁性、冒犯性或有害的行为的贡献者。
|
|
30
|
+
|
|
31
|
+
## 适用范围
|
|
32
|
+
|
|
33
|
+
本行为准则适用于项目空间和公共空间,当个人代表项目或其社区时。代表项目或社区的示例包括使用官方项目电子邮箱、通过官方社交媒体帐户发布信息或在在线或线下活动中担任指定代表。项目的代表可以由项目维护者进一步定义和阐明。
|
|
34
|
+
|
|
35
|
+
## 执行
|
|
36
|
+
|
|
37
|
+
可以通过 fund-cli-security@googlegroups.com 联系项目团队来报告滥用、骚扰或其他不可接受的行为。所有投诉都将被审查和调查,并将做出被认为必要和适当的回应。项目团队有义务对事件报告者保密。具体执行政策的更多细节可能会单独发布。
|
|
38
|
+
|
|
39
|
+
未能真诚遵守或执行行为准则的项目维护者可能会面临项目领导层其他成员确定的临时或永久影响。
|
|
40
|
+
|
|
41
|
+
## 归属
|
|
42
|
+
|
|
43
|
+
本行为准则改编自 [Contributor Covenant](https://www.contributor-covenant.org),版本 2.1,可在 https://www.contributor-covenant.org/version/2/1/code_of_conduct/ 获取。
|
|
44
|
+
|
|
45
|
+
有关此行为准则常见问题的答案,请参阅 https://www.contributor-covenant.org/faq。
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
# 克隆仓库
|
|
9
|
-
git clone https://github.com/
|
|
9
|
+
git clone https://github.com/jarrey-0804/fund-cli.git
|
|
10
10
|
cd fund-cli
|
|
11
11
|
|
|
12
12
|
# 创建虚拟环境
|
|
@@ -82,6 +82,35 @@ black src tests --line-length=100
|
|
|
82
82
|
ruff check src tests
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
+
## 文档贡献
|
|
86
|
+
|
|
87
|
+
我们欢迎文档改进!文档使用 MkDocs 构建:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# 安装文档依赖
|
|
91
|
+
pip install -e ".[docs]"
|
|
92
|
+
|
|
93
|
+
# 本地预览
|
|
94
|
+
mkdocs serve
|
|
95
|
+
|
|
96
|
+
# 构建
|
|
97
|
+
mkdocs build
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
文档文件位于 `docs/` 目录,遵循以下规范:
|
|
101
|
+
- 使用中文撰写
|
|
102
|
+
- 使用标准 Markdown 语法
|
|
103
|
+
- 命令示例包含预期输出
|
|
104
|
+
|
|
105
|
+
## PR 提交前检查清单
|
|
106
|
+
|
|
107
|
+
- [ ] 所有测试通过 (`pytest tests/ -v`)
|
|
108
|
+
- [ ] 代码检查通过 (`ruff check src/`)
|
|
109
|
+
- [ ] 类型检查通过 (`mypy src/fund_cli/core/ src/fund_cli/data/`)
|
|
110
|
+
- [ ] 新增功能有对应测试
|
|
111
|
+
- [ ] 文档已同步更新
|
|
112
|
+
- [ ] 遵循 Conventional Commits 提交规范
|
|
113
|
+
|
|
85
114
|
## 问题反馈
|
|
86
115
|
|
|
87
116
|
如果您发现了bug或有功能建议,请通过以下方式反馈:
|
|
@@ -93,3 +122,7 @@ ruff check src tests
|
|
|
93
122
|
## 许可证
|
|
94
123
|
|
|
95
124
|
通过贡献代码,您同意您的贡献将在MIT许可证下发布。
|
|
125
|
+
|
|
126
|
+
## 行为准则
|
|
127
|
+
|
|
128
|
+
本项目遵循 [贡献者公约](CODE_OF_CONDUCT.md),参与项目即表示同意遵守该准则。
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# 多阶段构建
|
|
2
|
+
FROM python:3.11-slim as builder
|
|
3
|
+
|
|
4
|
+
WORKDIR /app
|
|
5
|
+
|
|
6
|
+
# 安装构建依赖
|
|
7
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
8
|
+
gcc \
|
|
9
|
+
libpq-dev \
|
|
10
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
11
|
+
|
|
12
|
+
# 复制依赖文件
|
|
13
|
+
COPY pyproject.toml README.md ./
|
|
14
|
+
|
|
15
|
+
# 安装Python依赖
|
|
16
|
+
RUN pip install --no-cache-dir --upgrade pip && \
|
|
17
|
+
pip install --no-cache-dir build
|
|
18
|
+
|
|
19
|
+
# 构建wheel
|
|
20
|
+
COPY src/ ./src/
|
|
21
|
+
RUN python -m build
|
|
22
|
+
|
|
23
|
+
# 生产镜像
|
|
24
|
+
FROM python:3.11-slim
|
|
25
|
+
|
|
26
|
+
WORKDIR /app
|
|
27
|
+
|
|
28
|
+
# 安装运行时依赖
|
|
29
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
30
|
+
libpq5 \
|
|
31
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
32
|
+
|
|
33
|
+
# 创建非root用户
|
|
34
|
+
RUN useradd -m -u 1000 fundcli
|
|
35
|
+
|
|
36
|
+
# 复制构建产物
|
|
37
|
+
COPY --from=builder /app/dist/*.whl /tmp/
|
|
38
|
+
|
|
39
|
+
# 安装应用
|
|
40
|
+
RUN pip install --no-cache-dir /tmp/*.whl && \
|
|
41
|
+
rm /tmp/*.whl
|
|
42
|
+
|
|
43
|
+
# 创建缓存目录
|
|
44
|
+
RUN mkdir -p /home/fundcli/.fund_cli/cache && \
|
|
45
|
+
chown -R fundcli:fundcli /home/fundcli
|
|
46
|
+
|
|
47
|
+
USER fundcli
|
|
48
|
+
|
|
49
|
+
# 设置环境变量
|
|
50
|
+
ENV PYTHONUNBUFFERED=1
|
|
51
|
+
ENV FUND_CLI_HOME=/home/fundcli/.fund_cli
|
|
52
|
+
|
|
53
|
+
# 验证安装
|
|
54
|
+
RUN fund --version
|
|
55
|
+
|
|
56
|
+
ENTRYPOINT ["fund"]
|
|
57
|
+
CMD ["--help"]
|
fund_cli-3.1.0/Makefile
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.PHONY: help install test lint format clean build docker
|
|
2
|
+
|
|
3
|
+
help:
|
|
4
|
+
@echo "Fund CLI v3.1 - 开发命令"
|
|
5
|
+
@echo ""
|
|
6
|
+
@echo " make install 安装开发依赖"
|
|
7
|
+
@echo " make test 运行测试"
|
|
8
|
+
@echo " make lint 运行代码检查"
|
|
9
|
+
@echo " make format 格式化代码"
|
|
10
|
+
@echo " make build 构建包"
|
|
11
|
+
@echo " make docker 构建Docker镜像"
|
|
12
|
+
@echo " make clean 清理构建产物"
|
|
13
|
+
|
|
14
|
+
install:
|
|
15
|
+
pip install -e ".[dev]"
|
|
16
|
+
|
|
17
|
+
test:
|
|
18
|
+
pytest tests/ -v --tb=short
|
|
19
|
+
|
|
20
|
+
test-cov:
|
|
21
|
+
pytest tests/ -v --cov=fund_cli --cov-report=html
|
|
22
|
+
|
|
23
|
+
lint:
|
|
24
|
+
ruff check src/
|
|
25
|
+
mypy src/fund_cli/core/ src/fund_cli/data/ --ignore-missing-imports
|
|
26
|
+
|
|
27
|
+
format:
|
|
28
|
+
black src/ tests/
|
|
29
|
+
ruff check src/ --fix
|
|
30
|
+
|
|
31
|
+
build:
|
|
32
|
+
python -m build
|
|
33
|
+
|
|
34
|
+
docker:
|
|
35
|
+
docker build -t fund-cli:3.1.0 .
|
|
36
|
+
docker tag fund-cli:3.1.0 fund-cli:latest
|
|
37
|
+
|
|
38
|
+
clean:
|
|
39
|
+
rm -rf build/ dist/ *.egg-info/
|
|
40
|
+
find . -type d -name __pycache__ -exec rm -rf {} +
|
|
41
|
+
find . -type f -name "*.pyc" -delete
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fund-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.1.0
|
|
4
4
|
Summary: 专业基金分析CLI工具 - 面向机构客户
|
|
5
|
-
Project-URL: Homepage, https://github.com/
|
|
5
|
+
Project-URL: Homepage, https://github.com/jarrey-0804/fund-cli
|
|
6
6
|
Project-URL: Documentation, https://fund-cli.readthedocs.io
|
|
7
|
-
Project-URL: Repository, https://github.com/
|
|
7
|
+
Project-URL: Repository, https://github.com/jarrey-0804/fund-cli
|
|
8
8
|
Author: Fund CLI Team
|
|
9
9
|
License: MIT
|
|
10
10
|
License-File: LICENSE
|
|
11
11
|
Keywords: analysis,cli,finance,fund,investment,quant
|
|
12
|
-
Classifier: Development Status ::
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
13
|
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
14
14
|
Classifier: License :: OSI Approved :: MIT License
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
@@ -21,6 +21,10 @@ Requires-Python: >=3.10
|
|
|
21
21
|
Requires-Dist: akshare>=1.12.0
|
|
22
22
|
Requires-Dist: diskcache>=5.6.0
|
|
23
23
|
Requires-Dist: httpx>=0.25.0
|
|
24
|
+
Requires-Dist: langchain-core>=0.3.0
|
|
25
|
+
Requires-Dist: langchain-openai>=0.2.0
|
|
26
|
+
Requires-Dist: langgraph-checkpoint>=1.0.0
|
|
27
|
+
Requires-Dist: langgraph>=0.2.0
|
|
24
28
|
Requires-Dist: litellm>=1.20.0
|
|
25
29
|
Requires-Dist: matplotlib>=3.8.0
|
|
26
30
|
Requires-Dist: numpy>=1.24.0
|
|
@@ -36,6 +40,10 @@ Requires-Dist: quantstats>=0.0.62
|
|
|
36
40
|
Requires-Dist: rich>=13.0.0
|
|
37
41
|
Requires-Dist: tushare>=1.4.0
|
|
38
42
|
Requires-Dist: typer[all]>=0.9.0
|
|
43
|
+
Provides-Extra: all-extras
|
|
44
|
+
Requires-Dist: chromadb>=0.5.0; extra == 'all-extras'
|
|
45
|
+
Requires-Dist: langgraph-checkpoint-postgres>=1.0.0; extra == 'all-extras'
|
|
46
|
+
Requires-Dist: mcp>=1.0.0; extra == 'all-extras'
|
|
39
47
|
Provides-Extra: dev
|
|
40
48
|
Requires-Dist: black>=23.0.0; extra == 'dev'
|
|
41
49
|
Requires-Dist: mypy>=1.7.0; extra == 'dev'
|
|
@@ -50,6 +58,12 @@ Provides-Extra: docs
|
|
|
50
58
|
Requires-Dist: mkdocs-material>=9.4.0; extra == 'docs'
|
|
51
59
|
Requires-Dist: mkdocs>=1.5.0; extra == 'docs'
|
|
52
60
|
Requires-Dist: mkdocstrings[python]>=0.23.0; extra == 'docs'
|
|
61
|
+
Provides-Extra: mcp
|
|
62
|
+
Requires-Dist: mcp>=1.0.0; extra == 'mcp'
|
|
63
|
+
Provides-Extra: memory
|
|
64
|
+
Requires-Dist: chromadb>=0.5.0; extra == 'memory'
|
|
65
|
+
Provides-Extra: postgres
|
|
66
|
+
Requires-Dist: langgraph-checkpoint-postgres>=1.0.0; extra == 'postgres'
|
|
53
67
|
Description-Content-Type: text/markdown
|
|
54
68
|
|
|
55
69
|
# Fund CLI
|
|
@@ -58,6 +72,7 @@ Description-Content-Type: text/markdown
|
|
|
58
72
|
|
|
59
73
|
**专业基金分析CLI工具 - 面向机构客户**
|
|
60
74
|
|
|
75
|
+
[](https://github.com/jarrey-0804/fund-cli)
|
|
61
76
|
[](https://www.python.org/downloads/)
|
|
62
77
|
[](https://opensource.org/licenses/MIT)
|
|
63
78
|
[](https://github.com/psf/black)
|
|
@@ -70,6 +85,36 @@ Description-Content-Type: text/markdown
|
|
|
70
85
|
|
|
71
86
|
Fund CLI 是一款面向机构客户的专业基金分析命令行工具,提供基金筛选、业绩分析、组合对比、风险监控等功能。基于开源技术栈构建,支持多数据源接入和AI辅助分析。
|
|
72
87
|
|
|
88
|
+
## v3.1 新特性
|
|
89
|
+
|
|
90
|
+
### 多数据源架构
|
|
91
|
+
- **统一适配器接口**: 支持 Tushare、AKShare、Wind 三大数据源
|
|
92
|
+
- **数据源网关**: 熔断器 + 降级 + 重试机制,保障数据获取稳定性
|
|
93
|
+
- **数据标准化**: 跨数据源字段映射、日期格式统一、基金代码标准化
|
|
94
|
+
|
|
95
|
+
### 报告引擎增强
|
|
96
|
+
- **5种报告格式**: HTML、Markdown、PDF、Word、PowerPoint
|
|
97
|
+
- **4类报告模板**: 单基金研究、投资组合、市场资金流向、合规风控
|
|
98
|
+
- **Jinja2模板引擎**: 支持自定义模板和过滤器
|
|
99
|
+
|
|
100
|
+
### AI分析增强
|
|
101
|
+
- **双后端支持**: 规则引擎(零配置)+ OpenAI API(高精度)
|
|
102
|
+
- **智能分析**: 基金/组合摘要、风险提示、投资建议、亮点/风险点提取
|
|
103
|
+
|
|
104
|
+
### v3.0 新特性
|
|
105
|
+
|
|
106
|
+
- **AI Agent 对话** - 基于 LangGraph 的智能对话系统
|
|
107
|
+
- 12+ 数据接口工具自动调用
|
|
108
|
+
- 多轮对话上下文保持
|
|
109
|
+
- 记忆系统(可选 ChromaDB)
|
|
110
|
+
- **MCP 协议支持** - Model Context Protocol 集成
|
|
111
|
+
- **持仓分析** - 行业分布、集中度、风格分析
|
|
112
|
+
- **基金经理分析** - 业绩、稳定性、管理规模
|
|
113
|
+
- **组合优化** - 均值方差/最大夏普/风险平价
|
|
114
|
+
- **归因分析** - Brinson 归因模型
|
|
115
|
+
- **监控预警** - 净值变动监控和预警
|
|
116
|
+
- **交互式模式** - REPL 交互式命令行
|
|
117
|
+
|
|
73
118
|
## 核心功能
|
|
74
119
|
|
|
75
120
|
- **基金筛选** - 多维度筛选条件,支持业绩、风险、规模等指标
|
|
@@ -77,7 +122,9 @@ Fund CLI 是一款面向机构客户的专业基金分析命令行工具,提
|
|
|
77
122
|
- **基金对比** - 多基金横向对比分析
|
|
78
123
|
- **组合优化** - 基于现代投资组合理论的资产配置优化
|
|
79
124
|
- **AI分析** (V2.0) - AI辅助投资分析和报告生成
|
|
80
|
-
-
|
|
125
|
+
- **多数据源架构** (v3.1) - Tushare/AKShare/Wind 统一接入,熔断降级机制
|
|
126
|
+
- **报告引擎** (v3.1) - HTML/Markdown/PDF/Word/PPT 5种格式报告
|
|
127
|
+
- **AI增强** (v3.1) - 规则引擎 + OpenAI 双后端智能分析
|
|
81
128
|
|
|
82
129
|
---
|
|
83
130
|
|
|
@@ -109,6 +156,16 @@ fund --version
|
|
|
109
156
|
fund --help
|
|
110
157
|
```
|
|
111
158
|
|
|
159
|
+
### Docker 部署
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# 拉取镜像并运行
|
|
163
|
+
docker run --rm -e FUND_DATA_TUSHARE_TOKEN=your_token fund-cli:latest fund --help
|
|
164
|
+
|
|
165
|
+
# 使用 docker-compose
|
|
166
|
+
docker compose up fund-cli
|
|
167
|
+
```
|
|
168
|
+
|
|
112
169
|
---
|
|
113
170
|
|
|
114
171
|
## 使用教程
|
|
@@ -148,6 +205,19 @@ fund ai advice --risk-level 中等
|
|
|
148
205
|
fund ai risk 000001
|
|
149
206
|
```
|
|
150
207
|
|
|
208
|
+
### 报告生成功能 (v3.1)
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
# 生成单基金研究报告
|
|
212
|
+
fund report --type single_fund --fund 000001 --format pdf
|
|
213
|
+
|
|
214
|
+
# 生成投资组合报告
|
|
215
|
+
fund report --type portfolio --funds 000001,000002 --format html
|
|
216
|
+
|
|
217
|
+
# 列出可用模板
|
|
218
|
+
fund list-templates
|
|
219
|
+
```
|
|
220
|
+
|
|
151
221
|
### 组合优化
|
|
152
222
|
|
|
153
223
|
```bash
|
|
@@ -275,8 +345,12 @@ fund-cli/
|
|
|
275
345
|
│ ├── config.py # 配置管理
|
|
276
346
|
│ ├── core/ # 核心模块
|
|
277
347
|
│ ├── data/ # 数据层
|
|
348
|
+
│ │ ├── adapters/ # 数据源适配器 (v3.1)
|
|
349
|
+
│ │ ├── gateway.py # 数据源网关 (v3.1)
|
|
350
|
+
│ │ └── normalizer.py # 数据标准化 (v3.1)
|
|
278
351
|
│ ├── analysis/ # 分析模块
|
|
279
|
-
│ ├── ai/ # AI模块 (V2.0)
|
|
352
|
+
│ ├── ai/ # AI模块 (V2.0/V3.1)
|
|
353
|
+
│ ├── report/ # 报告引擎 (v3.1)
|
|
280
354
|
│ ├── commands/ # CLI命令
|
|
281
355
|
│ └── utils/ # 工具函数
|
|
282
356
|
├── tests/ # 测试代码
|
|
@@ -284,6 +358,43 @@ fund-cli/
|
|
|
284
358
|
└── examples/ # 示例脚本
|
|
285
359
|
```
|
|
286
360
|
|
|
361
|
+
## 架构设计
|
|
362
|
+
|
|
363
|
+
### 多数据源架构
|
|
364
|
+
|
|
365
|
+
```
|
|
366
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
367
|
+
│ DataSourceGateway │
|
|
368
|
+
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
|
|
369
|
+
│ │ 熔断器 │ │ 降级策略 │ │ 重试机制 │ │
|
|
370
|
+
│ └─────────────┘ └─────────────┘ └─────────────────────┘ │
|
|
371
|
+
└─────────────────────────────────────────────────────────────┘
|
|
372
|
+
│
|
|
373
|
+
┌─────────────────────┼─────────────────────┐
|
|
374
|
+
▼ ▼ ▼
|
|
375
|
+
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
|
|
376
|
+
│ TushareAdapter│ │ AKShareAdapter│ │ WindAdapter │
|
|
377
|
+
└───────────────┘ └───────────────┘ └───────────────┘
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### 报告引擎架构
|
|
381
|
+
|
|
382
|
+
```
|
|
383
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
384
|
+
│ ReportEngine │
|
|
385
|
+
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
|
|
386
|
+
│ │ Template │ │ Data │ │ Export │ │
|
|
387
|
+
│ │ Engine │ │ Provider │ │ Adapters │ │
|
|
388
|
+
│ └─────────────┘ └─────────────┘ └─────────────────────┘ │
|
|
389
|
+
└─────────────────────────────────────────────────────────────┘
|
|
390
|
+
│
|
|
391
|
+
┌─────────────────────┼─────────────────────┐
|
|
392
|
+
▼ ▼ ▼
|
|
393
|
+
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
|
|
394
|
+
│ HTML/Markdown│ │ PDF (Weasy) │ │ Word/PPT │
|
|
395
|
+
└───────────────┘ └───────────────┘ └───────────────┘
|
|
396
|
+
```
|
|
397
|
+
|
|
287
398
|
---
|
|
288
399
|
|
|
289
400
|
## 技术栈
|