Publications by klr

Even More JGB Yield Charts with R lattice

15.05.2013

See the last post for all the details. I just could not help creating a couple more. Variations on Favorite Plot – Time Series Line of JGB Yields by Maturity p2 <- xyplot(value ~ date | indexname, data = jgb.melt, type = "l", layout = c(length(unique(jgb.melt$indexname)), 1), panel = function(x, y, ...) { panel.abline(h =...

657 sym R (3283 sym/7 pcs) 14 img 7 tbl

Intended or Unintended Consequences

28.05.2013

A quick glimpse at the US 10y Treasury Bond rate since 2000 seems benign with low volatility and a general downward trend.require(latticeExtra) require(quantmod) US10y <- getSymbols("^TNX", from = "2000-01-01", auto.assign = FALSE)[, 4] asTheEconomist(xyplot(US10y, scales = list(y = list(rot = 1)), main = "US 10y Yield Since 2000")) F...

1463 sym R (5826 sym/6 pcs) 10 img 5 tbl

If…then in Japan

30.05.2013

If Japan starts to spiral out of control, then what do they do? A spiral would be a sudden move higher in JGB rates with a simultaneous crash in the Japanese Yen. Their response would be to try to slow the positive feedback loop through external intervention. Fortunately for Japan, they have amassed a significant reserve position of 1.2 trillion ...

1290 sym R (991 sym/2 pcs) 4 img

Rickshaw d3.js from R with rCharts

11.06.2013

Shutterstock’s open source Rickshaw provides a very nice tutorial to get started building interactive time series d3.js charts with Rickshaw.  I just could not resist rebuilding the tutorial but this time ENTIRELY in R with the amazing packages slidify and rCharts.  I have embedded the tutorial below, but it will probably look much better if ...

733 sym

R Plotting Financial Time Series

19.06.2013

In my little world of finance, data almost always is a time series.  Through both quiet iteration and significant revolutions, the volunteers of R have made analyzing and charting time series pleasant.  As a mini-tribute to all those who have helped, I wanted to write a short history of R time series plotting, specifically focusing on financial...

846 sym

dimple d3 and rCharts

27.06.2013

I put together a quick tutorial combining my two favorite things: finance and interactive visualizations.  I show how to use the new dimplejs d3 library with rCharts to create some nice interactive plots of US Treasury yield data.   A screenshot is below.  Go here for the tutorial and here for the code to reproduce. Related To leave a com...

717 sym 2 img

rCharts Remake of NYT

28.06.2013

For those wondering if I have forsaken finance, the answer is no.  I just don’t think there is much to do in here besides watch and wait.  So more d3 and R as I try to distract myself from doing something dumb in the markets. This time I used rCharts and slidify to  recreate another NYT visualization similar to what I did in 512 Paths to the...

1035 sym 2 img

rCharts version of d3 horizon

10.07.2013

I love horizon plots.  My love shows up throughout my blog, and I have plotted horizon charts in base graphics, xtsExtra, lattice, and ggplot2.  Now with rCharts, we can implement Jason Davies d3.js horizon chart plugin to plot R data in html/javascript.  I put together a tutorial going into great detail on rCharts and convertin custom charts...

807 sym 2 img

Exploring Networks with Sankey

16.07.2013

Motivated by a tweet from Tony Hirst (http://blog.ouseful.info/), I started experimenting with an rCharts implementation of the d3 sankey plugin.  While I was putting together examples, I found lots of gaps in my knowledge of sankeys and network analysis.  I did not want to let good learning go to waste, so I put together this quick tutorial do...

1077 sym 2 img

All My Roads Lead Back to Finance–PIMCO Sankey

17.07.2013

Even though the route might be circuitous, my seemingly random journeys all seem to lead back to finance.  My fun with rCharts sankey diagrams (Exploring Networks with Sankey) has led me into an exploration of the PIMCO network.  Although PIMCO is best known for its fixed income products, PIMCO has broadened its product offerings beyond bonds.�...

2392 sym R (3095 sym/2 pcs) 6 img