Working with Tidy Financial Data in tidyr

Holding data in a tidy format works wonders for one’s productivity. Here we will explore the tidyr package, which is all about creating tidy data. In particular, let’s develop an understanding of the tidyr::pivot_longer and tidyr::pivot_wider functions for switching between different formats of tidy data. In this video, you’ll learn: What tidy data looks like …

Read more

Exploiting The Non-Farm Payrolls Drift

Anyone that’s been around the markets knows that the monthly release of the United States Department of Labor’s Non-Farm Payrolls (NFP) data can have a tremendous impact, especially in the short term. NFP is a snapshot of the state of the employment situation in the US, representing the total number of paid workers, excluding farm …

Read more

Weekly Roundup 29 May – Crash Protection, Sloppy Regressions and Data Munging Skillz

Here’s a round-up of our new articles this week. They cover crash protection, sloppy, noisy regressions, and data-munging skills. Finding Options for Effective Crash Protection Large capital losses can be devastating to your trading account. A couple of weeks ago, we explained how you can use SPY put options to protect your portfolio against severe market …

Read more

How to Fill Gaps in Large Stock Data Universes Using tidyr and dplyr

When you’re working with large universes of stock data you’ll come across a lot of challenges: Stocks pay dividends and other distributions that have to be accounted for. Stocks are subject to splits and other corporate actions which also have to be accounted for. New stocks are listed all the time – you won’t have …

Read more

Find Cheap Options for Effective Crash Protection Using Crash Regressions

One way we can quantify a stock’s movement relative to the market index is by calculating its “beta” to the market. To calculate the beta of MSFT to SPY (for example) we: calculate daily MSFT returns and daily SPY returns align the returns with one another regress MSFT returns against SPY returns. This shows the …

Read more

Weekly Roundup 22 May – Doubling Down in Losing Trades Like a Drunken Hedge Fund Manager

Here’s a round-up of our new articles this week. They cover options trading, digital signal processing, data munging and Kris’s luxurious moustache… Trading Insanity! Every new trader tries out a few insane trading ideas! In a new series on the blog, Kris explores three insane trading strategies that tempted him back when he didn’t know any …

Read more

Using Digital Signal Processing in Quantitative Trading Strategies

In this post, we look at tools and functions from the field of digital signal processing. Can these tools be useful to us as quantitative traders? What’s a Digital Signal? A digital signal is a representation of physical phenomena created by sampling that phenomena at discrete time intervals. If you think about the way we …

Read more

Get Rich Quick Trading Strategies (and why they don’t work)

Every aspiring millionaire who comes to the markets armed with some programming ability has implemented a systematic Get Rich Quick (GRQ) trading strategy. Of course, they don’t work. Deep down even the greenest of newbies knows this. Yet, still, we are compelled to give them a try, just once, just for fun (or so we …

Read more

How To Get Historical S&P 500 Constituents Data For Free

spx constituents historical mean return

In this post, we are going to construct snapshots of historic S&P 500 index constituents, from freely available data on the internet. Why? Well, one of the biggest challenges in looking for opportunities amongst a broad universe of stocks is choosing what stock “universe” to look at. One approach to dealing with this is to …

Read more