An Exponentially Weighted Covariance Matrix in R

Exponential weighting schemes can help navigate the trade-off between responsiveness and stability of the inherently noisy estimates we make from market data. We previously saw examples of calculating the exponentially weighted moving average of a vector, and estimating the correlation between SPY and TLT using an exponential weighting scheme [link]. In this article, we’ll implement …

Read more

Using Exponentially Weighted Moving Averages to navigate trade-offs in systematic trading

Using Exponentially Weighted Moving Averages to navigate trade-offs in systematic trading A big part of the job of the indie trader is data analysis. We’re always looking in the past data to validate (or more often, invalidate) a hypothesis about what might predict future returns. And one could argue that recent data is more useful …

Read more

Beyond Stocks: The Surprising Volatility Returns of Oil and Gold

I’ve previously discussed the Volatility Risk Premium (VRP) and how it differs from the Equity Risk Premium (ERP). Probably the most interesting difference, from the perspective of the trader, is that the VRP may be somewhat amenable to timing – more than the ERP at any rate. In this article, I’ll use some of the …

Read more

A Free Interactive IPO Calendar

I felt like doing something a little more lighthearted than usual. I’ve been deep in data engineering land these last couple of weeks, building data pipelines for processing a ton of options data for a trade we’re researching (the straddle-over-earnings trade). So I took some time out to mess around with something fun – building a …

Read more

More Intuitive Joins in dplyr 1.1.0 – how to do an asof join on trades and quotes data

dplyr 1.1.0 was a significant release that makes several common data operations more syntactically intuitive. The most significant changes relate to joins and grouping/aggregating operations. In this post we’ll look at the changes to joins. First, install and load the latest version of dplyr: install.packages(“dplyr”) library(dplyr) A new approach to joins The best way to …

Read more

How do I know if I have an edge?

I’ve been helping a family friend with his trading. I’ve given him a simple systematic strategy to trade by hand. First, we set expectations We can plot the distribution of historic trade returns from past trading or a backtest as a histogram.   This is useful because it gives us a hint as to what …

Read more