Quant Mashup
Quantocracy is now on Bluesky and Threads. See the links in the header. - Mike
Simple Machine Learning Models on OrderBook/PositionBook Features [Dekalog Blog]
This post is about using OrderBook/PositionBook features as input to simple machine learning models after previous investigation into the relevance of such features. Due to the amount of training data available I decided to look only at a linear model and small neural networks (NN) with a single
- 2 years ago, 8 Apr 2022, 12:56pm -
Benford’s Law and Strategy Selection [Alvarez Quant Trading]
While talking to a trader, he mentioned an article in the December 2021 issue of Technical Analysis of Stocks & Commodities about Benford’s Law. I had read the same article and was wondering how it could be applied to my trading. Benford’s Law is often used to look for fraud. I am sure I am
- 2 years ago, 6 Apr 2022, 09:17pm -
Transformers: is attention all we need in finance? Part II [Quant Dare]
Using PyTorch to test the attention mechanism applied to time series forecasting. Introduction In the previous post we saw what Transformers are and how they work in its basic form. In this post we will develop one possible way to adapt the original design, which was created [1] to target NLP tasks,
- 2 years ago, 6 Apr 2022, 09:16pm -
Why 90% of Backtests Fail [Financial Hacker]
About 9 out of 10 backtests produce wrong or misleading results. This is the number one reason why carefully developed algorithmic trading systems often fail in live trading. Even with out-of-sample data and even with cross-validation or walk-forward analysis, backtest results are often way off to
- 2 years ago, 4 Apr 2022, 11:49pm -
Optimize Your Trading Strategy With Python And The Kelly Criterion [Raposa Trade]
Retail traders almost always have small trading accounts. To get the returns they're after, traders frequently take on leverage - often times imprudent amounts in highly levered FOREX accounts that can be levered 50-100x! Retail equity brokers are a bit more conservative with maximum leverage
- 2 years ago, 4 Apr 2022, 11:48pm -
Gaining an Edge via Textual Analysis of FOMC Meetings [Alpha Architect]
How investors understand and use central bank communications, aka FEDSPEAK, is oftentimes cryptic and difficult to analyze. This study attempts to provide some clarity to this issue by applying textual analysis to both high-frequency price and communication data, to focus on episodes whereby stock
- 2 years ago, 4 Apr 2022, 11:48pm -
Factor Olympics Q1 2022 [Factor Research]
Factor volatility was low despite the significant geopolitical and economic turmoil in Q1 2022 Value is the clear winner with double-digit gains Quality stocks underperformed, but only moderately INTRODUCTION We present the performance of five well-known factors on an annual basis for the last 10
- 2 years ago, 4 Apr 2022, 11:48pm -
Equity convexity and gamma strategies [SR SV]
Equity convexity means that a stock outperforms in times of large upward or downward movements of the broad market: its elasticity to the market return is curved upward. Gamma is a measure of that convexity. All else equal, positive gamma is attractive, as a stock would outperform in market rallies
- 2 years ago, 4 Apr 2022, 11:48pm -
Mean-Variance Optimization: Well Diversified (Near) Efficient Portfolios [Portfolio Optimizer]
One well-known stylized fact of the Markowitz’s mean-variance framework is that, irrespective of the quality of the estimates of asset returns and (co)variances, efficient portfolios are concentrated in a very few assets1. From a practitioner’s perspective, this has always been a problem12. In
- 2 years ago, 1 Apr 2022, 12:38pm -
Nuclear Threats and Factor Performance - Takeaway for Russia-Ukraine Conflict [Quantpedia]
The Russian invasion of Ukraine and its repercussions continue to occupy front pages all around the world. The battle situation is very dynamic, but it seems that Ukraine holds ground very well and is even able to execute strong local counter-offensives against Russian forces. That’s definitely
- 2 years ago, 1 Apr 2022, 12:37pm -
Are Stock Market Bubbles Identifiable? [Alpha Architect]
We can define an investment bubble as an irrational strong price increase—implying a predictable strong decline. The efficient market hypothesis (EMH) implies both the absence of bubbles and that the future return is unpredictable. In his Nobel Prize lecture, the father of the EMH, Eugene Fama
- 2 years ago, 31 Mar 2022, 11:49am -
Yield Curve Inversions and SPX Returns [Quantifiable Edges]
There has been a lot of talk recently about yield curve inversions and whether that means a recession is on the way, and how soon? And if there is a recession, will there also be a bear market? I decided to forget about economic forecast and just look at how the SPX did after a curve inversion. I
- 2 years ago, 31 Mar 2022, 11:49am -
Mutual Fund Returns vs Investor Returns [Quant Dare]
It is well known that we investors are full of biases when making investment decisions (loss-aversion, trend-chasing, …), but what is the real impact of these biases on our performance? In this post we will try to answer this question quantitatively, and we will also compare the average investor
- 2 years ago, 31 Mar 2022, 11:49am -
Which Articles Should You Read on SeekingAlpha.com? [Alpha Architect]
One of the most established tenets in social psychology science states, “When considering what content to share in their social interactions, people primarily contemplate what impressions their sharing could create among receivers and whether those impressions are consistent with who they are or
- 2 years ago, 28 Mar 2022, 08:44pm -
Building a Diversified Portfolio for the Long-Term [Factor Research]
Most diversifying strategies fail to provide diversification benefits when most needed We build a diversified portfolio via trend, multi-factor, and long volatility An equal-weighted approach to asset allocation is not worse than more complex approaches INTRODUCTION At FactorResearch, we have
- 2 years ago, 28 Mar 2022, 08:44pm -
Positive $SPX Seasonality After the 4th Friday in March [Quantifiable Edges]
There are some bullish forces kicking in the next few weeks. For one, the week after the 4th Friday in March has been a strong one over the last 24 years. (Not as much before that.) We can see this in the study below, which I showed in this weekend’s subscriber letter. Positive SPX seasonality
- 2 years ago, 28 Mar 2022, 08:43pm -
Using requests and BeautifulSoup in Python to scrape data [Wrighters.io]
The amount of data available on the internet is quite staggering. It is often quite easy to do a quick search and click through to view data on a website. However, if you want to actually use that data in your analysis, you have to be able to fetch it and convert it into a format that is usable. The
- 2 years ago, 27 Mar 2022, 08:43pm -
Top N Crypto-Assets by MarketCap for Backtesting Purposes in Python [Quant at Risk]
A quantitative research over the construction of a perfect crypto-portfolio can be based on a number of crypto-assets. The selection of them is of paramount importance. If you are able to build the right portfolio, stick to it, or successfully manage its composition in time (e.g. through the method
- 2 years ago, 27 Mar 2022, 08:42pm -
5 Economic Indicators That Matter To Investors [Decoding Markets]
Recently, I grabbed a book from my library that had been standing there for the past 10 years. It’s called Guide to the 50 Economic Indicators That Really Matter. It’s one of the few books that describe concrete trading strategies that are still relevant. It’s also a great read to brush up on
- 2 years ago, 27 Mar 2022, 08:42pm -
2022 Democratize Quant Conference Recap and Materials [Alpha Architect]
We recently hosted our Democratize Quant Conference (sign up here for updates). This post is a recap of what we heard and some resources we can make available to the public. Democratize Quant 2022 Agenda/Outline Session 1: State of the Asset Management Industry (with a focus on the ETF aspect) Dave
- 2 years ago, 26 Mar 2022, 11:11am -
Hedging cash flows [Quant Dare]
Currency hedging is a powerful tool, offering foreign investors access to new opportunities, providing returns very similar to those of local ones. However, it also has some disadvantages to consider. In this post we will explain how passive hedging could transform the original currency risk problem
- 2 years ago, 26 Mar 2022, 11:11am -
Can Investment Flows Affect Prices? Yep. [Alpha Architect]
Traditional finance theory suggests that stocks prices always reflect their fair market values based on publicly available information. Or in academic parlance, the “semi-strong” form efficient markets hypothesis serves as the null. What are the implications of this hypothesis? Well, the
- 2 years ago, 26 Mar 2022, 11:11am -
Finding Alpha on the Internet (Part 3) [Derek Wong]
We continue the series by replicating using as much data and code as provided in the source material. We create a three-state Gaussian Mixture Model and fit it so S&P500 data. I examine the output and give feedback about my coding replication and data sourcing along the way. Then I try to apply
- 2 years ago, 22 Mar 2022, 10:02pm -
Hacking 1-Minute Cryptocurrency Candlesticks: Capturing Binance Live Data [Quant at Risk]
There is no question about how profitable the trading of cryptocurrencies can be. If you create an algorithmic strategy and stick to it, you can capture a +10% PnL wave sometimes even twice a day for a selected asset. Unfortunately, the opposite is true, too! The crypto-risks seem to follow the same
- 2 years ago, 22 Mar 2022, 11:30am -
Intraday Stock Index Forecasting [Jonathan Kinlay]
In a previous post I discussed modelling stock prices processes as Geometric brownian Motion processes: To recap briefly, we assume a process of the form: Where S0 is the initial stock price at time t = 0. The mean of such a process is: and standard deviation: In the post I showed how to estimate
- 2 years ago, 22 Mar 2022, 11:29am -
What Can We Learn from Insider Trading in the 18th Century? [Quantpedia]
Directors, board members, and large shareholders are just some of those who might have non-public material information about their firm. Even though this information could be easily used to profit by trading their own stocks (stocks of the company they hold information about), this behavior is
- 2 years ago, 22 Mar 2022, 11:29am -
Measuring Hedge Fund Performance with Factor Model Monte Carlo [Light Finance]
Due diligence for hedge funds presents a unique set of challenges for analysts and asset allocators. Funds often have significant discretion to invest across multiple asset classes and instruments. Funds may also deploy strategies of varying complexity ranging from well-known approaches such as
- 2 years ago, 21 Mar 2022, 10:48am -
Risk-Managed Equity Exposure II [Factor Research]
Relying on single entry and exit signals for trading introduces model risk However, simple tactical asset allocation strategies are surprisingly robust Necessity of signal diversification is questionable INTRODUCTION Last week, we explored a simple risk management system for an equity allocation
- 2 years ago, 21 Mar 2022, 10:47am -
How to find your own Safe Haven investing strategy [Raposa Trade]
On Sunday September 2, 1666 a small fire started on the premises of the King's baker in London. By Thursday, the resulting inferno--later dubbed the Great Fire--had reduced much of the medieval City of London to ash. Writing of the fire in his diary, Samuel Pepys described a catastrophic scene
- 2 years ago, 21 Mar 2022, 10:47am -
Predicting volatility with neural networks [SR SV]
Predicting realized volatility is critical for trading signals and position calibration. Econometric models, such as GARCH and HAR, forecast future volatility based on past returns in a fairly intuitive and transparent way. However, recurrent neural networks have become a serious competitor. Neural
- 2 years ago, 21 Mar 2022, 10:46am -
Predicting NASDAQ price using news [Quant Dare]
News have a huge impact in the global stock market, but it’s impossible even for professionals to be constantly updated. One can ask itself: is there any way to automate this procedure? Recently in this blog we have covered the topic of summarizing news by applying the TF-IDF algorithm, which is a
- 2 years ago, 18 Mar 2022, 09:34pm -
A Deep Dive into the Low Beta Premium [Alpha Architect]
One of the big problems for the first formal asset pricing model developed by financial economists, the CAPM, was that it predicts a positive relationship between risk and return. However, empirical studies have found the actual relationship to be basically flat, or even negative. In addition,
- 2 years ago, 18 Mar 2022, 09:34pm -
$SPY Short-Term Overbought In A Downtrend [Quantifiable Edges]
In last night’s subscriber letter I showed a few studies suggesting the market was short-term overbought in a long-term downtrend, and that there appeared to be a short-term downside edge. Below is one of those studies, which also appeared in the Quantifinder yesterday afternoon.
- 2 years ago, 18 Mar 2022, 09:33pm -
Research Review | 18 March 2022 | Commodities and Inflation [Capital Spectator]
Performance of Gold as a Financial Asset During Different Phases of Financial Cycles Aniket Ranjan and Naveen Kumar (Reserve Bank of India) January 2022 The paper examines the fundamental relationship between gold and financial markets within the framework of unobserved components model. It measures
- 2 years ago, 18 Mar 2022, 09:32pm -
Trend-following and Mean-reversion in Bitcoin [Quantpedia]
Indisputably, trend-following and mean-reversion are two key concepts in quantitative investing or technical analysis. The trend-following proponents suggest a performance continuation and that assets that have performed well will continue to do so. In other words, the trend-following strategies are
- 2 years ago, 15 Mar 2022, 08:52pm -
Analyzing intraday and overnight stock returns with pandas [Wrighters.io]
I recently saw some chatter about a technical paper discussing the contrast between overnight and intraday stock returns. In the paper, we learn that overnight stock returns far outpace returns seen intraday during regular trading hours. In other words, stocks move the most when markets are not
- 2 years ago, 15 Mar 2022, 11:02am -
Is there any edge in holding stocks overnight? Correction [Rotating Stocks]
In my previous post I discussed about trading overnight, since there was a clear edge holding the SPY over night. But due to small mistake that I made in my testing the results were bad and the edge disappeared. The mistake was setting commissions as 0.05 $ per share instead of 0.005$ per share.
- 2 years ago, 15 Mar 2022, 11:02am -
Risk-Managed Equity Exposure [Factor Research]
Risk management overlays tend to reduce stock market returns However, they also can reduce drawdowns and increase Sharpe ratios Given that diversification has become more difficult, these are becoming more relevant INTRODUCTION It is tough to have high return expectations for stocks for the coming
- 2 years ago, 14 Mar 2022, 11:43am -
Are Financial Crises Predictable? [Alpha Architect]
Who among us wouldn’t want to be the savior that predicts a market crisis and saves our clients from losses in capital — or even better — profits from them? A central topic of interest for academics is whether there are more precise tools to predict financial crises. Those who believe so
- 2 years ago, 14 Mar 2022, 11:43am -
Factor Investing Premiums and the Economic Cycle [Alpha Architect]
Academic research has found that factor premiums are both time-varying and dependent on the economic cycle. For example, the authors of the 2017 study “Fama-French Factors and Business Cycles” examined the behavior of six Fama-French factors—market beta (MKT), size (SMB), value (HML), momentum
- 2 years ago, 12 Mar 2022, 11:12am -
Factor Performance in Cold War Crises - A Lesson for Russia-Ukraine Conflict [Quantpedia]
The Russia-Ukraine war is a conflict that has not been in Europe since WW2. And it has great implications not only on human lives but also on security prices. It bears numerous characteristics of the cold war crises, where two nuclear powers (Soviet Union and USA/NATO) were often very close to hot
- 2 years ago, 8 Mar 2022, 09:55am -
New Accounting Standards and Factor Investing [Alpha Architect]
How well do quantitative investors navigate around the changes to the accounting standards that are endemic to the financial data used in quantitative strategies? The numbers reported on financial statements are wholly governed by regulation and by each firm’s interpretation of those accounting
- 2 years ago, 8 Mar 2022, 09:53am -
How to gamble with demons (and make money doing it) [Raposa Trade]
A demon comes to you one night giving you a simple dice game to play. You're offered the chance to wager your wealth and receive a 50% increase if you roll a 6, 5% bump if you roll 2-5, or lose 50% if you roll a 1. You also get 300 rolls and get to compound your wealth with each roll of the
- 2 years ago, 7 Mar 2022, 09:56am -
Commodities vs Commodity ETFs [Factor Research]
The average correlation between oil and oil ETFs was only 0.8 Gold ETFs provide better exposure to gold than oil ETFs to oil Gold mining stocks are hybrids that feature gold and equity beta INTRODUCTION As the war in Russia unfolded, crude oil (WTI) breached $100 per barrel, which was last seen in
- 2 years ago, 7 Mar 2022, 09:55am -
Bittrex API - An Introductory Guide [Algo Trading 101]
Bittrex API is a method that allows us to automatically trade cryptocurrencies on Bittrex via code. What is Bittrex? Bittrex is an online cryptocurrency exchange platform that allows its users to trade over 700 trading pairs. As one of the oldest US-based exchanges, Bittrex is known for its
- 2 years ago, 4 Mar 2022, 10:28am -
Active mutual funds underperform passive funds, again [Mathematical Investor]
In a previous Mathematical Investor blog, we presented data on actively managed fund versus passive fund performance over various time horizons, based on the February 2019 Morningstar Active-Passive Barometer report. These data showed, for instance, that only 12.6% of actively managed U.S. large
- 2 years ago, 4 Mar 2022, 10:26am -
How to manage systemic risk in asset management [SR SV]
Systemic crises are rare but critical for long-term performance records. When the financial system fails, good trades become bad trades and many sensible investment strategies incur outsized losses due to deleveraging and liquidation pressure. Managers have two principal sets of tools to address
- 2 years ago, 4 Mar 2022, 10:26am -
Factor Investing: Are Internally Generated Intangibles Worthless? [Alpha Architect]
As mind-bending as it sounds, although a company’s internally generated intangible investments generate future value, they are currently not accepted as assets under US GAAP. Omission of this increasingly important class of assets reduces the usefulness and relevance of financial statement
- 2 years ago, 4 Mar 2022, 10:25am -
Creating an Algorithmic Trading Prototyping Environment with Jupyter Notebooks and Plotly [Quant Start]
In the previous article we installed Python and set up our virtual environment. We then used pandas-datareader directly in the python terminal in order to import some equities OHLC data and plot five years of the adjusted close price. This was accomplished in a few lines of code. However, once we
- 2 years ago, 3 Mar 2022, 10:03am -
Where Tactical Asset Allocation Stands Now (Feb 28, 2022) [Allocate Smartly]
It always feels a little offensive talking dollars and cents at times like this (*), but we hope that by helping investors to have a concrete strategy, we can at least take this one stress off the table. We track 60+ Tactical Asset Allocation (TAA) strategies, allowing us to draw some broad
- 2 years ago, 1 Mar 2022, 10:01am -