Skip to content

Instantly share code, notes, and snippets.

@mbusigin
Last active December 28, 2015 18:08
Show Gist options
  • Save mbusigin/7540585 to your computer and use it in GitHub Desktop.
Save mbusigin/7540585 to your computer and use it in GitHub Desktop.
Backing the value of interest into the purchasing power of the USD.... with taxes.
a = -Delt(CPIAUCNS, k=12)*100
a = na.omit( a[endpoints(a, on="years")] )
a = cumprod( (1+(a/100)) )
 
b = (M2OWN*0.6 - Delt(CPIAUCNS, k=12)*100)
b = na.omit( b[endpoints(b, on="years")] )
b = cumprod( (1+(b/100)) )
 
b2 = (TB3MS*0.6 - Delt(CPIAUCNS, k=12)*100)
b2 = na.omit( b2[endpoints(b2, on="years")] )
b2 = cumprod( (1+(b2/100)) )
  
d = na.omit(merge(a, b, b2))
names(d) = c("Purchasing Power of a $", "Purchasing Power of a $ w/ Interest (40% tax rate)", "Purchasing Power of a $ invested in 3mo T-bills (40% tax rate)")
par(mar=c(3, 2, 1, 0.5))
plotRelativeReturn(d, legend.cex=0.75)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment