Publications by klr

Speed Tests for Rolling/Running Functions

08.07.2014

I use rolling and running functions almost daily with financial time series. In my post A Whole New World with Chains and Pipes, I made this statement I have noticed that rolling analysis with xts can sometimes be slow. as.matrix is my favorite way to speed things up, since I usually do not need xts powerful indexing and subsetting fe...

808 sym

Pick a Color Site built in R with Shiny tags %$%

16.07.2014

I started down the color path with yesterday’s post Palette of Colors from Image %>% ggplot2 %>% rCharts + dimple.js.  Although R has lots of tools, such as RColorBrewer and the mentioned rPlotter, javascript does too with Gregor Aisch’s chroma.js and this translated-from-Perl color-scheme-js. I figured I should explore these jav...

809 sym

Alternate Price Plots | ggplot2 + magrittr

17.07.2014

code{white-space: pre;} pre:not([class]) { background-color: white; } if (window.hljs && document.readyState && document.readyState === “complete”) { window.setTimeout(function() { hljs.initHighlighting(); }, 0);} Just some quick experiments with ggplot2 + magrittr to plot prices differently than the traditional ...

807 sym

Chart from R + Color from Javascript

22.07.2014

Another color experiment combining resources from R and Javascript.  I just wish I could do Mean Phylogenetic Distance in Javascript like rPlotter.  I enjoyed using d3.js zoom behavior to pan and zoom the image on canvas.  Also, filedrop.js made the drag and drop image easy.  There are lots of mini lessons in this code for someone...

806 sym

Refresh Old rCharts+flickr post with httr and pipeR

30.07.2014

The R world keeps moving, and I noticed this old post didn’t work anymore, so I have rewritten it to use Hadley Wickham’s httr instead of Rflickr for two reasons: Rflickr is not working for me anymore httr is a very helpful package for navigating the “what was scary to me” world of http and oauth In addition to the changes a...

812 sym

Fama/French Factors in 1 line of code

11.08.2014

In the past, getting Fama/French factors from the Kenneth French dataset involved a convoluted procedure to download the zip file, unzip the file, clean the data, and convert to xts.  Now with Quandl, we can do it simply in one line of code.  Note:  this data is available in multiple formats (JSON, CSV, XML) from the API and for mu...

808 sym

Frazzini goes French

09.09.2014

A kind reader commented “Don’t know if you have seen it, but Frazzini goes French now too” .  I have profusely thanked and praised Kenneth French for his incredible data library.  Now, it appears I’ll have to repeatedly do the same for Andrea Frazzini. Here is a quick plot of Quality Minus Junk (QMJ) around the world.  The ...

807 sym

R User Group in Birmingham, AL

11.09.2014

If Birmingham, UK has one, then Birmingham, AL, USA should too. There is a big gaping hole in R user groups between Georgia and Texas that I think needs filling.  Way back in 2011, I weakly posted R User Group Birmingham Alabama, but this time I am more determined.  (note: I might even consider some Julia and Python, and sure you al...

812 sym

SelectionShare & TimingShare | Masterfully Written by Delightfully Responsive Author

03.10.2014

Anders Ekholm has written a wonderful paper Ekholm, Anders G. Components of Portfolio Variance: Systematic, Selection and Timing August 8, 2014 http://ssrn.com/abstract=2463649 demonstrating how we might decompose a money manager’s performance with just a return stream.  Since his method relies simply on the return stream, he ove...

811 sym

Popular Mutual Funds Decomposed With Ekholm (2014)

06.10.2014

While we have a foundation and momentum from the last post “SelectionShare & TimingShare | Masterfully Written by Delightfully Responsive Author” , we can run the Ekholm calculations on some popular funds to see how they have evolved since the early 1980s.  Remember these are my opinions and not investment advice.  I chose these...

812 sym