Quant Mashup - QuantStrat TradeR
Quantocracy is now on Bluesky and Threads. See the links in the header. - Mike
Several Key PerformanceAnalytics Functions From R Now In Python [QuantStrat TradeR]
So, thanks to my former boss, and head of direct indexing at BNY Mellon, Vijay Vaidyanathan, and his Coursera course, along with the usual assistance from chatGPT (I officially see it as a pseudo programming language), I have some more software for the Python community now released to my github. As
- 1 year ago, 21 Jun 2023, 06:08pm -
Community fav QuantStrat TradeR back posting after almost 2 year hiatus: This function VITAL for portfolio backtesting is now in Python [QuantStrat TradeR]
So, it’s been a little while. But after a couple of years of some grunt work analytics jobs *and* consulting for a $1B AUM fund, I’ve decided that I had a bit more in the tank to share as far as quant content creation–quantent creation (?)–goes. And a function I’ve searched for in Python
- 1 year ago, 4 May 2023, 01:48am -
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 -
A Review of Modern Asset Allocation For Wealth Management, by David M. Berns, PhD [QuantStrat TradeR]
This post will be a review of the book Modern Asset Allocation for Wealth Management, by Dr. David Berns, PhD. The long story short is that I think the book is a must-read for a new and different perspective on asset management, albeit one not without some fairly minor flaws that could be very
- 4 years ago, 5 Oct 2020, 09:05pm -
Two Different Methods to Apply Some Corey Hoffstein Analysis to your TAA [QuantStrat TradeR]
So, first off: I just finished a Thinkful data science in python bootcamp program that was supposed to take six months, in about four months. All of my capstone projects I applied to volatility trading; long story short, none of the ML techniques worked, and the more complex the technique I tried,
- 4 years ago, 29 May 2020, 02:50pm -
A Python Investigation of a New Proposed Short Vol ETF - SVIX [QuantStrat TradeR]
This post will be about analyzing SVIX–a proposed new short vol ETF that aims to offer the same short vol exposure as XIV used to–without the downside of, well, blowing up in 20 minutes due to positive feedback loops. As I’m currently enrolled in a Python bootcamp, this was one of my capstone
- 4 years ago, 6 Jan 2020, 07:36pm -
A Tale of an Edgy Panda and some Python Reviews [QuantStrat TradeR]
This post will be a quickie detailing a rather annoying…finding about the pandas package in Python. For those not in the know, I’ve been taking some Python courses, trying to port my R finance skills into Python, because R seems to have fallen out of favor in the world of finance. (If you know
- 4 years ago, 15 Dec 2019, 07:58pm -
How You Measure Months Matters — A Lot. A Look At Two Implementations of KDA [QuantStrat TradeR]
This post will detail a rather important finding I found while implementing a generalized framework for momentum asset allocation backtests. Namely, that when computing momentum (and other financial measures for use in asset allocation, such as volatility and correlations), measuring formal months,
- 4 years ago, 1 Dec 2019, 06:07pm -
KDA - Robustness Results [QuantStrat TradeR]
This post will display some robustness results for KDA asset allocation. Ultimately, the two canary instruments fare much better using the original filter weights in Defensive Asset Allocation than in other variants of the weights for the filter. While this isn’t as worrying (the filter most
- 5 years ago, 27 Feb 2019, 09:18am -
Right Now It’s KDA…Asset Allocation [QuantStrat TradeR]
This post will introduce KDA Asset Allocation. KDA — I.E. Kipnis Defensive Adaptive Asset Allocation is a combination of Wouter Keller’s and TrendXplorer’s Defensive Asset Allocation, along with ReSolve Asset Management’s Adaptive Asset Allocation. This is an asset allocation strategy with a
- 5 years ago, 24 Jan 2019, 09:44pm -
GARCH and a rudimentary application to Vol Trading [QuantStrat TradeR]
This post will review Kris Boudt’s datacamp course, along with introducing some concepts from it, discuss GARCH, present an application of it to volatility trading strategies, and a somewhat more general review of datacamp. So, recently, Kris Boudt, one of the highest-ranking individuals pn the
- 5 years ago, 3 Dec 2018, 11:16pm -
Principal Component Momentum? [QuantStrat TradeR]
This post will investigate using Principal Components as part of a momentum strategy. Recently, I ran across a post from David Varadi that I thought I’d further investigate and translate into code I can explicitly display (as David Varadi doesn’t). Of course, as David Varadi is a quantitative
- 6 years ago, 17 Sep 2018, 09:34pm -
A Review of Quantitative Investment Portfolio Analytics in R by @JPicerno [QuantStrat TradeR]
This is a review of James Picerno’s Quantitative Investment Portfolio Analytics in R. Overall, it’s about as fantastic a book as you can get on portfolio optimization until you start getting into corner cases stemming from large amounts of assets. Here’s a quick summary of what the book
- 6 years ago, 17 Aug 2018, 10:23pm -
A Different Way To Think About Drawdown — Geometric Calmar Ratio [QuantStrat TradeR]
This post will discuss the idea of the geometric Calmar ratio — a way to modify the Calmar ratio to account for compounding returns. So, one thing that recently had me sort of annoyed in terms of my interpretation of the Calmar ratio is this: essentially, the way I interpret it is that it’s a
- 6 years ago, 4 May 2018, 10:15pm -
The New Short Volatility Instrument Landscape [QuantStrat TradeR]
This post will discuss the consequences of ProShares’ decision to change the investment objective of SVXY, and possible alternatives that various investors can use to try and create an identical exposure if their strategy calls for such an instrument. So, to begin with, Proshares recently decided
- 6 years ago, 3 Mar 2018, 01:36pm -
Creating a Table of Monthly Returns With R and a Volatility Trading Interview [QuantStrat TradeR]
This post will cover two aspects: the first will be a function to convert daily returns into a table of monthly returns, complete with drawdowns and annual returns. The second will be an interview I had with David Lincoln (now on youtube) to talk about the events of Feb. 5, 2018, and my philosophy
- 6 years ago, 20 Feb 2018, 07:50pm -
Which Implied Volatility Ratio Is Best? [QuantStrat TradeR]
This post will be about comparing a volatility signal using three different variations of implied volatility indices to predict when to enter a short volatility position. In volatility trading, there are three separate implied volatility indices that have a somewhat long history for trading–the
- 6 years ago, 24 Jan 2018, 07:20pm -
Replicating Volatiltiy ETN Returns From CBOE Futures [QuantStrat TradeR]
This post will demonstrate how to replicate the volatility ETNs (XIV, VXX, ZIV, VXZ) from CBOE futures, thereby allowing any individual to create synthetic ETF returns from before their inception, free of cost. So, before I get to the actual algorithm, it depends on an update to the term structure
- 6 years ago, 12 Jan 2018, 10:36pm -
(Don’t Get) Contangled Up In Noise [QuantStrat TradeR]
This post will be about investigating the efficacy of contango as a volatility trading signal. For those that trade volatility (like me), a term you may see that’s somewhat ubiquitous is the term “contango”. What does this term mean? Well, simple: it just means the ratio of the second month of
- 6 years ago, 21 Dec 2017, 09:29pm -
Comparing Some Strategies from Easy Volatility Investing, and the Table.Drawdowns Command [QuantStrat TradeR]
This post will be about comparing strategies from the paper “Easy Volatility Investing”, along with a demonstration of R’s table.Drawdowns command. First off, before going further, while I think the execution assumptions found in EVI don’t lend the strategies well to actual live trading
- 7 years ago, 14 Nov 2017, 01:22pm -
Launching My Subscription Service [QuantStrat TradeR]
After gauging interest from my readers, I’ve decided to open up a subscription service. I’ll copy and paste the FAQs, or my best attempt at trying to answer as many questions as possible ahead of time, and may answer more in the future. I’m choosing to use Patreon just to outsource all of the
- 7 years ago, 30 Oct 2017, 01:16pm -
The Return of Free Data and Possible Volatility Trading Subscription [QuantStrat TradeR]
This post will be about pulling free data from AlphaVantage, and gauging interest for a volatility trading subscription service. So first off, ever since the yahoos at Yahoo decided to turn off their free data, the world of free daily data has been in somewhat of a dark age. Well, thanks to
- 7 years ago, 24 Oct 2017, 11:48am -
The Kelly Criterion — Does It Work? [QuantStrat TradeR]
This post will be about implementing and investigating the running Kelly Criterion — that is, a constantly adjusted Kelly Criterion that changes as a strategy realizes returns. For those not familiar with the Kelly Criterion, it’s the idea of adjusting a bet size to maximize a strategy’s long
- 7 years ago, 29 Sep 2017, 11:29pm -
Leverage Up When You’re Down? [QuantStrat TradeR]
This post will investigate the idea of reducing leverage when drawdowns are small, and increasing leverage as losses accumulate. It’s based on the idea that whatever goes up must come down, and whatever comes down generally goes back up. I originally came across this idea from this blog post. So,
- 7 years ago, 5 Sep 2017, 12:01pm -
An Out of Sample Update on DDN’s Volatility Momentum Trading Strategy and Beta Convexity [QuantStrat TradeR]
The first part of this post is a quick update on Tony Cooper’s of Double Digit Numerics’s volatility ETN momentum strategy from the volatility made simple blog (which has stopped updating as of a year and a half ago). The second part will cover Dr. Jonathan Kinlay’s Beta Convexity concept. So,
- 7 years ago, 20 Jun 2017, 12:43pm -
Testing the Hierarchical Risk Parity algorithm [QuantStrat TradeR]
This post will be a modified backtest of the Adaptive Asset Allocation backtest from AllocateSmartly, using the Hierarchical Risk Parity algorithm from last post, because Adam Butler was eager to see my results. On a whole, as Adam Butler had told me he had seen, HRP does not generate outperformance
- 7 years ago, 26 May 2017, 08:56pm -
The Marcos Lopez de Prado Hierarchical Risk Parity Algorithm [QuantStrat TradeR]
This post will be about replicating the Marcos Lopez de Prado algorithm from his paper building diversified portfolios that outperform out of sample. This algorithm is one that attempts to make a tradeoff between the classic mean-variance optimization algorithm that takes into account a covariance
- 7 years ago, 22 May 2017, 08:56pm -
Constant Expiry VIX Futures (Using Public Data) [QuantStrat TradeR]
This post will be about creating constant expiry (E.G. a rolling 30-day contract) using VIX settlement data from the CBOE and the spot VIX calculation (from Yahoo finance, or wherever else). Although these may be able to be traded under certain circumstances, this is not always the case (where the
- 7 years ago, 18 May 2017, 12:33pm -
A Review of Gary Antonacci’s Dual Momentum Investing Book [QuantStrat TradeR]
This review is a book review of Gary Antonacci’s Dual Momentum Investing book. The TL;DR: 4.5 out of 5 stars. So, I honestly have very little criticism of the book beyond the fact that the book sort of insinuates as though equity momentum is the be-all-end-all of investing, which is why I deduct a
- 7 years ago, 15 May 2017, 02:06pm -
Creating a VIX Futures Term Structure In R From Official CBOE Settlement Data [QuantStrat TradeR]
This post will be detailing a process to create a VIX term structure from freely available CBOE VIX settlement data and a calendar of freely obtainable VIX expiry dates. This has applications for volatility trading strategies. So this post, as has been the usual for quite some time, will not be
- 7 years ago, 27 Apr 2017, 04:10am -
Nuts and Bolts of Quantstrat, Part V [QuantStrat TradeR]
This post will be about pre-processing custom indicators in quantstrat–that is, how to add values to your market data that do not arise from the market data itself. The first four parts of my nuts and bolts of quantstrat were well received. They are even available as a datacamp course. For those
- 7 years ago, 13 Apr 2017, 10:36pm -
Ehlers’s Autocorrelation Periodogram [QuantStrat TradeR]
This post will introduce John Ehlers’s Autocorrelation Periodogram mechanism–a mechanism designed to dynamically find a lookback period. That is, the most common parameter optimized in backtests is the lookback period. Before beginning this post, I must give credit where it’s due, to one Mr.
- 7 years ago, 15 Feb 2017, 08:48pm -
A Review of @AlphaArchitect Quantitative Momentum book [QuantStrat TradeR]
This post will be an in-depth review of Alpha Architect’s Quantitative Momentum book. Overall, in my opinion, the book is terrific for those that are practitioners in fund management in the individual equity space, and still contains ideas worth thinking about outside of that space. However, the
- 8 years ago, 13 Oct 2016, 09:17pm -
The Problem With Depmix For Online Regime Prediction [QuantStrat TradeR]
This post will be about attempting to use the Depmix package for online state prediction. While the depmix package performs admirably when it comes to describing the states of the past, when used for one-step-ahead prediction, under the assumption that tomorrow's state will be identical to
- 8 years ago, 5 Oct 2016, 02:05pm -
An Introduction to Portfolio Component Value At Risk [QuantStrat TradeR]
This post will introduce component value at risk mechanics found in PerformanceAnalytics from a paper written by Brian Peterson, Kris Boudt, and Peter Carl. This is a mechanism that is an easy-to-call mechanism for computing component expected shortfall in asset returns as they apply to a portfolio.
- 8 years ago, 12 Jul 2016, 12:13pm -
A Return.Portfolio Wrapper to Automate Harry Long Backtests [QuantStrat TradeR]
This post will cover a function to simplify creating Harry Long type rebalancing strategies from SeekingAlpha for interested readers. As Harry Long has stated, most, if not all of his strategies are more for demonstrative purposes rather than actual recommended investments. So, since Harry Long has
- 8 years ago, 17 Jun 2016, 08:46pm -
How To Compute Turnover With Return.Portfolio in R [QuantStrat TradeR]
This post will demonstrate how to take into account turnover when dealing with returns-based data using PerformanceAnalytics and the Return.Portfolio function in R. It will demonstrate this on a basic strategy on the nine sector SPDRs. So, first off, this is in response to a question posed by one
- 8 years ago, 11 May 2016, 07:00pm -
Are R^2s Useful In Finance? [QuantStrat TradeR]
This post will shed light on the values of R^2s behind two rather simplistic strategies - the simple 10 month SMA, and its relative, the 10 month momentum (which is simply a difference of SMAs, as Alpha Architect showed in their book DIY Financial Advisor. Not too long ago, a friend of mine named
- 8 years ago, 18 Apr 2016, 05:32am -
A Book Review of Adaptive Asset Allocation from @GestaltU [QuantStrat TradeR]
This review will review the “Adaptive Asset Allocation: Dynamic Global Portfolios to Profit in Good Times – and Bad” book by the people at ReSolve Asset Management. Overall, this book is a definite must-read for those who have never been exposed to the ideas within it. However, when it comes
- 8 years ago, 1 Mar 2016, 10:31pm -
On The Relationship Between the SMA and Momentum [QuantStrat TradeR]
Happy new year. This post will be a quick one covering the relationship between the simple moving average and time series momentum. The implication is that one can potentially derive better time series momentum indicators than the classical one applied in so many papers. Okay, so the main idea for
- 8 years ago, 13 Jan 2016, 10:33am -
A First Attempt At Applying Ensemble Filters [QuantStrat TradeR]
This post will outline a first failed attempt at applying the ensemble filter methodology to try and come up with a weighting process on SPY that should theoretically be a gradual process to shift from conviction between a bull market, a bear market, and anywhere in between. This is a follow-up post
- 8 years ago, 4 Dec 2015, 12:55pm -
Review: Inovance's TRAIDE application [QuantStrat TradeR]
This review will be about Inovance Tech's TRAIDE system. It is an application geared towards letting retail investors apply proprietary machine learning algorithms to assist them in creating systematic trading strategies. Currently, my one-line review is that while I hope the company founders
- 9 years ago, 14 Nov 2015, 01:48am -
A Filter Selection Method Inspired From Statistics [QuantStrat TradeR]
This post will demonstrate a method to create an ensemble filter based on a trade-off between smoothness and responsiveness, two properties looked for in a filter. An ideal filter would both be responsive to price action so as to not hold incorrect positions, while also be smooth, so as to not incur
- 9 years ago, 9 Nov 2015, 12:59pm -
How well can you scale your strategy? [QuantStrat TradeR]
This post will deal with a quick, finger in the air way of seeing how well a strategy scales–namely, how sensitive it is to latency between signal and execution, using a simple volatility trading strategy as an example. The signal will be the VIX/VXV ratio trading VXX and XIV, an idea I got from
- 9 years ago, 21 Oct 2015, 11:53am -
Volatility Stat-Arb Shenanigans [QuantStrat TradeR]
This post deals with an impossible-to-implement statistical arbitrage strategy using VXX and XIV. The strategy is simple: if the average daily return of VXX and XIV was positive, short both of them at the close. This strategy makes two assumptions of varying dubiousness: that one can “observe the
- 9 years ago, 9 Oct 2015, 10:23am -
A Review of DIY Financial Advisor from @AlphaArchitect [QuantStrat TradeR]
This post will review the DIY Financial Advisor book, which I thought was a very solid read, and especially pertinent to those who are more beginners at investing (especially systematic investing). While it isn’t exactly perfect, it’s about as excellent a primer on investing as one will find out
- 9 years ago, 6 Oct 2015, 01:03pm -
Hypothesis-Driven Development Part V: Stop-Loss, Deflating Sharpes, and Out-of-Sample [QuantStrat TradeR]
This post will demonstrate a stop-loss rule inspired by Andrew Lo’s paper “when do stop-loss rules stop losses”? Furthermore, it will demonstrate how to deflate a Sharpe ratio to account for the total number of trials conducted, which is presented in a paper written by David H. Bailey and
- 9 years ago, 24 Sep 2015, 07:01pm -
Hypothesis Driven Development Part IV: Testing The Barroso/Santa Clara Rule [QuantStrat TradeR]
This post will deal with applying the constant-volatility procedure written about by Barroso and Santa Clara in their paper "Momentum Has Its Moments". The last two posts dealt with evaluating the intelligence of the signal-generation process. While the strategy showed itself to be
- 9 years ago, 16 Sep 2015, 10:28am -
Hypothesis Driven Development Part III: Monte Carlo In Asset Allocation Tests [QuantStrat TradeR]
This post will show how to use Monte Carlo to test for signal intelligence. Although I had rejected this strategy in the last post, I was asked to do a monte-carlo analysis of a thousand random portfolios to see how the various signal processes performed against said distribution. Essentially, the
- 9 years ago, 10 Sep 2015, 09:20pm -
Hypothesis-Driven Development Part II [QuantStrat TradeR]
This post will evaluate signals based on the rank regression hypotheses covered in the last post. The last time around, we saw that rank regression had a very statistically significant result. Therefore, the next step would be to evaluate the basic signals — whether or not there is statistical
- 9 years ago, 8 Sep 2015, 10:57pm -