stock-analysis-plugin 0.2.7__tar.gz → 0.2.8__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.
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/.gitignore +4 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/AGENTS.md +4 -4
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/PKG-INFO +21 -10
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/README.md +20 -9
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/dsh/README.md +2 -2
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/dsh/index.ts +44 -2
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/dsh/package.json +1 -1
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/hermes/plugin.yaml +1 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/hermes/schemas.py +32 -2
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/hermes/tools.py +6 -2
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/openclaw/README.md +1 -1
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/openclaw/index.ts +18 -2
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/openclaw/openclaw.plugin.json +2 -1
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/openclaw/package.json +1 -1
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/package-lock.json +2 -2
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/package.json +1 -1
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/pi/index.ts +51 -2
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/pyproject.toml +1 -1
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/bull-trend/SKILL.md +11 -1
- stock_analysis_plugin-0.2.8/skills/bull-trend/references/monthly-trend-strategy.md +47 -0
- stock_analysis_plugin-0.2.8/skills/bull-trend/references/trend-horizons.md +43 -0
- stock_analysis_plugin-0.2.8/skills/bull-trend/references/trend-temperature.md +57 -0
- stock_analysis_plugin-0.2.8/skills/bull-trend/scripts/market_trend.py +78 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/strategy-backtest/SKILL.md +10 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/e2e/test_dsh_e2e.ts +7 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/e2e/test_openclaw_e2e.ts +7 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/e2e/test_pi_e2e.ts +16 -4
- stock_analysis_plugin-0.2.8/tests/fixtures/trend_temperature.json +41 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_backtest.py +168 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_capabilities.py +7 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_dsh_discovery.ts +2 -2
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_dsh_integration.ts +17 -2
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_hermes_integration.py +39 -0
- stock_analysis_plugin-0.2.8/tests/test_monthly_market_skill.py +73 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_openclaw_integration.ts +15 -1
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_pi_integration.ts +18 -1
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_technical.py +180 -0
- stock_analysis_plugin-0.2.8/tests/test_trend_strategy.py +387 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/backtest.py +70 -5
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/capabilities.py +4 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/cli_budgets.json +2 -1
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/technical.py +186 -0
- stock_analysis_plugin-0.2.8/tools/trend_strategy.py +365 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/.github/release.yml +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/.github/workflows/autofix.yml +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/.github/workflows/ci.yml +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/.github/workflows/publish.yml +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/.npmignore +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/CLAUDE.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/LICENSE +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/docs/hermes-integration.en.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/docs/hermes-integration.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/docs/openclaw-integration.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/docs/pi-integration.en.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/docs/pi-integration.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/dsh/cordis.patch.yml +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/dsh/discovery.ts +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/hermes/__init__.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/openclaw/.npmignore +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/requirements-dev.txt +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/ruff.toml +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/schemas/market_review_schema.json +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/schemas/report_schema.json +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/scripts/ci-resolve-llm-host.mjs +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/scripts/cli-timeout.mjs +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/scripts/json-input.mjs +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/scripts/setup-python.mjs +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/scripts/sync-version.sh +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/scripts/venv-python.mjs +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/bottom-volume/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/bottom-volume/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/box-oscillation/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/box-oscillation/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/bull-trend/references/fat-tails.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/bull-trend/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/bull-trend/scripts/tail_analysis.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/chan-theory/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/chan-theory/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/dragon-head/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/dragon-head/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/emotion-cycle/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/emotion-cycle/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/event-driven/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/event-driven/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/expectation-repricing/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/expectation-repricing/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/growth-quality/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/growth-quality/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/hot-theme/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/hot-theme/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/ma-crossover/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/ma-crossover/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/market-review/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/market-review/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/one-yang-three-yin/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/one-yang-three-yin/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/shrink-pullback/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/shrink-pullback/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/stock-analysis/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/stock-analysis/references/short-term-trading.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/stock-analysis/references/stateless-analysis.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/stock-analysis/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/stock-screener/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/stock-screener/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/strategy-backtest/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/volume-breakout/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/volume-breakout/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/wave-theory/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/wave-theory/scripts/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/skills/wisburg-research/SKILL.md +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/strategies/examples/bottom_volume.yaml +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/strategies/examples/box_oscillation.yaml +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/strategies/examples/bull_trend.yaml +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/strategies/examples/dragon_head.yaml +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/strategies/examples/emotion_cycle.yaml +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/strategies/examples/ma_crossover.yaml +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/strategies/examples/rsi_oversold.yaml +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/strategies/examples/shrink_pullback.yaml +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/strategies/examples/volume_breakout.yaml +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/templates/_macros.j2 +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/templates/market_review/full.md.j2 +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/templates/stock_analysis/_evidence.md.j2 +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/templates/stock_analysis/brief.md.j2 +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/templates/stock_analysis/full.md.j2 +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/__init__.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/_stubs/dsh-tools.ts +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/_stubs/openclaw-sdk.ts +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/_stubs/typebox.ts +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/analysis_quality.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/conftest.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/e2e/dsh_tool_spy.mjs +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/e2e/host_smoke.mjs +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/e2e/llm-host.ts +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/e2e/test_analysis_quality.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/e2e/test_hermes_llm.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/e2e/test_host_llm.ts +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/e2e/test_host_to_python.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/e2e/test_provider_network.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/fixtures/analysis_quality.json +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/fixtures/stateless_analysis.json +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_alert_rules.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_analysis_quality.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_anomaly_detect.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_backtest_advanced.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_data_cache.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_diagnostics.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_disclosures.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_dsh_sdk_compat.ts +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_hk_lixinger.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_import_parser.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_json_input.ts +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_kline_adjustment.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_llm_hosts.ts +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_market_regime.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_market_review.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_name_resolver.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_pattern.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_position_context.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_provider_network_helpers.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_report_renderer.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_risk_screening.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_screener.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_search_intel.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_sec_edgar.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_sec_holders.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_sentiment.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_setup_python.mjs +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_signal_tracker.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_skill_workflows.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_stateless_analysis.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_stock_data.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_stock_data_failover.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_stock_data_margin.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_stock_data_short_term.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_subproc.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_tail_analysis_skill.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_trading_calendar.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_value_data.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_volume_analysis.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_watchlist.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tests/test_watchlist_context.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/__init__.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/_cache.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/_subproc.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/alert_rules.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/anomaly_detect.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/diagnostics.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/gather.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/import_parser.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/lixinger.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/market_regime.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/market_review.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/name_resolver.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/pattern.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/position_context.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/report_renderer.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/requirements.txt +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/risk_screening.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/screener.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/search_intel.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/sec_edgar.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/sec_holders.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/signal_tracker.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/stateless_analysis.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/stock_data.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/trading_calendar.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/value_data.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/volume_analysis.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/watchlist.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tools/watchlist_context.py +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/tsconfig.json +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/typings/openclaw/index.d.ts +0 -0
- {stock_analysis_plugin-0.2.7 → stock_analysis_plugin-0.2.8}/typings/pi-agent/index.d.ts +0 -0
|
@@ -29,6 +29,7 @@ node_modules/
|
|
|
29
29
|
!tools/cli_budgets.json
|
|
30
30
|
!tests/fixtures/analysis_quality.json
|
|
31
31
|
!tests/fixtures/stateless_analysis.json
|
|
32
|
+
!tests/fixtures/trend_temperature.json
|
|
32
33
|
!openclaw/openclaw.plugin.json
|
|
33
34
|
!strategies/**/*.yaml
|
|
34
35
|
|
|
@@ -66,3 +67,6 @@ dsh/strategies/
|
|
|
66
67
|
dsh/scripts/
|
|
67
68
|
dsh/*.tgz
|
|
68
69
|
.alma-snapshots/
|
|
70
|
+
|
|
71
|
+
# Local price snapshots and downloaded source evidence
|
|
72
|
+
outputs/trend-relative-selection-2026-10-16/
|
|
@@ -7,13 +7,13 @@ A multi-host agent plugin for stock analysis, screening, and strategy backtestin
|
|
|
7
7
|
The architecture is **one Python core, four thin host adapters**:
|
|
8
8
|
|
|
9
9
|
- `tools/*.py` — the shared CLI tools. **This is the single source of truth** for all behavior. Every tool prints JSON to stdout.
|
|
10
|
-
- `pi/index.ts` — Pi extension. `pi.registerTool` ×
|
|
10
|
+
- `pi/index.ts` — Pi extension. `pi.registerTool` ×68, each spawns a `tools/*.py` CLI.
|
|
11
11
|
- `hermes/` — Hermes plugin (`plugin.yaml` + `register(ctx)` in `__init__.py`; `tools.py` handlers → subprocess to the same CLIs). Discovered via the `hermes_agent.plugins` entry point.
|
|
12
|
-
- `openclaw/` — OpenClaw plugin (`openclaw.plugin.json` manifest + `index.ts` `definePluginEntry` + `registerTool` ×
|
|
13
|
-
- `dsh/` — dsh bundle (`package.json` `dsh.bundle` + `cordis.patch.yml` + `index.ts` cordis `apply(ctx)` with `defineTool` ×
|
|
12
|
+
- `openclaw/` — OpenClaw plugin (`openclaw.plugin.json` manifest + `index.ts` `definePluginEntry` + `registerTool` ×68). Bundled with esbuild.
|
|
13
|
+
- `dsh/` — dsh bundle (`package.json` `dsh.bundle` + `cordis.patch.yml` + `index.ts` cordis `apply(ctx)` with `defineTool` ×68 via `@deepseek-ai/dsh-tools`; skills via `ctx.skills.register`). Bundled with esbuild, `@deepseek-ai/*` external (peer deps).
|
|
14
14
|
- `skills/*/SKILL.md` — 20 workflow / strategy-methodology skills shared by all four hosts.
|
|
15
15
|
|
|
16
|
-
> **The invariant that matters most:** the four adapters expose the *same*
|
|
16
|
+
> **The invariant that matters most:** the four adapters expose the *same* 68 tools over the *same* Python CLIs. A change to a tool's name, parameters, or JSON output shape must be applied to **all four adapters and the relevant SKILL.md together** — never just one.
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: stock-analysis-plugin
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.8
|
|
4
4
|
Summary: Hermes plugin for stock analysis, screening, and strategy backtesting across A/HK/US/JP/KR/TW markets
|
|
5
5
|
Project-URL: Homepage, https://github.com/Weaxs/stock-analysis-plugin
|
|
6
6
|
Project-URL: Repository, https://github.com/Weaxs/stock-analysis-plugin
|
|
@@ -73,7 +73,7 @@ A 股 / 港股 / 美股 / 日股 / 韩股 / 台股综合分析、多因子选股
|
|
|
73
73
|
|
|
74
74
|
## 功能概览
|
|
75
75
|
|
|
76
|
-
- **
|
|
76
|
+
- **68 个工具** — 行情数据、技术分析、K 线形态、资金流向、估值历史、财报日历、股东/ETF/股息、新闻舆情、风险筛查、市场状态等
|
|
77
77
|
- **20 个 Skills** — 综合分析、全市场选股、策略回测 + 17 个策略方法论(缠论、波浪、龙头、情绪周期等)
|
|
78
78
|
- **策略回测引擎** — YAML DSL 定义策略,参数化条件组合,自动诊断,按需进行有限轮参数优化
|
|
79
79
|
- **多数据源 Failover** — 11 个数据源自动容灾切换(akshare / tushare / efinance / 腾讯行情 / 新浪行情 / pytdx / baostock / yfinance / finnhub / longbridge / alphavantage),A 股链路带粘性优选(最近成功的数据源下次优先尝试)
|
|
@@ -111,7 +111,7 @@ npm install @weaxs/stock-analysis-plugin
|
|
|
111
111
|
|
|
112
112
|
Pi 启动后自动加载,输入 `/skills` 确认。详见 [Pi Agent 接入指南](docs/pi-integration.md)([English](docs/pi-integration.en.md))。
|
|
113
113
|
|
|
114
|
-
新版 Pi(已核验 1.2.0)提供原生 `tool_search` 时,插件自动启用按需工具发现,
|
|
114
|
+
新版 Pi(已核验 1.2.0)提供原生 `tool_search` 时,插件自动启用按需工具发现,68 项能力保留注册,仅命中工具加载完整定义。缺少原生发现接口的旧版 Pi 或 SDK 宿主保持全量暴露。检索使用英文关键词或工具名,例如 `get_quote`、`get_financials`。
|
|
115
115
|
|
|
116
116
|
### Hermes Agent Plugin
|
|
117
117
|
|
|
@@ -136,7 +136,7 @@ register(ctx)
|
|
|
136
136
|
openclaw plugins install clawhub:@weaxs/openclaw-stock-analysis
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
OpenClaw Gateway 启动后自动加载并注册
|
|
139
|
+
OpenClaw Gateway 启动后自动加载并注册 68 个 tool。安装时 postinstall 会自动建 `.venv` 并装好 Python 依赖(前提:本机有 `python3 >= 3.10`)。
|
|
140
140
|
|
|
141
141
|
详见 [OpenClaw 接入指南](docs/openclaw-integration.md),或 plugin 自身说明 [`openclaw/README.md`](openclaw/README.md)。
|
|
142
142
|
|
|
@@ -147,7 +147,7 @@ dsh plugin --profile <你的profile> add @weaxs/dsh-stock-analysis
|
|
|
147
147
|
dsh --profile <你的profile>
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
-
作为 dsh bundle 安装:`dsh plugin add` 会把 `cordis.patch.yml` 叠加进 profile 组合,注册
|
|
150
|
+
作为 dsh bundle 安装:`dsh plugin add` 会把 `cordis.patch.yml` 叠加进 profile 组合,注册 68 个 tool + 20 个 skill。postinstall 自动建 `.venv`(pnpm 需在 profile 的 `pnpm-workspace.yaml` 里给本包配 `allowBuilds`,否则回退系统 `python3`)。
|
|
151
151
|
|
|
152
152
|
新版 dsh 的原生函数调用模式默认通过 `stock_tool_search` 按 Agent 搜索、加载所需工具,支持中文关键词或工具名;旧接口、搜索入口不可用时保留全量暴露。可设置 `toolDiscovery: false` 关闭,配置与 PTC 模式边界见下方接入文档。
|
|
153
153
|
|
|
@@ -315,13 +315,22 @@ Agent 会自动调用行情 → 技术面 → 基本面 → 资金面 → 消息
|
|
|
315
315
|
|
|
316
316
|
| 工具 | 说明 |
|
|
317
317
|
|------|------|
|
|
318
|
-
| `
|
|
318
|
+
| `analyze_trend_strategy` | 月度右侧趋势策略:单市场股票池筛选、真实旧仓保持/退出与逆波动新仓预算;直接传股票代码、自动取行情,无持仓存储,仍为not_validated |
|
|
319
|
+
| `get_technical_analysis` | 全面技术指标分析(MA/MACD/RSI/BOLL/KDJ;附实验性 trend_horizons 多期限月度趋势及独立趋势温度 trend_temperature;多周期共振时 resonance.direction ∈ aligned_bullish/aligned_bearish/divergent) |
|
|
319
320
|
| `analyze_pattern` | K 线形态识别 |
|
|
320
321
|
| `calculate_ma` | 多周期均线计算 |
|
|
321
322
|
| `get_volume_analysis` | 量价分析 |
|
|
322
323
|
| `evaluate_signal` | 历史信号胜率回测 |
|
|
323
324
|
| `detect_anomaly` | 当日技术、量价与资金异动扫描 |
|
|
324
325
|
|
|
326
|
+
`trend_temperature` 是独立趋势温度指标:`(EMA20-EMA60)/ATR14`,ATR 使用包含跳空的真实波幅简单均值。附分数、EMA差方向 `direction`、七档研究标签、前一期信息、数据日期和价格口径;`validation_status=not_validated`,真实股票试验未支持默认温度交易映射。方向按零轴计算,“平”标签不代表零方向;默认需 60 根预热,零 ATR 或坏行情返回不可用。±0.5/±1.5/±3 的分档尚未校准,不是趋势动物公式、肥尾指标、上涨概率或自动买卖信号,也不修改原综合评分。无需个人持仓存储;[公式、边界及回测说明](skills/bull-trend/references/trend-temperature.md)。
|
|
327
|
+
|
|
328
|
+
月度右侧趋势策略,通过 `analyze_trend_strategy(symbols, ...)` 调用:月初200日线上行入场、真实旧仓优先、63日波动预算;[输入格式与完整规则](skills/bull-trend/references/monthly-trend-strategy.md)。扩展及历史样本尚未通过完整效果门槛;直接提供股票代码即可自动取日K,输出信号与预算计划;实际成交/股数和共享资金回测另行核实,不自动保存持仓或下单。
|
|
329
|
+
|
|
330
|
+
趋势研究另返回 `trend_horizons`(daily、建议count=360):21/63/252根日K过去对数收益,在月初首根有效日K收盘观察并保持;显示期限组成、方向及观察日期,不强凑七档。与回测 `monthly_momentum` 共用计算,仍为 `not_validated`;[方法、预热与验证局限](skills/bull-trend/references/trend-horizons.md)。
|
|
331
|
+
|
|
332
|
+
市场只约束新开仓的三期限实验可运行 [market_trend.py](skills/bull-trend/scripts/market_trend.py),输入带预热的个股/同市场宽基daily OHLCV JSON,复用同一Python核心。月度入场、次日开盘、已有持仓按个股趋势退出;不会自动保存持仓或下单。[使用与当前验证边界](skills/bull-trend/references/trend-horizons.md#市场环境入场实验)。
|
|
333
|
+
|
|
325
334
|
### 筛选与回测
|
|
326
335
|
|
|
327
336
|
| 工具 | 说明 |
|
|
@@ -475,6 +484,8 @@ position:
|
|
|
475
484
|
| `volume_ratio` | 量比 | 是(默认 5) |
|
|
476
485
|
| `price_change` | 涨跌幅(%) | 否 |
|
|
477
486
|
| `bollinger_position` | 布林带位置(0=下轨, 1=上轨) | 是(默认 20) |
|
|
487
|
+
| `trend_score` | 独立实验趋势强度,默认 (EMA20−EMA60)/ATR14;fast_period/slow_period 控制 EMA | period 为 ATR 根数(默认 14) |
|
|
488
|
+
| `monthly_momentum` | 月初首根有效日K收盘观察过去 period 根对数收益,保持到下一观察;零成交量不计根数 | 是(默认63,要求正整数) |
|
|
478
489
|
| `close` / `volume` | 收盘价 / 成交量 | 否 |
|
|
479
490
|
|
|
480
491
|
### 可用运算符
|
|
@@ -593,20 +604,20 @@ GitHub Actions 的 `e2e-host` 使用 Pi、Hermes、OpenClaw、dsh 的真实运
|
|
|
593
604
|
```
|
|
594
605
|
stock-analysis/
|
|
595
606
|
├── pi/ # Pi Agent Extension
|
|
596
|
-
│ └── index.ts # 注册
|
|
607
|
+
│ └── index.ts # 注册 68 个工具 + 20 个 skill
|
|
597
608
|
├── hermes/ # Hermes Agent Plugin
|
|
598
609
|
│ ├── plugin.yaml # 插件清单
|
|
599
610
|
│ ├── __init__.py # register(ctx) 入口
|
|
600
611
|
│ ├── schemas.py # 工具 JSON Schema 定义
|
|
601
|
-
│ └── tools.py #
|
|
612
|
+
│ └── tools.py # 68 个 handler → subprocess 调 CLI
|
|
602
613
|
├── openclaw/ # OpenClaw Plugin
|
|
603
614
|
│ ├── openclaw.plugin.json # manifest(contracts.tools)
|
|
604
615
|
│ ├── package.json # 含 openclaw 块(pluginApi/SDK 版本)
|
|
605
|
-
│ └── index.ts # definePluginEntry + registerTool ×
|
|
616
|
+
│ └── index.ts # definePluginEntry + registerTool ×68
|
|
606
617
|
├── dsh/ # DeepSeek Harness (dsh) Plugin
|
|
607
618
|
│ ├── cordis.patch.yml # bundle patch(insert 插件入口)
|
|
608
619
|
│ ├── package.json # 含 dsh.bundle 块(bundle manifest)
|
|
609
|
-
│ └── index.ts # cordis apply(ctx) + defineTool ×
|
|
620
|
+
│ └── index.ts # cordis apply(ctx) + defineTool ×68
|
|
610
621
|
│
|
|
611
622
|
├── tools/ # 共享 Python CLI 工具
|
|
612
623
|
│ ├── stock_data.py # 行情 / 资金流 / 新闻 / 财务 / 短线情绪
|
|
@@ -32,7 +32,7 @@ A 股 / 港股 / 美股 / 日股 / 韩股 / 台股综合分析、多因子选股
|
|
|
32
32
|
|
|
33
33
|
## 功能概览
|
|
34
34
|
|
|
35
|
-
- **
|
|
35
|
+
- **68 个工具** — 行情数据、技术分析、K 线形态、资金流向、估值历史、财报日历、股东/ETF/股息、新闻舆情、风险筛查、市场状态等
|
|
36
36
|
- **20 个 Skills** — 综合分析、全市场选股、策略回测 + 17 个策略方法论(缠论、波浪、龙头、情绪周期等)
|
|
37
37
|
- **策略回测引擎** — YAML DSL 定义策略,参数化条件组合,自动诊断,按需进行有限轮参数优化
|
|
38
38
|
- **多数据源 Failover** — 11 个数据源自动容灾切换(akshare / tushare / efinance / 腾讯行情 / 新浪行情 / pytdx / baostock / yfinance / finnhub / longbridge / alphavantage),A 股链路带粘性优选(最近成功的数据源下次优先尝试)
|
|
@@ -70,7 +70,7 @@ npm install @weaxs/stock-analysis-plugin
|
|
|
70
70
|
|
|
71
71
|
Pi 启动后自动加载,输入 `/skills` 确认。详见 [Pi Agent 接入指南](docs/pi-integration.md)([English](docs/pi-integration.en.md))。
|
|
72
72
|
|
|
73
|
-
新版 Pi(已核验 1.2.0)提供原生 `tool_search` 时,插件自动启用按需工具发现,
|
|
73
|
+
新版 Pi(已核验 1.2.0)提供原生 `tool_search` 时,插件自动启用按需工具发现,68 项能力保留注册,仅命中工具加载完整定义。缺少原生发现接口的旧版 Pi 或 SDK 宿主保持全量暴露。检索使用英文关键词或工具名,例如 `get_quote`、`get_financials`。
|
|
74
74
|
|
|
75
75
|
### Hermes Agent Plugin
|
|
76
76
|
|
|
@@ -95,7 +95,7 @@ register(ctx)
|
|
|
95
95
|
openclaw plugins install clawhub:@weaxs/openclaw-stock-analysis
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
OpenClaw Gateway 启动后自动加载并注册
|
|
98
|
+
OpenClaw Gateway 启动后自动加载并注册 68 个 tool。安装时 postinstall 会自动建 `.venv` 并装好 Python 依赖(前提:本机有 `python3 >= 3.10`)。
|
|
99
99
|
|
|
100
100
|
详见 [OpenClaw 接入指南](docs/openclaw-integration.md),或 plugin 自身说明 [`openclaw/README.md`](openclaw/README.md)。
|
|
101
101
|
|
|
@@ -106,7 +106,7 @@ dsh plugin --profile <你的profile> add @weaxs/dsh-stock-analysis
|
|
|
106
106
|
dsh --profile <你的profile>
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
作为 dsh bundle 安装:`dsh plugin add` 会把 `cordis.patch.yml` 叠加进 profile 组合,注册
|
|
109
|
+
作为 dsh bundle 安装:`dsh plugin add` 会把 `cordis.patch.yml` 叠加进 profile 组合,注册 68 个 tool + 20 个 skill。postinstall 自动建 `.venv`(pnpm 需在 profile 的 `pnpm-workspace.yaml` 里给本包配 `allowBuilds`,否则回退系统 `python3`)。
|
|
110
110
|
|
|
111
111
|
新版 dsh 的原生函数调用模式默认通过 `stock_tool_search` 按 Agent 搜索、加载所需工具,支持中文关键词或工具名;旧接口、搜索入口不可用时保留全量暴露。可设置 `toolDiscovery: false` 关闭,配置与 PTC 模式边界见下方接入文档。
|
|
112
112
|
|
|
@@ -274,13 +274,22 @@ Agent 会自动调用行情 → 技术面 → 基本面 → 资金面 → 消息
|
|
|
274
274
|
|
|
275
275
|
| 工具 | 说明 |
|
|
276
276
|
|------|------|
|
|
277
|
-
| `
|
|
277
|
+
| `analyze_trend_strategy` | 月度右侧趋势策略:单市场股票池筛选、真实旧仓保持/退出与逆波动新仓预算;直接传股票代码、自动取行情,无持仓存储,仍为not_validated |
|
|
278
|
+
| `get_technical_analysis` | 全面技术指标分析(MA/MACD/RSI/BOLL/KDJ;附实验性 trend_horizons 多期限月度趋势及独立趋势温度 trend_temperature;多周期共振时 resonance.direction ∈ aligned_bullish/aligned_bearish/divergent) |
|
|
278
279
|
| `analyze_pattern` | K 线形态识别 |
|
|
279
280
|
| `calculate_ma` | 多周期均线计算 |
|
|
280
281
|
| `get_volume_analysis` | 量价分析 |
|
|
281
282
|
| `evaluate_signal` | 历史信号胜率回测 |
|
|
282
283
|
| `detect_anomaly` | 当日技术、量价与资金异动扫描 |
|
|
283
284
|
|
|
285
|
+
`trend_temperature` 是独立趋势温度指标:`(EMA20-EMA60)/ATR14`,ATR 使用包含跳空的真实波幅简单均值。附分数、EMA差方向 `direction`、七档研究标签、前一期信息、数据日期和价格口径;`validation_status=not_validated`,真实股票试验未支持默认温度交易映射。方向按零轴计算,“平”标签不代表零方向;默认需 60 根预热,零 ATR 或坏行情返回不可用。±0.5/±1.5/±3 的分档尚未校准,不是趋势动物公式、肥尾指标、上涨概率或自动买卖信号,也不修改原综合评分。无需个人持仓存储;[公式、边界及回测说明](skills/bull-trend/references/trend-temperature.md)。
|
|
286
|
+
|
|
287
|
+
月度右侧趋势策略,通过 `analyze_trend_strategy(symbols, ...)` 调用:月初200日线上行入场、真实旧仓优先、63日波动预算;[输入格式与完整规则](skills/bull-trend/references/monthly-trend-strategy.md)。扩展及历史样本尚未通过完整效果门槛;直接提供股票代码即可自动取日K,输出信号与预算计划;实际成交/股数和共享资金回测另行核实,不自动保存持仓或下单。
|
|
288
|
+
|
|
289
|
+
趋势研究另返回 `trend_horizons`(daily、建议count=360):21/63/252根日K过去对数收益,在月初首根有效日K收盘观察并保持;显示期限组成、方向及观察日期,不强凑七档。与回测 `monthly_momentum` 共用计算,仍为 `not_validated`;[方法、预热与验证局限](skills/bull-trend/references/trend-horizons.md)。
|
|
290
|
+
|
|
291
|
+
市场只约束新开仓的三期限实验可运行 [market_trend.py](skills/bull-trend/scripts/market_trend.py),输入带预热的个股/同市场宽基daily OHLCV JSON,复用同一Python核心。月度入场、次日开盘、已有持仓按个股趋势退出;不会自动保存持仓或下单。[使用与当前验证边界](skills/bull-trend/references/trend-horizons.md#市场环境入场实验)。
|
|
292
|
+
|
|
284
293
|
### 筛选与回测
|
|
285
294
|
|
|
286
295
|
| 工具 | 说明 |
|
|
@@ -434,6 +443,8 @@ position:
|
|
|
434
443
|
| `volume_ratio` | 量比 | 是(默认 5) |
|
|
435
444
|
| `price_change` | 涨跌幅(%) | 否 |
|
|
436
445
|
| `bollinger_position` | 布林带位置(0=下轨, 1=上轨) | 是(默认 20) |
|
|
446
|
+
| `trend_score` | 独立实验趋势强度,默认 (EMA20−EMA60)/ATR14;fast_period/slow_period 控制 EMA | period 为 ATR 根数(默认 14) |
|
|
447
|
+
| `monthly_momentum` | 月初首根有效日K收盘观察过去 period 根对数收益,保持到下一观察;零成交量不计根数 | 是(默认63,要求正整数) |
|
|
437
448
|
| `close` / `volume` | 收盘价 / 成交量 | 否 |
|
|
438
449
|
|
|
439
450
|
### 可用运算符
|
|
@@ -552,20 +563,20 @@ GitHub Actions 的 `e2e-host` 使用 Pi、Hermes、OpenClaw、dsh 的真实运
|
|
|
552
563
|
```
|
|
553
564
|
stock-analysis/
|
|
554
565
|
├── pi/ # Pi Agent Extension
|
|
555
|
-
│ └── index.ts # 注册
|
|
566
|
+
│ └── index.ts # 注册 68 个工具 + 20 个 skill
|
|
556
567
|
├── hermes/ # Hermes Agent Plugin
|
|
557
568
|
│ ├── plugin.yaml # 插件清单
|
|
558
569
|
│ ├── __init__.py # register(ctx) 入口
|
|
559
570
|
│ ├── schemas.py # 工具 JSON Schema 定义
|
|
560
|
-
│ └── tools.py #
|
|
571
|
+
│ └── tools.py # 68 个 handler → subprocess 调 CLI
|
|
561
572
|
├── openclaw/ # OpenClaw Plugin
|
|
562
573
|
│ ├── openclaw.plugin.json # manifest(contracts.tools)
|
|
563
574
|
│ ├── package.json # 含 openclaw 块(pluginApi/SDK 版本)
|
|
564
|
-
│ └── index.ts # definePluginEntry + registerTool ×
|
|
575
|
+
│ └── index.ts # definePluginEntry + registerTool ×68
|
|
565
576
|
├── dsh/ # DeepSeek Harness (dsh) Plugin
|
|
566
577
|
│ ├── cordis.patch.yml # bundle patch(insert 插件入口)
|
|
567
578
|
│ ├── package.json # 含 dsh.bundle 块(bundle manifest)
|
|
568
|
-
│ └── index.ts # cordis apply(ctx) + defineTool ×
|
|
579
|
+
│ └── index.ts # cordis apply(ctx) + defineTool ×68
|
|
569
580
|
│
|
|
570
581
|
├── tools/ # 共享 Python CLI 工具
|
|
571
582
|
│ ├── stock_data.py # 行情 / 资金流 / 新闻 / 财务 / 短线情绪
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Stock Analysis — DeepSeek Harness (dsh) Plugin
|
|
2
2
|
|
|
3
|
-
A股 / 港股 / 美股 / 日股 / 韩股 / 台股 行情、技术分析、筛选与回测。作为 dsh bundle 安装到 profile 后,对话中可调用
|
|
3
|
+
A股 / 港股 / 美股 / 日股 / 韩股 / 台股 行情、技术分析、筛选与回测。作为 dsh bundle 安装到 profile 后,对话中可调用 68 个工具,并自动注册 20 个工作流/策略方法论 skill。
|
|
4
4
|
|
|
5
5
|
## 按需工具发现
|
|
6
6
|
|
|
7
|
-
支持作用域工具接口和请求组装钩子的新版 dsh 默认增加一个宿主控制入口 `stock_tool_search`,原有
|
|
7
|
+
支持作用域工具接口和请求组装钩子的新版 dsh 默认增加一个宿主控制入口 `stock_tool_search`,原有 68 个分析工具的名称、参数和输出不变。原生函数调用模式下,首次请求只暴露这个发现入口;其他插件的工具照常保留。搜索支持中文描述、英文关键词或确切工具名,例如 `财务`、`get_quote`、`run_backtest`;命中工具在下一次模型请求提供完整 schema,再按原名调用。默认最多加载 5 项,`limit` 可设 1 到 20;无匹配返回空列表。
|
|
8
8
|
|
|
9
9
|
加载集合按 Agent 隔离,搜索和回退均保留宿主已有的工具权限限制。搜索入口被禁止或移除时,下一次请求保留原先已授权的完整股票工具目录。旧版缺少相关接口时保持全量暴露;PTC / both 模式沿用宿主生成的 SDK,不做发现过滤。加载集合在本次运行中保留,恢复会话或重载插件后需重新搜索。
|
|
10
10
|
|
|
@@ -468,7 +468,7 @@ export function apply(ctx: Context, config: {toolDiscovery?: boolean} = {}) {
|
|
|
468
468
|
pyTool({
|
|
469
469
|
name: "get_technical_analysis",
|
|
470
470
|
description:
|
|
471
|
-
"获取股票技术面分析(MA/MACD/RSI/BOLL/KDJ/成交量等指标 + 100分综合评分 + 6级买卖信号 +
|
|
471
|
+
"获取股票技术面分析(MA/MACD/RSI/BOLL/KDJ/成交量等指标 + 100分综合评分 + 6级买卖信号 + 趋势/偏离度/支撑压力位;附 trend_temperature(实验性EMA差/ATR描述;direction为均线方向;validation_status=not_validated,非星球指标,七档不作入场依据;另附 trend_horizons:21/63/252根日K月度动量,建议count=360,非概率、未验证);多周期共振时 resonance.direction ∈ aligned_bullish/aligned_bearish/divergent)。个股技术面综合判断与买卖时机分析的首选;只要均线数值或自定义周期用 calculate_ma,专问量价用 get_volume_analysis,扫当日异动用 detect_anomaly",
|
|
472
472
|
parameters: {
|
|
473
473
|
symbol: { type: "string", required: true, description: "股票代码(A股如600519,美股如AAPL,港股如00700.HK)" },
|
|
474
474
|
period: {
|
|
@@ -781,11 +781,53 @@ export function apply(ctx: Context, config: {toolDiscovery?: boolean} = {}) {
|
|
|
781
781
|
})
|
|
782
782
|
);
|
|
783
783
|
|
|
784
|
+
ctx.tools.register(defineTool({
|
|
785
|
+
name: "analyze_trend_strategy",
|
|
786
|
+
description: "月度右侧趋势策略:直接传同市场A/HK/US股票代码,自动获取日K,输出月度新入/持有/退出与逆波动预算。as_of默认最近已收盘交易日,持仓可选且不保存,不自动下单;跨样本仍not_validated。",
|
|
787
|
+
parameters: {
|
|
788
|
+
"symbols": {
|
|
789
|
+
"type": "array",
|
|
790
|
+
"items": {
|
|
791
|
+
"type": "string"
|
|
792
|
+
},
|
|
793
|
+
"description": "同一市场的完整股票池,1..100只;A如600036,HK如0700.HK,US如AAPL",
|
|
794
|
+
"required": true
|
|
795
|
+
},
|
|
796
|
+
"as_of": {
|
|
797
|
+
"type": "string",
|
|
798
|
+
"description": "可选已收盘截止日期YYYY-MM-DD,默认该市场最近已收盘交易日"
|
|
799
|
+
},
|
|
800
|
+
"held_symbols": {
|
|
801
|
+
"type": "array",
|
|
802
|
+
"items": {
|
|
803
|
+
"type": "string"
|
|
804
|
+
},
|
|
805
|
+
"description": "可选,as_of时真实持股代码,必须在股票池中;省略代表初始空仓,不保存账户"
|
|
806
|
+
},
|
|
807
|
+
"pending_exit_symbols": {
|
|
808
|
+
"type": "array",
|
|
809
|
+
"items": {
|
|
810
|
+
"type": "string"
|
|
811
|
+
},
|
|
812
|
+
"description": "可选,真实持股中此前已锁定且未成交的退出代码"
|
|
813
|
+
},
|
|
814
|
+
"slots": {
|
|
815
|
+
"type": "number",
|
|
816
|
+
"description": "可选固定容量K,默认ceil(N/3),不得小于真实持股数量"
|
|
817
|
+
}
|
|
818
|
+
},
|
|
819
|
+
output: { schema: { type: "string" }, render: (_args, value) => [{ type: "text", text: value }] },
|
|
820
|
+
async execute(params) {
|
|
821
|
+
return withJsonInput(params, (path: string) =>
|
|
822
|
+
runPy("trend_strategy.py", ["fetch", "--input", path]));
|
|
823
|
+
},
|
|
824
|
+
}));
|
|
825
|
+
|
|
784
826
|
ctx.tools.register(
|
|
785
827
|
pyTool({
|
|
786
828
|
name: "run_backtest",
|
|
787
829
|
description:
|
|
788
|
-
"策略回测(AlphaEvo)。读取YAML策略定义,在历史数据上模拟交易,输出收益率/回撤/胜率等指标。只想知道单个技术信号的历史胜率用更轻量的 evaluate_signal。period为实际数据期间,requested_period保留请求期间,warnings提示覆盖差异;年化按实际期间计算。默认前日收盘信号、次日开盘成交;YAML simulation.execution=same_close可复现旧假设。execution
|
|
830
|
+
"策略回测(AlphaEvo)。读取YAML策略定义,在历史数据上模拟交易,输出收益率/回撤/胜率等指标。只想知道单个技术信号的历史胜率用更轻量的 evaluate_signal。period为实际数据期间,requested_period保留请求期间,warnings提示覆盖差异;年化按实际期间计算。默认前日收盘信号、次日开盘成交;YAML simulation.execution=same_close可复现旧假设。execution返回模型、阻止成交次数和未模拟约束;零成交量及带历史限价的一字板不成交。支持 monthly_momentum:月初首根有效日K收盘观察过去period根对数收益,次日开盘;长周期需预热。",
|
|
789
831
|
parameters: {
|
|
790
832
|
strategy: { type: "string", required: true, description: "策略YAML文件路径" },
|
|
791
833
|
symbol: { type: "string", required: true, description: "股票代码(A股如600519,美股如AAPL,港股如00700.HK)" },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weaxs/dsh-stock-analysis",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "DeepSeek Harness (dsh) plugin for stock analysis, screening, and strategy backtesting across A/HK/US/JP/KR/TW markets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -1,4 +1,34 @@
|
|
|
1
1
|
TOOL_SCHEMAS = [
|
|
2
|
+
{
|
|
3
|
+
"name": "analyze_trend_strategy",
|
|
4
|
+
"description": "月度右侧趋势策略:直接传同市场A/HK/US股票代码,自动获取日K,输出月度新入/持有/退出与逆波动预算。as_of默认最近已收盘交易日,持仓可选且不保存,不自动下单;跨样本仍not_validated。",
|
|
5
|
+
"parameters": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"symbols": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {"type": "string"},
|
|
11
|
+
"minItems": 1,
|
|
12
|
+
"maxItems": 100,
|
|
13
|
+
"description": "同一市场的完整股票池,1..100只;A如600036,HK如0700.HK,US如AAPL",
|
|
14
|
+
},
|
|
15
|
+
"as_of": {"type": "string", "description": "可选已收盘截止日期YYYY-MM-DD,默认该市场最近已收盘交易日"},
|
|
16
|
+
"held_symbols": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": {"type": "string"},
|
|
19
|
+
"description": "可选,as_of时真实持股代码,必须在股票池中;省略代表初始空仓,不保存账户",
|
|
20
|
+
},
|
|
21
|
+
"pending_exit_symbols": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {"type": "string"},
|
|
24
|
+
"description": "可选,真实持股中此前已锁定且未成交的退出代码",
|
|
25
|
+
},
|
|
26
|
+
"slots": {"type": "number", "description": "可选固定容量K,默认ceil(N/3),不得小于真实持股数量"},
|
|
27
|
+
},
|
|
28
|
+
"required": ["symbols"],
|
|
29
|
+
"additionalProperties": False,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
2
32
|
{
|
|
3
33
|
"name": "get_announcements",
|
|
4
34
|
"description": "查询A股巨潮公告标题、日期、类型和原文PDF链接;按日期范围/类别筛选,默认近90天,top=1..500。第一版不提取正文,truncated提示截断。",
|
|
@@ -252,7 +282,7 @@ TOOL_SCHEMAS = [
|
|
|
252
282
|
},
|
|
253
283
|
{
|
|
254
284
|
"name": "get_technical_analysis",
|
|
255
|
-
"description": "获取股票技术面分析(MA/MACD/RSI/BOLL/KDJ/成交量等指标 + 100分综合评分 + 6级买卖信号 +
|
|
285
|
+
"description": "获取股票技术面分析(MA/MACD/RSI/BOLL/KDJ/成交量等指标 + 100分综合评分 + 6级买卖信号 + 趋势/偏离度/支撑压力位;附 trend_temperature(实验性EMA差/ATR描述;direction为均线方向;validation_status=not_validated,非星球指标,七档不作入场依据;另附 trend_horizons:21/63/252根日K月度动量,建议count=360,非概率、未验证);多周期共振时 resonance.direction ∈ aligned_bullish/aligned_bearish/divergent)。个股技术面综合判断与买卖时机分析的首选;只要均线数值或自定义周期用 calculate_ma,专问量价用 get_volume_analysis,扫当日异动用 detect_anomaly",
|
|
256
286
|
"parameters": {
|
|
257
287
|
"type": "object",
|
|
258
288
|
"properties": {
|
|
@@ -527,7 +557,7 @@ TOOL_SCHEMAS = [
|
|
|
527
557
|
},
|
|
528
558
|
{
|
|
529
559
|
"name": "run_backtest",
|
|
530
|
-
"description": "策略回测(AlphaEvo)。读取YAML策略定义,在历史数据上模拟交易,输出收益率/回撤/胜率等指标。只想知道单个技术信号的历史胜率用更轻量的 evaluate_signal。period为实际数据期间,requested_period保留请求期间,warnings提示覆盖差异;年化按实际期间计算。默认前日收盘信号、次日开盘成交;YAML simulation.execution=same_close可复现旧假设。execution
|
|
560
|
+
"description": "策略回测(AlphaEvo)。读取YAML策略定义,在历史数据上模拟交易,输出收益率/回撤/胜率等指标。只想知道单个技术信号的历史胜率用更轻量的 evaluate_signal。period为实际数据期间,requested_period保留请求期间,warnings提示覆盖差异;年化按实际期间计算。默认前日收盘信号、次日开盘成交;YAML simulation.execution=same_close可复现旧假设。execution返回模型、阻止成交次数和未模拟约束;零成交量及带历史限价的一字板不成交。支持 monthly_momentum:月初首根有效日K收盘观察过去period根对数收益,次日开盘;长周期需预热。",
|
|
531
561
|
"parameters": {
|
|
532
562
|
"type": "object",
|
|
533
563
|
"properties": {
|
|
@@ -207,6 +207,10 @@ def screen_stocks(args: dict, **kwargs) -> str:
|
|
|
207
207
|
return _run("screener.py", argv)
|
|
208
208
|
|
|
209
209
|
|
|
210
|
+
def analyze_trend_strategy(args: dict, **kwargs) -> str:
|
|
211
|
+
return _run_analysis("fetch", args, script="trend_strategy.py")
|
|
212
|
+
|
|
213
|
+
|
|
210
214
|
def run_backtest(args: dict, **kwargs) -> str:
|
|
211
215
|
strategy = args["strategy"]
|
|
212
216
|
symbol = args["symbol"]
|
|
@@ -537,13 +541,13 @@ def get_insider_trades(args: dict, **kwargs) -> str:
|
|
|
537
541
|
)
|
|
538
542
|
|
|
539
543
|
|
|
540
|
-
def _run_analysis(command: str, args: dict) -> str:
|
|
544
|
+
def _run_analysis(command: str, args: dict, *, script="stateless_analysis.py") -> str:
|
|
541
545
|
try:
|
|
542
546
|
with tempfile.TemporaryDirectory(prefix="stock-analysis-") as directory:
|
|
543
547
|
path = Path(directory) / "input.json"
|
|
544
548
|
path.write_text(json.dumps(args, ensure_ascii=False, allow_nan=False), encoding="utf-8")
|
|
545
549
|
path.chmod(0o600)
|
|
546
|
-
return _run(
|
|
550
|
+
return _run(script, [command, "--input", str(path)])
|
|
547
551
|
except Exception:
|
|
548
552
|
return json.dumps({"error": "Analysis input transport failed"})
|
|
549
553
|
|
|
@@ -494,7 +494,7 @@ export default definePluginEntry({
|
|
|
494
494
|
api.registerTool({
|
|
495
495
|
name: "get_technical_analysis",
|
|
496
496
|
description:
|
|
497
|
-
"获取股票技术面分析(MA/MACD/RSI/BOLL/KDJ/成交量等指标 + 100分综合评分 + 6级买卖信号 +
|
|
497
|
+
"获取股票技术面分析(MA/MACD/RSI/BOLL/KDJ/成交量等指标 + 100分综合评分 + 6级买卖信号 + 趋势/偏离度/支撑压力位;附 trend_temperature(实验性EMA差/ATR描述;direction为均线方向;validation_status=not_validated,非星球指标,七档不作入场依据;另附 trend_horizons:21/63/252根日K月度动量,建议count=360,非概率、未验证);多周期共振时 resonance.direction ∈ aligned_bullish/aligned_bearish/divergent)。个股技术面综合判断与买卖时机分析的首选;只要均线数值或自定义周期用 calculate_ma,专问量价用 get_volume_analysis,扫当日异动用 detect_anomaly",
|
|
498
498
|
parameters: Type.Object({
|
|
499
499
|
symbol: Type.String({ description: "股票代码(A股如600519,美股如AAPL,港股如00700.HK)" }),
|
|
500
500
|
period: Type.Optional(
|
|
@@ -851,10 +851,26 @@ export default definePluginEntry({
|
|
|
851
851
|
},
|
|
852
852
|
});
|
|
853
853
|
|
|
854
|
+
api.registerTool({
|
|
855
|
+
name: "analyze_trend_strategy",
|
|
856
|
+
description: "月度右侧趋势策略:直接传同市场A/HK/US股票代码,自动获取日K,输出月度新入/持有/退出与逆波动预算。as_of默认最近已收盘交易日,持仓可选且不保存,不自动下单;跨样本仍not_validated。",
|
|
857
|
+
parameters: Type.Object({
|
|
858
|
+
symbols: Type.Array(Type.String(), { description: "同一市场的完整股票池,1..100只;A如600036,HK如0700.HK,US如AAPL" }),
|
|
859
|
+
as_of: Type.Optional(Type.String({ description: "可选已收盘截止日期YYYY-MM-DD,默认该市场最近已收盘交易日" })),
|
|
860
|
+
held_symbols: Type.Optional(Type.Array(Type.String(), { description: "可选,as_of时真实持股代码,必须在股票池中;省略代表初始空仓,不保存账户" })),
|
|
861
|
+
pending_exit_symbols: Type.Optional(Type.Array(Type.String(), { description: "可选,真实持股中此前已锁定且未成交的退出代码" })),
|
|
862
|
+
slots: Type.Optional(Type.Number({ description: "可选固定容量K,默认ceil(N/3),不得小于真实持股数量" })),
|
|
863
|
+
}, { additionalProperties: false }),
|
|
864
|
+
async execute(_id, params) {
|
|
865
|
+
return asText(await withJsonInput(params, (path: string) =>
|
|
866
|
+
runPy("trend_strategy.py", ["fetch", "--input", path])));
|
|
867
|
+
},
|
|
868
|
+
});
|
|
869
|
+
|
|
854
870
|
api.registerTool({
|
|
855
871
|
name: "run_backtest",
|
|
856
872
|
description:
|
|
857
|
-
"策略回测(AlphaEvo)。读取YAML策略定义,在历史数据上模拟交易,输出收益率/回撤/胜率等指标。只想知道单个技术信号的历史胜率用更轻量的 evaluate_signal。period为实际数据期间,requested_period保留请求期间,warnings提示覆盖差异;年化按实际期间计算。默认前日收盘信号、次日开盘成交;YAML simulation.execution=same_close可复现旧假设。execution
|
|
873
|
+
"策略回测(AlphaEvo)。读取YAML策略定义,在历史数据上模拟交易,输出收益率/回撤/胜率等指标。只想知道单个技术信号的历史胜率用更轻量的 evaluate_signal。period为实际数据期间,requested_period保留请求期间,warnings提示覆盖差异;年化按实际期间计算。默认前日收盘信号、次日开盘成交;YAML simulation.execution=same_close可复现旧假设。execution返回模型、阻止成交次数和未模拟约束;零成交量及带历史限价的一字板不成交。支持 monthly_momentum:月初首根有效日K收盘观察过去period根对数收益,次日开盘;长周期需预热。",
|
|
858
874
|
parameters: Type.Object({
|
|
859
875
|
strategy: Type.String({ description: "策略YAML文件路径" }),
|
|
860
876
|
symbol: Type.String({ description: "股票代码(A股如600519,美股如AAPL,港股如00700.HK)" }),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weaxs/stock-analysis-plugin",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@weaxs/stock-analysis-plugin",
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.8",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"devDependencies": {
|
|
@@ -1186,7 +1186,7 @@ export default (pi: ExtensionAPI) => {
|
|
|
1186
1186
|
registerTool({
|
|
1187
1187
|
name: "get_technical_analysis",
|
|
1188
1188
|
description:
|
|
1189
|
-
"获取股票技术面分析(MA/MACD/RSI/BOLL/KDJ/成交量等指标 + 100分综合评分 + 6级买卖信号 +
|
|
1189
|
+
"获取股票技术面分析(MA/MACD/RSI/BOLL/KDJ/成交量等指标 + 100分综合评分 + 6级买卖信号 + 趋势/偏离度/支撑压力位;附 trend_temperature(实验性EMA差/ATR描述;direction为均线方向;validation_status=not_validated,非星球指标,七档不作入场依据;另附 trend_horizons:21/63/252根日K月度动量,建议count=360,非概率、未验证);多周期共振时 resonance.direction ∈ aligned_bullish/aligned_bearish/divergent)。个股技术面综合判断与买卖时机分析的首选;只要均线数值或自定义周期用 calculate_ma,专问量价用 get_volume_analysis,扫当日异动用 detect_anomaly",
|
|
1190
1190
|
parameters: {
|
|
1191
1191
|
type: "object",
|
|
1192
1192
|
properties: {
|
|
@@ -1605,10 +1605,59 @@ export default (pi: ExtensionAPI) => {
|
|
|
1605
1605
|
},
|
|
1606
1606
|
});
|
|
1607
1607
|
|
|
1608
|
+
registerTool({
|
|
1609
|
+
name: "analyze_trend_strategy",
|
|
1610
|
+
description: "月度右侧趋势策略:直接传同市场A/HK/US股票代码,自动获取日K,输出月度新入/持有/退出与逆波动预算。as_of默认最近已收盘交易日,持仓可选且不保存,不自动下单;跨样本仍not_validated。",
|
|
1611
|
+
parameters: {
|
|
1612
|
+
"type": "object",
|
|
1613
|
+
"properties": {
|
|
1614
|
+
"symbols": {
|
|
1615
|
+
"type": "array",
|
|
1616
|
+
"items": {
|
|
1617
|
+
"type": "string"
|
|
1618
|
+
},
|
|
1619
|
+
"minItems": 1,
|
|
1620
|
+
"maxItems": 100,
|
|
1621
|
+
"description": "同一市场的完整股票池,1..100只;A如600036,HK如0700.HK,US如AAPL"
|
|
1622
|
+
},
|
|
1623
|
+
"as_of": {
|
|
1624
|
+
"type": "string",
|
|
1625
|
+
"description": "可选已收盘截止日期YYYY-MM-DD,默认该市场最近已收盘交易日"
|
|
1626
|
+
},
|
|
1627
|
+
"held_symbols": {
|
|
1628
|
+
"type": "array",
|
|
1629
|
+
"items": {
|
|
1630
|
+
"type": "string"
|
|
1631
|
+
},
|
|
1632
|
+
"description": "可选,as_of时真实持股代码,必须在股票池中;省略代表初始空仓,不保存账户"
|
|
1633
|
+
},
|
|
1634
|
+
"pending_exit_symbols": {
|
|
1635
|
+
"type": "array",
|
|
1636
|
+
"items": {
|
|
1637
|
+
"type": "string"
|
|
1638
|
+
},
|
|
1639
|
+
"description": "可选,真实持股中此前已锁定且未成交的退出代码"
|
|
1640
|
+
},
|
|
1641
|
+
"slots": {
|
|
1642
|
+
"type": "number",
|
|
1643
|
+
"description": "可选固定容量K,默认ceil(N/3),不得小于真实持股数量"
|
|
1644
|
+
}
|
|
1645
|
+
},
|
|
1646
|
+
"required": [
|
|
1647
|
+
"symbols"
|
|
1648
|
+
],
|
|
1649
|
+
"additionalProperties": false
|
|
1650
|
+
},
|
|
1651
|
+
async execute(_id, params) {
|
|
1652
|
+
return asText(await withJsonInput(params, async (path: string) =>
|
|
1653
|
+
(await py("trend_strategy.py", ["fetch", "--input", path])).stdout));
|
|
1654
|
+
},
|
|
1655
|
+
});
|
|
1656
|
+
|
|
1608
1657
|
registerTool({
|
|
1609
1658
|
name: "run_backtest",
|
|
1610
1659
|
description:
|
|
1611
|
-
"策略回测(AlphaEvo)。读取YAML策略定义,在历史数据上模拟交易,输出收益率/回撤/胜率等指标。只想知道单个技术信号的历史胜率用更轻量的 evaluate_signal。period为实际数据期间,requested_period保留请求期间,warnings提示覆盖差异;年化按实际期间计算。默认前日收盘信号、次日开盘成交;YAML simulation.execution=same_close可复现旧假设。execution
|
|
1660
|
+
"策略回测(AlphaEvo)。读取YAML策略定义,在历史数据上模拟交易,输出收益率/回撤/胜率等指标。只想知道单个技术信号的历史胜率用更轻量的 evaluate_signal。period为实际数据期间,requested_period保留请求期间,warnings提示覆盖差异;年化按实际期间计算。默认前日收盘信号、次日开盘成交;YAML simulation.execution=same_close可复现旧假设。execution返回模型、阻止成交次数和未模拟约束;零成交量及带历史限价的一字板不成交。支持 monthly_momentum:月初首根有效日K收盘观察过去period根对数收益,次日开盘;长周期需预热。",
|
|
1612
1661
|
parameters: {
|
|
1613
1662
|
type: "object",
|
|
1614
1663
|
properties: {
|