Portfolio Optimization in R, a previous error.

December 25, 2011
By
Portfolio Optimization in R, a previous error.

I realized that I made a mistake in the calculation of the market weight portfolio from the previous post.  I hold constant the portfolio weights through time. These should be adjusted after each day as prices change.  The market portfolio re...

Read more »

R and the Geotechnical Exchange Format

December 24, 2011
By
R and the Geotechnical Exchange Format

Quite some time ago now, I wrote this function to read some *.gef files into R. "gef" stands for Geotechnical Exchange Format. Details on this data format can be found at http://www.geffiles.nl/, as well as several software tools. I had a long list of ...

Read more »

Call for Abstracts for useR! 2012

December 24, 2011
By

The international R User Conference useR! 2012 will be held June 12-15 at Vanderbilt University in Nashville, Tennessee, USA, with a pre-conference full-day course offered on June 11. Participants are encouraged to submit a one-page abstract for oral or poster presentation at the conference. Half-day tutorials will be held in the morning and afternoon of June 12th. For tutorials,...

Read more »

ML-Class Ex 7 – kMeans clustering

December 24, 2011
By
ML-Class Ex 7 – kMeans clustering

The K-means algorithm is a method to automatically cluster similar data examples together. The intuition behind K-means is an iterative procedure that starts by guessing the initial centroids, and then refines this guess by repeatedly assigning examples to their closest centroids and then recomputing the centroids based on the assignments. Read more »

Recology is 1 yr old

December 23, 2011
By
Recology is 1 yr old

This blog has lasted a whole year already.  Thanks for reading and commenting. There are a couple of announcements: Less blogging: I hope to put in many more years blogging here, but in full disclosure I am blogging for Journal of Ecology now, ...

Read more »

Recology is 1 yr old

December 23, 2011
By
Recology is 1 yr old

This blog has lasted a whole year already.  Thanks for reading and commenting. There are a couple of announcements: Less blogging: I hope to put in many more years blogging here, but in full disclosure I am blogging for Journal of Ecology now, ...

Read more »

Recology is 1 yr old…

December 23, 2011
By
Recology is 1 yr old…

This blog has lasted a whole year already.  Thanks for reading and commenting. There are a couple of announcements:Less blogging:  I hope to put in many more years blogging here, but in full disclosure, I am blogging for Journal of Ecology no...

Read more »

A Christmas Miracle

December 23, 2011
By

Data files on 407 banks, between the dates of 2007 to 2009, on the daily borrowing with the US Federal Reserve bank. The data sets are available from Bloomberg at this address data This is an unprecedented look into the day-to-day transactions of ...

Read more »

Programming traps when using "sample"

December 23, 2011
By
Programming traps when using "sample"

Standard sample function works differently when it gets single element integer vector as opposed to longer vectors. This can lead to unexpected bugs in R code.Several times I had a problem with code similar to one given here:for (i in 1:4) {&...

Read more »

Norman Nie on two big problems with Big Data

December 23, 2011
By

Revolution Analytics CEO Norman Nie sat down with Cassimir Medford from Business Agility to talk about the problems business today face with respect to Big Data. The two big problems identified: finding adequately trained personnel and locating the right tools. Norman traces the problem of finding skilled practitioners to work with Big Data to the US educational system: The...

Read more »

Portfolio Optimization in R, Part 4

December 23, 2011
By
Portfolio Optimization in R, Part 4

This post will conclude the portfolio optimization series.  In this post, we will construct a trading strategy based on portfolio optimization and test the results against the CAPM market portfolio as well as another strategy.It is worth reiterati...

Read more »

googleVis 0.2.13: new stepped area chart and improved geo charts

December 23, 2011
By
googleVis 0.2.13: new stepped area chart and improved geo charts

On 7th December Google published a new version of their Visualisation API. The new version adds a new chart type: Stepped Area Chart and provides improvements to Geo Chart. Now Geo Chart has similar functionality to Geo Map, but while Geo Map requires ...

Read more »

Happy Holidays and Best Wishes for 2012

December 22, 2011
By
Happy Holidays and Best Wishes for 2012

This is just a quick note to wish you and your family a very healthy and happy holidays and wonderful New Year! I hope you enjoyed reading my blog and thank you for your comments and emails. Here is a short R code that implements an interesting idea from the Charting the Santa Claus Rally

Read more »

AQP 0.9-9 is ready: 1.0 should be out by 2012-01-01 !

December 22, 2011
By
AQP 0.9-9 is ready: 1.0 should be out by 2012-01-01 !

Version 1.0 of AQP is nearly ready-- after nearly 3 years of development, 2 years on R-Forge, and 1+ year on CRAN. Just pushed version 0.9-9 to R-Forge, and it should be on CRAN within a couple days. Recent changes are listed below, clipped from the NE...

Read more »

R 2.14.1 is released

December 22, 2011
By

Peter Dalgaard announced today the release of the new R version 2.14.1.  Bellow is the announcement.  For R users who are using windows, I suggest to also have a look at one of the following two posts, suggestion an alternative strategy for how to more easily upgrade R under Windows XP, or under windows 7 (which tends to have more permission...

Read more »

Dynamic views don’t support javascript-so reverting back to simple views

December 22, 2011
By
Dynamic views don’t support javascript-so reverting back to simple views

Sorry for the temporary loss of GitHub gists...Hopefully dynamic views will support javascript soon!!

Read more »

R 2.14.1 is released

December 22, 2011
By

Source distributions of the latest maintenance release of R, R 2.14.1, are now available. Binary distributions will begin appearing on local CRAN mirrors in the next few days. This update makes a few small improvements (such as the ability to accurately count the number of available cores for parallel processing on Solaris and Windows, and improved support of grayscale...

Read more »

ASU Tuition by Academic Year

December 22, 2011
By
ASU Tuition by Academic Year

Description:Arizona State University tuition fees from 1987-2011.Data:https://azregents.asu.edu/ABOR%20Reports/TUITION%20HISTORY.pdfAnalysis:It has been suggested that the 'cost' of tuition has remained the same throughout the years, yet the 'price' of...

Read more »

Rcpp 0.9.8

December 22, 2011
By

A new release 0.9.8 of Rcpp is now on CRAN and will also get into Debian shortly (once I finish building R 2.14.1). This release contains a few incremental changes. Romain, sponsored by by the Open Source Programs Office at Google, had released a...

Read more »

Graphing Twitter friends/followers with R (updated yet again)

December 22, 2011
By

Those of you following my occasional updates here know that I have previously posted code for graphing Twitter friend/follower networks using R (post #1. post #2). Kai Heinrich was kind enough to send me some updated code for doing so using a newer version of the extremely useful twitteR package. His very crisp, yet thoroughly

Read more »

First impressions of Doing Bayesian Data Analysis

December 22, 2011
By
First impressions of Doing Bayesian Data Analysis

About a month ago I was discussing the approach that I would like to see in introductory Bayesian statistics books. In that post I mentioned a PDF copy of Doing Bayesian Data Analysis by John K. Kruschke and that I … Continue reading →

Read more »

Partisan Bias in Fed Inflation Forecasts?

December 22, 2011
By
Partisan Bias in Fed Inflation Forecasts?

Following on from my previous post about US Federal Reserve inflation forecast errors, I decided to put together a descriptive graph to see if there might be a partisan bias to these forecast erros. Also, given all of the work in the political eco...

Read more »

Legislative Activity in the Danish Parliament

December 22, 2011
By
Legislative Activity in the Danish Parliament

As mentioned in this post, I have been using the powerful combination of the Beautiful Soup and Mechanize modules in Python to build a web scrapers. The amount of data on the web is amazing, and I believe that any quantitatively oriented social scienti...

Read more »

Quel lancer de dé faire à Serpents et Échelles ?

December 21, 2011
By
Quel lancer de dé faire à Serpents et Échelles ?

Hier soir, j’évoquais l’utilisation des chaînes de Markov au jeu Serpents et Échelles. Comme me le faisait remarquer Jean-Philippe, de manière assez étrange, les enfants sont toujours beaucoup plus content après avoir fait un 6 qu’après avoir fait un 1. Mais est-ce réellement la valeur optimale que le dé doit prendre ? Ça dépend bien sûr de la position....

Read more »

Lehmann Primiality Test in R

December 21, 2011
By

After a small frustration with the limitations of R 16-bit intergers. I think i have worked out a solution. The issue was i was implementing a bone-headed solution to the modulo/exponent step. So to recap. The Lehmann primality test is a probabilistic ...

Read more »

An R function to map your Twitter Followers

December 21, 2011
By
An R function to map your Twitter Followers

I wrote a little function to make a personalized map of who follows you or who you follow on Twitter. The idea for this function was inspired by some plots I discussed in a previous post. I also found a lot of really useful code over at flowing data he...

Read more »

A Tool Chain for Plotting Twitter Archive Retweet Graphs – Py, R, Gephi

December 21, 2011
By
A Tool Chain for Plotting Twitter Archive Retweet Graphs – Py, R, Gephi

Another set of stepping stones that provide a clunky route to a solution that @mhawksey has been working on a far more elegant expression of (eg Free the tweets! Export TwapperKeeper archives using Google Spreadsheet and Twitter: How to archive event hashtags and create an interactive visualization of the conversation)… The recipe is as follows:

Read more »

Portfolio Optimization in R, Part 3

December 21, 2011
By
Portfolio Optimization in R, Part 3

In the last post, we discussed the issue of finding the market portfolio by fitting a curve to the found efficient frontier.  Because of kinks in the frontier, we could not guarantee that the fitted curve would be concave in the area of the market...

Read more »

Record Long Term Treasury Returns

December 21, 2011
By
Record Long Term Treasury Returns

I mistakenly assume everyone knows that US Treasury Returns have been extreme in 2011.  As we near the end of the year, I thought it would be beneficial to look at the world’s best performer while incorporating some new graphical techniques.&nbs...

Read more »