Quant Mashup
A Streamlit Dashboard for the @AlpacaHQ API (h/t @PyQuantNews)
The Alpaca brokerage service is very useful for algorithmic traders that comes with an API to retrieve data and execute trades in a paper or live environment. While you can also check the status and returns of your positions through the API, Alpaca has spent some time creating a frontend where users
- 3 years ago, 3 Sep 2021, 10:57am -
Factor Timing Is Tempting [Alpha Architect]
Academic research has found that factor premiums are both time-varying and dependent on the economic cycle. For example, Arnav Sheth, and Tee Lim, authors of the December 2017 study “Fama-French Factors and Business Cycles,” examined the behavior of six Fama-French factors—market beta (MKT),
- 3 years ago, 3 Sep 2021, 10:55am -
The three kinds of (over) fitting [Investment Idiocy]
This post is something that I've banged on about in many presentations at several conferences* (most complete slides are here), and in various interviews, but never actually formally described in a blog post. In fact this post has existed in draft form since 2015 (!). * you know, when you leave
- 3 years ago, 2 Sep 2021, 11:03am -
Purchasing Power Parity [Quant Dare]
Purchasing Power Parity (PPP) is a well-known measure used to compare the currencies of different countries in terms of price levels. So, in this post, we are going to explain PPP and study, through an example, its relation with the currency pairs. PPP is based on the law of one price (LOOP). For
- 3 years ago, 1 Sep 2021, 10:49am -
VVIX/VIX as a Return Indicator? [CXO Advisory]
Is the ratio of implied volatility of implied volatility (CBOE VVIX Index), interpretable as a measure of changes in investor fear level, to CBOE VIX Index itself a useful indicator of future stock market returns? To investigate, we relate monthly VVIX/VIX and monthly change in VVIX/VIX to monthly
- 3 years ago, 1 Sep 2021, 10:49am -
Mutual Funds: Negative $125B in Value-Add? [Alpha Architect]
Elton, Gruber, and Busse (2004) as well as Hortacsu and Syverson (2004) suggest that mutual fund markets are not perfectly competitive and that fees do matter to investors. In contrast, the neoclassical view of mutual funds (see for example Berk and Green, 2004; Pastor, Stambaugh and Taylor, 2019
- 3 years ago, 1 Sep 2021, 10:49am -
Caveats in Calibrating the OU Process [Hudson and Thames]
This is a series where we aim to cover in detail various aspects of the classic Ornstein-Uhlenbeck (OU) model and the Ornstein-Uhlenbeck Jump (OUJ) model, with applications focusing on mean-reverting spread modeling under the context of pairs trading or statistical arbitrage. Given the universality
- 3 years ago, 30 Aug 2021, 08:22pm -
Training Neural Networks: Why, As With Humans, Teaching Methods Matter [Enjine]
I achieved my life’s biggest accomplishment in 2004, when I defeated dozens of other contestants to clinch the Canadian Settlers of Catan championship. “Settlers”, as it’s called by its enthusiasts, is a strategy board game where players collect resources, build settlements, trade with and
- 3 years ago, 30 Aug 2021, 08:22pm -
The Best Systematic Trading Strategies in 2021: Part 3 [Quantpedia]
Finally, what are the five top-performing quantitative trading strategies in 2021? In part 1 of our article, we analyzed tendencies and trends among the Top 10 quantitative strategies of 2021. Thanks to Quantpedia Pro’s screener, we published several interesting insights about them. In part 2 of
- 3 years ago, 30 Aug 2021, 10:52am -
Building an Inflation Portfolio Using Asset Classes [Factor Research]
We recently explored using stocks to create an inflation-proxy portfolio that resulted in a collection of stocks with strong sector and factor biases. Specifically, the portfolio exhibited overweights in energy and financial stocks, perhaps as expected, as well as a long position in the value and
- 3 years ago, 30 Aug 2021, 10:51am -
Dijkstra algorithm [Quant Insti]
Start learning all about the Dijkstra algorithm for finding the shortest path. We briefly review the Kruskal algorithm, Prim algorithm, Johnson algorithm and Bellman algorithm as well. We'll cover: What is the Dijkstra algorithm? How does the Dijkstra algorithm work? Pseudo code of Dijkstra
- 3 years ago, 30 Aug 2021, 10:51am -
Countercyclical Trend Following [Allocate Smartly]
This is a test of a tactical strategy based on contrarian timing of the business cycle, increasing risk during periods of stress and decreasing risk during periods of calm. The strategy adds trend-following to this countercyclical approach to manage short-term market shocks. Backtested results from
- 3 years ago, 27 Aug 2021, 09:47pm -
International Tests of Factor Anomalies: Most Don’t Survive [Alpha Architect]
Since the development of the capital asset pricing model (CAPM) about 50 years ago, academic researchers have documented hundreds of “anomalies” that generate significant positive alpha. There are now so many that economist John Cochrane, in his 2011 presidential address to the American Finance
- 3 years ago, 27 Aug 2021, 09:46pm -
How to Use Exotic Assets to Improve Your Trading Strategy [Quantpedia]
As we have mentioned several times, the best course of action for a quant analyst who wants to develop a new trading strategy is to understand a well-known investment anomaly/factor fundamentally and then improve it. Quantpedia is a big fan of transferring ideas derived from academic research from
- 3 years ago, 26 Aug 2021, 12:57pm -
4 Ways to Trade the Trend Intensity Indicator [Raposa Trade]
Determining the strength of a trend can provide a valuable edge to your trading strategy and help you determine when to go long and let it ride, or not. This is what the Trend Intensity Indicator (TII) was designed to do. This indicator is as simple to interpret as more familiar values like the RSI.
- 3 years ago, 26 Aug 2021, 12:57pm -
Linear regression on market data using Python and R [Quant Insti]
This is the second installment of my series on regression analysis used in finance. In the first installment, we touched upon the most important technique in financial econometrics: regression analysis, specifically linear regression and two of its most popular flavours: univariate linear
- 3 years ago, 26 Aug 2021, 12:57pm -
Mean Reversion Entry: At Open vs. Intraday Pullback vs Confirmation [Alvarez Quant Trading]
For the mean reversion strategies that I have created in the past and are trading now, they typically enter at the next day’s open or wait for a further pullback intraday before entering. My current mean reversion strategy, which enters on a limit down, was doing great until a few months ago when
- 3 years ago, 25 Aug 2021, 12:49pm -
The Value Premium Might be Smaller Than We Originally Thought [Alpha Architect]
Remember HML? It was the original formulation for estimating the “value” premium published by Fama & French in 1992. In that seminal article, FF argued based on the results they obtained, that the risk of owning equity is multidimensional. One of those dimensions of risk they used was
- 3 years ago, 25 Aug 2021, 12:49pm -
Correlation Matrix Stress Testing: Shrinkage Toward an Equicorrelation Matrix [Portfolio Optimizer]
Financial research has consistently shown that correlations between assets tend to increase during crises and tend to decrease during recoveries1. The recent COVID-19 market crash was no exception, as illustrated on Alvarez Quant Trading blog post Correlations go to One for both the individual
- 3 years ago, 23 Aug 2021, 10:35pm -
The Best Systematic Trading Strategies in 2021: Part 2 [Quantpedia]
The year 2021 has been an incredible year for passive equity investors so far. However, in the first part of our article, we talked about quantitative strategies which achieved even better results in 2021 than passive US equity investors. Indeed, there do exist such strategies, at least definitely
- 3 years ago, 23 Aug 2021, 10:32pm -
Building a Long Volatility Strategy without Using Options [Factor Research]
Long volatility strategies can be built without using options Securities can be selected on different risk metrics like the VIX or high yield spread Although portfolios differ, the strategies exhibited similar trends INTRODUCTION We started our exploration of long volatility strategies by analyzing
- 3 years ago, 23 Aug 2021, 10:32pm -
Macro trends for trading models [SR SV]
Unlike market price trends, macroeconomic trends are hard to track in real-time. Conventional econometric models are immutable and not backtestable for algorithmic trading. That is because they are built with hindsight and do not aim to replicate perceived economic trends of the past (even if their
- 3 years ago, 23 Aug 2021, 10:31pm -
Crypto Trading Depth [Tr8dr]
I have a collection of crypto stat/arb strategies I plan to trade as a portfolio of strategies. Each strategy trades a small mean-reversion portfolio of loosely cointegrated coins, based on a bayesian state-based model. The returns in cryptos for this sort of strategy are phenomenal, however,
- 3 years ago, 20 Aug 2021, 10:39am -
Optimising the rsims package for fast backtesting in R [Robot Wealth]
rsims is a new package for fast, quasi event-driven backtesting in R. You can find the source on GitHub, docs here, and an introductory blog post here. Our use case for rsims was accurate but fast simulation of trading strategies. I’ve had a few questions about how I made the backtester as fast as
- 3 years ago, 20 Aug 2021, 10:38am -
The Impact of Goodwill on Stock Returns [Alpha Architect]
A firm’s stock price should reflect the value of both its tangible and intangible capital. While tangible capital has been widely studied, intangible capital has been receiving more attention due to its increasing importance in economic values. According to a December 29, 2020, Forbes article,
- 3 years ago, 20 Aug 2021, 10:38am -
Testing Turtle Trading: The System that Made Newbie Traders Millions [Raposa Trade]
In 1982, a group of inexperienced traders were recruited to be a part of an experiment that would make many of them multi-millionaires. Richard Dennis bet his partner William Eckhardt that anyone could be a successful trader given they had training and a system to follow. It was a re-hash of the
- 3 years ago, 18 Aug 2021, 11:04pm -
Designing Neural Networks [Enjine]
Unfamiliar terms have a way of impressing us. I remember the first time I heard about the ‘Monte Carlo’ method. The name conjured up an image of a sophisticated technique, born out of deep discussions by brilliant mathematicians in a Spanish cafe. Turns out, it’s just a by-word for running
- 3 years ago, 17 Aug 2021, 10:46am -
Financial Media, Price Discovery, and Merger Arbitrage [Alpha Architect]
This paper contributes to the literature on understanding the limits of arbitrage and the resulting dynamics of price discovery. Specifically, it studies the context of "merger arbitrage," which is a well-known investment strategy and unless there are limits to arbitrage, this market
- 3 years ago, 17 Aug 2021, 10:46am -
Free Resources to Learn Machine Learning for Trading [Quant Insti]
Machine learning is a need in almost every sector today. Sectors like medicine, transportation, healthcare, advertising and financial technology are tremendously reliant on machine learning. Speaking about the financial technology domain, algorithmic trading practice is extremely efficient with the
- 3 years ago, 16 Aug 2021, 10:44am -
Better Indicators with Windowing [Financial Hacker]
If indicators didn’t help your trading so far, just pimp them by preprocessing their input data. John Ehlers proposed in his TASC September article the windowing technique: multiply the input data with an array of factors. Let’s see how triangle, Hamming, and Hann factor arrays can improve the
- 3 years ago, 16 Aug 2021, 10:43am -
Chinese Stocks from a Factor Lens [Factor Research]
Foreign stock ownership is low in China and the market is dominated by retail investors This provides an opportunity for investors to deploy quant strategies Factor investing has been far more attractive in Chinese than U.S. equities in recent years INTRODUCTION The latest chapter in the complicated
- 3 years ago, 16 Aug 2021, 10:43am -
Embeddings of Sectors and Industries using Graph Neural Networks [Gautier Marti]
You can find the reproducible experiment in this Colab Notebook. In econometrics and financial research, categorical variables, and especially sectors and industries, are usually encoded as dummy variables (also called one-hot encoding in the machine learning community). You can find plenty of such
- 3 years ago, 13 Aug 2021, 01:38pm -
Exploring the rsims package for fast backtesting in R [Robot Wealth]
rsims is a new package for fast, realistic (quasi event-driven) backtesting of trading strategies in R. Really?? Does the world really need another backtesting platform…?? It’s hard to argue with that sentiment. Zipline, QuantConnect, Quantstrat, Backtrader, Zorro… there are certainly plenty
- 3 years ago, 13 Aug 2021, 10:44am -
Community Alpha of QuantConnect - Part 2: Social Trading Factor Strategies [Quantpedia]
This blog post is the continuation of series about Quantconnect´s Alpha market strategies. This part is related to the factor strategies notoriously known from the majority of asset classes. Although the results are insightful, they are not straightforward, and further analysis could be made.
- 3 years ago, 13 Aug 2021, 10:44am -
Research Review | 13 August 2021 | Market and Asset Analytics [Capital Spectator]
Decomposing Momentum: Eliminating its Crash Component Pascal Büsing (University of Muenster), et al. July 15, 2021 We propose a purely cross-sectional momentum strategy that avoids crash risk and does not depend on the state of the market. To do so, we simply split up the standard momentum return
- 3 years ago, 13 Aug 2021, 10:43am -
Relative Sentiment and Market Returns [Alpha Architect]
This paper studies the relationship between aggregate investor attention and subsequent market returns over the following week. The authors create two different investor attention indicators—one for aggregate retail attention (ARA) and one for aggregate institutional attention (AIA). ARA is found
- 3 years ago, 12 Aug 2021, 01:05pm -
New Feature: Cluster Analysis [Allocate Smartly]
We track a lot of tactical strategies, and it can be difficult to understand how they all fit together in the big picture. The usual correlation matrix (example) is helpful when drilling down on a single strategy, but it’s near impossible to see the forest for the trees among the 1000’s of data
- 3 years ago, 11 Aug 2021, 01:30pm -
Modeling US Stock Market Expected Returns, Part III [Capital Spectator]
I recently outlined two models for estimating the US stock market’s return for the decade ahead. Let’s add a third model to the mix with the plan to take the average as a relatively robust forecast. The previous two models (see here and here) used valuation to estimate ex ante performance for
- 3 years ago, 11 Aug 2021, 01:29pm -
Value Investing and the Role of Intangibles [Alpha Architect]
Recent research, including the 2020 studies “Explaining the Recent Failure of Value Investing” and “Intangible Capital and the Value Factor: Has Your Value Definition Just Expired?,” have investigated the impact on U.S. value strategies of the increase in the relative importance of
- 3 years ago, 11 Aug 2021, 01:29pm -
Valuing Bitcoin using USD Index [Recession Alert]
Of the dozen indicators and metrics we have researched, the fortunes of the US Trade-Weighted U.S Dollar Index (TWDI) has the biggest impact on Bitcoin USD prices. When the TWDI depreciates, this boosts Bitcoin prices strongly. When the TWDI becomes stronger, Bitcoin prices face significant
- 3 years ago, 10 Aug 2021, 01:40pm -
Extended Optimal Arbitrage Strategies [Hudson and Thames]
In our previous article, we’ve discussed a couple of trading strategies exploiting arbitrage between similar stocks using stochastic optimal control methods. A major shortcoming of those approaches is that we restricted ourselves to constructing delta-neutral portfolios. Along with this, the ratio
- 3 years ago, 9 Aug 2021, 11:33am -
Building an Inflation Portfolio Using Stocks [Factor Research]
An inflation portfolio can be created by systematically selecting stocks correlated to inflation This would have resulted in a portfolio with strong sector and factor biases However, the correlation to inflation would not have been significantly higher than for stocks overall INTRODUCTION Measuring
- 3 years ago, 9 Aug 2021, 10:09am -
Should you Trade with the Kelly Criterion? [Raposa Trade]
The Kelly Criterion gives an optimal result for betting based on the probability of winning a bet and how much you receive for winning. If you check out Wikipedia or Investopedia, you’ll see formulas like this: f∗=p−1−pb−1f^{*} = p - \frac{1-p}{b-1} f∗=p−b−11−p which gives you
- 3 years ago, 9 Aug 2021, 10:09am -
Machine learning for portfolio diversification [SR SV]
Dimension reduction methods of machine learning are suited for detecting latent factors of a broad set of asset prices. These factors can then be used to improve estimates of the covariance structure of price changes and – by extension – to improve the construction of a well-diversified minimum
- 3 years ago, 9 Aug 2021, 10:08am -
Paper Review: Algorithmic Financial Trading with Deep Convolutional Neural Networks [Enjine]
Of the major machine learning algorithms, the convolutional neural network (CNN) is my favourite. CNNs form some of our company’s most cherished elements that give strength to our investment algorithms. My curiosity was therefore piqued when I came across Sezer and Ozbayoglu’s paper titled
- 3 years ago, 5 Aug 2021, 01:04pm -
The Active vs Passive: Smart Factors, Market Portfolio, or Both? [Alpha Architect]
While there may be debates about passive and active investing, and even blogs about the numbers of active funds that were outperformed by the market, history taught us that the outperformance of active or passive investing is cyclical. As a proxy for active investing, the paper examines factor
- 3 years ago, 5 Aug 2021, 01:03pm -
10 Free Swing Trading Strategies That Work (Backtested Buy And Sell Signals) [Quantified Strategies]
The internet is flooded with anecdotal evidence about how to swing trade and how to make money. Unfortunately, almost all articles consist of unproven and untested swing trades. To make money swing trading is difficult, but we believe you face much better odds the more you backtest and generate
- 3 years ago, 5 Aug 2021, 01:02pm -
Distance Approach in Pairs Trading: Part II [Hudson and Thames]
We have discussed Basic Distance Approach in the previous blog post. In this post, we’ll look into one of the advanced methods in the Distance Approach and its differences to the Basic Distance Approach. If you haven’t read the previous blog post, we recommend reading it before you read this
- 3 years ago, 3 Aug 2021, 11:08am -
A quick example on using next day open-to-open returns for Tactical Asset Allocation [QuantStrat TradeR]
First off, for the hiring managers out there, after about a one-year contracting role at Bank of America doing some analytical reporting coding for them in Python, I am on the job market. Feel free to find my LinkedIn here. This post will cover how to make tactical asset allocation strategies a bit
- 3 years ago, 2 Aug 2021, 01:58pm -
Building a Long Volatility Strategy without Using Options [Factor Research]
Long volatility strategies can be built without using options Portfolios would have primarily consisted of certain currency pairs and treasury bonds They lack explosive returns when volatility spikes, but they also lack the bleed INTRODUCTION Almost all asset classes are implicitly short volatility
- 3 years ago, 2 Aug 2021, 01:58pm -