Coder Social home page Coder Social logo

back-tester's Introduction

Back Tester

Status

This is a personal project and it's currently under development as part of my self-study efforts. The project is continually evolving as I learn and incorporate more features and improvements. Feel free to explore, learn from it, or provide suggestions!


The project has been paused as I have shifted my focus into C++ now. I might re-implement this via C++.

About

Pet-project for quant trading self-training.

Key Features

  • Event-Driven Architecture: The backtester operates on an event-driven system that accurately simulates the order of market events, providing a strong foundation for concurrent processing.
  • Asynchronous Programming: The backtester uses asyncio for writing single-threaded concurrent code, which allows for efficient multiplexing of I/O access over various resources.
  • Data Handling with Polars: Leveraging the power of Polars, a lightning-fast DataFrame library implemented in Rust, for efficient and effective data handling.
  • Flexible and Powerful: The backtester is designed to be adaptable, allowing for the testing of a wide variety of trading strategies, from simple moving average cross-overs to complex machine learning-based approaches.

Main Components

  • Data Feed: The data feed component is responsible for providing the backtester with market data. This can be historical data for backtesting purposes or live data for paper trading.
  • Strategy: This component is where you define your trading strategy. It processes market data and generates trading signals.
  • Execution Handler: The execution handler simulates order execution. It takes trading signals from the strategy component and simulates the execution of the corresponding orders.
  • Performance Tracking: The backtester includes functionality for tracking the performance of a strategy over the course of a backtest. This includes calculating various performance metrics and generating performance charts.
  • Risk Management : involving setting limits on the total exposure to any one asset, ensuring that the portfolio is sufficiently diversified, rebalancing the portfolio periodically, etc.

Future Development

  • Polars as data handller
  • Redis as historical data & store frequently used data (e.g. like the latest prices or indicators calculated over a rolling window)
  • Restful API to fetch real-time or historical data from an external source

Strucutre

infra

Inspiration

This project was inspired by FunCoder. I'm grateful for the ideas and knowledge gained from his work which served as a foundation.

Disclaimer

Please note that this project is primarily for my personal learning and exploration. As such, it may not be regularly maintained or updated. I welcome any constructive feedback or suggestions for improvement!

back-tester's People

Contributors

gug-shadamu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.