% D A T A _ U S . M % ***************** clear all close all % M A C R O E C O N O M I C D A T A S E T O F U S A %______________________________________________________ % 1 2 3 4 5 6 7 % Obs. C I R GNP G M %______________________________________________________ USAMACRO=[ 1946.25 658.1 175.4 0.375 1012.4 178.9 479.1 1946.50 669.4 168.2 0.376 1018.0 180.4 481.2 1946.75 670.0 170.2 0.724 1021.5 181.3 475.8 1947.00 668.8 197.6 0.903 1045.1 178.7 465.3 1947.25 674.6 205.0 0.987 1061.2 181.6 453.1 1947.50 681.4 210.3 0.997 1088.0 196.3 443.3 1947.75 682.9 211.5 1.039 1099.5 205.1 436.1 1948.00 688.3 206.0 1.136 1109.5 215.2 438.1 1948.25 688.7 183.2 1.161 1089.5 217.6 440.1 1948.50 696.9 160.2 1.156 1083.7 226.6 441.3 1948.75 695.3 168.3 1.021 1095.0 231.4 443.0 1949.00 700.8 163.4 1.068 1092.6 228.4 444.8 1949.25 711.9 201.9 1.117 1139.7 225.9 449.5 1949.50 725.8 226.1 1.166 1173.3 221.4 453.7 1949.75 754.8 241.6 1.232 1226.0 229.6 450.3 1950.00 740.5 270.3 1.353 1257.2 246.4 445.0 1950.25 754.4 241.6 1.400 1281.9 285.9 432.8 1950.50 740.3 249.0 1.532 1307.6 318.3 433.0 1950.75 747.8 233.8 1.627 1329.6 348.0 439.1 1951.00 752.3 216.2 1.649 1335.3 366.8 439.4 1951.25 754.7 219.9 1.640 1351.7 377.1 442.5 1951.50 768.1 199.9 1.677 1355.6 387.1 445.7 1951.75 772.7 206.6 1.828 1376.0 396.7 447.6 1952.00 790.0 220.8 1.923 1409.1 398.3 452.1 1952.25 799.8 222.3 2.047 1434.0 411.9 453.8 1952.50 803.7 225.1 2.202 1449.0 420.2 455.1 1952.75 803.1 217.4 2.021 1440.9 420.4 455.3 1953.00 803.3 201.5 1.486 1428.3 423.5 454.0 1953.25 807.1 203.2 1.083 1407.7 397.4 450.9 1953.50 814.3 206.4 0.814 1399.7 379.0 453.0 1953.75 827.3 215.0 0.869 1414.7 372.4 459.1 1954.00 842.3 225.7 1.036 1432.9 364.9 464.6 1954.25 855.3 245.1 1.256 1465.2 364.8 469.6 1954.50 869.1 260.8 1.514 1488.2 358.3 473.0 1954.75 878.0 264.3 1.861 1505.5 363.2 474.6 1955.00 892.7 268.9 2.349 1520.6 359.0 474.2 1955.25 895.1 262.1 2.379 1517.2 360.0 475.4 1955.50 896.5 258.3 2.596 1519.7 364.9 472.9 1955.75 899.2 257.1 2.596 1518.7 362.4 468.7 1956.00 908.4 253.8 3.063 1529.8 367.6 467.5 1956.25 914.3 248.6 3.171 1542.3 379.4 464.6 1956.50 916.2 245.3 3.157 1543.1 381.6 461.1 1956.75 922.6 249.2 3.382 1553.9 382.1 457.0 1957.00 925.7 230.3 3.343 1537.2 381.2 453.0 1957.25 916.5 210.9 1.838 1513.9 386.5 447.4 1957.50 926.0 206.2 1.017 1524.9 392.7 449.6 1957.75 939.7 222.2 1.710 1559.0 397.1 454.2 1958.00 949.4 246.4 2.787 1600.5 404.7 458.5 1958.25 964.3 261.7 2.800 1625.3 399.3 464.0 1958.50 977.2 283.1 3.019 1659.1 398.8 466.3 1958.75 986.3 262.4 3.533 1645.8 397.1 467.1 1959.00 989.6 274.1 4.299 1659.0 395.3 460.7 1959.25 997.1 288.7 3.943 1681.0 395.2 459.2 1959.50 1009.8 261.4 3.092 1673.8 402.6 455.7 1959.75 1005.7 258.3 2.390 1670.8 406.8 459.4 1960.00 1007.8 233.6 2.360 1651.5 410.1 455.8 1960.25 1009.5 238.3 2.376 1667.5 419.7 458.0 1960.50 1023.5 249.1 2.324 1695.0 422.4 461.5 1960.75 1024.6 270.5 2.324 1721.8 426.7 462.2 1961.00 1042.9 248.4 2.475 1760.9 439.6 465.4 1961.25 1053.6 287.7 2.739 1787.3 446.0 467.3 1961.50 1063.6 291.2 2.716 1801.7 446.9 468.4 1961.75 1072.8 294.7 2.858 1819.6 452.1 466.4 1962.00 1085.8 280.7 2.803 1819.1 452.6 467.7 1962.25 1094.1 291.9 2.909 1841.2 455.2 471.9 1962.50 1100.2 306.9 2.941 1861.5 454.4 474.8 1962.75 1115.5 315.6 3.280 1895.2 464.1 477.6 1963.00 1123.6 314.0 3.499 1903.1 465.5 479.8 1963.25 1145.2 324.7 3.538 1939.1 469.2 481.8 1963.50 1164.4 323.6 3.481 1960.7 472.7 484.7 1963.75 1184.8 324.5 3.504 1979.6 470.3 491.3 1964.00 1188.8 330.8 3.685 1989.9 471.1 495.5 1964.25 1208.2 362.1 3.899 2039.9 469.6 498.2 1964.50 1221.7 364.3 3.879 2066.8 480.8 497.6 1964.75 1242.3 369.9 3.859 2103.7 491.5 501.7 1965.00 1273.2 371.8 4.158 2150.8 505.8 507.8 1965.25 1287.6 396.9 4.630 2198.0 513.5 511.8 1965.50 1293.1 390.9 4.597 2207.4 523.4 511.8 1965.75 1305.5 389.1 5.047 2236.5 541.9 506.2 1966.00 1309.5 385.2 5.246 2246.4 551.7 503.1 1966.25 1319.5 368.7 4.533 2257.3 569.2 507.1 1966.50 1336.5 361.7 3.657 2271.3 573.1 510.7 1966.75 1343.3 378.8 4.344 2301.2 579.1 518.0 1967.00 1351.5 388.4 4.787 2323.1 583.2 521.3 1967.25 1378.1 387.7 5.064 2355.9 590.1 521.9 1967.50 1396.7 397.2 5.510 2394.4 600.5 525.4 1967.75 1421.5 392.0 5.226 2414.5 601.0 528.3 1968.00 1427.1 390.2 5.580 2416.3 599.0 533.7 1968.25 1442.9 412.0 6.137 2448.1 593.2 536.5 1968.50 1451.7 409.1 6.240 2456.8 596.0 532.7 1968.75 1459.9 419.5 7.046 2469.8 590.4 527.6 1969.00 1472.0 400.5 7.317 2457.8 585.3 523.2 1969.25 1481.5 379.9 7.262 2440.0 578.6 521.4 1969.50 1488.1 376.4 6.752 2434.2 569.7 518.0 1969.75 1501.3 390.6 6.374 2463.5 571.6 519.3 1970.00 1497.2 379.3 5.358 2447.1 570.6 521.2 1970.25 1520.9 415.5 3.853 2504.0 567.6 524.7 1970.50 1533.0 423.1 4.206 2520.1 564.0 530.8 1970.75 1541.0 425.9 5.050 2533.8 566.9 534.1 1971.00 1560.1 412.8 4.234 2540.3 567.4 536.5 1971.25 1581.8 439.5 3.435 2597.7 576.4 542.5 1971.50 1607.9 462.3 3.784 2644.3 574.1 547.7 1971.75 1629.9 473.8 4.241 2669.8 566.1 554.3 1972.00 1667.8 468.0 4.851 2719.9 566.1 562.5 1972.25 1689.9 551.7 5.639 2778.1 572.5 565.2 1972.50 1687.2 521.7 6.608 2777.5 568.6 560.0 1972.75 1694.5 511.4 8.388 2761.7 555.8 556.1 1973.00 1686.8 534.2 7.461 2785.2 564.2 548.4 1973.25 1667.5 501.1 7.600 2736.4 567.8 542.1 1973.50 1677.2 496.5 8.268 2753.9 580.2 532.8 1973.75 1686.7 465.5 8.286 2724.8 572.6 522.7 1974.00 1664.7 462.2 7.336 2699.0 572.1 511.9 1974.25 1677.1 370.6 5.873 2625.2 577.5 505.2 1974.50 1706.0 358.1 5.400 2641.3 577.2 506.7 1974.75 1723.9 394.4 6.336 2700.4 582.1 505.4 1975.00 1740.4 410.1 5.684 2737.3 586.8 500.9 1975.25 1777.5 444.7 4.953 2804.6 582.4 502.2 1975.50 1790.4 454.9 5.168 2825.6 580.3 505.5 1975.75 1809.9 452.8 5.168 2842.1 579.4 502.6 1976.00 1837.8 461.8 4.698 2878.6 579.0 505.3 1976.25 1863.7 492.0 4.624 2935.9 580.2 508.1 1976.50 1869.0 519.0 4.828 2975.5 587.5 507.7 1976.75 1888.0 546.9 5.472 3029.8 594.9 509.4 1977.00 1914.2 527.2 6.137 3035.0 593.6 513.0 1977.25 1923.0 544.0 6.408 3059.5 592.5 513.6 1977.50 1960.8 584.6 6.481 3146.7 601.3 514.1 1977.75 1970.3 585.3 7.315 3165.1 611.5 512.5 1978.00 1989.7 595.8 8.680 3196.6 611.1 509.6 1978.25 1997.5 582.2 9.357 3186.4 606.7 503.3 1978.50 1994.1 590.1 9.372 3191.1 606.9 496.1 1978.75 2007.9 575.7 9.631 3194.9 611.3 497.2 1979.00 2018.0 552.9 11.804 3182.6 611.7 487.6 1979.25 2015.4 556.7 13.459 3189.9 617.8 473.9 1979.50 1974.1 499.2 10.049 3098.4 625.1 451.1 1979.75 1996.3 467.7 9.235 3085.1 621.1 464.9 1980.00 2015.6 513.5 13.709 3147.0 617.9 465.3 1980.25 2022.9 552.3 14.369 3201.5 626.3 455.3 1980.50 2022.4 551.2 14.825 3200.0 626.4 453.7 1980.75 2031.5 560.7 15.087 3222.4 630.2 448.9 1981.00 2020.0 517.9 12.023 3173.8 635.9 447.1 1981.25 2031.2 464.2 12.895 3130.0 634.6 451.2 1981.50 2041.0 467.5 12.359 3138.2 629.7 447.1 1981.75 2051.8 448.6 9.705 3142.9 642.5 449.1 1982.00 2078.7 408.8 7.935 3147.6 660.1 464.9 1982.25 2094.2 427.1 8.081 3170.5 649.2 475.8 1982.50 2135.1 486.9 8.419 3272.9 650.9 484.3 1982.75 2163.0 524.8 9.186 3341.4 653.6 493.6 1983.00 2191.9 577.2 8.793 3411.3 642.2 496.4 1983.25 2212.1 655.2 9.133 3520.3 653.0 497.4 1983.50 2246.7 658.4 9.843 3585.3 680.2 500.4 1983.75 2257.3 664.2 10.343 3606.0 684.5 501.5 1984.00 2281.1 655.7 8.973 3630.0 693.2 502.1 1984.25 2314.1 632.1 8.183 3649.6 703.4 510.9 1984.50 2337.0 645.7 7.523 3694.8 712.1 518.1 1984.75 2376.1 623.2 7.103 3737.9 738.6 533.8 1985.00 2383.2 643.3 7.146 3780.2 753.7 543.2 1985.25 2409.7 674.4 6.886 3821.7 737.6 553.4 1985.50 2434.3 665.6 6.130 3851.5 751.6 576.7 1985.75 2477.5 645.0 5.533 3879.7 757.2 598.0 1986.00 2480.5 631.0 5.340 3883.3 771.8 620.0 1986.25 2475.9 671.8 5.533 3907.3 759.6 631.8 1986.50 2487.5 673.7 5.733 3927.9 766.7 634.8 1986.75 2520.7 681.9 6.033 3974.3 771.7 630.1 1987.00 2504.6 723.1 6.033 4016.6 788.9 630.5 1987.25 2527.9 741.8 5.760 4035.7 766.0 631.5]; %DATA FOR " E K F S " %********************** N=max(size(USAMACRO(:,:))); %Outputs Y(t) % 5 6 7 8 % Y(t) C(t), I(t), R(t) %________________________________________ Y=[USAMACRO(4:N-1,5),USAMACRO(4:N-1,2:4)]; %Imputs U(t+1) % 1 2 % G(t+1), d_M(t+1) %______________________________________________________ U=[USAMACRO(5:N,6),[USAMACRO(5:N,7)-USAMACRO(4:N-1,7)]]; save data_us USAMACRO set(0,'DefaultAxesFontSize',7) figure(1) clf set(gcf,'Name','Observed Historical Data') subplot(321) hndl2=plot(USAMACRO(:,1),USAMACRO(:,2),'c'); set(hndl2,'LineWidth',1.5); hold off title('Real Aggregate Personal Consumption'); ylabel('C [ billions of 1982 dollars ]'); xlabel('Time [ quarter ]'); grid subplot(322) hndl3=plot(USAMACRO(:,1),USAMACRO(:,3),'c'); set(hndl3,'LineWidth',1.5); hold off title('Real Gross Domestic Investment'); ylabel('I [ billions of 1982 dollars ]'); xlabel('Time [ quarter ]'); grid subplot(323) hndl4=plot(USAMACRO(:,1),USAMACRO(:,4),'c'); set(hndl4,'LineWidth',1.5); hold off title('Interest Rate on 3-Month Treasury Bills'); ylabel('R [ percent per year ]'); xlabel('Time [ quarter ]'); grid subplot(324) hndl5=plot(USAMACRO(:,1),USAMACRO(:,5),'c'); set(hndl5,'LineWidth',1.5); hold off title('Real GNP (net export and import)'); ylabel('Y [ billions of 1982 dollars ]'); xlabel('Time [ quarter ]'); grid subplot(325) hndl6=plot(USAMACRO(:,1),USAMACRO(:,6),'r'); set(hndl6,'LineWidth',1.5); hold off title('Real Gavernment Spending'); ylabel('G [ billions of 1982 dollars'); xlabel('Time [ quarter ]'); grid subplot(326) hndl7=plot(USAMACRO(2:N,1),(USAMACRO(2:N,7)-USAMACRO(1:N-1,7)),'r'); set(hndl7,'LineWidth',1.5); hold off title('First Diferences of Real Money Stock M1'); ylabel('{\Delta}M [ billions of 1982 dollars ]'); xlabel('Time [ quarter ]'); grid