Blog Archives

Volume-weighted Exponential Moving Average

September 27, 2013
By

While I was working on a smoothing function, I came across the EMA (exponential moving average) which basically applies exponentially-decreasing weights to older observations. This is commonly used in finance, and can offer some protection against lags in trend movements. As I was looking to combine this moving average with a volume-weighted version, or simply

Read more »

Varying Window Length for Linear Models on Stocks

April 24, 2012
By
Varying Window Length for Linear Models on Stocks

In a previous post, we discussed ideas generated by a Timely Portfolio post about Linear Models on Stock. I wanted to see if there was a relationship between the window length of the running mean of the linear regression slope estimate and the running mean of the correlation between fitted and observed values. The parameters

Read more »

A thought on Linear Models on Stocks

April 16, 2012
By
A thought on Linear Models on Stocks

Timely Portfolio has a nice post about linear models sytems for stock. The idea follows from the steps below: Get the weekly closing values of the S&P 500. Choose a time window (i.e. 25 weeks) and for each window, linearly regress the subset of closing values Choose an investment strategy based on the residuals, the

Read more »

A look at market returns by month

November 30, 2011
By
A look at market returns by month

I’ve been reading The Big Picture, and again, there was a discussion about seasonality in stock markets (see Fourth Quarter is Da Bomb). I’ve already discussed the two seasonal investment scenarios (Nov. to Apr VS May to Oct) in this post, and was wondering if one could break it down further into a monthly analysis.

Read more »

First attempt at Chess Data Mining

November 15, 2011
By
First attempt at Chess Data Mining

Once you become addicted to chess game analysis, it becomes very easy to swamp yourselves with questions regarding different aspects of the game. Testing out different hypothesis like preference of mobility versus positional advantage requires a bit of manual chess game mining, which could potentially be analyzed using R. With the help of websites like

Read more »

Lending Club – naive data analysis

November 8, 2011
By
Lending Club – naive data analysis

Dataspora recently analyzed Lending Club‘s data in a geographical way using the data distributed by the site. Lending Club is an online financial community that brings together creditworthy borrowers and savvy investors so that both can benefit financially. We replace the high cost and complexity of bank lending with a faster, smarter way to borrow

Read more »

Netflix Post-mortem – How to detect Bubbles

October 26, 2011
By
Netflix Post-mortem – How to detect Bubbles

Bubbles. I’m no expert in behavioral economics, but bubbles seem to be well understood (after they occur) although they seem hard to detect (at least in the eyes of outsiders and late bubble participants). This post won’t tell you how to avoid bubbles, but might give you some insight. I came across Minsky’s explanation of

Read more »

Two seasonal investors – R snippet

October 24, 2011
By
Two seasonal investors – R snippet

In “A tale of 2 Seasonal Investors“, the Big Picture discusses the simple idea of comparing two simple investment approaches: being exposed to the market 6 months every year (from November to April), as opposed to investing in the other 6 months of every year (from May to October). Going back 50 years in the

Read more »

Volume by Price charts with R – first attempt

October 21, 2011
By
Volume by Price charts with R – first attempt

I stumbled upon this chart in the R Graph Gallery, which got me thinking someone could come up with a Volume by Price chart using R. Such charts can be useful to determine support and resistance levels, as they illustrate amount of volume for different price ranges. Below is my first attempt at this. Note

Read more »

Studying market reactions after consecutive gains (losses)

October 19, 2011
By
Studying market reactions after consecutive gains (losses)

Arthur Charpentier used R to denote a broken record of the CAC 40 when it went 11 consecutive days with negative returns. Question: What happens to the market after runs of positive or negative returns? Will the market tank or soar after n days of gains/losses? First, a little dissection of historical data (S&P 500

Read more »