โ† Back to list
Zuytan

rust-trading-development

by Zuytan

Algorithmic trading bot in Rust with multi-agent architecture, 10 strategies, risk management, and native egui UI. Supports Alpaca & Binance. ๐Ÿšง Work in progress

โญ 0๐Ÿด 0๐Ÿ“… Jan 24, 2026

SKILL.md


name: Rust Trading Development description: Specific rules for trading feature development

Skill: Rust Trading Development

When to use this skill

  • Adding or modifying trading strategies
  • Modifying the RiskManager or order validation
  • Financial calculations (prices, quantities, P&L)
  • Working with technical indicators

Templates available

TemplateUsage
(none yet)Add trading-specific templates as needed

Critical rules

Monetary precision (MANDATORY)

// โŒ 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.

Risk management

Every new strategy MUST respect the flow:

Analyst (generates TradeProposal) 
    โ†’ RiskManager (validates)
    โ†’ Executor (executes if approved)

The RiskManager applies the validation chain:

  1. BuyingPowerValidator
  2. CircuitBreakerValidator
  3. PDTValidator
  4. PositionSizeValidator
  5. SectorCorrelationValidator
  6. SentimentValidator

Mandatory tests

For any trading feature:

  • Unit tests for each technical indicator
  • Integration tests for complete flows
  • Backtests on historical data (if applicable)

Key files

PathContent
src/domain/trading/Trading entities (Order, Position, Trade)
src/domain/risk/Risk management, validators
src/application/strategies/Trading strategies
src/application/analyst.rsAnalyst agent
src/application/risk_manager.rsRiskManager service

Available technical indicators

The project uses the ta crate for indicators:

  • SMA, EMA (moving averages)
  • RSI (Relative Strength Index)
  • MACD (Moving Average Convergence Divergence)
  • Bollinger Bands
  • ADX (Average Directional Index)
  • ATR (Average True Range)

Example: Adding a new strategy

  1. Create the file in src/application/strategies/
  2. Implement the Strategy trait
  3. Add the mode to StrategyMode enum
  4. Register in StrategyFactory
  5. Add tests
  6. Document in docs/STRATEGIES.md

Score

Total Score

75/100

Based on repository quality metrics

โœ“SKILL.md

SKILL.mdใƒ•ใ‚กใ‚คใƒซใŒๅซใพใ‚Œใฆใ„ใ‚‹

+20
โœ“LICENSE

ใƒฉใ‚คใ‚ปใƒณใ‚นใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+10
โœ“่ชฌๆ˜Žๆ–‡

100ๆ–‡ๅญ—ไปฅไธŠใฎ่ชฌๆ˜ŽใŒใ‚ใ‚‹

+10
โ—‹ไบบๆฐ—

GitHub Stars 100ไปฅไธŠ

0/15
โœ“ๆœ€่ฟ‘ใฎๆดปๅ‹•

1ใƒถๆœˆไปฅๅ†…ใซๆ›ดๆ–ฐ

+10
โ—‹ใƒ•ใ‚ฉใƒผใ‚ฏ

10ๅ›žไปฅไธŠใƒ•ใ‚ฉใƒผใ‚ฏใ•ใ‚Œใฆใ„ใ‚‹

0/5
โœ“Issue็ฎก็†

ใ‚ชใƒผใƒ—ใƒณIssueใŒ50ๆœชๆบ€

+5
โœ“่จ€่ชž

ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐ่จ€่ชžใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+5
โœ“ใ‚ฟใ‚ฐ

1ใคไปฅไธŠใฎใ‚ฟใ‚ฐใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+5

Reviews

๐Ÿ’ฌ

Reviews coming soon