* * Graph examples from page 18 * calendar(m) 1926 * * The IBM data are log returns, the two others are simple. All are in * decimals (not percentages). * open data ch01_ibmvwewsp_m(26-03).txt data(format=free,org=columns) 1926:1 2003:12 date ibmsmp vwsmp ewsmp spsmp * * Create the log or simple returns from the ones we have * set ibmlog = log(1+ibmsmp) set ewlog = log(1+ewsmp) set vwlog = log(1+vwsmp) * * This uses the SPGRAPH instruction to stack the simple and log returns into * separate panes on a single graph. * spgraph(vfields=2,footer="Figure 1.2 Monthly Returns of IBM Stock") graph(vlabel="s-rtn") # ibmsmp graph(vlabel="l-rtn") # ibmlog spgraph(done) * spgraph(vfields=2,footer="Figure 1.3 Monthly Returns of Value-Weighted Index") graph(vlabel="s-rtn") # vwsmp graph(vlabel="l-rtn") # vwlog spgraph(done)