*********************************************************************************************** * Program: density2.prg * * * * Article: "Retail Sweep Programs and Bank Reserves" * * Federal Reserve Bank of St. Louis Review * * * * Author: Richard G. Anderson and Robert A. Rasche * * * * Issue: January / February 2001 * * * * All micro-banking data used in the article are confidential. For this reason, the * * data used in this program are not available to the public. * * * * * * Purpose: * * * * Scatter and distribution plots of the ratio of monetary base to net transactions * * before the first sweep and after the last sweep for which there was a change in eb status. * * * * Inputs frb_bal_ratio.prn which is generated by selecting banks that changed ebound status * * (from ebound to enonbound) after implementing a sweep program * * * * * *********************************************************************************************** *[section for Eb -> Enb banks] compute numbanks = 1231 compute nBanks = 458 all nBanks declare integer numbanks nBanks imatrix declare real vax vax3 ;* vertical axis scale for charts is vax declare vector[string] varlabs(2) declare string labls compute vax=0.0 compute vax3=0.0 compute varlabs(1) = 'Before Sweep' compute varlabs(2) = 'After + N' write varlabs * The procedures kernel.src and kernelNoPlot.src were written by Norman Morin * and revised by Tom Doan to speed up calculations. This procedures are available * through Estima's web site scratch(matrix=density_matrix) 52 1 nbanks imatrix source kernel.src source kernelNoPlot.src open data densityEbEnb.prn read(unit=data) density_matrix close data set entity / = (imatrix+1){0}; print / entity set before_frb_bal_ratio / = (imatrix+2){0} set after_frb_bal_ratio / = (imatrix+3){0} set after_5_frb_bal_ratio / = (imatrix+4){0} set after_10_frb_bal_ratio / = (imatrix+5){0} set after_15_frb_bal_ratio / = (imatrix+6){0} set after_20_frb_bal_ratio / = (imatrix+7){0} set after_25_frb_bal_ratio / = (imatrix+8){0} set before_vc_ratio / = (imatrix+9){0} set after_vc_ratio / = (imatrix+10){0} set after_5_vc_ratio / = (imatrix+11){0} set after_10_vc_ratio / = (imatrix+12){0} set after_15_vc_ratio / = (imatrix+13){0} set after_20_vc_ratio / = (imatrix+14){0} set after_25_vc_ratio / = (imatrix+15){0} set before_resb_ratio / = (imatrix+16){0} set after_resb_ratio / = (imatrix+17){0} set after_5_resb_ratio / = (imatrix+18){0} set after_10_resb_ratio / = (imatrix+19){0} set after_15_resb_ratio / = (imatrix+20){0} set after_20_resb_ratio / = (imatrix+21){0} set after_25_resb_ratio / = (imatrix+22){0} set before_clearb_ratio / = (imatrix+23){0} set after_clearb_ratio / = (imatrix+24){0} set after_5_clearb_ratio / = (imatrix+25){0} set after_10_clearb_ratio / = (imatrix+26){0} set after_15_clearb_ratio / = (imatrix+27){0} set after_20_clearb_ratio / = (imatrix+28){0} set after_25_clearb_ratio / = (imatrix+29){0} set before_rrb_ratio / = (imatrix+30){0} set after_rrb_ratio / = (imatrix+31){0} set after_5_rrb_ratio / = (imatrix+32){0} set after_10_rrb_ratio / = (imatrix+33){0} set after_15_rrb_ratio / = (imatrix+34){0} set after_20_rrb_ratio / = (imatrix+35){0} set after_25_rrb_ratio / = (imatrix+36){0} set before_stl_er_ratio / = (imatrix+37){0} set after_stl_er_ratio / = (imatrix+38){0} set after_5_stl_er_ratio / = (imatrix+39){0} set after_10_stl_er_ratio / = (imatrix+40){0} set after_15_stl_er_ratio / = (imatrix+41){0} set after_20_stl_er_ratio / = (imatrix+42){0} set after_25_stl_er_ratio / = (imatrix+43){0} set before_bog_er_ratio / = (imatrix+44){0} set after_bog_er_ratio / = (imatrix+45){0} set after_5_bog_er_ratio / = (imatrix+46){0} set after_10_bog_er_ratio / = (imatrix+47){0} set after_15_bog_er_ratio / = (imatrix+48){0} set after_20_bog_er_ratio / = (imatrix+49){0} set after_25_bog_er_ratio / = (imatrix+50){0} set ebchange / = (imatrix+51){0} print / set line_45 1 1 = 0.0 set line_45 2 nBanks = line_45(t-1)+0.005 ******************************************************************************************** * To add distribution and scatter plots: * * 1. Set nPages to the number of pairs of before and after sweeps series. * 2. Add and edit a block like the following: * * set PlotSeries(i,1) / = mbnt1b * set PlotSeries(i,2) / = mbnt1a * compute PlotLabels(i,1) = "Base Money/(Reported Net Trans + Sweeps) by Bank" * compute PlotLabels(i,2) = " " * * - i is the appropriate plot number. * - PlotSeries(i,1) is the before 1st sweep series. * - PlotSeries(i,2) is the after last sweep series. * - PlotLabels(i,1) is the plot header string. * - PlotLabels(i,2) is the plot subheader string. * ******************************************************************************************** compute nPages = 42 declare rect[series] PlotSeries(nPages,2) declare rect[string] PlotLabels(nPages,2) set PlotSeries(1,1) / = after_frb_bal_ratio set PlotSeries(1,2) / = before_frb_bal_ratio compute PlotLabels(1,1) = "Figure 7: Deposits at the Federal Reserve/(Reported Net Trans + Sweeps)" compute PlotLabels(1,2) = "Banks EBound Before to Enonbound After Sweep" set PlotSeries(2,1) / = after_frb_bal_ratio set PlotSeries(2,2) / = after_5_frb_bal_ratio compute PlotLabels(2,1) = "(Base Money - Vault Cash)/(Reported Net Trans + Sweeps)" compute PlotLabels(2,2) = "Banks Ebound -> Enonbound -- N = 5" set PlotSeries(3,1) / = after_frb_bal_ratio set PlotSeries(3,2) / = after_10_frb_bal_ratio compute PlotLabels(3,1) = "(Base Money - Vault Cash)/(Reported Net Trans + Sweeps)" compute PlotLabels(3,2) = "Banks Ebound -> Enonbound -- N = 10" set PlotSeries(4,1) / = after_frb_bal_ratio set PlotSeries(4,2) / = after_15_frb_bal_ratio compute PlotLabels(4,1) = "(Base Money - Vault Cash)/(Reported Net Trans + Sweeps)" compute PlotLabels(4,2) = "Banks Ebound -> Enonbound -- N = 15" set PlotSeries(5,1) / = after_frb_bal_ratio set PlotSeries(5,2) / = after_20_frb_bal_ratio compute PlotLabels(5,1) = "(Base Money - Vault Cash)/(Reported Net Trans + Sweeps)" compute PlotLabels(5,2) = "Banks Ebound -> Enonbound -- N = 20" set PlotSeries(6,1) / = after_frb_bal_ratio set PlotSeries(6,2) / = after_25_frb_bal_ratio compute PlotLabels(6,1) = "(Base Money - Vault Cash)/(Reported Net Trans + Sweeps)" compute PlotLabels(6,2) = "Banks Ebound -> Enonbound -- N = 25" set PlotSeries(7,1) / = after_vc_ratio set PlotSeries(7,2) / = before_vc_ratio compute PlotLabels(7,1) = "Figure 6: Vault Cash/(Reported Net Trans + Sweeps)" compute PlotLabels(7,2) = "Banks Ebound Before to Enonbound After Sweep" set PlotSeries(8,1) / = after_vc_ratio set PlotSeries(8,2) / = after_5_vc_ratio compute PlotLabels(8,1) = "Vault Cash/(Reported Net Trans + Sweeps)" compute PlotLabels(8,2) = "Banks Ebound -> Enonbound -- N = 5" set PlotSeries(9,1) / = after_vc_ratio set PlotSeries(9,2) / = after_10_vc_ratio compute PlotLabels(9,1) = "Vault Cash/(Reported Net Trans + Sweeps)" compute PlotLabels(9,2) = "Banks Ebound -> Enonbound -- N = 10" set PlotSeries(10,1) / = after_vc_ratio set PlotSeries(10,2) / = after_15_vc_ratio compute PlotLabels(10,1) = "Vault Cash/(Reported Net Trans + Sweeps)" compute PlotLabels(10,2) = "Banks Ebound -> Enonbound -- N = 15" set PlotSeries(11,1) / = after_vc_ratio set PlotSeries(11,2) / = after_20_vc_ratio compute PlotLabels(11,1) = "Vault Cash/(Reported Net Trans + Sweeps)" compute PlotLabels(11,2) = "Banks Ebound -> Enonbound -- N = 20" set PlotSeries(12,1) / = after_vc_ratio set PlotSeries(12,2) / = after_25_vc_ratio compute PlotLabels(12,1) = "Vault Cash/(Reported Net Trans + Sweeps)" compute PlotLabels(12,2) = "Banks Ebound -> Enonbound -- N = 25" set PlotSeries(13,1) / = after_resb_ratio set PlotSeries(13,2) / = before_resb_ratio compute PlotLabels(13,1) = "(Base Money - Vault Cash - Clearing Bal)/(Reported Net Trans + Sweeps)" compute PlotLabels(13,2) = "Banks Ebound -> After vs. Before" set PlotSeries(14,1) / = after_resb_ratio set PlotSeries(14,2) / = after_5_resb_ratio compute PlotLabels(14,1) = "(Base Money - Vault Cash - Clearing Bal)/(Reported Net Trans + Sweeps)" compute PlotLabels(14,2) = "Banks Ebound -> Enonbound -- N = 5" set PlotSeries(15,1) / = after_resb_ratio set PlotSeries(15,2) / = after_10_resb_ratio compute PlotLabels(15,1) = "(Base Money - Vault Cash - Clearing Bal)/(Reported Net Trans + Sweeps)" compute PlotLabels(15,2) = "Banks Ebound -> Enonbound -- N = 10" set PlotSeries(16,1) / = after_resb_ratio set PlotSeries(16,2) / = after_15_resb_ratio compute PlotLabels(16,1) = "(Base Money - Vault Cash - Clearing Bal)/(Reported Net Trans + Sweeps)" compute PlotLabels(16,2) = "Banks Ebound -> Enonbound -- N = 15" set PlotSeries(17,1) / = after_resb_ratio set PlotSeries(17,2) / = after_20_resb_ratio compute PlotLabels(17,1) = "(Base Money - Vault Cash - Clearing Bal)/(Reported Net Trans + Sweeps)" compute PlotLabels(17,2) = "Banks Ebound -> Enonbound -- N = 20" set PlotSeries(18,1) / = after_resb_ratio set PlotSeries(18,2) / = after_25_resb_ratio compute PlotLabels(18,1) = "(Base Money - Vault Cash - Clearing Bal)/(Reported Net Trans + Sweeps)" compute PlotLabels(18,2) = "Banks Ebound -> Enonbound -- N = 25" set PlotSeries(19,1) / = after_clearb_ratio set PlotSeries(19,2) / = before_clearb_ratio compute PlotLabels(19,1) = "Clearing Balances/(Reported Net Trans + Sweeps)" compute PlotLabels(19,2) = "Banks Ebound -> After vs. Before" set PlotSeries(20,1) / = after_clearb_ratio set PlotSeries(20,2) / = after_5_clearb_ratio compute PlotLabels(20,1) = "Clearing Balances/(Reported Net Trans + Sweeps)" compute PlotLabels(20,2) = "Banks Ebound -> Enonbound -- N = 5" set PlotSeries(21,1) / = after_clearb_ratio set PlotSeries(21,2) / = after_10_clearb_ratio compute PlotLabels(21,1) = "Clearing Balances/(Reported Net Trans + Sweeps)" compute PlotLabels(21,2) = "Banks Ebound -> Enonbound -- N = 10" set PlotSeries(22,1) / = after_clearb_ratio set PlotSeries(22,2) / = after_15_clearb_ratio compute PlotLabels(22,1) = "Clearing Balances/(Reported Net Trans + Sweeps)" compute PlotLabels(22,2) = "Banks Ebound -> Enonbound -- N = 15" set PlotSeries(23,1) / = after_clearb_ratio set PlotSeries(23,2) / = after_20_clearb_ratio compute PlotLabels(23,1) = "Clearing Balances/(Reported Net Trans + Sweeps)" compute PlotLabels(23,2) = "Banks Ebound -> Enonbound -- N = 20" set PlotSeries(24,1) / = after_clearb_ratio set PlotSeries(24,2) / = after_25_clearb_ratio compute PlotLabels(24,1) = "Clearing Balances/(Reported Net Trans + Sweeps)" compute PlotLabels(24,2) = "Banks Ebound -> Enonbound -- N = 25" set PlotSeries(25,1) / = after_rrb_ratio set PlotSeries(25,2) / = before_rrb_ratio compute PlotLabels(25,1) = "(RR - AVC)/(Reported Net Trans + Sweeps)" compute PlotLabels(25,2) = "Banks Ebound -> After vs. Before" set PlotSeries(26,1) / = after_rrb_ratio set PlotSeries(26,2) / = after_5_rrb_ratio compute PlotLabels(26,1) = "(RR - AVC)/(Reported Net Trans + Sweeps)" compute PlotLabels(26,2) = "Banks Ebound -> Enonbound -- N = 5" set PlotSeries(27,1) / = after_rrb_ratio set PlotSeries(27,2) / = after_10_rrb_ratio compute PlotLabels(27,1) = "(RR - AVC)/(Reported Net Trans + Sweeps)" compute PlotLabels(27,2) = "Banks Ebound -> Enonbound -- N = 10" set PlotSeries(28,1) / = after_rrb_ratio set PlotSeries(28,2) / = after_15_rrb_ratio compute PlotLabels(28,1) = "(RR - AVC)/(Reported Net Trans + Sweeps)" compute PlotLabels(28,2) = "Banks Ebound -> Enonbound -- N = 15" set PlotSeries(29,1) / = after_rrb_ratio set PlotSeries(29,2) / = after_20_rrb_ratio compute PlotLabels(29,1) = "(RR - AVC)/(Reported Net Trans + Sweeps)" compute PlotLabels(29,2) = "Banks Ebound -> Enonbound -- N = 20" set PlotSeries(30,1) / = after_rrb_ratio set PlotSeries(30,2) / = after_25_rrb_ratio compute PlotLabels(30,1) = "(RR - AVC)/(Reported Net Trans + Sweeps)" compute PlotLabels(30,2) = "Banks Ebound -> Enonbound -- N = 25" set PlotSeries(31,1) / = after_stl_er_ratio set PlotSeries(31,2) / = before_stl_er_ratio compute PlotLabels(31,1) = "(RB - RRB)-> STL ER /(Reported Net Trans + Sweeps)" compute PlotLabels(31,2) = "Banks Ebound -> After vs. Before" set PlotSeries(32,1) / = after_stl_er_ratio set PlotSeries(32,2) / = after_5_stl_er_ratio compute PlotLabels(32,1) = "(RB - RRB)-> STL ER/(Reported Net Trans + Sweeps)" compute PlotLabels(32,2) = "Banks Ebound -> Enonbound -- N = 5" set PlotSeries(33,1) / = after_stl_er_ratio set PlotSeries(33,2) / = after_10_stl_er_ratio compute PlotLabels(33,1) = "(RB - RRB)-> STL ER/(Reported Net Trans + Sweeps)" compute PlotLabels(33,2) = "Banks Ebound -> Enonbound -- N = 10" set PlotSeries(34,1) / = after_stl_er_ratio set PlotSeries(34,2) / = after_15_stl_er_ratio compute PlotLabels(34,1) = "(RB - RRB)-> STL ER/(Reported Net Trans + Sweeps)" compute PlotLabels(34,2) = "Banks Ebound -> Enonbound -- N = 15" set PlotSeries(35,1) / = after_stl_er_ratio set PlotSeries(35,2) / = after_20_stl_er_ratio compute PlotLabels(35,1) = "(RB - RRB)-> STL ER/(Reported Net Trans + Sweeps)" compute PlotLabels(35,2) = "Banks Ebound -> Enonbound -- N = 20" set PlotSeries(36,1) / = after_stl_er_ratio set PlotSeries(36,2) / = after_25_stl_er_ratio compute PlotLabels(36,1) = "(RB - RRB)-> STL ER/(Reported Net Trans + Sweeps)" compute PlotLabels(36,2) = "Banks Ebound -> Enonbound -- N = 25" set PlotSeries(37,1) / = after_bog_er_ratio set PlotSeries(37,2) / = before_bog_er_ratio compute PlotLabels(37,1) = "ER->BOG/(Reported Net Trans + Sweeps)" compute PlotLabels(37,2) = "Banks Ebound -> After vs. Before" set PlotSeries(38,1) / = after_bog_er_ratio set PlotSeries(38,2) / = after_5_bog_er_ratio compute PlotLabels(38,1) = "ER->BOG/(Reported Net Trans + Sweeps)" compute PlotLabels(38,2) = "Banks Ebound -> Enonbound -- N = 5" set PlotSeries(39,1) / = after_bog_er_ratio set PlotSeries(39,2) / = after_10_bog_er_ratio compute PlotLabels(39,1) = "ER->BOG/(Reported Net Trans + Sweeps)" compute PlotLabels(39,2) = "Banks Ebound -> Enonbound -- N = 10" set PlotSeries(40,1) / = after_bog_er_ratio set PlotSeries(40,2) / = after_15_bog_er_ratio compute PlotLabels(40,1) = "ER->BOG/(Reported Net Trans + Sweeps)" compute PlotLabels(40,2) = "Banks Ebound -> Enonbound -- N = 15" set PlotSeries(41,1) / = after_bog_er_ratio set PlotSeries(41,2) / = after_20_bog_er_ratio compute PlotLabels(41,1) = "ER->BOG/(Reported Net Trans + Sweeps)" compute PlotLabels(41,2) = "Banks Ebound -> Enonbound -- N = 20" set PlotSeries(42,1) / = after_bog_er_ratio set PlotSeries(42,2) / = after_25_bog_er_ratio compute PlotLabels(42,1) = "(ER->BOG)/(Reported Net Trans + Sweeps)" compute PlotLabels(42,2) = "Banks Ebound -> Enonbound -- N = 25" dofor i =1 7 if (i < 7) { compute vax=0.6 compute vax3=0.6 } if ((i > 6) .and. (i < 13)) ;* scale for vc_ratio { compute vax=0.5 compute vax3=0.5 } if (i > 12) .and. (i < 19) ;* scale for res_bal_ratio { compute vax=0.7 compute vax3=0.7 } if (i > 18) .and. (i < 31) ;* scale for clear_bal_ratio { compute vax= 0.9 compute vax3= 0.9 } if (i > 30) .and. (i < 43) ;* scale for clear_bal_ratio { compute vax=0.7 compute vax3=0.9 } if (i == 1) .or. (i==7) .or. (i==13) .or. (i==19) .or. (i==25) .or. (i==31) .or. (i==37) compute labls = varlabs(1) if (i != 1) .and. (i!=7) .and. (i!=13) .and. (i!=19) .and. (i!=25) .and. (i!=31) .and. (i!=37) compute labls = varlabs(2) display labls display i display '---------------------------------------------------------------------' display PlotLabels(i,1) display PlotLabels(i,2) display 'After Sweep' @kernelNoPlot(NGRAPH) PlotSeries(i,1) 1 nBanks x1 y1 x1n01 y1n01 stat PlotSeries(i,1) set x3 / = x1*sqrt(%variance)+%mean display '---------------------------------------------------------------------' label y1 y1n01 # 'After Sweep' 'Normal(0,1)' display '---------------------------------------------------------------------' display PlotLabels(i,1) display PlotLabels(i,2) display 'before sweep' @kernelNoPlot(NGRAPH) PlotSeries(i,2) 1 nBanks x2 y2 x2n01 y2n01 stat PlotSeries(i,2) set x4 / = x2*sqrt(%variance)+%mean display '---------------------------------------------------------------------' label y2 y2n01 # labls 'Normal(0,1)' stat(fractiles) PlotSeries(i,1) 1 nBanks GRPARM HEADER 20 spgraph(vfields=2,hfields=2,header=PlotLabels(i,1),sub=PlotLabels(i,2)+', Obs ='+%string(%nobs)) scatter(key=below,style=Lines,hlabel="Normalized Value",vlabel="Density", \$ hmin=-4.00,hmax=4.00,vmin=0.00,vmax=vax) 2 # x1 y1 1 nBanks # x1n01 y1n01 1 nBanks scatter(key=below,style=LINES,hlabel="Normalized Value",vlabel="Density", \$ hmin=-4.00,hmax=4.00,vmin=0.00,vmax=vax) 2 # x2 y2 1 nBanks # x2n01 y2n01 1 nBanks scatter(key=below,style=lines,hlabel="Value",vlabel="Density",hmin=0.0,hmax=0.14 \$ ,vmin=0.00,vmax=vax) 2 # x3 y1 1 nBanks # x4 y2 1 nBanks scatter(style=symbols,hlabel='After Sweep',vlabel=labls, \$ hmin=0.00,vmin=0.00,hmax=0.15,vmax=0.15) 2 # PlotSeries(i,1) PlotSeries(i,2) 1 nBanks # line_45 line_45 1 nBanks spgraph(done) end do display 'Done' ************************************************************** *[section for Eb -> Eb banks] end 1 compute nBanks = 155 compute numbanks = 1231 all nBanks declare integer numbanks nBanks imatrix declare real vax vax3 ;* vertical axis scale for charts is vax declare vector[string] varlabs(2) declare string labls compute vax=0.0 compute vax3=0.0 compute varlabs(1) = 'Before Sweep' compute varlabs(2) = 'After + N' write varlabs scratch(matrix=density_matrix) 52 1 nbanks imatrix source kernel.src source kernelNoPlot.src open data densityEbEb.prn read(unit=data) density_matrix close data set entity / = (imatrix+1){0}; print / entity set before_frb_bal_ratio / = (imatrix+2){0} set after_frb_bal_ratio / = (imatrix+3){0} set after_5_frb_bal_ratio / = (imatrix+4){0} set after_10_frb_bal_ratio / = (imatrix+5){0} set after_15_frb_bal_ratio / = (imatrix+6){0} set after_20_frb_bal_ratio / = (imatrix+7){0} set after_25_frb_bal_ratio / = (imatrix+8){0} set before_vc_ratio / = (imatrix+9){0} set after_vc_ratio / = (imatrix+10){0} set after_5_vc_ratio / = (imatrix+11){0} set after_10_vc_ratio / = (imatrix+12){0} set after_15_vc_ratio / = (imatrix+13){0} set after_20_vc_ratio / = (imatrix+14){0} set after_25_vc_ratio / = (imatrix+15){0} set before_resb_ratio / = (imatrix+16){0} set after_resb_ratio / = (imatrix+17){0} set after_5_resb_ratio / = (imatrix+18){0} set after_10_resb_ratio / = (imatrix+19){0} set after_15_resb_ratio / = (imatrix+20){0} set after_20_resb_ratio / = (imatrix+21){0} set after_25_resb_ratio / = (imatrix+22){0} set before_clearb_ratio / = (imatrix+23){0} set after_clearb_ratio / = (imatrix+24){0} set after_5_clearb_ratio / = (imatrix+25){0} set after_10_clearb_ratio / = (imatrix+26){0} set after_15_clearb_ratio / = (imatrix+27){0} set after_20_clearb_ratio / = (imatrix+28){0} set after_25_clearb_ratio / = (imatrix+29){0} set before_rrb_ratio / = (imatrix+30){0} set after_rrb_ratio / = (imatrix+31){0} set after_5_rrb_ratio / = (imatrix+32){0} set after_10_rrb_ratio / = (imatrix+33){0} set after_15_rrb_ratio / = (imatrix+34){0} set after_20_rrb_ratio / = (imatrix+35){0} set after_25_rrb_ratio / = (imatrix+36){0} set before_stl_er_ratio / = (imatrix+37){0} set after_stl_er_ratio / = (imatrix+38){0} set after_5_stl_er_ratio / = (imatrix+39){0} set after_10_stl_er_ratio / = (imatrix+40){0} set after_15_stl_er_ratio / = (imatrix+41){0} set after_20_stl_er_ratio / = (imatrix+42){0} set after_25_stl_er_ratio / = (imatrix+43){0} set before_bog_er_ratio / = (imatrix+44){0} set after_bog_er_ratio / = (imatrix+45){0} set after_5_bog_er_ratio / = (imatrix+46){0} set after_10_bog_er_ratio / = (imatrix+47){0} set after_15_bog_er_ratio / = (imatrix+48){0} set after_20_bog_er_ratio / = (imatrix+49){0} set after_25_bog_er_ratio / = (imatrix+50){0} set ebchange / = (imatrix+51){0} print / set line_45 1 1 = 0.0 set line_45 2 nBanks = line_45(t-1)+0.005 ******************************************************************************************** * To add distribution and scatter plots: * * 1. Set nPages to the number of pairs of before and after sweeps series. * 2. Add and edit a block like the following: * * set PlotSeries(i,1) / = mbnt1b * set PlotSeries(i,2) / = mbnt1a * compute PlotLabels(i,1) = "Base Money/(Reported Net Trans + Sweeps) by Bank" * compute PlotLabels(i,2) = " " * * - i is the appropriate plot number. * - PlotSeries(i,1) is the before 1st sweep series. * - PlotSeries(i,2) is the after last sweep series. * - PlotLabels(i,1) is the plot header string. * - PlotLabels(i,2) is the plot subheader string. * ******************************************************************************************** compute nPages = 42 declare rect[series] PlotSeries(nPages,2) declare rect[string] PlotLabels(nPages,2) set PlotSeries(1,1) / = after_frb_bal_ratio set PlotSeries(1,2) / = before_frb_bal_ratio compute PlotLabels(1,1) = "Figure 9: Deposits at the Federal Reserve/(Reported Net Trans + Sweeps)" compute PlotLabels(1,2) = "Banks Ebound Before and After Sweep" set PlotSeries(2,1) / = after_frb_bal_ratio set PlotSeries(2,2) / = after_5_frb_bal_ratio compute PlotLabels(2,1) = "(Base Money - Vault Cash)/(Reported Net Trans + Sweeps)" compute PlotLabels(2,2) = "Banks Ebound -> Enonbound -- N = 5" set PlotSeries(3,1) / = after_frb_bal_ratio set PlotSeries(3,2) / = after_10_frb_bal_ratio compute PlotLabels(3,1) = "(Base Money - Vault Cash)/(Reported Net Trans + Sweeps)" compute PlotLabels(3,2) = "Banks Ebound -> Enonbound -- N = 10" set PlotSeries(4,1) / = after_frb_bal_ratio set PlotSeries(4,2) / = after_15_frb_bal_ratio compute PlotLabels(4,1) = "(Base Money - Vault Cash)/(Reported Net Trans + Sweeps)" compute PlotLabels(4,2) = "Banks Ebound -> Enonbound -- N = 15" set PlotSeries(5,1) / = after_frb_bal_ratio set PlotSeries(5,2) / = after_20_frb_bal_ratio compute PlotLabels(5,1) = "(Base Money - Vault Cash)/(Reported Net Trans + Sweeps)" compute PlotLabels(5,2) = "Banks Ebound -> Enonbound -- N = 20" set PlotSeries(6,1) / = after_frb_bal_ratio set PlotSeries(6,2) / = after_25_frb_bal_ratio compute PlotLabels(6,1) = "(Base Money - Vault Cash)/(Reported Net Trans + Sweeps)" compute PlotLabels(6,2) = "Banks Ebound -> Enonbound -- N = 25" set PlotSeries(7,1) / = after_vc_ratio set PlotSeries(7,2) / = before_vc_ratio compute PlotLabels(7,1) = "Figure 8: Vault Cash/(Reported Net Trans + Sweeps)" compute PlotLabels(7,2) = "Banks Ebound Before and After Sweep" set PlotSeries(8,1) / = after_vc_ratio set PlotSeries(8,2) / = after_5_vc_ratio compute PlotLabels(8,1) = "Vault Cash/(Reported Net Trans + Sweeps)" compute PlotLabels(8,2) = "Banks Ebound -> Enonbound -- N = 5" set PlotSeries(9,1) / = after_vc_ratio set PlotSeries(9,2) / = after_10_vc_ratio compute PlotLabels(9,1) = "Vault Cash/(Reported Net Trans + Sweeps)" compute PlotLabels(9,2) = "Banks Ebound -> Enonbound -- N = 10" set PlotSeries(10,1) / = after_vc_ratio set PlotSeries(10,2) / = after_15_vc_ratio compute PlotLabels(10,1) = "Vault Cash/(Reported Net Trans + Sweeps)" compute PlotLabels(10,2) = "Banks Ebound -> Enonbound -- N = 15" set PlotSeries(11,1) / = after_vc_ratio set PlotSeries(11,2) / = after_20_vc_ratio compute PlotLabels(11,1) = "Vault Cash/(Reported Net Trans + Sweeps)" compute PlotLabels(11,2) = "Banks Ebound -> Enonbound -- N = 20" set PlotSeries(12,1) / = after_vc_ratio set PlotSeries(12,2) / = after_25_vc_ratio compute PlotLabels(12,1) = "Vault Cash/(Reported Net Trans + Sweeps)" compute PlotLabels(12,2) = "Banks Ebound -> Enonbound -- N = 25" set PlotSeries(13,1) / = after_resb_ratio set PlotSeries(13,2) / = before_resb_ratio compute PlotLabels(13,1) = "(Base Money - Vault Cash - Clearing Bal)/(Reported Net Trans + Sweeps)" compute PlotLabels(13,2) = "Banks Ebound -> After vs. Before" set PlotSeries(14,1) / = after_resb_ratio set PlotSeries(14,2) / = after_5_resb_ratio compute PlotLabels(14,1) = "(Base Money - Vault Cash - Clearing Bal)/(Reported Net Trans + Sweeps)" compute PlotLabels(14,2) = "Banks Ebound -> Enonbound -- N = 5" set PlotSeries(15,1) / = after_resb_ratio set PlotSeries(15,2) / = after_10_resb_ratio compute PlotLabels(15,1) = "(Base Money - Vault Cash - Clearing Bal)/(Reported Net Trans + Sweeps)" compute PlotLabels(15,2) = "Banks Ebound -> Enonbound -- N = 10" set PlotSeries(16,1) / = after_resb_ratio set PlotSeries(16,2) / = after_15_resb_ratio compute PlotLabels(16,1) = "(Base Money - Vault Cash - Clearing Bal)/(Reported Net Trans + Sweeps)" compute PlotLabels(16,2) = "Banks Ebound -> Enonbound -- N = 15" set PlotSeries(17,1) / = after_resb_ratio set PlotSeries(17,2) / = after_20_resb_ratio compute PlotLabels(17,1) = "(Base Money - Vault Cash - Clearing Bal)/(Reported Net Trans + Sweeps)" compute PlotLabels(17,2) = "Banks Ebound -> Enonbound -- N = 20" set PlotSeries(18,1) / = after_resb_ratio set PlotSeries(18,2) / = after_25_resb_ratio compute PlotLabels(18,1) = "(Base Money - Vault Cash - Clearing Bal)/(Reported Net Trans + Sweeps)" compute PlotLabels(18,2) = "Banks Ebound -> Enonbound -- N = 25" set PlotSeries(19,1) / = after_clearb_ratio set PlotSeries(19,2) / = before_clearb_ratio compute PlotLabels(19,1) = "Clearing Balances/(Reported Net Trans + Sweeps)" compute PlotLabels(19,2) = "Banks Ebound -> After vs. Before" set PlotSeries(20,1) / = after_clearb_ratio set PlotSeries(20,2) / = after_5_clearb_ratio compute PlotLabels(20,1) = "Clearing Balances/(Reported Net Trans + Sweeps)" compute PlotLabels(20,2) = "Banks Ebound -> Enonbound -- N = 5" set PlotSeries(21,1) / = after_clearb_ratio set PlotSeries(21,2) / = after_10_clearb_ratio compute PlotLabels(21,1) = "Clearing Balances/(Reported Net Trans + Sweeps)" compute PlotLabels(21,2) = "Banks Ebound -> Enonbound -- N = 10" set PlotSeries(22,1) / = after_clearb_ratio set PlotSeries(22,2) / = after_15_clearb_ratio compute PlotLabels(22,1) = "Clearing Balances/(Reported Net Trans + Sweeps)" compute PlotLabels(22,2) = "Banks Ebound -> Enonbound -- N = 15" set PlotSeries(23,1) / = after_clearb_ratio set PlotSeries(23,2) / = after_20_clearb_ratio compute PlotLabels(23,1) = "Clearing Balances/(Reported Net Trans + Sweeps)" compute PlotLabels(23,2) = "Banks Ebound -> Enonbound -- N = 20" set PlotSeries(24,1) / = after_clearb_ratio set PlotSeries(24,2) / = after_25_clearb_ratio compute PlotLabels(24,1) = "Clearing Balances/(Reported Net Trans + Sweeps)" compute PlotLabels(24,2) = "Banks Ebound -> Enonbound -- N = 25" set PlotSeries(25,1) / = after_rrb_ratio set PlotSeries(25,2) / = before_rrb_ratio compute PlotLabels(25,1) = "(RR - AVC)/(Reported Net Trans + Sweeps)" compute PlotLabels(25,2) = "Banks Ebound -> After vs. Before" set PlotSeries(26,1) / = after_rrb_ratio set PlotSeries(26,2) / = after_5_rrb_ratio compute PlotLabels(26,1) = "(RR - AVC)/(Reported Net Trans + Sweeps)" compute PlotLabels(26,2) = "Banks Ebound -> Enonbound -- N = 5" set PlotSeries(27,1) / = after_rrb_ratio set PlotSeries(27,2) / = after_10_rrb_ratio compute PlotLabels(27,1) = "(RR - AVC)/(Reported Net Trans + Sweeps)" compute PlotLabels(27,2) = "Banks Ebound -> Enonbound -- N = 10" set PlotSeries(28,1) / = after_rrb_ratio set PlotSeries(28,2) / = after_15_rrb_ratio compute PlotLabels(28,1) = "(RR - AVC)/(Reported Net Trans + Sweeps)" compute PlotLabels(28,2) = "Banks Ebound -> Enonbound -- N = 15" set PlotSeries(29,1) / = after_rrb_ratio set PlotSeries(29,2) / = after_20_rrb_ratio compute PlotLabels(29,1) = "(RR - AVC)/(Reported Net Trans + Sweeps)" compute PlotLabels(29,2) = "Banks Ebound -> Enonbound -- N = 20" set PlotSeries(30,1) / = after_rrb_ratio set PlotSeries(30,2) / = after_25_rrb_ratio compute PlotLabels(30,1) = "(RR - AVC)/(Reported Net Trans + Sweeps)" compute PlotLabels(30,2) = "Banks Ebound -> Enonbound -- N = 25" set PlotSeries(31,1) / = after_stl_er_ratio set PlotSeries(31,2) / = before_stl_er_ratio compute PlotLabels(31,1) = "(RB - RRB)-> STL ER /(Reported Net Trans + Sweeps)" compute PlotLabels(31,2) = "Banks Ebound -> After vs. Before" set PlotSeries(32,1) / = after_stl_er_ratio set PlotSeries(32,2) / = after_5_stl_er_ratio compute PlotLabels(32,1) = "(RB - RRB)-> STL ER/(Reported Net Trans + Sweeps)" compute PlotLabels(32,2) = "Banks Ebound -> Enonbound -- N = 5" set PlotSeries(33,1) / = after_stl_er_ratio set PlotSeries(33,2) / = after_10_stl_er_ratio compute PlotLabels(33,1) = "(RB - RRB)-> STL ER/(Reported Net Trans + Sweeps)" compute PlotLabels(33,2) = "Banks Ebound -> Enonbound -- N = 10" set PlotSeries(34,1) / = after_stl_er_ratio set PlotSeries(34,2) / = after_15_stl_er_ratio compute PlotLabels(34,1) = "(RB - RRB)-> STL ER/(Reported Net Trans + Sweeps)" compute PlotLabels(34,2) = "Banks Ebound -> Enonbound -- N = 15" set PlotSeries(35,1) / = after_stl_er_ratio set PlotSeries(35,2) / = after_20_stl_er_ratio compute PlotLabels(35,1) = "(RB - RRB)-> STL ER/(Reported Net Trans + Sweeps)" compute PlotLabels(35,2) = "Banks Ebound -> Enonbound -- N = 20" set PlotSeries(36,1) / = after_stl_er_ratio set PlotSeries(36,2) / = after_25_stl_er_ratio compute PlotLabels(36,1) = "(RB - RRB)-> STL ER/(Reported Net Trans + Sweeps)" compute PlotLabels(36,2) = "Banks Ebound -> Enonbound -- N = 25" set PlotSeries(37,1) / = after_bog_er_ratio set PlotSeries(37,2) / = before_bog_er_ratio compute PlotLabels(37,1) = "ER->BOG/(Reported Net Trans + Sweeps)" compute PlotLabels(37,2) = "Banks Ebound -> After vs. Before" set PlotSeries(38,1) / = after_bog_er_ratio set PlotSeries(38,2) / = after_5_bog_er_ratio compute PlotLabels(38,1) = "ER->BOG/(Reported Net Trans + Sweeps)" compute PlotLabels(38,2) = "Banks Ebound -> Enonbound -- N = 5" set PlotSeries(39,1) / = after_bog_er_ratio set PlotSeries(39,2) / = after_10_bog_er_ratio compute PlotLabels(39,1) = "ER->BOG/(Reported Net Trans + Sweeps)" compute PlotLabels(39,2) = "Banks Ebound -> Enonbound -- N = 10" set PlotSeries(40,1) / = after_bog_er_ratio set PlotSeries(40,2) / = after_15_bog_er_ratio compute PlotLabels(40,1) = "ER->BOG/(Reported Net Trans + Sweeps)" compute PlotLabels(40,2) = "Banks Ebound -> Enonbound -- N = 15" set PlotSeries(41,1) / = after_bog_er_ratio set PlotSeries(41,2) / = after_20_bog_er_ratio compute PlotLabels(41,1) = "ER->BOG/(Reported Net Trans + Sweeps)" compute PlotLabels(41,2) = "Banks Ebound -> Enonbound -- N = 20" set PlotSeries(42,1) / = after_bog_er_ratio set PlotSeries(42,2) / = after_25_bog_er_ratio compute PlotLabels(42,1) = "(ER->BOG)/(Reported Net Trans + Sweeps)" compute PlotLabels(42,2) = "Banks Ebound -> Enonbound -- N = 25" dofor i =1 7 if (i < 7) { compute vax=0.6 compute vax3=0.6 } if ((i > 6) .and. (i < 13)) ;* scale for vc_ratio { compute vax=0.5 compute vax3=0.5 } if (i > 12) .and. (i < 19) ;* scale for res_bal_ratio { compute vax=0.7 compute vax3=0.7 } if (i > 18) .and. (i < 31) ;* scale for clear_bal_ratio { compute vax= 0.9 compute vax3= 0.9 } if (i > 30) .and. (i < 43) ;* scale for clear_bal_ratio { compute vax=0.7 compute vax3=0.9 } if (i == 1) .or. (i==7) .or. (i==13) .or. (i==19) .or. (i==25) .or. (i==31) .or. (i==37) compute labls = varlabs(1) if (i != 1) .and. (i!=7) .and. (i!=13) .and. (i!=19) .and. (i!=25) .and. (i!=31) .and. (i!=37) compute labls = varlabs(2) display labls display i display '---------------------------------------------------------------------' display PlotLabels(i,1) display PlotLabels(i,2) display 'After Sweep' @kernelNoPlot(NGRAPH) PlotSeries(i,1) 1 nBanks x1 y1 x1n01 y1n01 stat PlotSeries(i,1) set x3 / = x1*sqrt(%variance)+%mean display '---------------------------------------------------------------------' label y1 y1n01 # 'After Sweep' 'Normal(0,1)' display '---------------------------------------------------------------------' display PlotLabels(i,1) display PlotLabels(i,2) display 'before sweep' @kernelNoPlot(NGRAPH) PlotSeries(i,2) 1 nBanks x2 y2 x2n01 y2n01 stat PlotSeries(i,2) set x4 / = x2*sqrt(%variance)+%mean display '---------------------------------------------------------------------' label y2 y2n01 # labls 'Normal(0,1)' stat(fractiles) PlotSeries(i,1) 1 nBanks GRPARM HEADER 20 spgraph(vfields=2,hfields=2,header=PlotLabels(i,1),sub=PlotLabels(i,2)+', Obs ='+%string(%nobs)) scatter(key=below,style=Lines,hlabel="Normalized Value",vlabel="Density", \$ hmin=-4.00,hmax=4.00,vmin=0.00,vmax=vax) 2 # x1 y1 1 nBanks # x1n01 y1n01 1 nBanks scatter(key=below,style=LINES,hlabel="Normalized Value",vlabel="Density", \$ hmin=-4.00,hmax=4.00,vmin=0.00,vmax=vax) 2 # x2 y2 1 nBanks # x2n01 y2n01 1 nBanks scatter(key=below,style=lines,hlabel="Value",vlabel="Density",hmin=0.0,hmax=0.14 \$ ,vmin=0.00,vmax=vax) 2 # x3 y1 1 nBanks # x4 y2 1 nBanks scatter(style=symbols,hlabel='After Sweep',vlabel=labls, \$ hmin=0.00,vmin=0.00,hmax=0.15,vmax=0.15) 2 # PlotSeries(i,1) PlotSeries(i,2) 1 nBanks # line_45 line_45 1 nBanks spgraph(done) end do display 'Done'