PCA and ggplot2 to recognise gestures (via David Chudzicki’s Blog: Visualizing ChaLearn Gestures Test Data)

Frequently we will want to estimate the empirical probability density function of real-world data and compare it to the theoretical density from one or more probability distributions. The following example shows the empirical and theoretical normal density for EUR/USD high-frequency … Continue reading →

6/18: A follow-up to this post is now available here.Recent DiscoveriesWhen I was a diplomat, I was always interested in the Wikileaks cables and what could be done with them. Unfortunately, I never got a chance to look at the site in depth, due to security policies. Now that the ex- is firmly prepended to diplomat in my...

The videos from 'Tiki + PluginR' workshop given in Madrid (Nov'12) in the context of the "3as Jornadas de Usuarios de R en Castellano" are available online. See it within the page of the fulll workshop: 2011. Taller 5: Crea interfaces Web 2.0 a tus programas en R con software libre (LAMP + Tiki + PluginR)....

Just had supper. My stomach is full of cabbage, carrot and noodle. I’d like to solve the ninth problem to stretch my mind. This one is about Pythagorean theorem. A Pythagorean triplet is a set of three natural numbers, a < b < … Continue reading →

Why study networks? Development and aid projects these days are more and more often focussing on supporting networks, so tools to analyse networks are always welcome. In this post I am going to present a very easy-to-use package for the stats program R which makes nice-looking graphs of these kinds of networks. In a recent

In Tiki9 icons and some other image paths have been refactored to share a common base folder. PluginR up to version 0.73 was using only paths from Tiki up to Tiki8. PluginR version 0.74 includes the icon also in the new path, so that it can be insta...

Here is a little overview on GenABEL library developed by Yurii Aulchenko (www.genabel.org/). GenABEL is a full-featured R library for dealing with Genome-Wide Association analysis of binary and quantitative traits. Compared to the ‘genetics’ package and many other tools, GenABEL … Continue reading →

I have discussed Volatility Position Sizing in the Volatility Position Sizing to improve Risk Adjusted Performance post using the Average True Range (ATR) as a measure of Volatility. Today I want show how to use historical volatility to adjust portfolio leverage. Let’s start with Buy and Hold strategy using SPY and rescale it to the

Hollywood movies are obsessed with outrunning explosions and outrunning crashing alien spaceships. For explosions the movies give the optimal (but unusable) solution: run straight away. For crashing alien spaceships they give the same advice, but in this case it is wrong. We demonstrate the correct angle to flee. Running from a crashing alien spaceship, Prometheus Related posts:

Once again working on my slides for the AMSI Lecture 2012 tour, it took me a while to get the following LaTeX code (about the family reunion puzzle) to work: \begin{frame} \slidetitle{A family meeting} \begin{block}{Random switch of couples} \only<1>{ \begin{itemize} \item Pick two couples at random with probabilities proportional to the

We're definitely in the age of Big Data: today, there are many more sources of data readily available to us to analyze than there were even a couple of years ago. But what about extracting useful information from novel data streams that are often noisy and minutely transactional ... aye, there's the rub. One of the great things about...

Background As of ggplot2 0.9.0 released in March 2012, there is a new generic function autoplot. This uses R's S3 methods (which is essentially oop for babies) to let you have some simple overloading of functions. I'm not going to get deep into oop, because honestly we don't need to. The idea is very simple. If I say "I'm...

What's the gain over lm()?By Ben OgorekRandom effects models have always intrigued me. They offer the flexibility of many parameters under a single unified, cohesive and parsimonious system. But with the growing size of data sets and increased ability to estimate many parameters with a high level of accuracy, will the subtleties of the random effects analysis be lost? In this...

Binomial Tree Simulation The binomial model is a discrete grid generation method from \(t=0\) to \(T\). At each point in time (\(t+\Delta t\)) we can move up with probability \(p\) and down with probability \((1-p)\). As the probability of an … Continue reading →

The final table in Universal Portfolios introduces leverage. It indirectly also shows the dangers of rebalancing on margin, while Kin Ark increases 4.2 times, at 50% margin it goes to nothing.The code below reproduces Table 8.4, again a...