In this article I will describe how our backtested algorithm can be used in live algorithmic trading. My broker provides me with the TWS (Trader WorkStation) API which is the solution that I use to build my trading application, obtain market and view account details such as open positions and available cash. The basic idea of […]
Category: Algorithmic Trading
This Trading Algorithm Landed Me in the Top 10 on Quantopian
Quantopian is a Boston-based company that aims to create a crowd-sourced hedge fund by letting freelance quantitative analysts develop, test, and use trading algorithms to buy and sell securities. All members can compete against other members in a series of contests called the “Quantopian Open.” Anyone can join the site and enter the contests. Quantopian […]
Pair Trading S1 and S2
This is a generic Notebook, similar to the one Pair Trading GLD and GDX, where I am going to pair trade two securities. The backtesting also includes broker fees. All I have to do is adjust my input parameters such as ticker symbols and dates. The algorithm then fetches the 10 year historical price data […]
Pair Trading GLD and GDX
When the correlation between the two securities temporarily weakens, i.e. one stock moves up while the other moves down, the pairs trade would be to short the outperforming stock and to long the underperforming one, betting that the “spread” between the two would eventually converge. The divergence within a pair can be caused by temporary […]
How to Convert Jupyter Notebook to WordPress suitable HTML
This is a quick tutorial that walks you through the steps for converting a Jupyter Notebook file to WordPress suitable HTML.
Testing for Cointegration of GLD and GDX for use in a Pair Trading Strategy
In this research I am going to test whether the price series of two securities GLD (Gold Price) and GDX (Gold Miners Equity ETF) are cointegrated. This is crucial if we want to develop a pair trading strategy around those two securities. I want to test if the spread between the two series is stationary […]