Quant Mashup
Quantocracy is no longer available via daily email. You can still follow us via RSS or our other socials. - Mike
Hacking 1-Minute Crypto Candlesticks: (2) Custom Charts using Plotly [Quant At Risk]
A clear and informative time-series visualisation is often a challenge. Especially this is true when it comes to candlestick charts in Python. Searching the Web for a perfect solution may bring you to the Plotly package which stores in its arsenal the corresponding function allowing for easy
- 3 years ago, 24 Apr 2022, 11:49am -
The Price of Transaction Costs [Quantpedia]
Capturing the systematic premia is the main aim of many quantitative traders. However, investors tend to overlook an important factor when backtesting. Trading costs are an essential part of every trade, and yet even when we consider them, we often only use an approximation. The recent article from
- 3 years ago, 24 Apr 2022, 11:49am -
Measuring uncertainty in time series data [Quant Dare]
In financial time series it is very common to make predictions of single points such as expected future prices or returns. But is there any other way of adding more information in our forecasts? In today’s post we will be making probabilistic forecasts for time series data using recurrent neural
- 3 years ago, 21 Apr 2022, 09:51pm -
The Implementation Costs of Indexed ETFs [Alpha Architect]
A common mistake made by many passive investors is that they view all index funds in the same asset class as “commodities(1)”, often considering only the expense ratio when making their investment choices. However, not all index funds are alike, and not all passively managed funds (what I refer
- 3 years ago, 21 Apr 2022, 09:51pm -
Can Market Maker Capital Constraints Result in Mispricing of ETFs? [Alpha Architect]
In this research, the authors explore the role of financial intermediaries in contagion or comovements in pricing efficiency. Specifically, lead market makers (LMMs) like Goldman Sachs, Cantor Fitzgerald, RBC Capital Markets, and others, have funding constraints that may influence their ability to
- 3 years ago, 21 Apr 2022, 09:51pm -
Thematic Indices: Looking at the Past or the Future? [Factor Research]
Thematic indices from MSCI have outperformed their benchmark since 2018 However, they have a rather unattractive factor mix Going against decades of research is not a sound investment strategy INTRODUCTION Although much of the future is uncertain, some technological innovations are rather certain.
- 3 years ago, 21 Apr 2022, 09:50pm -
Government Bonds Have Failed to Deliver When Needed [Allocate Smartly]
Most government bond funds have suffered major losses this year. What is worse is that those major losses have come when they’re needed most, when stocks and other risk assets are also falling. During times of market stress, gov bonds tend to act as a counterbalance to risk assets, but so far this
- 3 years ago, 18 Apr 2022, 10:31am -
The Turbulence Index: Measuring Financial Risk [Portfolio Optimizer]
One of the challenges in portfolio management is the timely detection of financial market stress periods, typically characterized by an increase in volatility and a breakdown in asset correlations1. Chow and al.2 propose to detect such periods through the usage of the caste distance, a measure
- 3 years ago, 18 Apr 2022, 10:31am -
How to use FX carry in trading strategies [SR SV]
FX forward-implied carry is a valid basis for trading strategies because it is related to divergences in monetary and financial conditions. However, nominal carry is a cheap and rough indicator: related PnLs are highly seasonal, sensitive to global equity markets, and prone to large drawdowns.
- 3 years ago, 18 Apr 2022, 10:30am -
Research Review | 15 April 2022 | Risk Factor Premia [Capital Spectator]
A Look Under the Hood of Momentum Funds Ayelen Banegas and Carlo Rosa (Federal Reserve) February 2022 Momentum investing has surged over the past few years, with assets growing at three times the rate of conventional funds. Using a comprehensive dataset of US equity funds, this paper examines the
- 3 years ago, 18 Apr 2022, 10:30am -
Trading and investing performance: year eight [Investment Idiocy]
Eight years! Wow. In late 2013 I walked out of an office for the last time where I had been working for AHL, a large systematic futures trading fund. A few months later, in April 2014, I had my own very small systematic futures trading account, and I started doing these performance reviews. And this
- 3 years ago, 14 Apr 2022, 09:24pm -
Bond Investing in Inflationary Times [Alpha Architect]
As the chief research officer of Buckingham Strategic Partners, the issue I am being asked to address most often is about fixed income strategies when yields are at historically low levels and inflation risk is heightened due to the unprecedented increase in money creation (through quantitative
- 3 years ago, 14 Apr 2022, 09:24pm -
Never Sell in May! [Financial Hacker]
“Sell in May and go away” is an old stock trader’s wisdom. But in his TASC May 2022 article, Markos Katsanos examined that rule in detail and found that it should rather be “Sell in August and buy back in October”. Can trading be really this easy? Let’s have a look at the simple seasonal
- 3 years ago, 14 Apr 2022, 10:25am -
What's the Best Factor for High Inflation Periods? - Part II [Quantpedia]
This second article offers a different look at high inflation periods, which we already analyzed in What’s the Best Factor for High Inflation Periods? – Part I. In this second part, we look at factor performance during 10-year periods of high inflation. High Inflation Periods As we already
- 3 years ago, 13 Apr 2022, 01:08pm -
An Introduction to Stooq Pricing Data [Quant Start]
In the previous article we learnt how to setup a prototyping environment for algorithmic trading using Jupyter Notebooks. We used Yahoo data with Pandas DataReader. In this article we will be looking at another free market data provider Stooq. If you would like to follow along with the tutorial and
- 3 years ago, 12 Apr 2022, 09:59pm -
What's the Best Factor for High Inflation Periods? - Part I [Quantpedia]
In the past couple of weeks, we have done a few event studies, analyzing events that in one way or another resemble what is happening in the world today. At the beginning of March, we examined Factor Performance in Cold War Crises, and at the end of March, we brought you an article analyzing Nuclear
- 3 years ago, 11 Apr 2022, 12:20pm -
Trend Following & Factor Investing - Unexpected Cousins? [Factor Research]
Trend following and beta-neutral factor investing are considered diversifying strategies However, since 2009 their correlations to stocks moved in tandem Both strategies had related performance drivers and risk exposures INTRODUCTION Asset classes seem easy to distinguish at first. For example,
- 3 years ago, 11 Apr 2022, 12:20pm -
Find Your Best Market to Trade With the Hurst Exponent [Raposa Trade]
After five consecutive years of drought, Northern Californians welcomed the heavy rainfall in the winter of 2016-2017. By February, however, the rain had led many to worry about the integrity of the Lake Oroville Dam. Officials evacuated over 200,000 residents who lived downstream of the dam along
- 3 years ago, 11 Apr 2022, 12:20pm -
Shorting ETFs: A look into the ETF Loan Market [Alpha Architect]
The growth of ETFs has been explosive (and we aren’t helping the matter via ETF Architect which facilitates low-cost high quality ETF white label services). At the end of 2020, there was roughly $5.4 trillion invested in ETFs in the United States, representing more than 25% of US market trading by
- 3 years ago, 11 Apr 2022, 12:19pm -
A Guide to Obtaining Time Series Datasets in Python (h/t @PyQuantNews) [Machine Learning Mastery]
Datasets from real-world scenarios are important for building and testing machine learning models. You may just want to have some data to experiment with an algorithm. You may also want to evaluate your model by setting up a benchmark or determining its weaknesses using different sets of data.
- 3 years ago, 8 Apr 2022, 12:59pm -
Is Sector-neutrality in Factor Investing a Mistake? [Alpha Architect]
Firm characteristics such as size, book-to-market ratio, profitability, and momentum have been found to be correlated with expected returns. The predictive power of these characteristics may stem from their industry component, their firm-specific component, or both. For example, while the study
- 3 years ago, 8 Apr 2022, 12:57pm -
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
- 3 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
- 3 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,
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 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
- 3 years ago, 21 Mar 2022, 10:47am -