This is my implementation of the Reweighted Price Relative Tracking strategy documented in the research paper by Zhao-Rong Lai et al. Shout out to the “Paper-to-Profit” substack for calling my attention to it. The code is not meant to be deployed as-is but serves as an educational template for those interested in modern portfolio optimization techniques based on academic research...
KER and FCF Yield Factor Optimization
This is a factor optimization strategy, written for Quantconnect LEAN (Python). The attached code demonstrates how to combine technical and fundamental factors in an optimized portfolio, focusing on the most heavily-weighted stocks in SPY. Feel free to re-use this, customize it, make it better and re-share. General Architecture The strategy uses a two-factor model combining...
On ML: For ‘Feature’ Consideration
I’m a big fan of the folks at RobotWealth, the great work they are doing and their efforts to educate others. One of my favorite posts from @Kris goes into great detail about features, the importance of stationarity, and other key considerations when applying ML to trading. I shared this with a friend recently, and he summarized this gem of a post into key takeaways, and I thought to share some...
Trading Earnings Volatility With Options
This strategy was inspired by u/mori226. The system trades options spreads (diagonals) around earnings volatility, buying when IV is lowest, selling when it is highest. Current work-in-progress is in the embedded PDF below and includes backtest results from my prototyping in OptionStack. Spread Entry Long: One month after earnings, buy cheap LEAP calls.Entry Criteria (all must be met)It’s been at...
Not All NFTs Are Collectibles
There are NFTs and then there are NFT collectibles. An NFT, or a Non-Fungible Token, is a breakthrough innovation in verifiable ownership. Verifiable ownership is a critical and fundamental component of human society, be it ownership of a property, an idea, an identity, etc. NFT collectibles are an application of NFT technology, and people use it to prove ownership of digital assets that they...
Stock Universe Selection on Multiple Timeframes
This is my take on scheduled intraday universe selection, written in Python (LEAN). The attached code is not a tradable strategy, it’s a template for others to use in building their own strategies. Feel free to re-use this, customize it, make it better and re-share. General ArchitectureThere are three universe selection phases: Coarse, Fine and Intraday (scheduled). In the Fine and...
Kalman and Laguerre signals
It seems that the Kalman filter and Laguerre filter work well with EMAs for entries/exits. The attached algorithm trades Crypto (or any ‘trendy’ asset), using crossovers between the three. It has a 60% Win Rate and a 3.58 Sharpe, but don’t be fooled. This isn’t because it’s an amazing strategy, it’s because crypto assets went parabolic during the backtest period. So...
Presenting. Crypto. Trend following.
I gave a presentation to a small group of crypto traders and software engineers about strategy automation. The goal was to show what was possible using the tools and platforms available to retail traders, and possibly inspire them to give it a try. I think it worked. The slides are embedded below. I walk through a basic breakout strategy with a trailing stop, and on the last slides you can find...
Backtest Results for a Portfolio Hedge using SPY Put Options
I’ve been doing some research on portfolio hedges using Quantconnect and it’s quite interesting. Here are the results from backtesting a ‘Protective SPY Put’ hedge. Summary of Results: It’s proven to be effective, but there is some selection bias at play. ie: In my backtest, I’ve picked Put options that are ‘just the right’ distance away from spot...
Fun with a ‘SPY Climber’
After a long work day I often challenge myself to write the least amount of code to generate the most profitable equity curve. I never have any intent to trade the thing –it’s deliberately overfit– but I find it to be good calming way to unwind. Some people have a Zen garden on their desk. To each his own. Last night I wasn’t up for a challenge, but I still wanted the...