Skip to content

Add comprehensive Kilo Code agent skills suite for autonomous strategy development#18

Open
itsXactlY wants to merge 343 commits intoMain-Stablefrom
add-kilo-agent-skills
Open

Add comprehensive Kilo Code agent skills suite for autonomous strategy development#18
itsXactlY wants to merge 343 commits intoMain-Stablefrom
add-kilo-agent-skills

Conversation

@itsXactlY
Copy link
Copy Markdown
Owner

Kilo Code Agent Skills Suite for BTQuant

Overview

This PR adds an extensive suite of agent skills for Kilo Code CLI, enabling fully autonomous strategy development, testing, optimization, and evaluation workflows in BTQuant.

What's Included

Generic Skills (All Modes) - 11 Skills

  1. strategy-development - Strategy architecture, parameters, signal generation, risk management
  2. strategy-backtesting - Backtest setup, data sourcing, metrics, validation
  3. strategy-optimization - Grid search, Bayesian optimization, robustness testing
  4. strategy-evaluation - Performance metrics, evaluation framework, production criteria
  5. data-management - Data sourcing, validation, preparation, feature engineering
  6. exchange-integration - CCXT setup, order management, websockets, rate limiting
  7. ml-models - Classification/regression models, feature engineering, training best practices
  8. autonomous-workflows - 6-stage development pipeline, continuous monitoring, CI/CD
  9. code-quality - PEP 8, testing, documentation, security, error handling
  10. performance-analysis - Return analysis, risk metrics, visualization, comparisons
  11. documentation - README templates, changelogs, API docs, performance reports

Code Mode Skills - 2 Specialized Skills

  1. testing-strategies - Unit tests, integration tests, edge cases, parametrized tests
  2. advanced-debugging - Signal tracing, profiling, memory tracking, logging

Key Features

Autonomous Development Pipeline

Skills enable agents to:

Generate Strategies → Validate Code → Backtest → Optimize → Evaluate → Document

Multi-Stage Workflow Support

  • Stage 1: Strategy generation with parameter configs
  • Stage 2: Syntax validation and linting
  • Stage 3: Comprehensive backtesting on multiple assets
  • Stage 4: Bayesian parameter optimization
  • Stage 5: Multi-metric evaluation against production criteria
  • Stage 6: Auto-generated documentation

Continuous Monitoring

  • Daily performance tracking
  • Automatic regime detection
  • Triggered retraining when performance degrades > 25%
  • Comprehensive alert system

Advanced Capabilities

  • ML Integration: Classification, regression, time-series validation
  • Exchange Integration: CCXT support, 400+ exchanges, testnet trading
  • Data Validation: OHLCV integrity checks, outlier detection
  • Performance Analysis: Sharpe, Sortino, Calmar, profit factor calculations
  • Production Ready: Comprehensive testing and quality standards

Usage

Quick Start

cd /path/to/BTQuant
kilocode

# Tasks automatically leverage skills:
> "Generate 3 new MA crossover strategy variants"
> "Run comprehensive backtest suite"
> "Optimize with Bayesian search"
> "Evaluate against production criteria"

Code Mode

/mode code

# For testing and debugging:
> "Add unit tests for signal generation"
> "Debug why backtest performance degrades"

Autonomous CI/CD

echo "Run full development pipeline" | kilocode --auto --timeout 600

Directory Structure

.kilocode/
├── skills/                          # Generic skills (all modes)
│   ├── strategy-development/
│   ├── strategy-backtesting/
│   ├── strategy-optimization/
│   ├── strategy-evaluation/
│   ├── data-management/
│   ├── exchange-integration/
│   ├── ml-models/
│   ├── autonomous-workflows/
│   ├── code-quality/
│   ├── performance-analysis/
│   └── documentation/
├── skills-code/                     # Code mode specific
│   ├── testing-strategies/
│   └── advanced-debugging/
└── SKILLS_README.md                 # Comprehensive documentation

Example Workflows

Workflow 1: Strategy Development & Optimization

1. Agent creates new strategy (strategy-development)
2. Runs backtest (strategy-backtesting)
3. Optimizes parameters (strategy-optimization)
4. Evaluates viability (strategy-evaluation)
5. Generates documentation (documentation)

Workflow 2: ML Strategy Development

1. Design ML model (ml-models)
2. Engineer features (data-management)
3. Train with time-series validation (ml-models)
4. Backtest (strategy-backtesting)
5. Optimize hyperparameters (strategy-optimization)
6. Analyze performance (performance-analysis)

Workflow 3: Production Deployment

1. Meet evaluation thresholds (strategy-evaluation)
2. Pass code quality review (code-quality)
3. Complete performance analysis (performance-analysis)
4. Create documentation (documentation)
5. Set up continuous monitoring (autonomous-workflows)

Benefits

Fully Autonomous: Zero human intervention required for standard workflows
Comprehensive: Covers entire development lifecycle
Production-Ready: Includes validation, testing, and monitoring
Extensible: Easy to add new skills or customize existing ones
Well-Documented: Each skill includes practical code examples
Mode-Specific: Generic skills available everywhere, code skills in code mode
Best Practices: Incorporates industry standards and BTQuant conventions
Risk Management: Built-in production criteria and validation

Integration

These skills work seamlessly with:

  • Kilo Code CLI interactive and autonomous modes
  • BTQuant's CCXT integration (400+ exchanges)
  • MSSQL data backend
  • ML frameworks (sklearn, PyTorch)
  • Python testing frameworks (pytest, unittest)

Next Steps

  1. Start interactive session: kilocode
  2. Try a simple task: "Create a simple MA crossover strategy"
  3. Scale up to complex workflows
  4. Customize skills for your specific needs

References


Status: Ready for autonomous agent deployment
Total Skills: 13 (11 generic + 2 code-mode)
Lines of Documentation: 3,500+
Code Examples: 150+

aLca and others added 30 commits April 24, 2025 02:35
- introducing CCXT brokerage, trade where every u want, what ever u want (spot/futures/margin)

- mexc exchange adapter has being completely overhauled for HFT trading

- positions / sizes / average prizes are kept tracked now properly, even on restarts

- resolved memory leaking mysteries

Refactor and optimize backtrader dependencies

- Updated .gitignore to exclude dontcommit.py in backtrader dependencies.
- Added TODO note for reworking getvalue to use with websocket in testing_ccxt.py.
- Enhanced CCXTBroker class for better order handling and position tracking.
- Adjusted sleep time in AbstractDataBase to improve data loading efficiency.
- Commented out bid/ask lines in CCXT feed to streamline processing.
- Implemented TickSampler in MexcData for efficient tick processing and candle generation.
- Optimized MexcStore WebSocket connection handling and message processing.
- Refined NearestNeighbors_RationalQuadraticKernel strategy for better debugging and position management.
- Cleaned up BaseStrategy to improve position validation and error handling.
- Updated TickSampler to improve tick processing and buffer management.
- Reduced max buffer size in MexcStore to optimize memory usage.
- Modified Aligator_supertrend strategy parameters for better performance.
- Enhanced DCA logic in NearestNeighbors_RationalQuadraticKernel strategy.
- Improved order tracking with OrderTracker class for better management of active orders.
- Added position reporting functionality to BaseStrategy for better visibility of active trades.
- Adjusted debug logging and print statements for clarity and consistency.
…up base strategy and remove unused imports; add Example_Trading_CCXT script for live trading integration
@itsXactlY itsXactlY self-assigned this Jan 3, 2026
@itsXactlY itsXactlY force-pushed the add-kilo-agent-skills branch from 96a6af0 to 233d82b Compare March 7, 2026 05:05
itsXactlY pushed a commit that referenced this pull request Mar 7, 2026
- Updated supertask.md to mark task #16 as completed
- Also updated tasks #18-#21 which were already implemented in code
- The docking layout for Time & Sales area is now properly configured with ImGuiDir_Down, 0.40f split

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant