All Projects → rburkholder → Trade Frame

rburkholder / Trade Frame

Licence: other
c++ based application for testing options based automated trading ideas using DTN IQ real time data feed and Interactive Brokers (TWS API) for trade execution.

Projects that are alternatives of or similar to Trade Frame

Turingtrader
The Open-Source Backtesting Engine/ Market Simulator by Bertram Solutions.
Stars: ✭ 132 (-29.41%)
Mutual labels:  trading, finance, trading-platform, options
Lean
Lean Algorithmic Trading Engine by QuantConnect (Python, C#)
Stars: ✭ 5,675 (+2934.76%)
Mutual labels:  finance, trading-platform, options, trading
Roq Api
API for algorithmic and high-frequency trading
Stars: ✭ 132 (-29.41%)
Mutual labels:  trading, trading-platform, market-data
roq-samples
How to use the Roq C++20 API for Live Cryptocurrency Algorithmic and High-Frequency Trading as well as for Back-Testing and Historical Simulation
Stars: ✭ 119 (-36.36%)
Mutual labels:  trading, market-data, trading-platform
Sumzerotrading
A Java API for Developing Automated Trading Applications for the Equity, Futures, and Currency Markets
Stars: ✭ 128 (-31.55%)
Mutual labels:  trading, trading-platform, market-data
Tradingstrategies
Algorithmic trading strategies
Stars: ✭ 120 (-35.83%)
Mutual labels:  trading, finance, trading-platform
SierraChartZorroPlugin
A Zorro broker API plugin for Sierra Chart, written in Win32 C++.
Stars: ✭ 22 (-88.24%)
Mutual labels:  options, trading, boost
futu algo
Futu Algorithmic Trading Solution (Python) 基於富途OpenAPI所開發量化交易程序
Stars: ✭ 143 (-23.53%)
Mutual labels:  finance, trading, trading-platform
AutoTrader
A Python-based development platform for automated trading systems - from backtesting to optimisation to livetrading.
Stars: ✭ 227 (+21.39%)
Mutual labels:  finance, trading, trading-platform
piker
#nontina, #paperhands,, #pwnzebotz, #tradezbyguille
Stars: ✭ 63 (-66.31%)
Mutual labels:  finance, trading, trading-platform
korbit-python
Korbit API wrapper for Python
Stars: ✭ 17 (-90.91%)
Mutual labels:  finance, trading, trading-platform
Ta Rs
Technical analysis library for Rust language
Stars: ✭ 248 (+32.62%)
Mutual labels:  trading, finance, market-data
Shioaji
Shioaji all new cross platform api for trading ( 跨平台證券交易API )
Stars: ✭ 203 (+8.56%)
Mutual labels:  trading, trading-platform, market-data
Krypto Trading Bot
Self-hosted crypto trading bot (automated high frequency market making) written in C++
Stars: ✭ 2,589 (+1284.49%)
Mutual labels:  trading, trading-platform, market-data
pinance
Python module(s) to get stock data, options data and news.
Stars: ✭ 70 (-62.57%)
Mutual labels:  finance, options, market-data
Stocksharp
Algorithmic trading and quantitative trading open source platform to develop trading robots (stock markets, forex, crypto, bitcoins, and options).
Stars: ✭ 4,601 (+2360.43%)
Mutual labels:  trading, finance, trading-platform
Quantdom
Python-based framework for backtesting trading strategies & analyzing financial markets [GUI ]
Stars: ✭ 449 (+140.11%)
Mutual labels:  trading, finance, trading-platform
Mop
Stock market tracker for hackers.
Stars: ✭ 1,534 (+720.32%)
Mutual labels:  finance, trading
Iextrading4j
IEX Cloud open source API wrapper
Stars: ✭ 112 (-40.11%)
Mutual labels:  finance, market-data
Tradingview Trainer
A lightweight app for practicing your trading on Tradingview
Stars: ✭ 106 (-43.32%)
Mutual labels:  trading, options

trade-frame

Introduction

This is an application I use for automated trading securities.
C++ is used throughout for building high-capacity, low-latency trading applications.

A C++17 compiler is used to build the libraries and code.

CMake is used for build the projects and libraries.

Example

Picture from the ComboTrading project showing an instrument list, with a chart for one of the listed instruments. Bid, ask, spread, and greeks are charted for the option (charted real-time).

Option Greeks Timeline

More pictures under ComboTrading

Building

Scripts are library version specific. I use Debian Buster x64. Build notes are as of 2016/09/25. There are some wxWidget requirements for using a GTK variation of video drivers (I've used Nvidia and Radeon cards successfully).

You'll need to Have about 10G free to build the project and related libraries and installs (from my libs-build repository).

Debian Stretch netinst (daily snapshot usually works): [since Buster is now 'stable', these links now refer to Bullseye] https://www.debian.org/devel/debian-installer/ http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/amd64/iso-cd/

# run with bash
# create working directory
mkdir rburkholder
cd rburkholder
# git for latest code, wine for IQFeed daemon
sudo apt-get update && apt-get install git wine wget
sudo dpkg --add-architecture i386 && apt-get install wine32
wget http://www.iqfeed.net/iqfeed_client_5_2_5_0.exe
wine iqfeed_client_5_2_5_0.exe

# interactive brokers Java for linux
wget https://download2.interactivebrokers.com/installers/tws/stable/tws-stable-linux-x64.sh
sh tws-stable-linux-x64.sh

# initial library install
git clone https://github.com/rburkholder/libs-build.git
cd libs-build
./build.sh tradeframe
cd ..

# main trade-frame code
git clone https://github.com/rburkholder/trade-frame.git

# pre-build some of the example apps 
# (first example built will take a while as most support libraries are built as well)
pushd trade-frame
cd ArmsIndex
make
cd IQFeedMarketSymbols
make
cd ../IQFeedGetHistory
make
cd ../Hdf5Chart
make
cd ../LiveChart
make
cd ../ComboTrading
make
#cd ../StickShift2 <-- does not currently build
#make
cd ../HedgedBollinger
make
cd ../BasketTrading
make
cd ../Weeklies
make
cd ../Scanner
make
popd

Starting Up

  • Start the IQFeed daemon by starting Apps -> Wine -> Programs -> IQFeed -> IQWatchQuote (may need to start twice, and then watch a symbol) [or from the command line: IQConnect.exe ... -autoconnect & ]
  • Start Interactive Brokers TWS and connect to a paper trading account .* do not use an active account for testing .* when connecting via an application, you will need to go into the settings to enable the API, and to activate the port
  • IQFeedMarketSymbols project:
    • run the app:
      • Actions -> New Symbol List Remote
      • the program will spend a few minutes downloading, parsing, and saving the latest IQFeed symbol list
      • lots of messages will be generated, no need to evaluate them, other than the summary stats at the end
      • File -> Exit
  • IQFeedGetHistory project:
    • obtains daily ohlc values, used to refresh data
    • repeats the symbol download, which was done with IQFeedMarketSymbols
    • run the app:
      • ensure the iqfeed daemon is running (you should see active updates in the quote monitor)
      • 'turn on' IQF
      • Actions -> download n # of days:
        • 0 to download full history of symbol, can take a while
        • 10 to try a test
        • a symbol download will commence
        • there will be a couple of minutes of no activity while the symbol list is scanned
        • data for a series of symbols will start
        • once the message 'Process Complete' shows, the download is complete
      • 'turn off' IQF
      • File -> Exit
  • BasketTrading project:
    • runs a Darvas selection process on daily bars retrieved by IQFeedGetHistory
    • runs an automated buy/sell/stop process from market open to market close on a basket of instruments
  • more apps to be described here ...

Background

Current Market Data Providers and Execution vendors:

  • IQFeed: real time market data and historical data
  • Interactive Brokers: real time market data, real time order execution

Securities types:

  • Equities
  • Options
  • Futures
  • Futures Options

Libraries used (use my lib-build respository to download and build the various dependencies):

  • wxWidgets
  • boost
  • curl
  • zlib
  • hdf5
  • sqlite (included in source)
  • exelformat (included in source)

The libraries are cross platform capable: Linux and Windows

The code started out on Windows using Visual Studio, and is now predominately tested on Linux Debian. Some work is required to port back to Windows.

The lib directory has a series of libraries I use throughout the various applications. Primary libraries include:

  • TFTimeSeries - manage trades, quotes, greeks
  • TFSimulation - simulation engine
  • TFIQFeed - engine to talk to DTNIQ Feed (ask me for a referral)
  • TFInteractiveBrokers - engine to talk to IB
  • TFIndicators - some indicators
  • TFHDF5TimeSeries - wraps the HDF5 library for storing time series
  • TFOptions - options calculations
  • TFTrading - manages orders, executions, portfolios, positions, accounts,
  • OUCharting - wrapper around ChartDirector for plots and charts
  • OUSqlite - database for maintaining trading records

During its infancy, the code used MFC (Microsoft Foundation Classes), some Berkeley DB code, and various other modules, which I now no longer support. The code remains in the repository for historical value, and for the time it might be re-written for current use.

These are some of the currently supported applications:

  • IQFeedMarketSymbols - automatically download and decompress the latest mkt_symbol.txt file from dtn,iq
  • IQFeedGetHistory - load up with historical data for looking for trading ideas
  • Hdf5Chart - view the contents of the hdf5 data set
  • LiveChart - view an instrument in real time
  • ComboTrading - basics of trading multiple securities, such as various options strategies
  • StickShift2 - some rough code for some option trading ideas
  • HedgedBollinger - some experiments in futures, mostly tracking at the money implied volatility

The announcement on my blog: http://blog.raymond.burkholder.net/index.php?/archives/679-trade-frame-c++-securities-trading-software-development-framework.html

Some other, possibly, related entries: http://blog.raymond.burkholder.net/index.php?/categories/23-Trading

Testing

  • IQFeed testing: you can utilize the symbol TST$Y, this symbol sends a loop of data 24/7. (2019/03/12)
  • Interactive Brokers: use edemo/demouser as a signin - random data on many symbols 24/7.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].