*---------------------------------------------------------------- * GraphHistoricalAggregates.prg * * This sample program graphs historical monetary aggregates data. * r.g.anderson October 2005 * * *----------------------------------------------------------------- cal 1929 1 12 all 0 1961:1 open data m1sa.xls data(format=xls,org=obs) 1929:1 1961:1 cursa m1sa close data open data m2sa.xls data(format=xls,org=obs) 1948:1 1961:1 m2sa m3sa close data * Diagnostic Graphs * M1 smpl 1929:1 1961:1 spgraph(header="Historical M1",sub="Jan 1929 to Jan 1961, monthly, SA",vfields=3) set ln_m1 / = log(m1sa) graph(header="Level (left) and Log Level (right)",klabel=|| 'M1', 'ln(M1)' ||,overlay=line,sub="billions of dollars, SA",key=upleft) 2 # m1sa # ln_m1 set g_m1 / = ((m1sa/m1sa{1})-1.0)*1200 graph(header="Growth Rate",sub="percent change, monthly, annual rate") 1 # g_m1 1929:2 1961:1 graph(header="Growth Rate (truncated)",sub="percent change, monthly, annual rate",min=-10,max=+10) 1 # g_m1 1929:2 1961:1 spgraph(done) * Currency smpl 1929:1 1961:1 spgraph(header="Historical Currency",sub="Jan 1929 to Jan 1961, monthly, SA",vfields=3) set ln_cur / = log(cursa) graph(header="Level (left) and Log Level (right)",klabel=|| 'Currency', 'ln(Cur)' ||,overlay=line,sub="billions of dollars, SA",key=upleft) 2 # cursa # ln_cur set g_cur / = ((cursa/cursa{1})-1.0)*1200 graph(header="Growth Rate",sub="percent change, monthly, annual rate") 1 # g_cur graph(header="Growth Rate (truncated)",sub="percent change, monthly, annual rate",min=-10,max=10) 1 # g_cur spgraph(done) * M2 smpl 1948:1 1961:1 spgraph(header="Historical M2",sub="Jan 1948 to Jan 1961, monthly, SA",vfields=3) set ln_m2 / = log(m2sa) graph(header="Level (left) and Log Level (right)",klabel=|| 'M2', 'ln(M2)' ||,overlay=line,sub="billions of dollars, SA",key=upleft) 2 # m2sa # ln_m2 set g_m2 / = ((m2sa/m2sa{1})-1.0)*1200 graph(header="Growth Rate",sub="percent change, monthly, annual rate",min=-20,max=20) 1 # g_cur graph(header="Growth Rate (truncated)",sub="percent change, monthly, annual rate",min=-10,max=10) 1 # g_cur spgraph(done) * M3 smpl 1948:1 1961:1 spgraph(header="Historical M3",sub="Jan 1948 to Jan 1961, monthly, SA",vfields=3) set ln_m3 / = log(m3sa) graph(header="Level (left) and Log Level (right)",klabel=|| 'M3', 'ln(M3)' ||,overlay=line,sub="billions of dollars, SA",key=upleft) 2 # m3sa # ln_m3 set g_m3 / = ((m3sa/m3sa{1})-1.0)*1200 graph(header="Growth Rate",sub="percent change, monthly, annual rate") 1 # g_cur graph(header="Growth Rate (truncated)",sub="percent change, monthly, annual rate",min=-10,max=10) 1 # g_cur spgraph(done)