Will Kinlaw, Mark Kritzman and David Turkington recently published an interesting paper titled, "A New Index of the Business Cycle" in which they applied the Mahalanobis Distance to an ensemble of leading economic indicators to calculate the probability of a recession. After a decent amount of putzing around with the data, I was able to …
Resampled Efficient Frontier
Let's face it, mean-variance optimization out of the box is all but useless. If you've ever used any kind of portfolio optimizer, you know that small changes to your initial inputs can often lead to concentrated allocations. So as practitioners how can we get around this? Add constraints to the optimization? Well, that sort of …
Building a Simple Backtester
Overview: In this tutorial, we're going to be discussing how to build our own backtesting engine using the Numpy and Pandas library. We are then going to backtest a simple sector momentum strategy and plot the performance and weights over time. Generally, there are two ways to go about building a backtesting engine. The first …
Python OLS Regression
Overview: Linear regression is one of the most commonly used tools in finance for analyzing the relationship between two or more variables. In this post, we’ll derive the formulas for estimating the unknown parameters in a linear regression using Ordinary Least Squares(OLS). We will then use those formulas to build some functions in Python. Simple Regression Suppose we are …