Giter Club home page Giter Club logo

quanttrader's Introduction

quanttrader

Welcome to quanttrader, a pure python-based event-driven backtest and live trading package for quant traders.

The source code is completely open-sourced here on GitHub. The package is published here on pypi and is ready to be pip installed. The document is hosted here on readthedocs.

In most cases, a backtest strategy can be directly used for live trade by simply switching to live brokerage. A control window is provided to monitor live trading sessions for each strategy separately and the portfolio as a whole.

Backtest

Backtest code structure

Backtests examples

Reinforcement trader

Live trading

Live Trading demo video

Live Trading code structure

Prerequisite: download and install IB TWS or IB Gateway; enable API connection as described here.

Installation

Step 1

pip install quanttrader

Alternatively, download or git the source code and include unzipped path in PYTHONPATH environment variable.

step 2

Download live_engine.py, config_live.yaml, order_per_interval_strategy.py by clicking Raw button, right clicking save as, and then change the file extension to .py or .yaml.

step 3

cd where_the_files_are_saved
python live_engine.py

Instruments Supported and Example

  • Stock: AMZN STK SMART
  • Foreign Exchange: EURGBP CASH IDEALPRO
  • Futures: ESM9 FUT GLOBEX
  • Options on Stock: AAPL OPT 20201016 128.75 C SMART
  • Options on Futures: ES FOP 20200911 3450 C 50 GLOBEX
  • Comdty: XAUUSD CMDTY SMART

Order Type Supported

Basic order types. See IB Doc for details.

  • Auction
  • Auction Limit
  • Market
  • Market If Touched
  • Market On Close
  • Market On Open
  • Market to Limit
  • Limit Order
  • Limit if Touched
  • Limit on Close
  • Limit on Open
  • Stop
  • Stop Limit
  • Trailing Stop
  • Trailing Stop Limit

gui

DISCLAIMER Open source, free to use, free to contribute, use at own risk. No promise of future profits nor responsibility of future loses.

quanttrader's People

Contributors

letianzj avatar wenq1 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.