Blog

Explore the research behind our trading, plus some just-for-fun stuff....

Posted on Jun 01, 2020 by Kris Longmore
1 Comment.
455 Views

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 employees and public servants. We...

Posted on May 29, 2020 by Robot James
No Comments.
144 Views

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 downside. If you're prepared to...

Posted on May 28, 2020 by Kris Longmore
No Comments.
234 Views

When data is too big to fit into memory, one approach is to break it into smaller pieces, operate on each piece, and then join the results back together. Here's how to do that to calculate rolling mean pairwise correlations of a large stock universe. Background We've been using the problem of calculating mean rolling correlations of ETF constituents as...

Posted on May 27, 2020 by Robot James
No Comments.
275 Views

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 as much history for these...

Posted on May 26, 2020 by Robot James
2 comments.
876 Views

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 procedure, graphically: library(tidyverse) library(ggpmisc) msftspyreturns...

Posted on May 25, 2020 by Ajet Luka
5 comments.
459 Views

In today's article, we are going to take a look at rolling and expanding windows. By the end of the post,  you will be able to answer these questions: What is a rolling window? What is an expanding window? Why are they useful? What is a Rolling or Expanding window? Here is a normal window. We use normal windows because...

Posted on May 22, 2020 by Robot James
No Comments.
184 Views

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 better. First, he looks at...

Posted on May 22, 2020 by Kris Longmore
No Comments.
318 Views

Recently, we wrote about calculating mean rolling pairwise correlations between the constituent stocks of an ETF. The tidyverse tools dplyr and slider solve this somewhat painful data wrangling operation about as elegantly and intuitively as possible. Why did you want to do that? We're building a statistical arbitrage strategy that relies on indexation-driven trading in the constituents. We wrote about...