Token导航 LogoToken导航TokenDH.com
开发规范需要联网github未标认证来源可访问clear审计提醒

trading-best-practices交易最佳实践

Agent Skill

trading-best-practices 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

5,880

周安装

290

GitHub Stars

3

下载量

2,571
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:trading-best-practices(交易最佳实践)
来源仓库:https://github.com/zuytan/rustrade
仓库路径:skills/trading-best-practices
安装命令:
npx skills add https://github.com/zuytan/rustrade --skill 'Trading Best Practices'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/zuytan/rustrade --skill 'Trading Best Practices'

简介

用于记录任务执行中的错误、用户纠正和经验缺口,帮助 Agent 持续沉淀最佳实践。

  • 适用于需要让 AI 在 Codex、Claude、Cursor、Gemini CLI 中不断修正和改进的场景。
  • 通过 GitHub 仓库提供技能支持,安装后可用于跟踪问题、优化流程和积累经验。
  • 建议确认权限范围和维护状态,避免触发不必要的联网或文件操作。
  • 使用时需结合原始 README 验证具体用法,确保符合实际工作流需求。

SKILL.md

Skill: Trading Best Practices

When to use this skill

  • Before implementing a new trading strategy
  • When modifying risk management logic
  • Quarterly review of existing strategies
  • Before going live with real capital
  • When performance degrades unexpectedly

Purpose

This skill ensures that trading implementations follow current best practices and avoid common pitfalls in algorithmic trading. It includes mechanisms to stay updated with the latest financial research and market structure changes.

Critical Trading Principles

1. Risk Management (Non-negotiable)

Position Sizing:

  • Never risk more than 1-2% of capital per trade
  • Use Kelly Criterion or fixed fractional sizing
  • Account for correlation between positions

Stop Losses:

  • ALWAYS use stop losses (no exceptions)
  • Place stops based on volatility (ATR) not arbitrary percentages
  • Never move stops against your position

Drawdown Protection:

  • Maximum drawdown threshold: 20% (conservative) to 30% (aggressive)
  • Implement circuit breakers for daily loss limits
  • Use high-water mark tracking

2. Strategy Development

Avoid Overfitting:

  • ❌ Don't optimize on the same data you test on
  • ✅ Use walk-forward analysis
  • ✅ Test on out-of-sample data
  • ✅ Prefer simple strategies with fewer parameters

Backtesting Integrity:

  • Account for transaction costs (commissions + slippage)
  • Use realistic fill assumptions (no perfect fills at close)
  • Avoid look-ahead bias (only use data available at decision time)
  • Include survivorship bias (test on delisted stocks too)

Statistical Validation:

  • Minimum 100+ trades for statistical significance
  • Sharpe Ratio > 1.0 (preferably > 1.5)
  • Profit Factor > 1.5
  • Win rate should match strategy type (trend: 40-50%, mean reversion: 55-65%)

3. Market Microstructure Awareness

Execution Quality:

  • Use limit orders to control slippage
  • Avoid market orders on illiquid assets
  • Be aware of bid-ask spread costs
  • Consider market impact for larger positions

Regime Awareness:

  • Strategies perform differently in bull/bear/sideways markets
  • Adapt position sizing to market volatility (VIX)
  • Reduce exposure during high uncertainty events

4. Common Pitfalls to Avoid

PitfallWhy it's badSolution
Curve fittingStrategy works on past but fails liveWalk-forward testing, simplicity
Ignoring costsProfitable backtest becomes losing liveInclude realistic commissions + slippage
Revenge tradingEmotional decisions after lossesAutomated rules, circuit breakers
Over-leveragingOne bad trade wipes accountFixed fractional position sizing
No stop lossSmall loss becomes catastrophicAlways use stops based on volatility
Ignoring correlationDiversification illusionMonitor sector/asset correlation

Research Workflow

To stay current with financial innovation, perform quarterly reviews:

Step 1: Research Latest Practices

# Use web search to find recent research
# Topics to research:
# - "algorithmic trading best practices 2026"
# - "quantitative finance risk management"
# - "market microstructure changes"
# - "regulatory changes algorithmic trading"

Step 2: Review Current Implementation

Compare findings against:

  • src/domain/risk/ - Risk management logic
  • src/application/strategies/ - Strategy implementations
  • docs/STRATEGIES.md - Strategy documentation

Step 3: Identify Gaps

Document any practices we're missing or doing incorrectly.

Step 4: Update Implementation

If gaps found:

  1. Create issue/task for improvement
  2. Follow /implement workflow
  3. Backtest changes thoroughly
  4. Update this skill with new learnings

Checklist: Strategy Implementation

Before implementing ANY new strategy:

  • Strategy has clear entry/exit rules
  • Risk per trade is defined (max 2%)
  • Stop loss logic is implemented
  • Position sizing accounts for volatility
  • Backtested on 2+ years of data
  • Tested on out-of-sample data
  • Transaction costs included in backtest
  • Sharpe Ratio > 1.0
  • Max Drawdown < 20%
  • No look-ahead bias
  • Strategy logic is simple (fewer parameters = better)
  • Correlation with existing strategies checked

Red Flags in Strategy Design

// ❌ RED FLAG: No stop loss
if signal == Signal::Buy {
    execute_order(symbol, quantity); // Where's the stop?
}

// ❌ RED FLAG: Fixed position size (ignores risk)
let quantity = 100; // Always 100 shares?

// ❌ RED FLAG: No transaction costs
let profit = exit_price - entry_price; // Ignores commissions/slippage

// ❌ RED FLAG: Too many parameters
struct Strategy {
    sma_period_1: usize,
    sma_period_2: usize,
    rsi_period: usize,
    rsi_oversold: f64,
    rsi_overbought: f64,
    macd_fast: usize,
    macd_slow: usize,
    // ... 20 more parameters = overfitting
}

// ✅ GOOD: Risk-based position sizing with stop
let risk_amount = capital * risk_per_trade;
let stop_distance = entry_price * atr_multiplier;
let quantity = risk_amount / stop_distance;
let stop_loss = entry_price - stop_distance;

Resources to Monitor

Academic Research:

  • SSRN (Social Science Research Network)
  • arXiv quantitative finance section
  • Journal of Portfolio Management

Industry Standards:

  • CFA Institute guidelines
  • FIX Protocol updates (market structure)
  • SEC/FINRA regulatory changes

Market Data:

  • VIX (volatility regime)
  • Sector rotation trends
  • Correlation matrices

Update Frequency

  • Monthly: Check VIX and market regime
  • Quarterly: Research latest academic papers
  • Annually: Full strategy review and revalidation
  • Ad-hoc: When performance degrades or market structure changes

Integration with Other Skills

  • Use benchmarking skill to validate strategies
  • Use critical-review skill for code quality
  • Use rust-trading skill for implementation rules
  • Update documentation skill when best practices change

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenCode

24.95%
按下载量换算641

Claude Code

23.82%
按下载量换算612

windsurf

18.01%
按下载量换算463

trae

13.04%
按下载量换算335

Codex

6.71%
按下载量换算173

Antigravity

3.54%
按下载量换算91

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。来源字段存在多来源差异,先按来源优先级自动处理,无法消解时进入异常复核队列。

来源信息

继续浏览同类 Skills