Git Product home page Git Product logo

shannon's Introduction

Shannon Backtesting Framework

Python 3.8 License

This project(Shannon) is an open-source framework designed to offer efficient backtesting capabilities for multi-factor strategies. The primary objective of this framework is to facilitate researchers and traders in testing, optimizing, and implementing their strategies with ease.

The key to a successful strategy lies in enhancing the signal-to-noise ratio of factors, a concept first introduced by the great foundational figure in information theory, Claude Shannon. Inspired by this concept, the design of this framework thoroughly incorporates various flexible filters to improve the signal-to-noise ratio of factors. Hence, the framework is named "Shannon" as a tribute to this brilliant genius.

Key Features

Modular Design: The framework is architected to decouple modules like data preparation, strategy formulation, and performance evaluation comprehensively. Users can switch between various modules conveniently, thereby facilitating efficient strategy development.

Strategy-Centric: The focus is on writing the strategy, so users don't have to be distracted by data preparation or performance assessment tasks.

High Flexibility: It combines factor-based stock selection with various filters, offering users a high level of customization. Regardless of the strategy or factors you're based on, you can efficiently implement them within this framework.

Install

After downloading and extracting, switch to the project directory.

pip install -r requirements.txt

Steps

1.In config.py, users can configure the data storage path, backtesting parameters, and more.

2.Run preprocess.py for data preprocessing.

3.Execute backtest.py to complete the backtesting and output the strategy evaluation metrics.

4.This framework includes a built-in sample strategy located in the strategies folder. Users can follow its pattern to craft their own strategies.

Data Api

The data used by this framework includes individual stock trading data,index trading data and financial data. This data needs to be retrieved via an API and then decompressed locally. Users can contact the author to obtain free API access permissions (each type of data can be downloaded once a week).

shannon's People

Contributors

chrisphoenixsoar 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.