Tuesday, July 20, 2021

FREDcast for July 20th, 2021

Since stlouisfed is discontinuing FREDcast, I'll track my forecasts here. Since COVID, I haven't been doing very well, even though my final forecast, for June 2021, placed 7th on the Public Leader Board (before Real GDP Growth comes in). I'm in the process of refining my modeling.
| :UNRATE | 6.3 | UNRATE_M_Lpredict3 |
| :PAYEMS | 1614000 | PAYEMS_M_Lpredict6 |
| :GDPC1 | -0.3 | GDPC1_Q_Lpredict3 |
| :CPIAUCSL | 5.5 | CPIAUCSL_M_Lpredict1 |

Sunday, June 19, 2016

Reverse Engineering the Eview code in FRB/US model

Proud Economy 0014: FRBUSinR

Reverse Engineering the Eview code in FRB/US model

I've started looking at the eview programs in the models packages by indexing the subroutine calls in the frbuseview.nw file. You can see the current results in the generated frbuseview.pdf file.
I'm doing this work on the ReverseEngineer branch in the github project.
Looking at the code brings back memories. This was originally written in Fortran! Look at the ii, jj, kk variable names. I had forgotten about that from when I briefly helped the programmer debug the original model some 45 years ago. Who would have expected nostalgia from something so prosaic. I actually never saw the original source code because I was working with only a hex dump.
Gary Young

Saturday, June 11, 2016

FRB/US model packages from the Federal Reserve

Proud Economy 0013: FRBUSinR

Study of FRB/US model packages from the Federal Reserve

(and perhaps port to R language)

FRB/US model packages:

"The main FRB/US model package is a self-contained set of equations, data, programs and documentation that enables various types of simulations and provides information about the model's structure."

"NOTE: The programs for simulating the FRB/US model are written for use with the software EViews, available at www.EViews.com"

Github: proudindiv/FRBUSinR:

Unfortunately, EViews is propritary software and hence not readily accessible. My thought is to explore the information provided by the Federal Reserve using the open source R-language and other freely available tools for truly reproducible results.

My project is at proudindiv/FRBUSinR on github. I hope to produce something that attracts others to participate.

Gary Young

Wednesday, January 8, 2014

A Few Interesting Timeseries

Proud Economy 0012

Proud Economy 0012

econ307classnotes01

This time I'm just going to extract data for a few interesting timeseries that we need for our initial simple modeling and demonstrate extracting them live from the web.

library(quantmod)
seriesnames <- c("GDPMC1", "UNRATE", "CPIAUCSL", "FYFSD", "FYGFD", "GFDEGDQ188S", 
    "M1NS", "FEDFUNDS")
sapply(seriesnames, function(.m.) eval(parse(text = paste("setSymbolLookup(", 
    .m., "='FRED')"))))
getSymbols(seriesnames)
## [1] "GDPMC1"      "UNRATE"      "CPIAUCSL"    "FYFSD"       "FYGFD"      
## [6] "GFDEGDQ188S" "M1NS"        "FEDFUNDS"

Real Gross Domestic Product (GDPMC1)

So we have lost forever a half decade of wealth creation and still counting! Who's responsible?

FRED: Real Gross Domestic Product (GDPMC1)

chartSeries(GDPMC1, theme = "white", subset = "2000/", name = "Real Gross Domestic Product (GDPMC1)")

plot of chunk unnamed-chunk-4

Civilian Unemployment Rate (UNRATE)

What a waste!

FRED: Civilian Unemployment Rate (UNRATE)

chartSeries(UNRATE, theme = "white", subset = "2000/", name = "Civilian Unemployment Rate (UNRATE)")

plot of chunk unnamed-chunk-5

Consumer Price Index for All Urban Consumers: All Items (CPIAUCSL)

Here is a naturally occuring deflation experiment.

FRED: Consumer Price Index for All Urban Consumers: All Items (CPIAUCSL)

chartSeries(CPIAUCSL, theme = "white", subset = "2000/", name = "Consumer Price Index for All Urban Consumers: All Items (CPIAUCSL)")

plot of chunk unnamed-chunk-6

Federal Surplus or Deficit -

Deficit caused by your recession comes from the stimulus, the unemployment insurance paid, and the reduction in taxes collected. So making the recession worse by heavy government austerity won't turn that around.

FRED: Federal Surplus or Deficit [-] (FYFSD)

chartSeries(FYFSD, theme = "white", subset = "1970/", name = "Federal Surplus or Deficit [-] (FYFSD)")

plot of chunk unnamed-chunk-7

Gross Federal Debt (FYGFD)

The Federal Debt looks bad, but what about the public's huge wealth loss. If you don't fix that, we'll have another French Revolution.

FRED: Gross Federal Debt (FYGFD)

chartSeries(FYGFD, theme = "white", subset = "2000/", name = "Gross Federal Debt (FYGFD)")

plot of chunk unnamed-chunk-8

Federal Debt: Total Public Debt as Percent of Gross Domestic Product (GFDEGDQ188S)

FRED: Federal Debt: Total Public Debt as Percent of Gross Domestic Product (GFDEGDQ188S)

chartSeries(GFDEGDQ188S, theme = "white", subset = "2000/", name = "Federal Debt: Total Public Debt as Percent of Gross Domestic Product (GFDEGDQ188S)")

plot of chunk unnamed-chunk-9

M1 Money Stock (M1NS)

The Fed has had to pump the money supply, since Congress and the President aren't doing sufficient fiscal stimulus.

FRED: M1 Money Stock (M1NS)

chartSeries(M1NS, theme = "white", subset = "2000/", name = "M1 Money Stock (M1NS)")

plot of chunk unnamed-chunk-10

Effective Federal Funds Rate (FEDFUNDS)

Look at that zero lower bound. That's what Paul Krugman has been talking about for the past few years.

FRED: Effective Federal Funds Rate (FEDFUNDS)

chartSeries(FEDFUNDS, theme = "white", subset = "2000/", name = "Effective Federal Funds Rate (FEDFUNDS)")

plot of chunk unnamed-chunk-11

Gary Young (proudindiv)

Tuesday, December 24, 2013

Sources of Macroeconomic Data

Proud Economy 0011

Bureau of Economic Analysis, U.S. Department of Commerce (BEA)

Concepts and Methods of the U.S. National Income and Product Accounts:

The national income and product accounts (NIPAs) are one of the three major elements of the U.S. national economic accounts. The NIPAs display the value and composition of national output and the distribution of incomes generated in its production.

The other major elements of the U.S. national economic accounts are the industry accounts, which are also prepared by the Bureau of Economic Analysis (BEA), and the flow of funds accounts, which are prepared by the Federal Reserve Board. The industry accounts consist of the input-output (I-O) accounts, which trace the flow of goods and services among industries in the production process and which show the value added by each industry and the detailed commodity composition of national output, and the gross domestic product (GDP) by industry accounts, which measure the contribution of each private industry and of government to GDP. The flow of funds accounts record the acquisition of nonfinancial and financial assets (and the incurrence of liabilities) throughout the U.S. economy, the sources of the funds used to acquire those assets, and the value of assets held and of liabilities owed.

In addition, BEA prepares two other sets of U.S. economic accounts: the international accounts, which consist of the international transactions (balance of payments) accounts and the international investment position accounts; and the regional accounts, which consist of the estimates of GDP by state and by metropolitan area, of state personal income, and of local area personal income. Finally, the U.S. Bureau of Labor Statistics prepares estimates of productivity for the U.S. economy (which are partly based on the estimates of GDP). Altogether, the system of U.S. economic accounts presents a coherent, comprehensive, and consistent picture of U.S. economic activity Labor Statistics prepares estimates of productivity for the U.S. economy (which are partly based on the estimates of GDP). Altogether, the system of U.S. economic accounts presents a coherent, comprehensive, and consistent picture of U.S. economic activity.

(Download NIPA Tables)
(Gross-Domestic-Product-(GDP)-by-Industry Data)
(Regional Economic Accounts: Download CSV)
(Direct Investment and Multinational Companies: Comprehensive data)


A Primer on BEA’s Industry Accounts By Mary L. Streitwieser:

BEA’s industry accounts—which include the annual and benchmark input-output (I-O) accounts, the GDP by industry accounts, the KLEMS statistics, and satel­ lite accounts—provide answers to such questions. Broadly speaking, the accounts facilitate the study of the internal workings of the U.S. economy.

Concepts and Methods of the Input-Output Accounts by Karen J. Horowitz and Mark A. Planting:

The input-output (I-O) accounts are an integral and essential element of the U.S. economic accounts. First, they are the building blocks for other economic accounts. Prominent among these are BEA’s national income and product accounts (NIPAs), which feature the estimates of gross domestic product (GDP). Second, the I-O accounts provide detailed statistics on economic processes and relationships. They incorporate a complete, balanced set of economic statistics, and they present a full accounting of industry and final-use transactions.

Board of Governors of the Federal Reserve System

(Data Download Program)
(Complete table listing)

Financial Accounts Guide

This interactive documentation serves as a guide to the data compiled and published as part of the “Financial Accounts of the United States” (Z.1) data release, previously called the “Flow of Funds Accounts of the United States”. The Z.1 includes flow of funds, balance sheet, and integrated macroeconomic account data. This comprehensive documentation system is designed to help a user understand the links between series and underlying source data by providing the capability to search or browse the vast amount of information underlying the Z.1.

The U.S. Flow of Funds Accounts and Their Uses by Albert M. Teplin

In simple terms, the flow of funds accounts measure financial flows across sectors of the economy, tracking funds as they move from those sectors that serve as sources of capital, through intermediaries (such as banks, mutual funds, and pension funds), to sectors that use the capital to acquire physical and financial assets. With data extending back more than half a century, the accounts provide a broadly consistent set of time-series data for measuring financial flows in the economy.

Gary Young (proudindiv)

Monday, December 23, 2013

Examining "Macroeconometric Modeling by Ray C. Fair"

Proud Economy 0010

This looks like something that I wanted to learn back in the 1970's, but was unable to get into. I started programming in 1967 and worked at the Federal Reserve Bank of San Francisco for a while. I became aware of their economists and econometric modeling, but I was in the wrong world to break into that field.

Professor Fair's information looks like he has been there and he has made his information available on the internet at "fairmodel.econ.yale.edu". Now I wonder if one could use his work to reconstruct something like his model from scratch and use that to learn about macroeconomics?

Reading Fair's "Reflections on Macroeconometric Modeling", July 2013, it sounds like he is talking about the right stuff, but I don't understand it enough to evaluate it at all. I would start with a naive approach, see how much of Fair's model I can understand and extract, and attempt to formulate an infrastructure to build my versions.

Starting with "The US Model Appendix A" sectors

  • Households
  • Firms
  • Financial Institutions
  • Foreign Entities
  • Government
we can then sort out the variables (about 350) and equations (188 of them). The "The Fair-Parke Program" appears to contain the Fortran code and all of data that is used to run the models at "The US Model" and "The MCI Model".

More as I get to it

Gary Young (proudindiv)

Federal Reserve Economic Data - FRED - St. Louis Fed

Proud Economy 0009