Blog

Download Intraday Stock Data with IEX and Parquet
Pythondata

Download Intraday Stock Data with IEX and Parquet

Post Outline * Why IEX? * Why Parquet? * System Outline * Code * Links WHY IEX? IEX is a relatively new exchange (founded in 2012). For our purposes, what makes them different from other exchanges is they provide a robust FREE API to query their stock exchange data. As a result we can leverage the pandas-datareader framework to query IEX data quite simply. WHY PARQUET? I don't use Hadoop, however Parquet is a great storage format within the pandas ecosystem as well. It is fast, s

READ MORE →
Labeling and Meta-Labeling Returns for ML Prediction
EducationPython

Labeling and Meta-Labeling Returns for ML Prediction

Post Outline * Introduction * Links * Embedded Notebook INTRODUCTION This post focuses on Chapter 3 in the new book Advances in Financial Machine Learning by Marcos Lopez De Prado. In this chapter De Prado demonstrates a workflow for improved return labeling for the purposes of supervised classification models. He introduces multiple concepts but focuses on the Triple-Barrier Labeling method, which incorporates profit-taking, stop-loss, and holding period information, and also meta-labeli

READ MORE →
Exploring Alternative Price Bars
PythonQuant

Exploring Alternative Price Bars

Post Outline * Introduction * Links * Embedded Notebook Introduction This post explores a concept at the heart of quantitative financial research. Most qfin researchers utilize statistical techniques that require varying degrees of stationarity. As many of you are aware financial time series violate pretty much all the rules of stationarity and yet many researchers, including me, have applied or will apply techniques when not appropriate thereby calling into question many of the resulting

READ MORE →
Mixture Model Trading (Part 5 - Algorithm Evaluation with pymc3)
PythonQuant

Mixture Model Trading (Part 5 - Algorithm Evaluation with pymc3)

Post Outline * Recap * Chapter Goals and Outline * Links * Embedded Jupyter Notebook Recap See <Mixture Model Trading (Part 1, Part 2, Part 3, Part 4, Part 5, Github Repo)>. This research demonstrates a systematic trading strategy development workflow from theory to implementation to testing. It focuses on the concept of using Gaussian Mixture Models as a method for return distribution prediction and then using a simple market timing strategy to take advantage of the predicted asset retu

READ MORE →
Mixture Model Trading (Part 4 - Strategy Implementation)
PythonQuant

Mixture Model Trading (Part 4 - Strategy Implementation)

Post Outline * Chapter Goals and Outline * Links * Introduction * Mixture Model Trading Algorithm Outline * GMM Algorithm Implementation * Next Steps Chapter Goals and Outline * Use Part 3 - strategy research as a basis for algorithmic trading strategy. * Implement strategy using the Quantconnect platform. Links * Mixture Model Trading Github Repo * Part 4 Jupyter Notebook Link * Full Algorithm Python Script Introduction This notebook will walkthrough the algorithm implement

READ MORE →
Mixture Model Trading (Part 3 - Strategy Research)
PythonQuant

Mixture Model Trading (Part 3 - Strategy Research)

Post Outline * Introduction * Links * Notebook * Next Steps Introduction This is the beginning of a three part series that I completed towards the end of 2017 as a learning module for Quantinsti.com. The purpose of the series is to demonstrate a research workflow focused around the theory and application of mixture models as the core framework behind a algorithmic trading strategy. Below is a quote taken from the README of the github repo: “The primary goal of this repo is to demonstrat

READ MORE →
Mixture Model Trading (Part 2 - Gaussian Mixtures)
PythonQuant

Mixture Model Trading (Part 2 - Gaussian Mixtures)

Post Outline * Introduction * Links * Notebook * Next Steps Introduction This is the beginning of a three part series that I completed towards the end of 2017 as a learning module for Quantinsti.com. The purpose of the series is to demonstrate a research workflow focused around the theory and application of mixture models as the core framework behind a algorithmic trading strategy. Below is a quote taken from the README of the github repo: “The primary goal of this repo is to demonstrat

READ MORE →
Mixture Model Trading (Part 1 - Motivation)
PythonQuant

Mixture Model Trading (Part 1 - Motivation)

Post Outline * Introduction * Links * Notebook * Next Steps Introduction This is the beginning of a three part series that I completed towards the end of 2017 as a learning module for Quantinsti.com. The purpose of the series is to demonstrate a research workflow focused around the theory and application of mixture models as the core framework behind a algorithmic trading strategy. Below is a quote taken from the README of the github repo: I will be presenting each of the notebooks

READ MORE →
Computing Option Skews with Dask
ResearchQuant

Computing Option Skews with Dask

Post Outline * Introduction * Links + Datasets * Notebook * Next Steps Introduction This article series provides an opportunity to move towards more interactive analysis. My plan is to integrate more Jupyter notebooks and Github repos into my research/publishing workflow. For datasets that are too big to share through github I will provide a download link both here and in the github readme. I will be posting the notebooks into this blog using iframes. If you experience any issues with f

READ MORE →
How To Get Free Intraday Options Data With Pandas-DataReader
PythonResearch

How To Get Free Intraday Options Data With Pandas-DataReader

Post Outline * Purpose * Intuitive explanation * Code * Next Steps Purpose This is a simple reference article for readers that might wonder where I get/got my options data from. In this regard I would like to shout out the contributors to the pandas-datareader, without their efforts this process would be much more complex. Intuitive Explanation So this code consists of three components. The first is the actual script that wraps the pandas-datareader functions and downloads the options

READ MORE →
Exploring Our Scraped Options Data Bid-Ask Spreads (Part-2)
PythonResearch

Exploring Our Scraped Options Data Bid-Ask Spreads (Part-2)

Post Outline * Notes on Part-2 * The Data * Bid-Ask Spread Analysis * How Do Aggregate Bid-Ask Spreads Vary with Days To Expiration? * How Do Bid-Ask Spreads Vary with Volume? * How Do Bid-Ask Spreads Vary with Volatility? * Summary Conclusions Notes on Part-2 Some astute readers in the comments noted that analysis based on the absolute difference in bid-ask price is not robust when considering the price of the underlying option and can lead to spurious conclusions. They recomme

READ MORE →
Exploring Our Scraped Options Data Bid-Ask Spreads
PythonResearch

Exploring Our Scraped Options Data Bid-Ask Spreads

Post Outline * The Objective * The Data * Basic Data Analysis * Bid-Ask Spread Analysis * How Do Aggregate Bid-Ask Spreads Vary with Days To Expiration? * How Do Bid-Ask Spreads Vary with Volume? * How Do Bid-Ask Spreads Vary with Volatility? * Summary Conclusions The Objective Compared to the equity market, the options market is a level up in complexity. For each symbol there are multiple expiration dates, strike prices for each expiration date, implied volatilities, and that'

READ MORE →