Create a gist now

Instantly share code, notes, and snippets.

explore the intended and unintended consequences of fed and boj actions
<!DOCTYPE html>
<!-- saved from url=(0014)about:internet -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Intended Or Unintended Consequence</title>
</head>
<body>
<h2>Intended Or Unintended Consequence</h2>
<p>A quick glimpse at the US 10y Treasury Bond rate since 2000 seems benign with low volatility and a general downward trend.</p>
<pre><code class="r">require(latticeExtra)
require(quantmod)
US10y &lt;- getSymbols(&quot;^TNX&quot;, from = &quot;2000-01-01&quot;, auto.assign = FALSE)[,
4]
asTheEconomist(xyplot(US10y, scales = list(y = list(rot = 1)),
main = &quot;US 10y Yield Since 2000&quot;))
</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAEgCAMAAABrWDzDAAAAk1BMVEUAAAAAADoAAGYAOmYAOpAAUm0AZrY6AAA6ADo6AGY6Ojo6OmY6OpA6ZmY6ZrY6kNtmAABmADpmAGZmOgBmOpBmZmZmkJBmtttmtv+QOgCQOjqQOmaQkGaQkLaQtpCQ27aQ2/+qqqq2ZgC2Zjq2/9u2///bkDrbkJDbtmbb29vb/9vb////tmb/25D//7b//9v///+8F4ZnAAAACXBIWXMAAAsSAAALEgHS3X78AAAOt0lEQVR4nO2diXrbuBVGmTSwJ206dqabPOmSqLW6WLLw/k9XbiB2EsQFSYD8z5doIXFBiDjCQslQxQEgUG1dAFA2EAiQgECABAQCJCAQIAGBAAlDoPev3+vb2+dXzs9VVT0MO+4vp/a2qp7U9PeXj69N2PNDF6lkwvm13ceHrJQkLt6fq6qJEAcx70GOeAU6PzRVJwyqK/HUPX9/1iqzVqe+PX96szKRAulZ+Wgzvnx8FQcx70GW+ATqHggFLtVv/lALdPup3nj99NYYwS+dEdcP39v/TUDTVtQqNQ/r5uTDX7voIav6wfvXvz9WdWp+e2xSiggujlUnEQcx71c6IWAePoH0FuPfr20X1lZjvbOp665P403r87+Xpzby3txfPr31D9+fO4GG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WaZr4E9iRbL25s5p8qM5VHnqoudda5mECdQe/bjWiAztNsSedjmW3aBZ8WKreUJPaNW7EP4UpUythdoRgtkxsadq/64M87VHOIG0c07N2pQYId2W+IOy4MdcBQ5uAWyY8MlUGO7igwfA9mxcedKtl65tEDnTuaYaYkdeg5+ZzgOG3xSHLGX0DekHdvMccKqUovtKjJ4FmbHRp6r7AQCYAACARIQCJCAQIAEBAIkIBAgAYEACQgESEAgQAICARIQCJCAQIAEBAIkIBAgAYEACQgESEAgQAICARIQCJCAQIAEBAIkIBAgAYEAif8DsoyX7BrC13gAAAAASUVORK5CYII=" alt="plot of chunk unnamed-chunk-2"/> </p>
<p>However, if we plot the change in rate over 252 days or 1 year, we might wonder whether the rate is as benign as we initially surmised. Although this might seem like an acceptable intended consequence of the aggressive monetary easing by the US Fed, I fear that we will face the historically normal unintended consequences.</p>
<pre><code class="r">p1 &lt;- asTheEconomist(xyplot(US10y - lag(US10y, 252),
scales = list(y = list(rot = 0)), main = &quot;US 10y Yield - Yearly Change&quot;))
p1
</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAEgCAMAAABrWDzDAAAAhFBMVEUAAAAAADoAAGYAOmYAOpAAUm0AZrY6AAA6ADo6AGY6Ojo6OpA6kNtmAABmADpmAGZmOgBmZmZmkJBmtv+QOgCQOjqQOmaQkGaQkLaQtpCQ27aQ2/+qqqq2ZgC2/7a2/9u2///bkDrbkJDbtmbb2//b/9vb////tmb/25D//7b//9v///9JnlmeAAAACXBIWXMAAAsSAAALEgHS3X78AAAQIElEQVR4nO2dDXvjqBVGnTRkOt1kt91Md6eduo37ESfh//+/6gsBEpIuXEBgvefZSSzpXkBwjJCjfXySADA47d0AUDcQCLCAQIAFBAIsIBBgAYEAi4lAHz//aH6+f32V8nw6nR7HA5/fXrqfp9OTGf/57f61TXt+7DONQqS8dsccsc6WGAX028+nrrKP5xffkwL5WBTo/NgOuRrrxpyXfvvj2TKo1+H88DYrZCaQM3ae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CMUvKQUaA09YQAgeKRtJGl9kDeb232BwLlKJwBBIoHBCoQCJSjcAYQKB4QqEAgUI7CGZQuUAcEKuvW3QQCxaOKRsYGAsWjikbGpgqBivrsfpkqGhkbCBSPKhoZGwgUjyoaGRsIFI8qGhmbOgSqAwgEWEAgwAICARYQCLCoRqDPb6fTw1ucsiBQPKoR6Poo5fklTlmZvjP1EIgyvtZ1BWNEL3kFAgSqmYFkPwlFAQLFow6Buu9MPcfyBwJFpA6BZLuIjnT9khAoJtUIdD41PMUpiyjQCWwjxN4t2CKOMyECraTE20xWMKpNBwQ6WLWxgUAHqzY2/NI5JTByUW2O3BylH6tLj1VtltKP1aXHqnb30sHNA4EACwgEWEAgwAICARYQCLCAQIBFmEDDU9nn090Paf0MyiU/4+2oVsoL7bkER+7ldCI9VxXtbOXHL6/03Hkq/WF4R7XknvIjTKD+qezrw9vkv8Bc6jPe89RmH/HBlqjVhp1t09b7V0nOdaSSH4af59J7yo/wS9jlpTG6cdv8GZbb7wlLff/pP/RumTT5L8QZaJ76/tObx0PFKvfz++dvr9Krp+zUfk9YtX49RSdYoKYDm3Npmmb+DMuVHs94T1Kb/rmSu2WS2z4XTB2OaYuvHv9f1Zgrux8+PTVJlT4Pw09yvXrKg1CBut4PnIGmuR7PeM+qbZ+zI/bLLLeRh9ins9RH+f7V+2wHgeg9NU31eRh+Vq1HT/kQuohu37lhq4J5LvkZ73mqJDvgaDJ1Bpqn0iUwc/uRJPfUPJX+MPw8V5J7yo8wgYansoPuS+a55Ge8HdXSJ5F57oX4lpyntjc5tLG0cvuRpPbUPJX+MLyj2qIEAmAAAgEWEAiwgECABQQCLCAQYAGBAAsIBFhAIMACAgEWEAiwgECABQQCLCAQYAGBAAsIBFhAIMACAgEWEAiwgECABQQCLCAQYAGBAIv/A10zIusTItQPAAAAAElFTkSuQmCC" alt="plot of chunk unnamed-chunk-3"/> </p>
<p>And if we use some Vanguard US Bond Funds (vbmfx and vustx) as a proxy for the US bond market <a href="http://timelyportfolio.blogspot.com/2013/01/approaching-zero-bound-bonds.html">Approaching the Zero Bound - Bonds</a>, we see that we are now in a market different than the last 4 years.</p>
<pre><code class="r">require(directlabels)
require(reshape2)
getSymbols(&quot;VUSTX&quot;, from = &quot;1990-01-01&quot;)
</code></pre>
<pre><code>## [1] &quot;VUSTX&quot;
</code></pre>
<pre><code class="r">getSymbols(&quot;VBMFX&quot;, from = &quot;1990-01-01&quot;)
</code></pre>
<pre><code>## [1] &quot;VBMFX&quot;
</code></pre>
<pre><code class="r">
bonds.tr &lt;- merge(ROC(VUSTX[, 6], 250), ROC(VBMFX[,
6], 250))
colnames(bonds.tr) &lt;- c(&quot;VanguardLongTsy&quot;, &quot;VanguardTotBnd&quot;)
bond.funds.melt &lt;- melt(as.data.frame(cbind(as.Date(index(bonds.tr)),
coredata(bonds.tr))), id.vars = 1)
colnames(bond.funds.melt) &lt;- c(&quot;date&quot;, &quot;fund&quot;, &quot;totret250&quot;)
bond.funds.melt$date &lt;- as.Date(bond.funds.melt$date)
p2 &lt;- direct.label(xyplot(bonds.tr, screens = 1, ylim = c(-0.35,
0.35), scales = list(y = list(rot = 0)), col = theEconomist.theme()$superpose.line$col,
par.settings = theEconomist.theme(box = &quot;transparent&quot;),
lattice.options = theEconomist.opts(), xlab = NULL,
main = &quot;Vanguard Bond Funds 250 Day Total Return&quot;),
list(&quot;last.points&quot;, hjust = 1, cex = 1.2))
p2
</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAEgCAMAAABrWDzDAAABelBMVEUAAAAAADoAAGYAOpAAUm0AUoAAUocAUpMAUqAAYG0AYKYAZrYAbm0AbqYAbrgAcrkAfMkAiZMAkNEAlqYAlskAltsAo7gAo8sAo9MAo9sAo+EAo+cApMMAproAs+0AwvMmo8smo9M6AAA6ADo6AGY6OgA6OpA6Um06Uoc6UqA6kNs6o9s6o+E6o+c6reg60vlEo9tEqKpgpNtgp8tgqMNgqapmAABmADpmAGZmOjpmOpBmUm1m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IAKhfy2yeBQkAQTwBIIglAASxBICgHRQAglgCQBBLAAhiCQBBLAEgiCUABLEEgCCWABDEEgCCWAJAEEsAaB/lH65wfnJwwPzZVAC0h4q/u3uoYDpm2VrKwxWgTch1YvKD36ebBQjaAZGHK5ggxBEA2jelD1dYMfkBQPuoMAc6P+GNXxIA7af8wxVWB0pHLFMACGIJAEEsASCIJQAEsQSAIJYAEMQSAIJYAkAQSwAIYgkAQSwBIIglAASxBIAglgAQxBIAglgCQBBLAAhiCQBBLAEgiCUABLEEgCCWANA+yt8brz4cMG/sAUB7KHpvfLzHeT3h3vh9kutEem/8pgGCdkDk3vgV875CALR3Su+NN+GIIwC0h4pzoCMABK0hf2+8XoXh8S7QRQoAQSwBIIglAASxBIAglgAQxBIAglgCQBBLAAhiaSxAB9AWawEAVVkoGa3Lhk0b2jSZANB+bppMAGg/N02mhU2iZ3YH5ifXwpza7i7YbvPraWFObXcXbLf59bRIp6DtEQCCWAJAEEsACGIJAEEsASCIJQAEsbQIgPRtkucn+tc77au+Xck9PoIvbfJrd90DKejrjOZn8t7eTzql93wtAaCzg6dvydND1TTH9vX8wwlb6MyYtDdj0n+zmZ/Ne9tQk3rP1wIAOv+ZvtNf32G7OrKvj//8CveGyVSnx/Z2cPo6m/nZvA8NNa33PC0AIGkeFaFj9Y+P7OuZjkjsXzSPUoexfSAFfZ3N/Gze24aa2numFgOQlr3P376eMR87QrQ69I/EmSUC5eb1tlm8dwAhArWk20U/LOuHn7rXIzndMXx+oi3NNgcqmJ/Le9dQmAO1ZCLQyjyuL7xOdgiv9B8DH822Ciuan8l731BYhUE7IwAEsQSAIJYAEMQSAIJYAkAQSwAIYgkAQSwBIIglAASxBIAglgAQxBIAglgCQBBLAAhiCQBBLAEgiCUABLEEgCCWABDEEgCCWAJAEEsACGLp/wEuj6WpH4tbAwAAAABJRU5ErkJggg==" alt="plot of chunk unnamed-chunk-4"/> </p>
<pre><code class="r">
p3 &lt;- asTheEconomist(horizonplot(totret250 ~ date |
fund, origin = 0, horizonscale = 0.05, data = bond.funds.melt,
strip = TRUE, strip.left = FALSE, par.strip.text = list(cex = 1.1),
layout = c(1, 2), main = &quot;Vanguard Bond Funds 250 Day Total Return&quot;))
p3
</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAEgCAMAAABrWDzDAAAA51BMVEUAAAAAADQAADoAAFwAAGYAMjQAMlwAMoEAOpAAWYEAWaQAZrYBZbMtAAAtWaQtfcU6AAA6ADo6AGY6OgA6OpA6kNtGjMhSAABSMgBSWTRSWVxSneZmAABmADpmAGZmOjpmZmZmkJBmtv9yMgByWQByfTRyvqRyvuaQOgCQOjqQOmaQkGaQkLaQtpCQ27aQ2/+RWQCRvoGR3aSR3eafyNyvfTSv3cWv3ea0FBS2ZgC225C2/7a2/9u2///LnVzLvoHL3aTL3cXL3ebbkDrb29vb///gMjH3qZz/tmb/25D//7b//9v///+wzxruAAAACXBIWXMAAAsSAAALEgHS3X78AAAUj0lEQVR4nO3djX/UyHkHcAGXcAfjQpP6IQ2XNjVJjmuaQstw4LZng91bGbz//98TzatmpNHrjF739/twa3slPRppvjsarbklOyJIRLKlG4BsOwCERAWAkKgAEBIVAEKiclqA/j/ZSoiOD+j+9VP59fbbXwZXuvvmZ/Hl6/dZEfV940r3rzOZi7aVTERF8cyX58UWRcPExuemvaLKwzfBMrdZZSf3r8/Lon944zTEOVx3JaQ7lRFI9d3X78M92xoLSGx72SDQAmrrJR/Q1++LdW+Lp+4UboFcPie/Fzu7a4BYmPtH11YQ0EVlAQANSwWQ6n7Rg/L1flGc6L89ly/xYhx4+NdvfpYrOMvvf/xrsVgv9CuIV3fhqFpBrGR7yZSrrXRrBxbJSfT3pWIiUdwpoKr/5YCp23MplN0+1YejAamWiMen5XE5gGQ5ZyXTKnlw/2mahoRSnQPJDrh8qnr2UoAp+q8YT8Rr/svzEpBZfv9anvvzo1zxaEegC3U5lFuqCu5KdUCVlYQadyAqJNz/+FsJUtr58htd50IvNe1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(p2,position=c(0,0.4,1,1),more=TRUE)
# print(update(p3,main=NULL),position=c(0,0,1,0.5))
</code></pre>
<h2>Comparison to Japan</h2>
<p>For some reference, let&#39;s look at a country getting quite a bit of attention lately in the press. We can add US yields to my favorite chart from <a href="http://timelyportfolio.blogspot.com/2013/05/japan-jgb-yieldsmore-lattice-charts.html">Japan - JGB Yields–More Lattice Charts</a>. Most of the difference is in the short end of the curve where the US is still near the minimum since 2012 while Japan is near the max out to 7 years.</p>
<pre><code class="r">url &lt;- &quot;http://www.mof.go.jp/english/jgbs/reference/interest_rate/&quot;
filenames &lt;- paste(&quot;jgbcme&quot;,c(&quot;&quot;,&quot;_2010&quot;,&quot;_2000-2009&quot;,&quot;_1990-1999&quot;,&quot;_1980-1989&quot;,&quot;_1974-1979&quot;),&quot;.csv&quot;,sep=&quot;&quot;)
#load all data and combine into one jgb data.frame
jgb &lt;- read.csv(paste(url,filenames[1],sep=&quot;&quot;),stringsAsFactors=FALSE)
for (i in 2:length(filenames)) {
jgb &lt;- rbind(jgb,read.csv(paste(url,&quot;/historical/&quot;,filenames[i],sep=&quot;&quot;),stringsAsFactors=FALSE))
}
#now clean up the jgb data.frame to make a jgb xts
jgb.xts &lt;- as.xts(data.matrix(jgb[,2:NCOL(jgb)]),order.by=as.Date(jgb[,1]))
colnames(jgb.xts) &lt;- paste0(gsub(&quot;X&quot;,&quot;JGB&quot;,colnames(jgb.xts)))
#get Yen from the Fed
#getSymbols(&quot;DEXJPUS&quot;,src=&quot;FRED&quot;)
xtsMelt &lt;- function(data) {
require(reshape2)
#translate xts to time series to json with date and data
#for this behavior will be more generic than the original
#data will not be transformed, so template.rmd will be changed to reflect
#convert to data frame
data.df &lt;- data.frame(cbind(format(index(data),&quot;%Y-%m-%d&quot;),coredata(data)))
colnames(data.df)[1] = &quot;date&quot;
data.melt &lt;- melt(data.df,id.vars=1,stringsAsFactors=FALSE)
colnames(data.melt) &lt;- c(&quot;date&quot;,&quot;indexname&quot;,&quot;value&quot;)
#remove periods from indexnames to prevent javascript confusion
#these . usually come from spaces in the colnames when melted
data.melt[,&quot;indexname&quot;] &lt;- apply(matrix(data.melt[,&quot;indexname&quot;]),2,gsub,pattern=&quot;[.]&quot;,replacement=&quot;&quot;)
return(data.melt)
#return(df2json(na.omit(data.melt)))
}
jgb.melt &lt;- xtsMelt(jgb.xts[&quot;2012::&quot;,])
jgb.melt$date &lt;- as.Date(jgb.melt$date)
jgb.melt$value &lt;- as.numeric(jgb.melt$value)
jgb.melt$indexname &lt;- factor(
jgb.melt$indexname,
levels = colnames(jgb.xts)
)
jgb.melt$maturity &lt;- as.numeric(
substr(
jgb.melt$indexname,
4,
length( jgb.melt$indexname ) - 4
)
)
jgb.melt$country &lt;- rep( &quot;Japan&quot;, nrow( jgb.melt ))
#now get the US bonds from FRED
USbondssymbols &lt;- paste0(&quot;DGS&quot;,c(1,2,3,5,7,10,20,30))
ust.xts &lt;- xts()
for (i in 1:length( USbondssymbols ) ) {
ust.xts &lt;- merge(
ust.xts,
getSymbols(
USbondssymbols[i],
auto.assign = FALSE,
src = &quot;FRED&quot;
)
)
}
ust.melt &lt;- na.omit( xtsMelt( ust.xts[&quot;2012::&quot;,] ) )
ust.melt$date &lt;- as.Date(ust.melt$date)
ust.melt$value &lt;- as.numeric(ust.melt$value)
ust.melt$indexname &lt;- factor(
ust.melt$indexname,
levels = colnames(ust.xts)
)
ust.melt$maturity &lt;- as.numeric(
substr(
ust.melt$indexname,
4,
length( ust.melt$indexname ) - 4
)
)
ust.melt$country &lt;- rep( &quot;US&quot;, nrow( ust.melt ))
bonds.melt &lt;- rbind( jgb.melt, ust.melt )
p4 &lt;- xyplot(
value ~ date | maturity,
groups = country,
data = bonds.melt,
type = &quot;l&quot;,
col = c(brewer.pal(9,&quot;Blues&quot;)[5],brewer.pal(9,&quot;Blues&quot;)[7]),
layout = c( length( unique( bonds.melt$maturity ) ), 1 ),
panel = function(x, y, subscripts, col, ...) {
panel.abline(
h = c(
sapply( by( y, bonds.melt[subscripts,&quot;country&quot;], summary ), min ),
sapply( by( y, bonds.melt[subscripts,&quot;country&quot;], summary ), max )
),
#if(!col){
col = col[1:length(unique(bonds.melt[subscripts,&quot;country&quot;]))]
#} else col = trellis.par.get()$superpose.line$col[1:length(unique(bonds.melt[subscripts,&quot;country&quot;]))]
)
panel.xyplot( x = x, y = y, subscripts = subscripts, col = col, ... )
panel.text(
x = x[ length(unique(x)) / 2],
y = mean(
c(
sapply( by( y, bonds.melt[subscripts,&quot;country&quot;], summary ), max )[1],
sapply( by( y, bonds.melt[subscripts,&quot;country&quot;], summary ), min )[2]
)
),
labels = paste0(unique(bonds.melt$maturity)[panel.number()],&quot;y&quot;),
cex = 0.8,
#font = 2,
col = &quot;black&quot;,
adj = c(0.5,0.5)
)
},
scales = list(
x = list(
draw = FALSE
#tck = c(1,0),
#alternating = 1,
#at = min(bonds.melt$date),
#labels = format(min(bonds.melt$date),&quot;%Y&quot;)
),
y = list( tck = c(1,0), lwd = c(0,1) )
),
strip = FALSE,
par.settings = list(axis.line = list(col = 0)),
xlab = NULL,
ylab = &quot;Yield&quot;,
main = &quot;JGB and US Yields by Maturity Since Jan 2012&quot;
)
p4 &lt;- p4 + layer(
panel.abline(
h = pretty(bonds.melt$value,4),
lty = 3
)
)
p4
</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAAEgCAMAAABrWDzDAAAA/FBMVEUAAAAAADoAAFYAAGYAGWYALYEAOpAARpkAZpAAZrYILYENAEgNUbUTGQAYJ3kYLQAYRpkYYrgYcbUccbUhUUghcYEhcZwhcbUrADErAFYrfNY6AAA6AGY6OgA6Ojo6OpA6ZmY6ZrY6kJA6kNs8J1Y8Ypk8ldZMRgBMrplMrtZcYjFcrtZmAABmADpmAGZmOjpmOpBmZjpmZmZmkJBmtrZmtv9rfFZrlXlrrplrrrhrrtaQOgCQOjqQOmaQZpCQkLaQtpCQ27aQ2/+2ZgC2Zjq2tma225C2/7a2/9u2///bkDrb25Db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bSgyIsEMh61bbDeFY8dV8IjbSxMiooXbhYsW+qDzkjAoZAJZktkGOKfCy41UL3A9GP/6LrIm0sNpLRIyFydgXV5YfI0KgM8wTqura18uBXzZ9xM+QyrpEuMVQ+P78VJY9uY/kVVGT7kT1aNVQ0hZ8cZlyU+c34wZ+v/v2rjz7pPv6w+/J7fLmpyIbyhz+B4gM+W1msHfThBCVCRCBvhdiaKF+uCKkjsfvq64fuy7/rfvYhm6iSui//5uejpYc1zDCSIkgN1gStJ5o/lJdfkPXJ1ARB3sbqkuHtkALly5agCyRCnHSupttHEGOLzA2iXXgM5F6QNblqbBMoX7bNpEDH4LYpMezbu0OPvTEl0Pnmff8vtQX/9u5gV0wJdDqonsIhdZP6n06wnRQrOYx1fJVFAt3LKBmAUeaVQAB40GMgsGsKtMLAnpkUCIAUEAiQgECABAQCJCAQIAGBAAkIBEhAIEACAgESEAiQgECABAQCJCAQIAGBAAkIBEhAIEACAgESEAiQgECABAQCJCAQIAGBAAkIBEhAIEACAgESEAiQ+BPVXHanNYMcGwAAAABJRU5ErkJggg==" alt="plot of chunk unnamed-chunk-5"/> </p>
</body>
</html>

Intended Or Unintended Consequence

A quick glimpse at the US 10y Treasury Bond rate since 2000 seems benign with low volatility and a general downward trend.

opts_chunk$set(message = FALSE, warning = FALSE, error = FALSE, fig.width = 8, fig.height = 4, tidy.opts = list( width.cutoff = 50 ))
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"
  )
)

However, if we plot the change in rate over 252 days or 1 year, we might wonder whether the rate is as benign as we initially surmised. Although this might seem like an acceptable intended consequence of the aggressive monetary easing by the US Fed, I fear that we will face the historically normal unintended consequences.

p1 <- asTheEconomist( 
  xyplot ( 
    US10y - lag( US10y, 252 ),
    scales = list(y=list(rot=0)),
    main = "US 10y Yield - Yearly Change"
  )
)
p1

And if we use some Vanguard US Bond Funds (vbmfx and vustx) as a proxy for the US bond market Approaching the Zero Bound - Bonds, we see that we are now in a market different than the last 4 years.

require(directlabels)
require(reshape2)

getSymbols("VUSTX",from="1990-01-01")
getSymbols("VBMFX",from="1990-01-01")

bonds.tr <- merge(ROC(VUSTX[,6],250),ROC(VBMFX[,6],250))
colnames(bonds.tr) <- c("VanguardLongTsy","VanguardTotBnd")
bond.funds.melt <- melt(as.data.frame(cbind(as.Date(index(bonds.tr)),coredata(bonds.tr))),id.vars=1)
colnames(bond.funds.melt) <- c("date","fund","totret250")
bond.funds.melt$date <- as.Date(bond.funds.melt$date)

p2 <- direct.label(
  xyplot(bonds.tr,screens=1,
         ylim=c(-0.35,0.35),scales=list(y=list(rot=0)),
         col=theEconomist.theme()$superpose.line$col,
         par.settings=theEconomist.theme(box="transparent"),
         lattice.options=theEconomist.opts(),
         xlab=NULL,
         main="Vanguard Bond Funds 250 Day Total Return"),
  list("last.points",hjust=1,cex=1.2))
p2

p3 <- asTheEconomist(
  horizonplot(totret250~date|fund,origin=0,horizonscale=0.05,
              data=bond.funds.melt,
              strip=TRUE,strip.left=FALSE,par.strip.text=list(cex=1.1),
              layout=c(1,2),
              main="Vanguard Bond Funds 250 Day Total Return"))
p3

#print(p2,position=c(0,0.4,1,1),more=TRUE)
#print(update(p3,main=NULL),position=c(0,0,1,0.5))

Comparison to Japan

For some reference, let's look at a country getting quite a bit of attention lately in the press. We can add US yields to my favorite chart from Japan - JGB Yields–More Lattice Charts. Most of the difference is in the short end of the curve where the US is still near the minimum since 2012 while Japan is near the max out to 7 years.

url <- "http://www.mof.go.jp/english/jgbs/reference/interest_rate/"
filenames <- paste("jgbcme",c("","_2010","_2000-2009","_1990-1999","_1980-1989","_1974-1979"),".csv",sep="")

#load all data and combine into one jgb data.frame
jgb <- read.csv(paste(url,filenames[1],sep=""),stringsAsFactors=FALSE)
for (i in 2:length(filenames)) {
  jgb <- rbind(jgb,read.csv(paste(url,"/historical/",filenames[i],sep=""),stringsAsFactors=FALSE))
}

#now clean up the jgb data.frame to make a jgb xts
jgb.xts <- as.xts(data.matrix(jgb[,2:NCOL(jgb)]),order.by=as.Date(jgb[,1]))
colnames(jgb.xts) <- paste0(gsub("X","JGB",colnames(jgb.xts)))

#get Yen from the Fed
#getSymbols("DEXJPUS",src="FRED")

xtsMelt <- function(data) {
  require(reshape2)
  
  #translate xts to time series to json with date and data
  #for this behavior will be more generic than the original
  #data will not be transformed, so template.rmd will be changed to reflect
  
  
  #convert to data frame
  data.df <- data.frame(cbind(format(index(data),"%Y-%m-%d"),coredata(data)))
  colnames(data.df)[1] = "date"
  data.melt <- melt(data.df,id.vars=1,stringsAsFactors=FALSE)
  colnames(data.melt) <- c("date","indexname","value")
  #remove periods from indexnames to prevent javascript confusion
  #these . usually come from spaces in the colnames when melted
  data.melt[,"indexname"] <- apply(matrix(data.melt[,"indexname"]),2,gsub,pattern="[.]",replacement="")
  return(data.melt)
  #return(df2json(na.omit(data.melt)))
  
}


jgb.melt <- xtsMelt(jgb.xts["2012::",])
jgb.melt$date <- as.Date(jgb.melt$date)
jgb.melt$value <- as.numeric(jgb.melt$value)
jgb.melt$indexname <- factor(
  jgb.melt$indexname,
  levels = colnames(jgb.xts)
)
jgb.melt$maturity <- as.numeric(
  substr(
    jgb.melt$indexname,
    4,
    length( jgb.melt$indexname ) - 4
  )
)
jgb.melt$country <- rep( "Japan", nrow( jgb.melt ))

#now get the US bonds from FRED
USbondssymbols <- paste0("DGS",c(1,2,3,5,7,10,20,30))

ust.xts <- xts()
for (i in 1:length( USbondssymbols ) ) {
  ust.xts <- merge( 
    ust.xts,
    getSymbols( 
     USbondssymbols[i],
     auto.assign = FALSE,
     src = "FRED"
    )
  )
}

ust.melt <- na.omit( xtsMelt( ust.xts["2012::",] ) )

ust.melt$date <- as.Date(ust.melt$date)
ust.melt$value <- as.numeric(ust.melt$value)
ust.melt$indexname <- factor(
  ust.melt$indexname,
  levels = colnames(ust.xts)
)
ust.melt$maturity <- as.numeric(
  substr(
    ust.melt$indexname,
    4,
    length( ust.melt$indexname ) - 4
  )
)
ust.melt$country <- rep( "US", nrow( ust.melt ))

bonds.melt <- rbind( jgb.melt, ust.melt )

p4 <- xyplot(
  value ~ date | maturity,
  groups = country,
  data = bonds.melt,
  type = "l",
  col = c(brewer.pal(9,"Blues")[5],brewer.pal(9,"Blues")[7]),
  layout = c( length( unique( bonds.melt$maturity ) ), 1 ),
  panel = function(x, y, subscripts, col, ...) {
    panel.abline(
      h = c( 
        sapply( by( y, bonds.melt[subscripts,"country"], summary ), min ),
        sapply( by( y, bonds.melt[subscripts,"country"], summary ), max )
      ),
      #if(!col){
      col = col[1:length(unique(bonds.melt[subscripts,"country"]))]
      #} else col = trellis.par.get()$superpose.line$col[1:length(unique(bonds.melt[subscripts,"country"]))]
    )
    panel.xyplot( x = x, y = y, subscripts = subscripts, col = col, ... )
    panel.text(
      x = x[ length(unique(x)) / 2],
      y = mean(
        c(
          sapply( by( y, bonds.melt[subscripts,"country"], summary ), max )[1],
          sapply( by( y, bonds.melt[subscripts,"country"], summary ), min )[2]
        )
      ),
      labels = paste0(unique(bonds.melt$maturity)[panel.number()],"y"),
      cex = 0.8,
      #font = 2,
      col = "black",
      adj = c(0.5,0.5)
    )
  },
  scales = list( 
    x = list(
      draw = FALSE
      #tck = c(1,0),
      #alternating = 1,
      #at = min(bonds.melt$date),
      #labels = format(min(bonds.melt$date),"%Y")
    ),
    y = list( tck = c(1,0), lwd = c(0,1) )
  ),
  strip = FALSE,
  par.settings = list(axis.line = list(col = 0)),
  xlab = NULL,
  ylab = "Yield",
  main = "JGB and US Yields by Maturity Since Jan 2012"
)
p4 <- p4 + layer(
  panel.abline(
    h = pretty(bonds.melt$value,4),
    lty = 3
  )
)
p4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment