Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计通过

qc-backtest-masterQC 回测大师

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

7,491

周安装

306

GitHub Stars

公开资料未说明

下载量

2,399
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:qc-backtest-master(QC 回测大师)
来源仓库:https://github.com/tltby12341/qc-backtest-master
安装命令:
openclaw skills install qc-backtest-master
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install qc-backtest-master

简介

QuantConnect 自动化回测管道 — 通过一条命令提交本地策略、编译、执行、提前停止监控以及下载结果。

SKILL.md

name
qc-backtest-master
description
QuantConnect automated backtest pipeline — submit local strategies, compile, execute, monitor with early-stop, and download results in one command.
version
1.0.0
metadata
openclaw
requires
env
bins
primaryEnv
QC_API_TOKEN
emoji
\F680

QC Backtest Master

Automate the full QuantConnect backtest lifecycle from local code to cloud results, without ever opening the web UI.

What this skill does

When the user asks to backtest a strategy, run a backtest, or submit code to QuantConnect, follow this workflow:

1. Submit & Compile

Upload the user's local .py strategy file to a QuantConnect cloud project, replacing any existing main.py. Trigger compilation and report any errors with line numbers.

python3 submit_backtest.py \
  --main-file <path_to_strategy.py> \
  --name "<backtest_name>" \
  --project-id $QC_PROJECT_ID

If the strategy has auxiliary data files (.json, .txt, .csv), upload those too.

2. Monitor with Early-Stop

Poll backtest progress in real time. If drawdown exceeds the user's threshold after 20% progress, automatically delete the backtest to save compute time.

python3 monitor_backtest.py <backtest_id> \
  --max-dd <threshold> \
  --check-after-progress 0.20 \
  --timeout 3600

Exit codes:

CodeMeaning
0Backtest completed normally
1Runtime error (print full stack trace)
2Timeout
3Early stop: drawdown exceeded threshold, backtest deleted

3. Download Results

Fetch the complete backtest statistics (JSON) and all order records (CSV, paginated at 100 per call to bypass QC's limit).

python3 get_results.py <backtest_id> --output-dir ./results/<name>

Output files:

  • <backtest_id>_result.json — Full statistics, charts, runtime data
  • <backtest_id>_orders.csv — All orders with symbol, direction, quantity, fill price, fees, timestamps

4. Full Pipeline (One Command)

Run the entire submit-compile-monitor-download pipeline:

python3 run_workflow.py \
  --main-file <path_to_strategy.py> \
  --name "<backtest_name>" \
  --max-dd 40

5. List Historical Backtests

python3 list_backtests.py --limit 10

QC API Client

The qc_api/client.py module wraps the QuantConnect REST API v2:

  • create_backtest(project_id, name, compile_id) — Start a backtest
  • read_backtest(project_id, backtest_id) — Get status and results
  • read_backtest_orders(project_id, backtest_id, start, end) — Paginated order fetch
  • delete_backtest(project_id, backtest_id) — Delete (used for early-stop)
  • update_project_file(project_id, name, content) — Upload code
  • compile_project(project_id) — Trigger compilation

Credentials are read from environment variables QC_USER_ID and QC_API_TOKEN.

Rules

  • Entry file: Local strategy files are uploaded as main.py. Old Main.py is auto-deleted to prevent conflicts. Do not manually rename files on the QC cloud project.
  • One backtest at a time: QC free tier allows only 1 concurrent backtest per project. Never submit a second backtest while one is running — it will silently fail or queue.
  • Logs are not available via API: QC REST API v2 does not expose self.log() output. View logs in the QC web UI manually.
  • Early-stop threshold: Accepts both fraction (0.40) and percentage (40) formats. Early-stop permanently deletes the backtest — it cannot be recovered.
  • Environment variables QC_USER_ID, QC_API_TOKEN, and QC_PROJECT_ID must be set. The skill will raise a clear error if any are missing.
  • Do not modify cloud project files outside this skill. The skill assumes it owns main.py and will overwrite any manual changes on the next submission.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

90.67%
按下载量换算2,175

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills