ETF Trading Backtest System for Openclaw

A professional-grade quantitative tool for simulating ETF transactions and performing backtest analysis using technical indicators and realistic market rules.

tangsuann
v1.0.0
Mar 17, 2026
1
1.3k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install etf-trading-backtest

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install etf-trading-backtest using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is ETF Trading Backtest System?

The ETF Trading Backtest System is a specialized tool within the Openclaw Skills library designed for developers and traders focusing on A-share ETFs. It provides a comprehensive framework for simulating intraday trading strategies by leveraging technical indicators like Bollinger Bands (BOLL), Moving Average Convergence Divergence (MACD), and KDJ. The system is built to mirror real-world trading environments, incorporating T+1 settlement rules, transaction fees, and stamp duties.

By using this skill, users can validate their quantitative hypotheses without financial risk. It automatically handles the calculation of critical performance metrics, such as the Sharpe ratio and maximum drawdown, providing a data-driven approach to strategy refinement. Whether you are targeting the Shipping ETF (560710) or other stock-based assets, this system offers the analytical depth required for professional strategy auditing.

ETF Trading Backtest System Use Cases

  • Backtesting historical ETF data to evaluate the profitability of technical indicator combinations.
  • Simulating real-time trading signals for A-share ETFs like the Fuguo CSI Smart Selection Shipping Industry ETF (560710).
  • Automating the generation of daily trading reports and performance summaries for quantitative portfolios.
  • Calculating risk-adjusted returns to optimize stop-loss and take-profit parameters in a safe environment.

How ETF Trading Backtest System Works

  1. Data Acquisition: The system fetches real-time or historical market data for the target ETF ticker.
  2. Indicator Calculation: It computes core technical metrics including BOLL, MACD, and KDJ values.
  3. Signal Generation: Buy and sell signals are generated based on prioritized logic, such as price breakthroughs or oversold conditions.
  4. Execution Simulation: The engine simulates trade execution while accounting for T+1 rules and transaction costs (commissions and taxes).
  5. Risk Assessment: The system calculates professional risk metrics, including the Calmar ratio, win rate, and annualized volatility.
  6. Reporting: A detailed Markdown report is produced, summarizing current positions, profit/loss, and overall strategy health.

ETF Trading Backtest System Setup

To integrate this tool into your Openclaw Skills workflow, follow these steps:

# Navigate to your agent workspace
# Ensure dependencies like pandas and numpy are installed

# Configure your target ETF and initial capital in references/rules.md
# Execute the main trading script
python scripts/trade.py

ETF Trading Backtest System Data Schema & Taxonomy

The system organizes data into several key structures to ensure transparent backtesting:

Category Metadata Fields
Technical Indicators BOLL (Upper/Mid/Lower), MACD (DIF/DEA/Histogram), KDJ (K, D, J)
Trade Execution Operation Type, Execution Price, Quantity, Transaction Fee, Stamp Duty
Portfolio Metrics Total Assets, Floating P/L, Realized P/L, Current Position Ratio
Risk Statistics Max Drawdown, Sharpe Ratio, Calmar Ratio, Win Rate, Profit-Loss Ratio

ETF Trading Backtest System Advanced Features

  • Multi-indicator signal fusion: Combines BOLL breakouts with KDJ J-values for high-probability entries.
  • Automated Cron Integration: Supports scheduled tasks for market opening (9:30), mid-day analysis, and market closing reviews (15:00).
  • Customizable Trading Constraints: Easily modify stop-loss thresholds, take-profit lines, and commission rates in the configuration file.
  • Detailed Performance Auditing: Generates comprehensive backtest reports with annualized return projections and risk-adjusted volatility analysis.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*