360 Secure SkillHub
360 安全技能中心

trading-backtest-viewer

读取本地交易回测结果 JSON,提取总收益、胜率、Sharpe、最大回撤、交易次数、平均持仓时长和盈亏比,并整理为摘要表;指标缺失时说明缺口,可比较两份结果文件。

eohmig
eohmig
热度 15.61
最近更新 2026-09-20 04:31:24
分类:数据依赖:读写文件 / 代码执行应用场景:财务 / 报告撰写 / 数据处理 / 摘要总结

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add trading-backtest-viewer
Metadata
name
trading-backtest-viewer
description
Parse and summarize backtest results from D:/Stock/ — win rate, Sharpe, drawdown, returns

trading-backtest-viewer

Read and summarize trading backtest results stored as JSON in D:/Stock/.

Steps

  1. Read the backtest result files:

    • D:/Stock/backtest_results.json (summary)
    • D:/Stock/backtest_results_full.json (detailed)
  2. Extract and report the following metrics:

    • Total return (percentage)
    • Win rate (% of winning trades)
    • Sharpe ratio (if available)
    • Max drawdown (peak-to-trough decline)
    • Number of trades
    • Average trade duration
    • Profit factor (gross profit / gross loss)
  3. If metrics are missing or the JSON schema differs, parse whatever is present and note gaps.

  4. Present results in a clean summary table:

    ## Backtest Summary
    | Metric        | Value     |
    |---------------|-----------|
    | Total Return  | +XX.X%    |
    | Win Rate      | XX.X%     |
    | Sharpe Ratio  | X.XX      |
    | Max Drawdown  | -XX.X%    |
    | Trades        | NNN       |
    
  5. Offer to compare with the other file (_full.json vs _results.json) if both exist.

Notes

  • The data lives in D:/Stock/backtest_results*.json.
  • Do NOT modify the files — read-only analysis.
  • If Python is available, you may use python -c "import json; ..." for structured parsing.