330 search results for "boxplot"

GNU R loop speed comparison

March 16, 2013
By
GNU R loop speed comparison

Recently I had several discussions about using for loops in GNU R and how they compare to *apply family in terms of speed. I have not seen a direct benchmark comparing them so I decided to execute one (warning: some of the code presented today tak...

Read more »

Discovering Argon with the 2-Sample t-Test

Discovering Argon with the 2-Sample t-Test

I learned about Lord Rayleigh’s discovery of argon in my 2nd-year analytical chemistry class while reading “Quantitative Chemical Analysis” by Daniel Harris.  (William Ramsay was also responsible for this discovery.)  This is one of my favourite stories in chemistry; it illustrates how diligence in measurement can lead to an elegant and surprising discovery.  I find

Read more »

Comparing quantiles for two samples

March 8, 2013
By
Comparing quantiles for two samples

Recently, for a research paper, I some samples, and I wanted to compare them. Not to compare they means (by construction, all of them were centered) but there dispersion. And not they variance, but more their quantiles. Consider the following boxplot type function, where everything here is quantile related (which is not the case for standard boxplot, see http://freakonometrics.hypotheses.org/4138,...

Read more »

Predicted correlations and portfolio optimization

March 5, 2013
By
Predicted correlations and portfolio optimization

What effect do predicted correlations have when optimizing trades? Background A concern about optimization that is not one of “The top 7 portfolio optimization problems” is that correlations spike during a crisis which is when you most want optimization to work. This post looks at a small piece of that question.  It wonders if increasing predicted … Continue reading...

Read more »

What can we use the VIX for?

March 3, 2013
By
What can we use the VIX for?

In part 1, we took a look at VIX and the relationship it had between historical volatility and realized volatility.Continuing on, I thought I would take a look at next day returns and the VIX. There is a relationship between SPX and VIX in that when SP...

Read more »

R/ggplot2 tip: aes_string

February 25, 2013
By
R/ggplot2 tip: aes_string

I’m a big fan of ggplot2. Recently, I ran into a situation which called for a useful feature that I had not used previously: aes_string. Imagine that you have data consisting of observations for several variables – let’s say A, B, C – where each observation is from one of two groups – call them

Read more »

Portfolio tests of predicted returns

February 25, 2013
By
Portfolio tests of predicted returns

Exploring the quality of predictions using random portfolios and optimization. Previously “Simple tests of predicted returns” showed a few ways to look at expected returns at the asset level.  Here we move to the portfolio level. The previous post focused on correlation.  Win Vector Blog points out that gauging prediction quality using correlation can be … Continue reading...

Read more »

Simple tests of predicted returns

February 18, 2013
By
Simple tests of predicted returns

Some ways to explore how good a method of predicting returns is. Data and model The universe is 443 large cap US stocks that have data back to the beginning of 2004.  The daily (adjusted) close was used. The model that is used as an example is the default signal from the MACD function of … Continue reading...

Read more »

Finding outliers in numerical data

Finding outliers in numerical data

One of the topics emphasized in Exploring Data in Engineering, the Sciences and Medicine is the damage outliers can do to traditional data characterizations.  Consequently, one of the procedures to be included in the ExploringData package is FindOutliers, described in this post.  Given a vector of numeric values, this procedure supports four different methods for identifying possible outliers.Before...

Read more »

Variability of predicted portfolio volatility

February 11, 2013
By
Variability of predicted portfolio volatility

A prediction of a portfolio’s volatility is an estimate — how variable is that estimate? Data The universe is 453 large cap US stocks. The variance matrices are estimated with the daily returns in 2012. Variance estimation was done with Ledoit-Wolf shrinkage (shrinking towards equal correlation). Two sets of random portfolios were created.  In both … Continue reading...

Read more »