Skip to content

Hrishi0115/Trading_System

Repository files navigation

System Design

Overview

An overview of the complete system and how each component interacts:

  1. Strategy Editor: Allows users to create and modify trading strategies.
  2. Backtesting Engine: Evaluate the performance of trading strategies using historical data.
  3. Metrics Calculator: Provides performance metrics (and visualisations) to assess the effectiveness of strategies.
  4. Trading Bots (Build-a-Bot): Executes trades in real-time based on the strategies.
  5. Data Loader: Fetches historical and live market data

Components and Interactions

  1. Strategy Editor
  • Function: Allows users to define and modify trading strategies
  • Output: Generate strategy configurations that can be used the backtesting engine and trading bots
  1. Backtesting Engine
  • Function: Simulates trades based on historical data to evaluate the performance of strategies
  • Input: Accepts strategies from the strategy editor (or predefined/proprietary strategies offered by the editor)
  • Output: Provides performance metrics and visualisations
  1. Metrics Calculator (for both backtesting and paper/real live trading)
  • Function: Calculates various performance metrics such as total return, Sharpe ratio, drawdown, etc
  • Input: Receives trade and portfolio data from the backtesting engine
  • Output: Provides a summary of performance metrics
  1. Trading Bots (Build-a-Bot)
  • Function: Executes trades in real-time using live market data
  • Input: Accepts strategies from the strategy editor
  • Output: Real-time trade execution and monitoring
  1. Data Loader
  • Function: Fetches historical data for backtesting and live data for trading bots
  • Output: Provides data in a format suitable for strategies

Detailed Design

  1. Strategy Editor Modules:
  • User interface (UI) to define strategies (intuitive drag-and-drop interface and advanced code editor - maybe even write our own custom scripting language - great educational opportunity)
  • Backend to save and export strategy configurations
  1. Backtesting Engine Modules:
  • Strategy Loader: Load strategy configurations
  • Simulation Engine: Simulates trades based on historical data
  • Metrics Calculator: Computes performance metrics
  • Visualisation: Plots result
  1. Metrics Calculator Modules (Embedded system of the backtesting engine)
  • Performance Metrics: Calculates metrics like return, Sharpe ratio, etc
  • Summary Report: Generates a report of performance metrics
  1. Trading Bots Modules
  • Live Data Loader: Fetches live market data
  • Signal Generator: Generates buy/sell signals based on live data
  • Trade Executor: Executes trade in real-time
  1. Data Loader Modules
  • Historical Data Loader: Fetches historical market data
  • Live Data Loader: Fetches live market data

Integration Workflow

  1. Create Strategy
  • Users define strategies in the Strategy Editor
  • Strategy configurations are saved and can be exported to the backtesting engine and trading bots
  1. Backtest Strategy
  • Strategy Loader loads the strategy configuration
  • Data Loader fetches historical data
  • Simulation Engine runs the strategy on historical data
  • Metrics Calculator computes performance metrics
  • Visualisation plots the backtest results
  • Performance metrics and visualisations are presented to the user
  1. Deploy Strategy to Trading Bot
  • Strategy configuration is loaded to the trading bot
  • Live Data Loader fetches real-time market data
  • Signal Generator uses live data to generate buy/sell signals
  • Trade Executor executes trades in real-time based on signals

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages