Quant Mashup Modelling Bid/Offer Spread In Equities Trading Strategy Backtest [Python For Finance]In this blog post I wanted to run a couple of quick experiments to see how clearly I was able to highlight the importance of incorporating various elements and components into a backtest that I admittedly often overlook in most of my posts – that is I make the assumption that they will be dealt(...) Another Method of Creating Synthetic Data [Dekalog Blog]Over the years I have posted about several different methodologies for creating synthetic data and I have recently come across yet another one which readers may find useful. One of my first posts was Creation of Synthetic Data, which essentially is a random scrambling of historic data for a single(...) Crowded trades: measure and effect [SR SV]One measure of the crowdedness of trades in a portfolio is centrality. Centrality is a concept of network analysis that measures how similar one institution’s portfolio is to its peers by assessing its importance as a network node. Empirical analysis suggests that [1] the centrality of individual(...) Using Firm Characteristics to Enhance Momentum Strategies [Alpha Architect]Research into the momentum factor continues to demonstrate its persistence and pervasiveness, including across factors. Recent papers have focused on trying to identify ways to improve the explanatory power and performance of momentum strategies. Prior research on Momentum The study “Momentum Has(...) Momentum Explains a Bunch Of Equity Factors [Quantpedia]Financial academics have described so many equity factors that the whole universe of them is sometimes called “factor zoo”. Therefore, it is no surprise that there is a quest within an academic community to bring some order into this chaos. An interesting research paper written by Favilukis and(...) The “Master of the Robots” on machine learning in finance [Mathematical Investor]Marcos Lopez de Prado, who was named Quant of the Year for 2019 by the Journal of Portfolio Management, is widely regarded as one of the leading quantitative mathematicians in today’s financial world. He currently ranks #1 among authors in the economics field on the SSRN research network, as(...) An age prediction solution applied to rank returns [Quant Dare]Image processing is one of the hot topics in AI research, alongside with reinforcement learning, ethics in AI and many others. A recent solution to perform ordinal regression on age of people has been published, and in this post we apply that technique to financial data. Ranking classification is an(...) Building a Basic Cross-Sectional Momentum Strategy – Python Tutorial [Quantoisseur]In this tutorial we utilize the free Alpha Vantage API to pull price data and build a basic momentum strategy that is rebalanced weekly. This approach can be adapted for any feature you’d like to explore. Let me know what you’d like to see in the next video! An Analysis of “Graham’s Net-Nets: Outdated or Outstanding?” [Alpha Architect]In an earlier post we analyzed the prominent and often-cited study on “net-nets” conducted by Henry R. Oppenheimer from the Financial Analysts Journal (1986). In this post, we analyze the article “Graham’s Net-Nets: Outdated or Outstanding?” by James Montier. The objective of the article(...) Concurrent Scalping Algo Using Async Python [Alpaca]One of the advantages of running automatic trading strategies is that you can quickly and consistently act on price action. Even if you have enough time to trade the same idea manually, you need to watch the market movement very closely and keep paying attention to multiple monitors. With(...) World's Largest Quant Conference of Its Kind: The Quant Conference | 1st November, 2019 | London, UKEnjoy 15% off with the promo code: QUANTOCRACY2019. The Quant Conference has been conceived as an educational setting where attendees can learn about the current trends in the field of quantitative finance. Furthermore, it brings a unique opportunity to network with aspiring students, professional(...) The Hidden Truths About Stop loss In Trading [Quant Insti]A stop-loss order, or stops as is generally said, is an order placed with the broker to sell (or buy) if the stock of a company which you hold, reaches a pre-determined price in order to avoid large losses. In the trading world, the use of stops is seen as an essential part of risk control and money(...) A Framework for Creating Model Portfolios [Alpha Architect]Asset allocation is a very important decision for investors. Model portfolios are constructed with an optimized asset allocation process to help meet investor needs and preferences. The authors investigate the following research question: How does one construct a model portfolio? What are the(...) 9 Things That Get Me Fired Up About Being a Quant Investor Today [Two Centuries Investments]As trading costs have just hit zero, and passive investing overtook active in August, the investment industry is braced for further pressure to deliver alpha after fees. In my view, the potential to build great models today is huge, but constrained by the research cultures of most firms. Here is(...) Macro Timing with Trend Following [Flirting with Models]While it may be tempting to time allocations to active strategies, it is generally best to hold them as long-term allocations. Despite this, some research has shown that there may be certain economic environments where trend following equity strategies are better suited. In this commentary, we(...) Low Volatility vs Option-Based Strategies [Factor Research]Option-based strategies have similar characteristics to Low Volatility portfolios Combining these reduces idiosyncratic strategy risks The combinations feature higher risk-adjusted returns and lower drawdowns than the S&P 500 INTRODUCTION Some investment products and strategies can be considered(...) Integrating R with the Zorro Backtesting and Execution Platform [Robot Wealth]n the last two posts, we implemented a Kalman filter in R for calculating a dynamic hedge ratio, and presented a Zorro script for backtesting and trading price-based spreads using a static hedge ratio. The goal is to get the best of both worlds and use our dynamic hedge ratio within the Zorro(...) Alternative Investments - A Field Manual [Alpha Architect]It’s not a perfect world out there and often times alternative funds are mischaracterized, misused, and not put through a rigorous enough portfolio construction process. It’s my hope that I can forewarn you of the proverbial landmines and better prepare you to invest (or not invest) in the(...) Continuous Futures Contracts Methodology for Backtesting [Quantpedia]The problem with spliced futures No doubt, the correct datasets are the key when one does some analysis in the financial markets. For some financial instruments, the data can be found for free and ready for the upcoming process, but on the other hand, some instruments are more complicated. Nowadays,(...) New book: Leveraged Trading [Investment Idiocy]This month* marks the release of my third book, with the snappy title "Leveraged Trading", and the slightly less snappy subtitle "A professional approach to trading FX, stocks on margin, CFDs, spread bets and futures for all traders". Photo courtesy of Harriman House. As you can(...) Ideal Cyclic Tau Embedding as Times Series Features [Dekalog Blog]Continuing on from my Ideal Tau for Time Series Embedding post, I have now written an Octave function based on these ideas to produce features for time series modelling. The function outputs are two slightly different versions of features, examples of which are shown in the following two plots,(...) Tactical Asset Allocation in September [Allocate Smartly]This is a summary of the recent performance of a wide range of excellent Tactical Asset Allocation (TAA) strategies, net of transaction costs. These strategies are sourced from books, academic papers, and other publications. While we don’t (yet) include every published TAA model, these strategies(...) Factor Olympics Q3 2019 [Factor Research]Most factors generated positive returns in Q1-3 2019 Low Volatility produced the best and Value the worst performance year-to-date The factor rotation from Momentum into Value in Q3 was short-lived INTRODUCTION We present the performance of five well-known factors on an annual basis for the last 10(...) Short-Duration Stock Anomaly: Risk or Mispricing [Alpha Architect]Some background on Bond duration: Duration measures bond’s price sensitivity to interest rates changes. It’s estimated based on the discounted expectations of the bond future cash flows and expressed in the number of years. The longer the duration, the higher the bond interest rate risk. (read(...) Building a garden "trading" office (off topic but fun) [Investment Idiocy](Both) regular followers of this blog will have been on tenterhooks for many months now, waiting for my next post. I have been busy! First of all, I've been finishing my third book. More detail on that later, in the next post. I've also had a fair bit of holiday time. But mainly over the(...) Quality: Independent attributes or a real factor? [Alpha Architect]The authors do a very nice survey on measures of quality found in the academic literature and in commercially available quality indexes. They examine seven quality categories including: profitability, earnings stability, capital structure, growth, accounting quality, payout/dilution and investment.(...) Macro and Momentum Factor Rotation [Flirting with Models]While many investors have adopted a multi-factor approach to style investing, some have pushed these boundaries by advocating for an active, rotational approach to factor allocation. In a recent white paper, MSCI suggests several methods that might be conducive for performing style rotation,(...) PDF: Lectures in Quantitative Economics with Python (h/t @PyQuantNews) An Approach to Time Series Data when Data is Limited (ARIMA / VAR) [Auquan]Investors are slowly becoming more and more interested in ethical investing. Part of the reason is the industry is starting to care more, but the other reason is that there is a lot of evidence to show that it can produce better or at least equivalent returns. One subset of this type of investing is(...) The Short Duration Premium [Alpha Architect]In my June 4, 2019 article “The Re-Death of Value, or Déjà Vu All Over?” I noted that one possible explanation for at least part of the poor performance of value stocks over the past decade has been the sharp fall in both the real interest rate (due to weak global growth) and unexpected(...) Trading Using Machine Learning In Python [Quant Insti]In recent years, machine learning, more specifically machine learning in Python has become the buzz-word for many quant firms. In their quest to seek the elusive alpha, a number of funds and trading firms have adopted to machine learning. While the algorithms deployed by quant hedge funds are never(...) Intraday Futures Calendar Spreads and the Impact of Transaction Costs [Quant Rocket]Intraday trading strategies offer great promise as well as great peril. This post explores an intraday trading strategy for crude oil calendar spreads and highlights the impact of transaction costs on its profitability. Background In a previous post, I explored an end-of-day pairs trading strategy(...) The Simplest Momentum Indicator [Alvarez Quant Trading]We all have our favorite momentum indicators. One of mine is percent off 1 year high. This requires 252 data points and comparisons, plus a division. Another one is the 200-day moving average. This requires 200 closing prices, 199 additions and a division. A simple momentum indicator is Rate of(...) Volatility Clustering: Are large price moves followed by large price moves? [Oxford Capital]Concept: Volatility clustering: Large price moves tend to be followed by large price moves, and small price moves tend to be followed by small price moves. Research Question: Is there a tendency of large price moves in one direction to be followed by large price moves in the opposite direction?(...) Pairs Trading in Zorro [Robot Wealth]In our previous post, we looked into implementing a Kalman filter in R for calculating the hedge ratio in a pairs trading strategy. You know, light reading… We saw that while R makes it easy to implement a relatively advanced algorithm like the Kalman filter, there are drawbacks to using it as a(...) Deep Trading with TensorFlow: Recapitulating [Todo Trader]e have already traveled a good part of the trip, but there is still an important part. In this post, I tell you where we are and how much we have left. Courage, we sure got it! The Machine Learning Workflow The following diagram provides a high-level overview of the stages in a machine learning(...) The Volatility Effect Revisited [Alpha Architect]One dirty little secret that has been hiding behind the curtains of finance for a long time, is that high-risk stocks do not have higher returns than low-risk stocks. Back in 1975 Haugen and Heins first recognized the low-risk anomaly: Our emperical efforts do not support the conventional hypothesis(...) Inverted Yield Curve: Belgium 1840 - 2018 [Two Centuries Investments]Over the last few months, much of the financial press expressed concerns about the impact of inverted yield curves on financial markets, in particular, the stock returns. Some previous academic literature has shown that there exists a link between yield curves and economic growth (see references(...) Trend Following Active Returns [Flirting with Models]Recent research suggests that equity factors exhibit positive autocorrelation, providing fertile ground for the application of trend-following strategies. In this research note, we ask whether the same techniques can be applied to the active returns of long-only style portfolios. We construct(...) Smart Beta vs Alpha + Beta [Factor Research]Investment portfolios can be simplified by separating alpha from beta Alpha + beta portfolios offer higher risk-adjusted returns than smart beta The main hurdle for better portfolios is investor behaviour, not a lack of products INTRODUCTION In Buddhist teaching, the primary obstacles that prevent(...) The quantitative path to macro information efficiency [SR SV]Financial markets are not information efficient with respect to macroeconomic information because data are notoriously ‘dirty’, relevant economic research is expensive, and establishing stable relations between macro data and market performance is challenging. However, statistical programming(...) The Weakest Week (2019 update) [Quantifiable Edges]As I have shown many times in the past, there isn’t a more reliable time of the year to have a selloff than this upcoming week. I have often referred to is as “The Weakest Week”. Since 1960 the week following the 3rd Friday in September has produced the most bearish results of any week. Below(...) Mean-Reversion in Trend-Following Performance Using a 120-day Lookback [CSS Analytics]In the last post we showed that trend-following tends to be mean-reverting in the short-term. Data analysis also shows that trend-following has an even stronger mean-reverting effect using a 6-month or 120-day window using the same methodology. Take a look at the chart below using the BarclayHedge(...) How To Make A Kalman Filter in R for Pairs Trading [Robot Wealth]Anyone who’s tried pairs trading will tell you that real financial series don’t exhibit truly stable, cointegrating relationships. If they did, pairs trading would be the easiest game in town. But the reality is that relationships are constantly evolving and changing. At some point, we’re(...) A simple algorithm to detect complex chart patterns [Philipp Kahler]Finding complex chart patterns has never been an easy task. This article will give you a simple indicator for complex chart pattern recognition. You will have the freedom to detect any pattern with any pattern length. Not just 2-bar candlestick formations, but complex stuff like V-Tops spread over(...) Mean-Reversion in Trend-Following Performance [CSS Analytics]In a recent post I showed that the momentum factor has been mean-reverting in the short-term, and that this effect can be used to trade both the factor and momentum strategies effectively. An obvious extension is to see whether trend-following as a factor is also mean-reverting. After all,(...) Cognitive Trading System Model [Todo Trader]Yes, Artificial Intelligence (AI) is here to stay. Previously on this blog, I have written about the Basis of the Scientific Trading System as well as the Artificial Intelligence Trading Systems. Since then, I have designed a trading system model which I believe could satisfy all requirements of the(...) Factor Investing from Concept to Implementation [Alpha Architect]There is a substantial debate on the topic of factor investing and whether or not the “backtested” excess returns are actually achievable in practice. Much of the research on the topic suggests that practitioners in the field are unable to capture any of the so-called “factor premiums”. For(...) No, the VIX is Not Broken [Six Figure Investing]Hardly a month goes by without some pundit trumpeting that the VIX is broken. But before you worry too much, consider some of the non-obvious characteristics of the Cboe’s Fear Gauge. First a Summary These charts list possible explanations for perceived VIX “brokenness” Complaint Market in Low(...) The Failure of Value Investing explained [Alpha Architect]It’s no secret that value has had a bad bout of performance in recent memory. This underperformance has been thoroughly examined by multiple research teams and we’ve done some of our own work on the subject. We’ve also done in-depth rebuttals to “value investing is dead” articles in the(...)