A股模拟交易系统 / A-Share Paper Trading System
name: a-stock-trader
by bombfuock · published 2026-03-22
$ claw add gh:bombfuock/bombfuock-a-stock-trader---
name: a-stock-trader
description: "A股模拟交易系统 - 数据爬取、存储、策略回测、模拟交易 / A-Share Paper Trading System - Data Fetch, Storage, Backtest, Simulation"
metadata:
version: 1.0.1
author: OpenClaw Agent
---
# A股模拟交易系统 / A-Share Paper Trading System
这是一个完整的A股模拟交易系统,包含数据获取、存储、策略回测和模拟交易功能。
This is a complete A-share paper trading system with data fetching, storage, strategy backtest and simulation.
功能模块 / Function Modules
1. 数据爬取 / Data Fetching
2. 数据存储 / Data Storage
3. 模拟交易 / Paper Trading
4. 策略模板 / Strategy Templates
#### 4.1 均线策略 (MA) / Moving Average Strategy
#### 4.2 动量策略 (Momentum) / Momentum Strategy
#### 4.3 突破策略 (Breakout) / Breakout Strategy
#### 4.4 网格策略 (Grid) / Grid Strategy
使用示例 / Usage Examples
获取数据 / Fetch Data
python scripts/fetch_daily.py --stock 600519 --days 250运行回测 / Run Backtest
python scripts/backtest.py --strategy ma --stock 600519模拟交易 / Paper Trade
python scripts/simulate.py --strategy momentum --stock 600519查看持仓 / Show Portfolio
python scripts/simulate.py --show数据结构 / Data Schema
daily_data (日线数据 / Daily Data)
| 字段/Field | 类型/Type | 说明/Description |
|------------|-----------|-----------------|
| date | TEXT | 日期 / Date |
| code | TEXT | 股票代码 / Stock code |
| open | REAL | 开盘价 / Open |
| high | REAL | 最高价 / High |
| low | REAL | 最低价 / Low |
| close | REAL | 收盘价 / Close |
| volume | REAL | 成交量 / Volume |
| amount | REAL | 成交额 / Amount |
positions (持仓 / Positions)
| 字段/Field | 类型/Type | 说明/Description |
|------------|-----------|-----------------|
| code | TEXT | 股票代码 / Stock code |
| name | TEXT | 股票名称 / Stock name |
| shares | INTEGER | 股数 / Shares |
| cost | REAL | 成本价 / Cost |
| buy_date | TEXT | 买入日期 / Buy date |
trades (交易记录 / Trade Records)
| 字段/Field | 类型/Type | 说明/Description |
|------------|-----------|-----------------|
| date | TEXT | 交易日期 / Date |
| code | TEXT | 股票代码 / Stock code |
| type | TEXT | buy/sell |
| price | REAL | 价格 / Price |
| shares | INTEGER | 股数 / Shares |
| pnl | REAL | 盈亏 / PnL |
定时任务 / Scheduled Tasks
系统会自动:/ System will automatically:
注意事项 / Notes
1. 本系统仅供学习研究,不构成投资建议 / For learning only, not investment advice
2. 模拟交易不涉及真实资金 / No real money involved
3. 历史业绩不代表未来表现 / Past performance doesn't guarantee future results
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...