356 search results for "quantmod"

Weekend Reading – S&P 500 Visual History

January 19, 2013
By
Weekend Reading – S&P 500 Visual History

Michael Johnston at the ETF Database shared a very interesting post with me over the holidays. The S&P 500 Visual History – is an interactive post that shows the top 10 components in the S&P 500 each year, going back to 1980. On a different note, Judson Bishop contributed a plota.recession() function to add recession

Read more »

Optimal number of clusters

January 16, 2013
By
Optimal number of clusters

In the last post, Examples of Current Major Market Clusters, we looked at clustering Major Markets into 4 groups based on their correlations in 2012. Today, I want to continue with clustering theme and discuss methods of selecting number of clusters. I will look at the following methods of selecting optimal number of clusters: Minimum

Read more »

Examples of Current Major Market Clusters

January 11, 2013
By
Examples of Current Major Market Clusters

I want to follow up and provide a bit more details to the excellent “A Visual of Current Major Market Clusters” post by David Varadi. Let’s first load historical for the 10 major asset classes: Gold ( GLD ) US Dollar ( UUP ) S&P500 ( SPY ) Nasdaq100 ( QQQ ) Small Cap (

Read more »

Adding Comments to CSV Files

January 11, 2013
By

Various of my R scripts produce csv files as output. For instance, I run a lengthy SVM back test, the end result is a csv file containing the indicator with some additional information. The problem is that over time one loses track what exactly the file contained and what parameters were used to produce it.

Read more »

Does anything NOT beat the GARCH(1,1)?

January 7, 2013
By
Does anything NOT beat the GARCH(1,1)?

In their paper on GARCH model comparison, Hansen and Lunde (2005) present evidence that among 330 different models, and using daily data on the DM/$ rate and IBM stock returns, no model does significantly better at predicting volatility (based on a realized measure) than the GARCH(1,1) model, for an out of sample period of about

Read more »

Does anything NOT beat the GARCH(1,1)?

January 7, 2013
By
Does anything NOT beat the GARCH(1,1)?

In their paper on GARCH model comparison, Hansen and Lunde (2005) present evidence that among 330 different models, and using daily data on the DM/$ rate and IBM stock returns, no model does significantly better at predicting volatility (based on a realized measure) than the GARCH(1,1) model, for an out of sample period of about

Read more »

2012 Summary and 2013 Plans

January 6, 2013
By
2012 Summary and 2013 Plans

2012 was a very important year for me. It was my first full year of trading only pure quantitative strategies. It was a very successful year as well, despite the fact that the S&P 500 returned 16% (including dividends) – a tough to beat benchmark. The strategy I use on the SPY, for which I

Read more »

More Principal Components Fun

January 6, 2013
By
More Principal Components Fun

Today, I want to continue with the Principal Components theme and show how the Principal Component Analysis can be used to build portfolios that are not correlated to the market. Most of the content for this post is based on the excellent article, “Using PCA for spread trading” by Jev Kuznetsov. Let’s start by loading

Read more »

Clustering with selected Principal Components

December 28, 2012
By
Clustering with selected Principal Components

In the Visualizing Principal Components post, I looked at the Principal Components of the companies in the Dow Jones Industrial Average index over 2012. Today, I want to show how we can use Principal Components to create Clusters (i.e. form groups of similar companies based on their distance from each other) Let’s start by loading

Read more »

Visualizing Principal Components

December 22, 2012
By
Visualizing Principal Components

Principal Component Analysis (PCA) is a procedure that converts observations into linearly uncorrelated variables called principal components (Wikipedia). The PCA is a useful descriptive tool to examine your data. Today I will show how to find and visualize Principal Components. Let’s look at the components of the Dow Jones Industrial Average index over 2012. First,

Read more »