rust-trading-development
星标15
分支5
更新时间2026年1月17日 08:29
Specific rules for trading feature development
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
Specific rules for trading feature development
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
TDD workflow for implementing features
Test and validation workflow before commit
Keep project documentation up to date
Manage and enforce project specifications for consistency
Designing premium user interfaces with egui
Critical analysis of trading techniques and financial innovation
| name | Rust Trading Development |
| description | Specific rules for trading feature development |
| Template | Usage |
|---|---|
| (none yet) | Add trading-specific templates as needed |
// ❌ FORBIDDEN
let price: f64 = 123.45;
let total = price * quantity;
// ✅ CORRECT
use rust_decimal::Decimal;
let price = Decimal::from_str("123.45").unwrap();
let total = price * quantity;
Why: Rounding errors in f64 can cause real financial losses.
Every new strategy MUST respect the flow:
Analyst (generates TradeProposal)
→ RiskManager (validates)
→ Executor (executes if approved)
The RiskManager applies the validation chain:
For any trading feature:
| Path | Content |
|---|---|
src/domain/trading/ | Trading entities (Order, Position, Trade) |
src/domain/risk/ | Risk management, validators |
src/application/strategies/ | Trading strategies |
src/application/analyst.rs | Analyst agent |
src/application/risk_manager.rs | RiskManager service |
The project uses the ta crate for indicators:
src/application/strategies/Strategy traitStrategyMode enumStrategyFactorydocs/STRATEGIES.md