- Binary Options Explained
- Platform Introduction
- Project Summary
- Resources to Start Coding Trading Algorithms
- Best Options Trading Platforms
- Development Environment
- Development on Ubuntu 16.04 64 bit System
- Best Options Trading Tools
- Development on macOS
- Architecture Diagram
- Message Protocol
- Ticker Symbol
- order status
- Code Structure
- Todo List
Binary Options Explained
C/C++ High frequency quantitative trading and investment platform
EliteQuant is an open source forever free unified quant trading platform built by quant traders, for quant traders. It is dual listed on both github and gitee.
The word unified carries two features.
- First it’s unified across backtesting and live trading.
Just switch the data source to play with real money.
- Second it’s consistent across platforms written in their native langugages.
It becomes easy to communicate with peer traders on strategies, ideas, and replicate performances, sparing language details.
Related projects include
EliteQuant_Cpp is C/C++ 11 based multi-threading, concurrent high-frequency trading platform.
It follows modern design patterns such as event-driven, server/client architect, dependency injection and loosely-coupled robust distributed system.
It is self-contained and can be used out of box. At the same time, it serves as server side for other EliteQuant projects.
Please feel free to report issues, fork the branch, and create pull requests.
Any kind of contributions are welcomed and appreciated. Through shared code architecture, it also helps traders using other languges.
No installation is needed, it's ready for use out of box.
Just download the code and enjoy.
The easiest way is to download and uzip compiled.zip from the project root directory. Then run the program called eqsever.exe.Before you run this executable, there are a couple of config settings you need to modify.
By default, the program reads config.xml from the same directory.
Resources to Start Coding Trading Algorithms
Therefore open the config file
- If you want to use interactive broker, open IB trader workstation (TWS), go to its menu File/Global Configuration/API/Settings, check "Enable ActiveX and Socket Client", uncheck "Read-Only API"
- In the config file, change the account id to yours; IB account id usually can be found on the top right of the TWS window.
- If you use CTP, change your brokerage account information and ctp addresses accordingly.
- create folder for log_dir and data_dir respectively.
The former records runtime logs, while the later saves tick data.
Interactive Brokers is the most popular broker among retail traders.
Best Options Trading Platforms
A lot of retail trading platform such as quantopian, quantconnect are built to support IB. If you don't have IB account but want to try it out, they provide demo account edemo with password demouser. Just download TWS trader workstation and log in with this demo account.
Note that accound id changes everytime you log on to TWS with demo account so you have to change EliteQuant config file accordingly.
CTP is the de-facto brokerage for Chinese futures market, including commodity futures and financial futures. They also offer free demo account SimNow.
After registration, you will get account, password, brokerid, along with market data and trading broker address. Replace them in EliteQuant config file accordingly.
Below is the environment we are using
- Visual Studio 2017 Community Edition on Windows
- Qt Creator 4.5.0 Commuity
Visual C++ is a popular choice on Windows.
Qt Creator builds cross-plaform Qt user interface.
Other choices are CLion, CMake, etc.
Development on Ubuntu 16.04 64 bit System
You can follow below steps to install necessary third party libraries and build this project with cmake on newest 64 bit Ubuntu system. Assume you have xcode and Homebrew installed, open a command terminal and execute the following.
Best Options Trading Tools
make -j2 # run the programcd eqserver cp ../../eqserver/config.yaml . mkdir log data ./eqserver # change config.yaml first
On Linux, you might encounter the double free or corruption (!prev) error when you terminate the eqserver by pressing Ctrl+C.
One way to suppress this warning is to add MALLOC_CHECK_=0 variable to your environment.
Development on macOS
You can follow below steps to install necessary third party libraries and build this project with cmake on clean macOS system.
Messages are sperated by character '|'.
- new market order: o|account|api|client order id|MKT|AAPL STK SMART|100❶order_flag]
- new limit order: o|account|api|client order id|LMT|AAPL STK SMART|100|170.00❶order_flag]
- order status: s|account|api|server order id|client order id|broker order id|order status
- fill: f|account|api|server order id|client order id|broker order id|trade id|trade time|symbol|trade price|tradesize
- cancel: c|account|api|server order id|client order id|broker order id
- tick message: AAPL STK SMART|time|data type|price|size|depth
- full tick message: AAPL STK SMART|time|3|price|size|1|bid|bid size|ask|ask size|open interest|open|high|low|pre close|upper limit|lower limit
The following are message types:
- k: tick msg
- p: last price
- z: last size
- o: new order
- c: cancel order
- s: order status
- n: position query
- m: general message
- b: bar
- h: historical data
- e: test message
In EliteQuant, an instrument is identified by its full symbol, which consists of a couple fo words separated by space.
The general pattern is "Local_Symbol Security_Type Exchange_Name Currency Multiplier“. For example
- Stock: SPY STK SMART
- Future: ESZ7 FUT GLOBEX 50
- FX: EUR.USD CASH IDEALPRO
- FX futures: 6BU1 FUT GLOBELX
- Option: GOOGL_140920P00535000 OPT SMART 100
- Futures Options: EWQ4_C1730 FOP GLOBEX 50