Efficient Frontier Code along the Data Shenanigans blog entry: "A Gentle Introduction to Finance using R: Efficient Frontier and CAPM - Part 1" The R code can be found in the folder R, the data is uploaded to data, and pictures can be found on the first level.