Giter Club home page Giter Club logo

thales's Introduction

Thales: an Algorithmic Options Trading Bot

build codecov License: MIT

Description

Thales (THAY-leez) is a high-frequency, algorithmic trading bot designed for trading options contracts, named after the Greek philosopher Thales of Miletus, who is credited with the first recorded use of an options contract.

The bot uses the Black-Scholes formula and various statistical models to identify options that are "mispriced" by the market. For example, if the bot thinks a call or put is currently undervalued, it will attempt to buy that call or put.

Requirements

  • C++17 compiler (GCC v7.1+ or Clang v5.0+)
  • CMake v3.12+
  • Google Test v1.8.0+ for unit testing
  • Google Benchmark v1.3.0+ for benchmarking
  • libcurl v7.50.0+ for HTTP requests
  • API key from Polygon.io for real-time options data

Usage

To start the bot, simply execute the following command inside the build directory:

./thales

By default, thales will run in paper trading mode using the Polygon.io API for simulating trades and tracking the paper trading portfolio. You can configure various settings, such as the trading strategy, risk management parameters, and data sources, by modifying the appropriate configuration files.

Configuration

Thales can be configured through various configuration files inside the config directory. Here's a brief overview of the available configuration options:

  • polygon_credentials.cfg (required): Contains the Polygon.io API key for accessing real-time and historical options data.
  • trading_strategy.cfg: Defines the parameters and settings for the trading strategy.
  • risk_management.cfg: Specifies risk management rules and thresholds.
  • data_sources.cfg: Configures the data sources for historical and real-time market data.

Refer to the individual configuration files and the project documentation for more details on configuring the trading bot.

Build

  1. Clone the repository:

    git clone https://github.com/cm-jones/thales.git
    cd thales
  2. Configure the build system:

    cmake -S . -B build
  3. Build the project:

    cmake --build build

Testing

Thales uses Google Test for unit testing. To run the unit tests, execute the following command inside the build directory:

ctest

This will run all the registered unit tests and display the results.

Benchmarking

Thales uses Google Benchmark for benchmarking. To run the benchmarks, follow these steps:

  1. Build the benchmarks (if not already built):

    cmake --build build --target thales_benchmarks
    
  2. Run the benchmarks:

    cd build
    make thales_benchmarks
    ./thales_benchmarks
    

This will execute all the registered benchmarks and display the results.

Documentation

Detailed documentation is generated automatically via Doxygen when there's a push or a pull request on the main branch. It can be viewed here.

Contributing

See CONTRIBUTING.md for information on how to contribute to Thales.

License

This project is licensed under the MIT License.

thales's People

Contributors

cm-jones avatar

Stargazers

JongGyun Kim avatar Teck-Hou Teng avatar

Watchers

JongGyun Kim avatar  avatar

thales's Issues

Where is cfg files?

I believe the project is currently a work in progress.

The cfg files mentioned in the README.md are missing.

Regardless, I'm quite interested in this project.
As far as I know, there are no public option trading frameworks available.

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.