Skip to content

Latest commit

 

History

History
283 lines (206 loc) · 8.11 KB

File metadata and controls

283 lines (206 loc) · 8.11 KB

Asphyxiation Grid Takashi Kotegawa Bot Manual

Asphyxiation Grid Takashi Kotegawa Bot

LinkedIn Version Python Rust License Build Status Tests Code Style Dependencies PRs Welcome Documentation Last Commit Stars Security Coverage Issues Made with Rust Made with Python Maintenance Contributions Performance Code Quality Technical Debt Downloads KuCoin API OS

USDT (TRC-20): TP6zpvjt2ZNGfWKPevfp65ZrcbKMWSQXDi

Overview

The AsphyxiationGrid is an automated trading system that operates in the KuCoin futures market, implementing the hybrid "Kotegawa-Infinite Grid" strategy. The system combines advanced technical analysis, machine learning and Rust optimizations to identify and execute trading opportunities.

System Architecture

1. Core Components

TakashiKotegaModel (Python)

  • Volatility regime detection using Isolation Forest
  • Adaptive Kairi indicator implementation (ZLEMA)
  • RSI and ATR integration for technical analysis
  • Trained models persistence system

AsphyxiationGrid (Python)

  • KuCoin Futures connection management
  • Dynamic grid system with optimised levels
  • Order execution with risk management
  • Operations monitoring and logging

TakashiLib (Rust)

  • Optimised volatility factors calculation
  • Grid levels optimization based on historical data
  • High performance statistical analysis processing

2. Trading Strategy

The "Kotegawa-Infinite Grid" strategy operates in three layers:

  1. Volatility Analysis

    • Machine Learning for regime detection
    • Dynamic parameter adjustment based on market state
  2. Grid System

    • Levels calculated through Rust optimization
    • Automatic adjustment based on current volatility
    • Dynamic position rebalancing
  3. Risk Management

    • Dynamic stop-loss based on ATR
    • Adaptive position sizing
    • Volatility-controlled leverage

System Requirements

Software

  • Python 3.9+
  • Rust (latest stable)
  • Cargo (for TakashiLib build)

Recommended Hardware

  • CPU: 2+ cores
  • RAM: 4GB+ (60% available for bot)
  • Stable internet connection

Python Dependencies

base64
ccxt
hashlib
hmac
kucoin-python
maturin
numpy
pandas
psutil
python-dotenv
scikit-learn
ta
ta-lib

Rust Dependencies

pyo3 = "0.18"
statrs = "0.16"
ndarray = "0.15"

Configuration

1. Environment Variables (.env)

# KuCoin API
KUCOIN_API_KEY=<your_api_key>
KUCOIN_API_SECRET=<your_secret>
KUCOIN_API_PASSPHRASE=<your_passphrase>
KUCOIN_IP_WHITELIST=<your_whitelist>

# Trading Parameters
BASE_CURRENCY=USDT
TRADING_PAIRS=BTCUSDTM,ETHUSDTM,XRPUSDTM
TIMEFRAME=1m
KAIRI_PERIOD=25
RSI_PERIOD=14
ATR_PERIOD=14

# Risk Management
MAX_POSITION_SIZE=0.1  # 10% of capital
LEVERAGE=25  # Conservative leverage
USE_ISOLATED_MARGIN=true
STOP_LOSS_PERCENT=3.0  # -3% ROE
TAKE_PROFIT_PERCENT=15.0  # 15% ROE

# Grid Parameters
GRID_LEVELS=10
GRID_SPREAD=0.5  # 0.5% between levels
GRID_REBALANCE_THRESHOLD=5.0
MIN_VOLATILITY_THRESHOLD=2.0
MAX_TRADES_PER_HOUR=20

# Technical Indicators
KAIRI_PERIOD=25
RSI_PERIOD=14
ATR_PERIOD=14
CONVERGENCE_FACTOR=0.75

2. Installation

  1. Environment preparation:
conda create -n asphyxiation python=3.12
conda activate asphyxiation
  1. Dependencies installation:
conda install -c conda-forge ccxt python-dotenv numpy pandas ta-lib scikit-learn rust maturin
  1. TakashiLib build:
maturin develop --release

3. Execution

python AsphyxiationBot.py

Monitoring and Maintenance

Logs and Cache

  • historical/ directory: Detailed operation logs
  • cache/ directory: Trades and states cache
  • models/ directory: Persisted ML models

Important Metrics

  • Market volatility
  • ML model state
  • Grid performance
  • Margin utilisation

Limitations and Considerations

  1. Performance

    • Required minimum latency: ~100ms
    • Memory usage grows with number of pairs
    • Processing increases with grid levels
  2. Risk Management

    • Stop-loss always active
    • Leverage limits by volatility
    • Protection against connection failures
  3. Maintenance

    • Daily log verification
    • Resource usage monitoring
    • Regular configuration backup

Development and Customization

Model Extension

  • New indicators implementation in TakashiKotegaModel.py
  • Additional optimizations in Rust via src/lib.rs
  • Strategy customization in AsphyxiationBot.py

Contributions

  1. Repository fork
  2. Feature branch creation
  3. Tests with maturin develop
  4. Pull request with detailed description

Support

For questions and support:

  1. Check logs in historical/
  2. Consult performance metrics
  3. Review .env configurations

This manual reflects the current system implementation, focusing on critical components and their interactions.

🤝 Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

💡 Donations

If this project has been helpful, consider making a donation:

USDT (TRC-20): TP6zpvjt2ZNGfWKPevfp65ZrcbKMWSQXDi

Your support helps us continue to develop innovative tools.

🔧 Support

To contribute to public and social projects focused on research and artificial intelligence, feel free to support with any amount you prefer.

👥 About the Author

🧠 Takk™ Innovate Studio