# Federal Debt and the Cost of Money — RainbowStats replication i = SERIES_SINCE(PNFI,19800101) p = SERIES_SINCE(GDPDEF,19800101) g = LOGDIFF(i/p) y = SERIES_SINCE(GDP,19800101) gy = LOGDIFF(y/p) c = SERIES_SINCE(PCE,19800101) gc = LOGDIFF(c/p) r = toQuarterly(SERIES_SINCE(GS10,19800101)) dr = DIFF(r) debt = SERIES_SINCE(GFDEGDQ188S,19800101) d = LAG(debt,1)/100 dc = d-0.80 dc2 = dc*dc n = SERIES_SINCE(A091RC1Q027SBEA,19800101) j = 100*n/y dj = DIFF(j) ldj = LAG(dj,1) m1 = REGRESSION(LIST(g,gy,dr,dj)) m2 = REGRESSION(LIST(gc,gy,dj,dr)) m3 = REGRESSION(LIST(gy,g,gc,dj)) m4 = REGRESSION(LIST(dj,dr,gy,dc,dc2,ldj)) system = SIMU_REGRESSION(m1,m2,m3,m4) iv1 = LAG(dr,1) iv2 = LAG(dr,2) iv3 = LAG(gy,1) iv4 = LAG(gy,2) iv5 = LAG(g,1) iv6 = LAG(g,2) iv7 = LAG(gc,1) iv8 = LAG(gc,2) iv9 = LAG(dj,1) iv10 = LAG(dj,2) iv11 = LAG(d,1) iv12 = LAG(d,2) instruments = same_date_Range(iv1,iv2,iv3,iv4,iv5,iv6,iv7,iv8,iv9,iv10,iv11,iv12) three = THREE_STAGE_REGRESSION(system,instruments) quad = REGRESSION(LIST(dj,dc,dc2,dr,gy,ldj)) debt_chart = SET_TITLE(LINE_CHART(debt),"Federal Debt as a Percentage of GDP") interest_chart = SET_TITLE(LINE_CHART(j),"Federal Interest Payments Relative to GDP") rate_chart = SET_TITLE(LINE_CHART(r),"10-Year Treasury Yield") growth_chart = SET_TITLE(LINE_CHART(gy),"Quarterly Real GDP Growth") investment_chart = SET_TITLE(LINE_CHART(g),"Real Private Investment Growth") consumption_chart = SET_TITLE(LINE_CHART(gc),"Real Consumption Growth") debt_scatter = POLY_SCATTER(d,dj,2) intro = TEXT_SLIDE("Federal Debt, Interest Rates, and Economic Growth","A dynamic four-equation model of investment, consumption, growth, and federal interest costs.") method = TEXT_SLIDE("Econometric Method","Instrument projections followed by SUR/FGLS with Bartlett-kernel system HAC inference; a 3SLS approximation, not textbook 3SLS.") conclusion = TEXT_SLIDE("Conclusions","A significant positive quadratic term suggests curvature, while interest-payment changes exhibit persistence. These conditional associations are not causal proof of a debt threshold.") SLIDESHOW(intro,debt_chart,interest_chart,rate_chart,growth_chart,investment_chart,consumption_chart,method,three,quad,debt_scatter,conclusion)