{"id":"d4782484-08e6-4b85-9565-acea8c696742","entityType":"agent","slug":"dify-123qwer","name":"股票预测分析","canonicalUrl":"https://www.xpersona.co/agent/dify-123qwer","canonicalPath":"/agent/dify-123qwer","generatedAt":"2026-10-09T08:06:17.843Z","source":"DIFY_MARKETPLACE","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T01:20:56.516Z","emptyReason":null},"description":"输入沪深 A 股代码，自动用逻辑回归、SVM、随机森林、LightGBM 四个模型做 walk-forward 样本外回测，对比买入持有等双基线，输出收益、夏普、换手与成本拖累指标、净值曲线和完整 HTML 报告。历史回测，不构成投资建议。 模板设置步骤（Setup Guide） 前置条件 - 一台可运行 Python 3.10–3.12 的机器（Windows / Linux /macOS 均可），用于运行回测后端 API（Dify 本身不执行 pandas / 机器学习计算，这是本模板的必要外部服务） - 一个可用的大模型 API Key（如 DeepSeek、通义千问、OpenAI 等），供「参数提取器」和「LLM 总结」节点使用 - 后端机器需能访问公网（首次查询新股票时要从 baostock 拉取行情，约 10–40 秒） 步骤 1・部署回测后端 API 1. 获取后端代码包（api.py、compare_models.py、requirements.txt、src/，目录结构需保持不变） 2. Windows 用户直接双击 **一键部署.bat**，脚本会自动创建虚拟环境、安装全部依赖并启动服务；其他系统手动执行： 3. 浏览器访问 http://127","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. Last updated 10/9/2026.","installCommand":null,"sourceUrl":"https://marketplace.dify.ai/api/v1/templates/6b34588e-3954-4bc7-9a4b-89567823b065","homepage":null,"primaryLinks":[{"label":"View on Dify","url":"https://marketplace.dify.ai/api/v1/templates/6b34588e-3954-4bc7-9a4b-89567823b065","kind":"source"}],"safetyScore":82,"overallRank":87.8,"popularityScore":65,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"输入沪深 A 股代码，自动用逻辑回归、SVM、随机森林、LightGBM 四个模型做 walk-forward 样本外回测，对比买入持有等双基线，输出收益、夏普、换手与成本拖累指标、净值曲线和完整 HTML 报告。历史回测，不构成投资建议。 模板设置步骤（Setup Guide） 前置条件 - 一台可运行 Python"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T01:20:56.516Z","emptyReason":null},"protocols":[],"capabilities":[{"label":"workflow","status":"self-declared"},{"label":"others","status":"self-declared"},{"label":"siliconflow","status":"self-declared"}],"verifiedCount":0,"selfDeclaredCount":3,"capabilityMatrix":{"rows":[{"key":"workflow","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"},{"key":"others","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"},{"key":"siliconflow","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"}],"flattenedTokens":"capability:workflow|supported|profile capability:others|supported|profile capability:siliconflow|supported|profile"}},"adoption":{"evidence":{"source":"no-adoption-signals","verified":false,"confidence":"low","updatedAt":"2026-10-09T01:20:56.516Z","emptyReason":"No source adoption metrics were available."},"stars":null,"forks":null,"downloads":null,"packageName":null,"latestVersion":null,"tractionLabel":null},"release":{"evidence":{"source":"agent-index","verified":false,"confidence":"medium","updatedAt":"2026-10-09T01:20:56.512Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T01:20:56.516Z","lastCrawledAt":"2026-10-09T01:20:56.512Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T01:20:56.512Z","lastVerifiedAt":null,"highlights":[]},"execution":{"evidence":{"source":"Dify","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":null,"setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/dify-123qwer/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/dify-123qwer/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/dify-123qwer/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/dify-123qwer/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/dify-123qwer/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/dify-123qwer/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":[]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"DIFY_MARKETPLACE","generatedAt":"2026-10-09T08:06:17.843Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/dify-123qwer/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/dify-123qwer/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/dify-123qwer/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/dify-123qwer/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"Dify","verified":false,"confidence":"high","updatedAt":"2026-10-09T01:20:56.516Z","emptyReason":null},"readme":"## 模板设置步骤（Setup Guide）\r\n\r\n### 前置条件\r\n\r\n- 一台可运行 Python 3.10–3.12 的机器（Windows / Linux /macOS 均可），用于运行回测后端 API（Dify 本身不执行 pandas / 机器学习计算，这是本模板的必要外部服务）\r\n- 一个可用的大模型 API Key（如 DeepSeek、通义千问、OpenAI 等），供「参数提取器」和「LLM 总结」节点使用\r\n- 后端机器需能访问公网（首次查询新股票时要从 baostock 拉取行情，约 10–40 秒）\r\n\r\n### 步骤 1・部署回测后端 API\r\n\r\n1. 获取后端代码包（`api.py`、`compare_models.py`、`requirements.txt`、`src/`，目录结构需保持不变）\r\n2. Windows 用户直接双击 **`一键部署.bat`**，脚本会自动创建虚拟环境、安装全部依赖并启动服务；其他系统手动执行：\r\n```\r\npython -m venv .venv\r\n.venv/bin/pip install -r requirements.txt\r\n.venv/bin/python -m uvicorn api:app --host 0.0.0.0 --port 8000\r\n```\r\n3. 浏览器访问 `http://127.0.0.1:8000/health`，返回 `{\"status\":\"ok\"}` 即后端就绪\r\n\r\n### 步骤 2・让 Dify 能访问到该 API（关键，按你的部署形态二选一）\r\n\r\n- **Dify 云端版（marketplace 大多数用户）**：云端无法访问你的 [localhost](https://localhost)，必须把后端部署到公网服务器（建议配 HTTPS 域名），并设置环境变量 `API_BASE_URL=https://你的域名`，让报告里的图片 / 报告链接可打开\r\n- **Dify 用 Docker 自部署、与后端在同一台机器**：HTTP 节点地址用 `http://host.docker.internal:8000/analyze`（不能用 127.0.0.1，那指向容器自身）；新版 Dify 默认开启 SSRF 防护拦截内网地址，需在 `docker/.env` 加入下面一行后执行 `docker compose up -d`：\r\n```\r\nSSRF_PROXY_ALLOW_PRIVATE_IPS=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16\r\n```\r\n- **Dify 与后端在局域网不同机器**：填后端机器的局域网 IPv4（如 `http://192.168.1.50:8000/analyze`），并在该机防火墙放行 8000 入站\r\n\r\n### 步骤 3・采用模板\r\n\r\n在模板详情页点「Open in Dify / 添加到工作区」，选择创建为 **Chatflow（对话流）**。\r\n\r\n### 步骤 4・配置模型供应商\r\n\r\n进入「设置 → 模型供应商」填入你的模型 API Key，并在工作流的**参数提取器**和**LLM 总结**两个节点里分别选中该模型。\r\n\r\n### 步骤 5・配置 HTTP 请求节点\r\n\r\n打开「HTTP 请求」节点核对：\r\n\r\n表格\r\n\r\n| 配置项 | 值 |\r\n| --- | --- |\r\n| Method | POST |\r\n| URL | 步骤 2 确定的地址 + `/analyze` |\r\n| Headers | `Content-Type: application/json` |\r\n| Body | 引用参数提取器输出的 `code / start / end`（已内置） |\r\n| 超时时间 | **≥ 120 秒**（首次拉取新股票数据需要 10–40 秒，超时会断连报错） |\r\n\r\n### 步骤 6・预览验证\r\n\r\n点右上角「预览」，输入 `600519` 或「帮我分析贵州茅台」：\r\n\r\n- 首次等待 10–40 秒，同一股票再次提问秒回（命中本地缓存）\r\n- 正常返回：4 个模型与双基线的对比表格、客观结论文字、净值曲线图、完整 HTML 报告链接\r\n- 输入参数：股票代码 `code` 必填（支持 6 位代码或中文名，覆盖沪深主板 / 创业板 / 科创板，暂不支持北交所）；起止日期可选，默认 2016-01-01 ~ 2025-12-31\r\n\r\n### 步骤 7・发布\r\n\r\n验证通过后点「发布 → 发布更新」，即可通过 WebApp、嵌入网页或 API 使用。","readmeExcerpt":"模板设置步骤（Setup Guide） 前置条件 - 一台可运行 Python 3.10–3.12 的机器（Windows / Linux /macOS 均可），用于运行回测后端 API（Dify 本身不执行 pandas / 机器学习计算，这是本模板的必要外部服务） - 一个可用的大模型 API Key（如 DeepSeek、通义千问、OpenAI 等），供「参数提取器」和「LLM 总结」节点使用 - 后端机器需能访问公网（首次查询新股票时要从 baostock 拉取行情，约 10–40 秒） 步骤 1・部署回测后端 API 1. 获取后端代码包（api.py、compare_models.py、requirements.txt、src/，目录结构需保持不变） 2. Windows 用户直接双击 **一键部署.bat**，脚本会自动创建虚拟环境、安装全部依赖并启动服务；其他系统手动执行： 3. 浏览器访问 http://127","codeSnippets":[],"executableExamples":[],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[],"languages":["zh-Hans"],"docsSourceLabel":"Dify","editorialOverview":"输入沪深 A 股代码，自动用逻辑回归、SVM、随机森林、LightGBM 四个模型做 walk-forward 样本外回测，对比买入持有等双基线，输出收益、夏普、换手与成本拖累指标、净值曲线和完整 HTML 报告。历史回测，不构成投资建议。 模板设置步骤（Setup Guide） 前置条件 - 一台可运行 Python 3.10–3.12 的机器（Windows / Linux /macOS 均可），用于运行回测后端 API（Dify 本身不执行 pandas / 机器学习计算，这是本模板的必要外部服务） - 一个可用的大模型 API Key（如 DeepSeek、通义千问、OpenAI 等），供「参数提取器」和「LLM 总结」节点使用 - 后端机器需能访问公网（首次查询新股票时要从 baostock 拉取行情，约 10–40 秒） 步骤 1・部署回测后端 API 1. 获取后端代码包（api.py、compare_models.py、requirements.txt、src/，目录结构需保持不变） 2. Windows 用户直接双击 **一键部署.bat**，脚本会自动创建虚拟环境、安装全部依赖并启动服务；其他系统手动执行： 3. 浏览器访问 http://127","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":327,"uniquenessScore":73,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T01:20:56.516Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T01:20:56.516Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"agent-directory","verified":false,"confidence":"low","updatedAt":"2026-10-09T08:06:17.843Z","emptyReason":"No close protocol neighbors were found."},"items":[],"links":{"hub":"/agent","source":"/agent/source/dify_marketplace","protocols":[]}}}