Quant Mashup
Financial Data Manipulation in dplyr for Quant Traders [Robot Wealth]
In this post, we’re going to show how a quant trader can manipulate stock price data using the dplyr R package. Getting set up and loading data Load the dplyr package via the tidyverse package. if (!require('tidyverse')) install.packages('tidyverse') library(tidyverse) First,
- 4 years ago, 14 May 2020, 10:12am -
Academic Finance Research Galore. WFA Sessions Announced [Alpha Architect]
Attention all finance geeks. The latest and greatest from academic researchers is available for all to review. The WFA recently released their sessions. WFA is one of the more prestigious academic conferences and papers presented at the conference often find their way into top-tier academic
- 4 years ago, 14 May 2020, 10:12am -
Machine Learning and Investing: Forecasting Fundamentals w/ Ensembles [Alpha Architect]
Quantitative factor portfolios generally use historical company fundamental data in portfolio construction. The key assumption behind this approach is that past fundamentals proxy for elements of risk and/or systematic mispricing. However, what if we could forecast fundamentals, with a small margin
- 4 years ago, 13 May 2020, 01:37pm -
Get Rich Quick Trading Strategies (and why they don't work) [Robot Wealth]
Every aspiring millionaire who comes to the markets armed with some programming ability has implemented a systematic Get Rich Quick (GRQ) trading strategy. Of course, they don’t work. Deep down even the greenest of newbies knows this. Yet, still, we are compelled to give them a try, just once,
- 4 years ago, 13 May 2020, 08:19am -
Designing an energy arbitrage strategy (h/t @PyQuantNews) [Steve Klosterman]
The price of energy changes hourly, which opens up the possibility of temporal arbitrage: buying energy at a low price, storing it, and selling it later at a higher price. To successfully execute any temporal arbitrage strategy, some amount of confidence in future prices is required, to be able to
- 4 years ago, 13 May 2020, 08:19am -
How To Get Historical S&P 500 Constituents Data For Free [Robot Wealth]
In this post, we are going to construct snapshots of historic S&P 500 index constituents, from freely available data on the internet. Why? Well, one of the biggest challenges in looking for opportunities amongst a broad universe of stocks is choosing what stock “universe” to look at. One
- 4 years ago, 12 May 2020, 10:05am -
Skulls, Financial Turbulence and Risk Management [Alpha Architect]
When hunting for diversity, the typical investor considers only average correlations. However, when measuring an asset’s diversification benefits utilizing average correlations tend to mislead investors. For example, when both U.S. and non-U.S. equities produce returns greater than one standard
- 4 years ago, 12 May 2020, 10:05am -
Straddles and Trend Following [Flirting with Models]
The convex payoff profile of trend following strategies naturally lends itself to comparative analysis with option strategies. Unlike options, however, the payout of trend following is not guaranteed. To compare and contrast the two approaches, we replicate simple trend following strategies with
- 4 years ago, 11 May 2020, 10:10am -
How to Find Cheap Options to Buy and Expensive Options to Sell [Robot Wealth]
If you want to make money trading, you’re going to need a way to identify when an asset is likely to be cheap and when it is likely to be expensive. You want to be a net buyer of the cheap stuff and a net seller of the expensive stuff. Thanks, Capitain Obvious. You’re welcome. How does this
- 4 years ago, 11 May 2020, 10:10am -
Value Investing: Even Deeper History [Two Centuries Investments]
In last week’s post we extended the systematic value factor (or at least a pretty good proxy of it) back to 1871. The response from readers was encouraging, perhaps because of the pain that value investing has been causing lately. Long-run history gives some relief. This week we dig deeper,
- 4 years ago, 11 May 2020, 10:10am -
The Case Against Factor Investing [Factor Research]
Factor investing is likely the best option for investors seeking to outperform the market However, the cyclicality of factors makes factor investing challenging when it underperforms Investors that do not understand this cyclicality are likely better served by plain, rather than smart beta FREE
- 4 years ago, 11 May 2020, 10:09am -
Online Portfolio Selection: Mean Reversion [Hudson and Thames]
Mean Reversion is an effective quantitative strategy based on the theory that prices will revert back to its historical mean. A basic example of mean reversion follows the benchmark of Constant Rebalanced Portfolio. By setting a predetermined allocation of weight to each asset, the portfolio shifts
- 4 years ago, 10 May 2020, 10:03pm -
How to Hedge a Portfolio with Put Options [Robot Wealth]
There are 2 good reasons to buy put options: because you think they are cheap because you want downside protection. In the latter case, you are looking to use the skewed payoff profile of the put option to protect a portfolio against large downside moves without capping your upside too much. The
- 4 years ago, 8 May 2020, 09:35pm -
Machined risk premia [OSM]
Over the last few posts, we’ve discussed methods to set return expectations to construct a satisfactory portfolio. These methods are historical averages, discounted cash flow models, and risk premia. our last post, focused on the third method: risk premia. Using the Capital Asset Pricing Model
- 4 years ago, 8 May 2020, 09:34pm -
When endogenous risk management isn't enough: a simple risk overlay [Investment Idiocy]
"How does your risk management work?" ... is a question I'm frequently asked. In fact this is actually a difficult question, if you were to look at my open source python backtesting project pysystemtrade, you would struggle to point at a piece of code and say "Behold! Right
- 4 years ago, 7 May 2020, 02:54pm -
Backtesting ESG Factor Investing Strategies [Quantpedia]
Socially Responsible Investing (also called ESG Factor Investing) grows in popularity. More and more investors enter the stock market not just to invest their savings, but they are also want to support companies that bring positive social or environmental change. ESG factor investing can bring
- 4 years ago, 7 May 2020, 02:54pm -
The Size Effect in Multifactor Portfolios [Alpha Architect]
The lack of a statistically significant size premium in the U.S. since the publication of Rolf Banz’s 1981 paper, “The Relationship Between Return and Market Value of Common Stocks,” published in the Journal of Financial Economics, led many investors to question its use in building portfolios.
- 4 years ago, 7 May 2020, 02:53pm -
Sentiment analysis: ifo business climate data [Grzegorz Link]
Sentiment analysis is one of the investing tools I'm most fond of. There are multiple ways of measuring sentiment: from basic investor surveys to advanced text mining techniques, but one of the most robust and long-term datasets is ifo Institute's business climate sentiment polls.[4]
- 4 years ago, 6 May 2020, 10:44pm -
Can neural networks predict the stock market just by reading newspapers? [Quant Dare]
Markets are said to be driven by randomness, but this does not imply that they are 100% random and thus, completely unpredictable. In the end, there are always people behind investments and many of them are making decisions based on what they read in newspapers. We will be trying to estimate the
- 4 years ago, 6 May 2020, 11:32am -
How to download fundamentals data with Python (h/t @PyQuantNews) [TheAutomatic.net]
In this post we will explore how to download fundamentals data with Python. We’ll be extracting fundamentals data from Yahoo Finance using the yahoo_fin package. For more on yahoo_fin, including installation instructions, check out its full documentation here. Getting started Now, let’s import
- 4 years ago, 6 May 2020, 11:31am -
Pairs Trading Literature Review [Robot Wealth]
This post summarises the key lessons of the academic literature that has been published on pairs trading. The key themes are highlighted at the end of the page. Pair Trading Literature Review Gatev, Goetzmann, Rouwenhorst – “Pairs Trading: Performance of a Relative Value Arbitrage Strategy”
- 4 years ago, 6 May 2020, 11:31am -
Using Aggregate TAA Allocation as a Tool for Timing the Market [Allocate Smartly]
We track 50+ public Tactical Asset Allocation (TAA) strategies. A unique feature of our platform is that we show the aggregate allocation across all of those strategies each day (member link). For example, the graph below shows the aggregate allocation year to date by category of asset. Note the
- 4 years ago, 5 May 2020, 01:53pm -
Cheap vs. Expensive Factors: Does Valuation Matter for Future Returns? [Alpha Architect]
Tesla (TSLA) breached the $100 billion market capitalization in January 2020 and became the most valuable car manufacturer globally. However, valuing the company is challenging given the growth profile, complexity of the business, and erratic CEO. It is not yet profitable and cash flow is negative,
- 4 years ago, 5 May 2020, 01:53pm -
Overnight and Intraday SPX returns [Robot Wealth]
One of the things I’ve noticed from staring at the screen all day for the last few months is that most of the large negative returns in US stock indexes have come overnight. What do you mean by “overnight”? The core stock trading session for US stocks is between 9:30 am and 4 pm Eastern Time.
- 4 years ago, 5 May 2020, 09:30am -
LSTM Networks: Can They Predict Equity Index Prices? [Quant Insti]
In this article, we will study a deep learning framework based on recurrent neural networks to predict daily equity index price movements. Specifically, the focus will be on long short-term memory (LSTM) networks - which are a type of recurrent neural network. Different types of inputs and network
- 4 years ago, 5 May 2020, 09:29am -
Why Passively Investing in Active Methods May Not Work [Alpha Architect]
In this piece, David Blitz provides an interesting perspective on using the passive framework as a blueprint for constructing active (ETF-like) products. The article is not an empirical (no charts!) nor a theoretical (no analytics) analysis, but is focused on just one question: Is it efficient to
- 4 years ago, 5 May 2020, 09:29am -
Using Apache Airflow to Extract CoT Data [Robot Wealth]
In today’s post we are going to be extracting CoT (Commitment of Traders) reports from the CFTC website using a pipeline built on Apache Airflow. What is CoT data? The CoT report is a weekly publication which reports the open positions of market participants in the U.S futures market. It’s
- 4 years ago, 4 May 2020, 09:28am -
Online Portfolio Selection: Momentum [Hudson and Thames]
Today we will be exploring the second chapter of our newest online portfolio selection module, momentum. Momentum strategies have been a popular quantitative strategy in recent decades as the simple but powerful trend-following allows investors to exponentially increase their returns. This module
- 4 years ago, 4 May 2020, 09:27am -
Value Crashes: Deep History [Two Centuries Investments]
Value investing is struggling big time! As of March 2020, Value factor is down -51% from the peak reached 14 years ago. It is the longest and largest drawdown in value’s recent history. Many value investors have already rotated into growth. The remaining diehards also want to quit. Even Warren
- 4 years ago, 4 May 2020, 09:26am -
Market Profile Chart in Octave [Dekalog Blog]
In a comment on my previous post, visualising Oanda's orderbook, a reader called Darren suggested that I was over complicating things and should perhaps use a more established methodology, namely Market Profile. I had heard of Market Profile before Darren mentioned it, but had always assumed
- 4 years ago, 4 May 2020, 09:26am -
Merger Arbitrage: Arbitraged Away? [Factor Research]
As AUM in merger arbitrage has increased, alpha decreased Investors can access merger arbitrage via hedge funds, bank indices, and ETFs The strategy is not as uncorrelated from equities as likely perceived by allocators INTRODUCTION Working in the restructuring team of a corporate finance boutique
- 4 years ago, 4 May 2020, 09:26am -
Equilibrium theory of Treasury yields [SR SV]
An equilibrium model for U.S. Treasury yields explains how macroeconomic trends and related expectations for future short-term interest rates shape the yield curve. Long-term yield trends arise from learning about stable components in GDP growth and inflation. They explain the steady rise of
- 4 years ago, 4 May 2020, 09:26am -
Tactical Asset Allocation in April: Stubbornly Defensive [Allocate Smartly]
Tactical Asset Allocation (TAA) dodged the worst of the bear in February and March, but trailed the big bounce in April. Entering May, TAA remains stubbornly defensive. We track 50+ TAA strategies sourced from books, papers, etc., allowing us to draw broad conclusions about TAA as a style. In the
- 4 years ago, 1 May 2020, 02:51pm -
Performance After 10% Up Months [Quantifiable Edges]
April finished with a 12.7% gain for the SPX. That is the strongest 1-month gain since January of 1987. In last night’s subscriber letter I decided to look back at all other instances following 1-month SPX (or its predecessor the S&P 90) gains of 10% or more. The table below shows all
- 4 years ago, 1 May 2020, 02:50pm -
What's the Story Behind EBIT/TEV? [Alpha Architect]
A common question we receive at Alpha Architect is the following: Why do you focus on EBIT/TEV as a value screen for stocks instead of the more traditional measures such as book to price? In short, we believe stocks are ownerships in businesses (I know that sounds crazy coming from a quant shop!).
- 4 years ago, 1 May 2020, 02:50pm -
Using random forest to model limit order book dynamic [R Trader]
In this article I use the random forest algorithm to forecast mid price dynamic over short time horizon i.e. a few seconds ahead. This is of particular interest to market makers to skew their bid/ask spread in the direction of the most favorable outcome. Most if not all the literature on the topic
- 4 years ago, 30 Apr 2020, 09:35pm -
The VIX Futures Basis [Robot Wealth]
In the eye of the recent storm, with VIX up over 50, many traders were looking to “short the VIX” using products like TVIX. “Surely it’s going to coming back down?” Well yeah, it will, eventually, but that doesn’t mean that you can profitably short VIX products. First, some basics…
- 4 years ago, 30 Apr 2020, 09:35am -
Understanding Neural Networks (with Graphs) [Quant Dare]
Artificial Neural Networks (ANN) have been applied with success to many daily tasks that needed human supervision, but due to its complexity, it is hard to understand how they work and how they are trained. Along this blog, we have deeply talked about what Neural Networks are, how they work, and how
- 4 years ago, 30 Apr 2020, 09:34am -
How to Design Intraday Algo-Trading Model for Cryptocurrencies using Bitcoin-based Signals? [Quant at Risk]
With a growing popularity of cryptocurrencies and their increasing year-over-year traded volumes, crypto algo-trading is a next big thing! If you study this market closely you will notice that it offers quick gains in much shorter unit of time comparing to stocks or FX. No wonder why a participation
- 4 years ago, 28 Apr 2020, 10:47am -
Overnight Risk Premium in Equity and Commodity Markets [Philipp Kahler]
Over the last 20 years equity markets and ETFs did a significant part of their total performance over night. This article will examine the relationship of in-session moves vs. the out-of-session moves of ETFs and commodities. The overnight risk premium As an investor you can expect to get paid for
- 4 years ago, 28 Apr 2020, 10:46am -
Ways to Measure Extreme Downside Risk [Alpha Architect]
Larry Swedroe recently wrote a post titled “Is there a Tail Risk Premium in Stocks.” This post is a good complement to Larry’s as this paper proposes two new measures of systematic tail risk and explores whether they are associated with a significant risk premium. The first measure, Extreme
- 4 years ago, 28 Apr 2020, 10:46am -
Introducing Online Portfolio Selection [Hudson and Thames]
Online Portfolio Selection is an algorithmic trading strategy that sequentially allocates capital among a group of assets to maximize the final returns of the investment. Traditional theories for portfolio selection, such as Markowitz’s Modern Portfolio Theory, optimize the balance between the
- 4 years ago, 27 Apr 2020, 10:49am -
VIX - Simple and Intuitive Explanation of Volatility Index [Only VIX]
Few years ago I published two post trying to give simple explanations and intuition behind complicated formulas used for calculating vol indexes. However few of you emailed that some charts are missing from these older posts, and for technical reasons since I could not restore them, I decided to
- 4 years ago, 27 Apr 2020, 10:48am -
Tranching, Trend, and Mean Reversion [Flirting with Models]
In past research we have explored the potential benefits of how-based diversification through the lens of pay-off functions. Specifically, we explored how strategic rebalancing created a concave payoff while momentum / trend-following created a convex payoff. By combining these two approaches, total
- 4 years ago, 27 Apr 2020, 10:48am -
Tail Risk Hedge Funds [Factor Research]
Tail risk funds tend to be most in demand when they are least attractive Short-term bonds provided similar benefits to tail risk funds The TAIL ETF closely replicates the performance of tail risk funds INTRODUCTION In a year where the S&P 500 lost more than 30% in a few weeks, there are few
- 4 years ago, 27 Apr 2020, 10:47am -
Efficiently Simulating Geometric Brownian Motion in R [Robot Wealth]
For simulating stock prices, Geometric Brownian Motion (GBM) is the de-facto go-to model. It has some nice properties which are generally consistent with stock prices, such as being log-normally distributed (and hence bounded to the downside by zero), and that expected returns don’t depend on the
- 4 years ago, 26 Apr 2020, 12:03pm -
Podcast with @MebFaber: Why an investment plan is a must and how to behave in a market crash [System Trader Show]
Meb Faber is a co-founder and the Chief Investment Officer of Cambria Investment Management. His speciality is quant investing. Meb is the host of The Meb Faber Show podcast and has authored numerous white papers and books. He is a frequent speaker and writer on investment strategies and has been
- 5 years ago, 25 Apr 2020, 01:36pm -
Risk premia [OSM]
Our last post discussed using the discounted cash flow model (DCF) as a method to set return expectations that one would ultimately employ in building a satisfactory portfolio. We noted that if one were able to have a reasonably good estimate of the cash flow growth rate of an asset, then it would
- 5 years ago, 25 Apr 2020, 12:04pm -
Research Review | 24 April 2020 | Covid-19 Blowback [Capital Spectator]
Howell E. Jackson (Harvard Law School) and Steven L. Schwarcz (Duke U.) April 19, 2020 The coronavirus has produced a public health debacle of the first-order. But the virus is also propagating the kind of exogenous shock that can precipitate – and to a considerable degree is already precipitating
- 5 years ago, 25 Apr 2020, 12:04pm -
Visualising Oanda's Orderbook [Dekalog Blog]
My earlier post of 26th March shows code to visualise the most recent instantaneous snapshot of Oanda's order book, realised as a horizontal bar chart superimposed over a price chart. Below is a screen shot of a different type of chart designed to show the historical order book, which is
- 5 years ago, 24 Apr 2020, 10:30am -