Skip to content

Instantly share code, notes, and snippets.

@mbusigin
Created August 5, 2013 14:06
Show Gist options
  • Save mbusigin/6156162 to your computer and use it in GitHub Desktop.
Save mbusigin/6156162 to your computer and use it in GitHub Desktop.
Calculate drawdown in PCE as % of Wages
plot_PCEWage_drawdown <- function()
{
if ( exists("PCE") == FALSE ) { getSymbols("PCE", src="FRED") }
if ( exists("A576RC1") == FALSE ) { getSymbols("A576RC1", src="FRED") }
pce_wage_dd = ( SMA(calculateDrawdown(PCE/A576RC1)) ) * 100
recplot(pce_wage_dd, main="Drawdown of (PCE as % of Wages)")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment