Search

PythonReactSEOPDF
OpenClaw

a-stock-trader

A股模拟交易系统 - 数据爬取、存储、策略回测、模拟交易 / A-Share Paper Trading System - Data Fetch, Storage, Backtest, Simulation

bombfuock0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install bombfuock/a-stock-trader

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

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
  • 实时行情数据(10分钟级别)/ Real-time data (10-min level)
  • 历史K线数据(日/周/月)/ Historical K-line (daily/weekly/monthly)
  • 个股基本面数据 / Stock fundamentals
  • 大盘指数数据 / Market index data
  • 数据源:东方财富网、新浪财经 / Data source: East Money, Sina Finance
2. 数据存储 / Data Storage
  • SQLite 数据库 / SQLite database
  • 表结构:日线数据、财务数据、持仓记录、交易记录 / Tables: daily_data, financials, positions, trades
  • 数据路径:~/.openclaw/workspace/a-stock/ / Data path
3. 模拟交易 / Paper Trading
  • 纸上交易(不真实下单)/ Paper trading (no real orders)
  • 持仓管理 / Position management
  • 资金管理(初始100万)/ Capital management (initial 1M)
  • 收益计算 / PnL calculation
4. 策略模板 / Strategy Templates
4.1 均线策略 (MA) / Moving Average Strategy
  • 金叉买入,死叉卖出 / Buy on golden cross, sell on death cross
  • 参数:MA5, MA10, MA20 / Parameters
4.2 动量策略 (Momentum) / Momentum Strategy
  • 追涨杀跌 / Trend following
  • 涨幅>5%买入,回撤>3%卖出 / Buy when +5%, sell when -3%
4.3 突破策略 (Breakout) / Breakout Strategy
  • 20日高点突破买入 / Buy on 20-day high breakout
  • 跌破5日低点卖出 / Sell on 5-day low break
4.4 网格策略 (Grid) / Grid Strategy
  • 震荡行情网格交易 / Grid trading in ranging market
  • 设定价格区间和网格数量 / Set price range and grid count

使用示例 / 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 sc...

Source information

Source
github
Repository
openclaw/skills
Path
skills/bombfuock/a-stock-trader
Version
—
Commit
c2c5292cda83fd52f7b5a2e9b828ab5ed96912a3
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

README

A股模拟交易系统

快速开始

1. 获取数据
python scripts/fetch_daily.py --stock 600519 --days 250
2. 运行回测
python scripts/backtest.py --stock 600519 --strategy ma
3. 模拟交易
# 查看持仓
python scripts/simulate.py --show

# 买入
python scripts/simulate.py --buy --stock 600519 --shares 1000 --price 50.0

# 卖出
python scripts/simulate.py --sell --stock 600519 --shares 500 --price 55.0

策略说明

  • ma - 均线策略(金叉买入,死叉卖出)
  • momentum - 动量策略(追涨杀跌)

Extracted content

SKILL.md
# 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
- 实时行情数据(10分钟级别)/ Real-time data (10-min level)
- 历史K线数据(日/周/月)/ Historical K-line (daily/weekly/monthly)
- 个股基本面数据 / Stock fundamentals
- 大盘指数数据 / Market index data
- 数据源:东方财富网、新浪财经 / Data source: East Money, Sina Finance

### 2. 数据存储 / Data Storage
- SQLite 数据库 / SQLite database
- 表结构:日线数据、财务数据、持仓记录、交易记录 / Tables: daily_data, financials, positions, trades
- 数据路径:`~/.openclaw/workspace/a-stock/` / Data path

### 3. 模拟交易 / Paper Trading
- 纸上交易(不真实下单)/ Paper trading (no real orders)
- 持仓管理 / Position management
- 资金管理(初始100万)/ Capital management (initial 1M)
- 收益计算 / PnL calculation

### 4. 策略模板 / Strategy Templates

#### 4.1 均线策略 (MA) / Moving Average Strategy
- 金叉买入,死叉卖出 / Buy on golden cross, sell on death cross
- 参数:MA5, MA10, MA20 / Parameters

#### 4.2 动量策略 (Momentum) / Momentum Strategy
- 追涨杀跌 / Trend following
- 涨幅>5%买入,回撤>3%卖出 / Buy when +5%, sell when -3%

#### 4.3 突破策略 (Breakout) / Breakout Strategy
- 20日高点突破买入 / Buy on 20-day high breakout
- 跌破5日低点卖出 / Sell on 5-day low break

#### 4.4 网格策略 (Grid) / Grid Strategy
- 震荡行情网格交易 / Grid trading in ranging market
- 设定价格区间和网格数量 / Set price range and grid count

## 使用示例 / Usage Examples

### 获取数据 / Fetch Data
```bash
python scripts/fetch_daily.py --stock 600519 --days 250
```

### 运行回测 / Run Backtest
```bash
python scripts/backtest.py --strategy ma --stock 600519
```

### 模拟交易 / Paper Trade
```bash
python scripts/simulate.py --strategy momentum --stock 600519
```

### 查看持仓 / Show Portfolio
```bash
python sc...
README
# A股模拟交易系统

## 快速开始

### 1. 获取数据
```bash
python scripts/fetch_daily.py --stock 600519 --days 250
```

### 2. 运行回测
```bash
python scripts/backtest.py --stock 600519 --strategy ma
```

### 3. 模拟交易
```bash
# 查看持仓
python scripts/simulate.py --show

# 买入
python scripts/simulate.py --buy --stock 600519 --shares 1000 --price 50.0

# 卖出
python scripts/simulate.py --sell --stock 600519 --shares 500 --price 55.0
```

## 策略说明

- `ma` - 均线策略(金叉买入,死叉卖出)
- `momentum` - 动量策略(追涨杀跌)

Related skills

OpenClaw

adaptive-skill-factory

505768069-rgb

Discover, install, update, or create the right skill when a workflow gap appears. Use when a task is repetitive, a role lacks a reliable procedure, an existing skill might save time, ClawHub search/install coul...