Monday, June 24, 2013

Global Economic Model


My old friend Jack, jokingly I think, suggested that I develop a transfer function (model) of the economy. I say jokingly because the world economy is neither linear nor time-invariant. Jack and I are both electrical engineers and I think we'd agree that the world is full of non-linear behavior over virtually any time frame. That said, the concept is still appealing.

How do the powers-that-be prove to themselves that the policies they enact are actually beneficial?

I've been writing about political issues of concern for fiscal conservatives:
  • K-12 Education
  • Healthcare
  • Deficit Spending
  • National Debt
  • Government Employee Pensions
  • Energy
  • Government Regulations
  • Targeted Taxes
  • Debt/GDP Ratios
  • The Grand Bargain
  • Immigration Reform
  • College Education
  • Entitlements
  • Tax Trickery
  • Taxpayer Funded Insurance
Based on what I've learned since I started studying this stuff, it looks pretty clear that the (untrained) social engineers do the same thing self-taught regular engineers do; slap some stuff together and, fingers crossed, head to the lab to see what happens.

Good engineers read specifications, develop architectures to meet requirements, perform detailed design work, build models for simulation, compare simulation results to requirements, build prototypes, develop test plans, integrate smaller pieces of a large design and then have the whole thing independently verified by a disinterested third party.

All of this before releasing the design on an unsuspecting public.

Social engineers say pass this law so wee see what's in it as Nancy Pelosi did with respect to Obamacare. What are these people thinking?

The Congressional Budget Office (CBO) is supposed to score all legislation but the scope is limited to the budget, not the world economy. Take a look at some of these scores and I think you'll agree that it is not terribly useful. In addition, I'm not sure the CBO is a disinterested third party.

Requirements
So, what must such a model entail?

The transfer function must accommodate:
  • multiple inputs (wages, tips, loans, imports, labor, materials, energy, etc)
  • multiple conversion factors (interest rates, market prices, commodity prices, etc.)
  • multiple outputs (bills, taxes, exports, savings, labor, finished goods, etc.) that sum to 100%
  • provision for storage (savings and credit)
  • provision for time sensitivity since interest rates apply over time.
Analog Model
As a circuit design engineer, I like to think of transfer functions as analog (linear) and analog means amplifiers with feedback paths. These implementations can be simulated with software like pSpice.

However, even the very best amplifiers do not have sufficient dynamic range to handle the scales encompassed by the global economy. We'd need to accurately predict sums from, say, one cent to hundreds of trillions of dollars. This spans more than 16 decimal places and analog circuits simply are not up to it.

In addition, the analog model has no notion of time; everything happens more or less instantaneously.

That said, the arithmetic is an important part of the model and it can be performed flawlessly in the digital domain with computers and software. In the digital domain, we can also introduce the notion of time by sampling the mathematical result after it is calculated and before applying the previous result as the new stimulus to the model.

I'm not sure about software simulators since I'm a hardware guy but I know that we often develop hardware with a language called VHDL and I know that the simulators for that work quite well.

Of course, some will argue that this is an expensive approach. I can state categorically that it is cheaper than the method currently in use; throw it against the wall and see what sticks (according to someone with a vested interest in the result).

Digital Model
The digital model can have as much dynamic range as is required. Today's 32-bit computers have a virtually unlimited dynamic range with double-precision floating-point format.

Every economic object (wage earner, bank account, security (stocks and/or bonds), company, factory, farm, government, country, etc.) can be represented by a generic function with multiple inputs, multiple conversion factors, a storage mechanism (essentially an accumulator) and multiple outputs that represent the combined and converted value of all inputs at their prevailing rates of gain or loss at any instant in time.

All outputs of all economic objects (EO) can be sampled simultaneously, each sample being modified with newly prevailing rates as it is fed back to all objects to produce new outputs. And so on...

This is the description of the classic finite state machine. More specifically, a Mealy Machine.

The INPUTS are either independent sources (of money, material, labor, etc.), the fed-back samples of any/all other economic objects' output states, prevailing rates (interest rates, commodity prices), conversion factors ($/hour, $/ton, $/barrel, $/Euro, etc.) or output percentages for complex objects that provide output streams to multiple other objects like employees but whose totals must sum to 100%.

The State Transition Conditions (STC) effectively comprise the mathematical operations (mostly arithmetic but with some algebra and calculus) and conversions between input values and some common standard like money (US dollars, for example) in the previous section. The STC might also comprise an accumulation (essentially the integration function of calculus) of money like a bank account or an accumulation of goods like a warehouse.

The OUTPUTS are the simultaneous samples of all of the output states of all economic objects. These are fed back to the input side of the economic objects simultaneously with new (or unchanged) prevailing rates and independent sources to produce new output states for successive samples. There may be many outputs of various types; a person might output both man-hours to an employer and money to a grocery store but the man-hours must limit to 24/day and the money must limit to total liquidity. Outputs can change between samples; for example, after a layoff, many outputs from a company may disappear.

Successive samples produce an economic history or model of the system at hand.

Example Economic Object
The most obvious example of an EO is a taxpaying member of the US workforce.

I have long used Quicken (tm) software for my personal economic model so I know that I have lots of inputs and outputs; my itemized payee list has hundreds of entries but sadly, there are far fewer inputs. I'll choose a few representative ones for the example because the reality is too tedious.

Inputs
  • Paycheck
  • Tax Return (Federal)
  • Tax Return (State)
  • Checking Account
  • Landscaper (contract labor)
  • Food
  • Electricity
  • Heating Oil
  • Satellite TV
State Transition Conditions
  • FICA rate
  • Federal Income Tax rate
  • State Income Tax rate
  • Real estate property tax rate
  • Auto property tax rate
  • Savings rate
  • Landscaper ($/week)
  • Grocery bills ($/week)
  • Electricity bills ($/month)
  • Heating oil (contract $/month)
  • Satellite TV (contract $/month)
  • Health Insurance ($/month)
Outputs
  • Checking account (savings)
  • 401k (savings)
  • US Treasury (FICA plus withholding)
  • Connecticut Treasury (state withholding)
  • City of Shelton (real estate plus property tax)
  • Landscaper
  • Stop & Shop
  • United Illumination
  • Sippin Energy
  • DirecTV
  • United Healthcare
  • Man-hours to employer
Of course, I'm retired so I don't get a paycheck and I don't give any man-hours to an employer but these are common inputs and outputs for most of us and they're listed for informative purposes.

Scale
For small-scale models this could easily be implemented with a spreadsheet program like Excel.

However, for a global model with literally billions of economic objects, Excel is not up to it. As analog computation had issues with dynamic range, spreadsheets have issues with scale. In addition, spreadsheets are rarely subject to any sort of authentication protocol; for example, the President's budget was clearly developed on a spreadsheet but the formulas in the cells (and the data leading to the formulas) were not published for peer (or public) review.

In addition, a model with billions of EOs and hundreds or thousands of STC calculations per EO will not run effectively on a personal computer; I'm thinking supercomputer.

Comparison with Reality
So, how well might this model correlate with the real world?

One obvious advantage is what I think interested Jack; everything is considered as a whole. This is completely different from the manner in which national and global economic information is usually presented to us by the politicos and the media; they prefer to treat everything as though it has no relationship with everything else. They ignore chaos as exemplified by the Butterfly Effect.

A possible disadvantage is that, in the model, everything is sampled at the same time whereas in the real world, everything is asynchronous; securities markets open and close at different times, people get raises and pink slips seemingly at random, people are born and people die. Some things appear to be synchronized to the rotation of the Earth, others appear to be synchronized to its orbit while others appear to synchronized to the orbit of the moon. Sometimes, shit just happens!

The disadvantage can be partially overcome by increasing the sampling rate and drawing the conversion factors from live feeds over the Internet. The model can also be verified by providing inputs like natural disasters into the model and observing the behavior of the EO outputs with time for correlation with similar results from the past.

Usefulness
What, you might ask, is useful about this model?

I can promote the company (founded by my brother and his wife) that has developed sophisticated financial modeling software for businesses and institutions; in fact, I will admit to a bit of plagiarism with respect to the notion of objects. This product has been developed to use GAAP for the creation of Income Statements, Balance Sheets and Cash Flow Analysis. It can perform any number of "what if" analyses including full Monte Carlo simulations. Perfect for business modeling but with intentional limitations for those purposes and probably unsuitable for the requirements at hand due to scale.

The useful characteristic of my proposed model is also that of prediction but on a grand scale; global. Many small- and specific-case economic models have been developed to help predict the likely outcomes of specific plans or policies but none for the big picture. My model, if fully or only partially populated with EO data and the underlying network of connections, could be used to predict global economic outcomes; within reason.

I say "within reason" because most EOs are people or are led by people and people don't always behave reasonably. Conversely, what some consider to be reasonable is thought of as crazy by others.

For example, Texas Governor Rick Perry recently came to Connecticut to entice manufacturers to relocate to his state to take advantage of the low tax, low regulation business environment there. Instead of considering ideas to level the playing field, there was a lot of angst and cries for federal laws to prevent poaching. Ah, the joys of being liberal and clueless; feeling entitled to unconstitutionally restrict the freedom of others to compensate for you own failed policies.

As another example of reasonableness, let's talk about the availability of EO data for the model. The basic problem is that this is private information and most if not all EOs will not share it for obvious reasons; economic life is a competition.

People compete for jobs, companies compete for business and countries compete for export markets.

Unless you're President of the US with the access and willingness to use the country's formidable electronic hacking, spying and eavesdropping capabilities on both your own citizens and others around the world, good luck.

Oh wait, we do do that. So why do our policies produce such consistently poor results? 

As I said, good engineers read specifications, develop architectures to meet requirements, perform detailed design work, build models for simulation, compare simulation results to requirements, build prototypes, develop test plans, integrate smaller pieces of a large design and then have the whole thing independently verified by a disinterested third party.

All of this before releasing the design on an unsuspecting public.

Ask questions.

No comments:

Post a Comment