Efficient Frontier of Funds and Allocation Systems

April 18, 2012
By
Efficient Frontier of Funds and Allocation Systems

I did a very basic experiment in Efficient Frontier of Buy-Hold and Tactical System where I determined the efficient frontier of the S&P 500 with itself transformed by a Mebane Faber 10-month moving average tactical allocation. The result was inter...

Read more »

Visualizing iOS Text Editors

April 18, 2012
By
Visualizing iOS Text Editors

The other day Brett Terpstra posted a gigantic and quite beautifully-executed feature comparison of all of the text editors available for iOS devices. The table is really terrific and also a bit overwhelming, as there's so much data. On the bus home ye...

Read more »

Small Countries Stablize by Exporting High-Tech

April 18, 2012
By
Small Countries Stablize by Exporting High-Tech

Smaller countries lead the way. When you think of 'high-tech', which countries come to mind? What is 'High-Tech'? Before continuing, what is meant by the term 'high-tech'? As defined by the World Data Bank, high-technology exports ar...

Read more »

knitr Performance Report-Attempt 2

April 18, 2012
By
knitr Performance Report-Attempt 2

Over the years I have changed my learning process from reading thoroughly first before proceeding to reading minimally and then applying immediately.  I very quickly see the gaps in my knowledge.  This method is far more painful but seems to ...

Read more »

When do you need all the data for Big Analytics?

April 18, 2012
By

In the 2012 edition of the SAP Sybase Capital Markets Guide, Revolution Analytics' Senior Advisor for Products and Strategy (and former CEO) Norman Nie writes about the "Five Benefits of Big Analytics". (You can also read his article at Enterprise Innovation.) Norman makes the argument that while sampling and aggregation are often useful ways of handling very large data...

Read more »

Simple Moving Average Strategy with a Volatility Filter

April 18, 2012
By
Simple Moving Average Strategy with a Volatility Filter

I would describe my trading approach as systematic long term trend following. A trend following strategy can be difficult mentally to trade after experiencing multiple consecutive losses when a trade reverses due to a volatility spike or the trend reverses. Volatility tends to increase when prices fall. This is not good for a long only … Continue reading...

Read more »

How to organize R user group

April 18, 2012
By

The first thing, what you have to do is to estimate how many users will be interested in local R group. I would say, that out of one million inhabitants you can expect 10-20 users. Based on this raw number, you can know, what challenges are waiting for you. If you expect 100 or more users, you have

Read more »

A word cloud where the x and y axes mean something

April 17, 2012
By
A word cloud where the x and y axes mean something

Ok so I have now done two iterations on a better way to visualize term frequencies using R, ggplot2 and plyr. The first was ok but ugly, the second was better but still ugly. How to read it: Frequency is segmented in to 20% quantiles The frequency is on the y axis Word size is

Read more »

Visualizing iOS Text Editors

April 17, 2012
By
Visualizing iOS Text Editors

The other day Brett Terpstra posted a gigantic and quite beautifully-executed feature comparison of all of the text editors available for iOS devices. The table is really terrific and also a bit overwhelming, as there’s so much data. On the bus h...

Read more »

Visualizing iOS Text Editors

April 17, 2012
By
Visualizing iOS Text Editors

The other day Brett Terpstra posted a gigantic and quite beautifully-executed feature comparison of all of the text editors available for iOS devices. The table is really terrific and also a bit overwhelming, as there’s so much data. On the bus h...

Read more »

Quickly Explore the Penn World Tables in R

April 17, 2012
By
Quickly Explore the Penn World Tables in R

The Penn World Tables are one of the greatest source of worldwide macroeconomic data, but dealing with its web interface is somewhat cumbersome. Fortunately, the data is also available as a R package on CRAN. Having some tools at hand … Continue reading →

Read more »

More Spectra patterns (1ª derivative)

April 17, 2012
By
More Spectra patterns (1ª derivative)

In the case of the first derivative for the absortion band, the maximum becomes a cero crossing.Using SG filters, we can calculate it with R, and to see, like in the last posts, the Corrgram matrix.Corrgram for the first derivative for this band:L...

Read more »

Get your large SQL data in ff swiftly

Get your large SQL data in ff swiftly

The ff package is great when you are working with large data in R. Data in corporate environments are usually not that large that a Hadoop system is needed to handle it but the data are mostly large enough to make R choke on it's RAM.  T...

Read more »

Montreal R Workshop: Quantile Regression

April 17, 2012
By
Montreal R Workshop: Quantile Regression

Stewart Biology Building, McGill University (Rm N4/17) Monday, April 24, 2012  14h-16h Dr. Arthur Charpentier (UQàM) In this workshop we will examine difference concepts related to quantiles, and practical issues based on R codes. This workshop will present quantile regression, and the idea of iterative least square estimation. It will present an illustration on climate

Read more »

Pair Trading: Quick Update

April 17, 2012
By

I've been working on different projects lately and my time for this blog, unfortunately, has been close to zero. But that's going to change. Don't expect new post every day, but there should be a new post at least in every two weeks. Anyway, let's get back to the point of this post. One of the readers contacted

Read more »

Revolution Analytics Spring Webinar Series

April 17, 2012
By

The webinar team at Revolution Analytics has put together a great program over the next couple of months. With a mix of guest speakers and Revolution Analytics staff, this series will cover topics as diverse as Big Data with R and Hadoop, integrating R with MS Office, spatial statistics with R, data mining with R, retail marketing analytics, and...

Read more »

The (Un)disputed Champion of Psychotherapy – Clinical psychologists and their theoretical orientations

April 17, 2012
By
The (Un)disputed Champion of Psychotherapy – Clinical psychologists and their theoretical orientations

Cognitive Behavioral Therapy is the psychological treatment of choice for many, if not all, mental disorders. Nonetheless a majority of US clinical psychologist do not primarily identify themselves as either cognitive or behavioral therapists. Looking at data from PubMed publication counts a clear picture emerges; psychodynamic researchers might just be research loafers.

Read more »

Calculating the mixing matrix and assortativity coefficient with igraph in R

April 16, 2012
By

The mixing matrix of a graph gives the density of edges between vertices with different characteristics. The mixing matrix for a given igraph object can be calculated using the following function: The assortativity coefficient, based on Newman’s paper, can be … Continue reading →

Read more »

Math Spectra Patterns

April 16, 2012
By
Math Spectra Patterns

I was working today with "R" to get more patterns with the Corrgram. In the demo raw spectra I wanted this time to look to a band as much Gaussian as possible. I select it and trim the spectra to that region treated with the MSC ("Multiple Scatter Corr...

Read more »

Word cloud alternatives

April 16, 2012
By
Word cloud alternatives

Here is an alternative to word clouds that makes it easier to get insights, but also has some of the aesthetic appeal of the traditional word cloud. My first attempt at this looked pretty bad and this is not too much better, but hopefully someone else will help improve it. library(languageR) # get english word

Read more »

Installing R’s maps package on Ubuntu

April 16, 2012
By

I recently ran into trouble trying to install the R maps package on Ubuntu 10.04.  Here's the error I was getting: ** arch - gcc -std=gnu99 -O3 -pipe  -g    Gmake.c   -o GmakeGmake.c: In function ‘get_lh’:Gmake.c:111: warning: cast from pointer to integer of different sizeGmake.c:113: warning: cast from pointer to integer of different sizeGmake.c: In function ‘main’:Gmake.c:211: warning: cast from...

Read more »

Installing R’s maps package on Ubuntu

April 16, 2012
By
Installing R’s maps package on Ubuntu

I recently ran into trouble trying to install the R maps package on Ubuntu 10.04.  Here's the error I was getting: ** arch - gcc -std=gnu99 -O3 -pipe  -g    Gmake.c   -o GmakeGmake.c: In function ‘get_lh’:Gmake.c:...

Read more »

R Quickie: Custom Panel Functions and Default Arguments

April 16, 2012
By

Sometimes the basic functionality in lattice graphics isn't enough. Custom "panel functions" are one approach to fully customizing the lattice graphics system. Two examples are given below illustrating how to define an (inline) custom panel function fo...

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 »

How NOAA uses R to forecast river flooding

April 16, 2012
By
How NOAA uses R to forecast river flooding

Thanks to the lower-than-usual snowfall over most of the US this past winter, there's low risk of major flooding as the snow melts this Spring (for the first time in four years!). Nonetheless, being able to forecast river flood events is of critical importance to local emergency managers, water & electric utilities, river navigation companies, and the US Army...

Read more »

Example 9.27: Baseball and shrinkage

April 16, 2012
By
Example 9.27: Baseball and shrinkage

To celebrate the beginning of the professional baseball season here in the US and Canada, we revisit a famous example of using baseball data to demonstrate statistical properties. In 1977, Bradley Efron and Carl Morris published a paper about the Jame...

Read more »

Benford’s Law

April 16, 2012
By
Benford’s Law

Here is a quick quiz. If you visit the Wikipedia page List of countries by GDP, you will find three lists ranking the countries of the world in terms of their Gross Domestic Product (GDP), each list corresponding to a different source of the data. If you pick the list according to the CIA (let’s

Read more »

Information flows like water

April 16, 2012
By
Information flows like water

Guiding a ship, it takes more than your skill Spark David Rowe’s Risk column this month is about data leverage. The idea is that you are leveraging your data if you are using it to answer questions that are too demanding of information. The piece reminded me of a talk that Dave gave a few … Continue reading...

Read more »

Borrowing Ideas from Timely Portfolio

April 15, 2012
By
Borrowing Ideas from Timely Portfolio

I want to highlight two great Visualization techniques I discovered by reading the fine blog from Timely Portfolio. First method is based on the lm System on Nikkei with New Chart. Let’s visualize Strategy’s Long/Short/Not Invested periods by highlighting the underlying (i.e. buy & hold) with green/red/gray. Following is a sample code that implements this

Read more »