Articles by enguyen

Volume-weighted Exponential Moving Average

September 27, 2013 | enguyen

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 ... [Read more...]

Varying Window Length for Linear Models on Stocks

April 24, 2012 | enguyen

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 ... [Read more...]

A thought on Linear Models on Stocks

April 16, 2012 | enguyen

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 ... [Read more...]

A look at market returns by month

November 30, 2011 | enguyen

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 ... [Read more...]

First attempt at Chess Data Mining

November 15, 2011 | enguyen

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 ... [Read more...]

Lending Club – naive data analysis

November 8, 2011 | enguyen

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 ... [Read more...]

Netflix Post-mortem – How to detect Bubbles

October 26, 2011 | enguyen

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 ... [Read more...]

Two seasonal investors – R snippet

October 24, 2011 | enguyen

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 ... [Read more...]

Volume by Price charts with R – first attempt

October 21, 2011 | enguyen

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 ... [Read more...]

Studying market reactions after consecutive gains (losses)

October 19, 2011 | enguyen

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 ... [Read more...]

More on higher moments: rolling skewness of S&P 500 daily returns

October 15, 2011 | enguyen

In this post, Portfolio Probe explores a way to decide whether market kurtosis and skewness are predictable. Market skewness, in naive financial modeling, is some kind of measure of (as-)symmetrical distribution of (daily) returns around the average market return. A higher skewness would tend to indicate a denser distribution ... [Read more...]

S&P 500 components heatmap in R

October 12, 2011 | enguyen

In this article, Hans Gilde exposes the clever use of a heatmap hidden in the Bioconductor library. In his example, he describes a way to show different ‘observations’ on subjects, with the concept of time. Financial indices, like the S&P 500 or the Dow Jones indices, are mathematically some kind ... [Read more...]

Shared and reproducible computing with OpenCPU

September 7, 2011 | enguyen

While looking for an online computing provider, I bumped into OpenCPU is a new initiative to make innovations in statistics, visualization and data-science more widely applicable. I guess the idea of online analysis and visualization, and online cloud R computing platform isn’t really new at this point ... [Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)