Skip to content

none34829/trade-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trade Simulator

A high-performance trade simulator leveraging real-time market data to estimate transaction costs and market impact for cryptocurrency exchanges.

Features

  • Real-time L2 orderbook data processing via WebSocket
  • Market impact calculation using Almgren-Chriss model
  • Slippage estimation using regression modeling
  • Fee calculation based on exchange documentation
  • Maker/Taker proportion prediction
  • Performance metrics including internal latency

Setup

  1. Install the required dependencies:

    pip install -r requirements.txt
    
  2. Run the application:

    python src/main.py
    

Requirements

  • Python 3.8+
  • Libraries specified in requirements.txt
  • Internet connection to access WebSocket endpoints
  • VPN for accessing OKX (as market data is restricted in some regions)

Documentation

Performance Optimization

The application includes various optimizations:

  • Efficient data structures for orderbook processing
  • Multi-threading for UI and data processing
  • Optimized regression model implementations
  • Memory management techniques

Input Parameters

  1. Exchange (OKX)
  2. Spot Asset (Any available on the selected exchange)
  3. Order Type (market)
  4. Quantity (~100 USD equivalent)
  5. Volatility (market parameter)
  6. Fee Tier (based on exchange documentation)

Output Parameters

  1. Expected Slippage
  2. Expected Fees
  3. Expected Market Impact
  4. Net Cost
  5. Maker/Taker proportion
  6. Internal Latency

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages