Site Meter

Monday, May 28, 2018

Lost in cyberspace.

Danger Will Robinson danger. I am currently locked out of twitter, which is convinced I may be a 'bot. Twitter machines keep politely telling me that to reactivate my account I should click and they will send a number as a text message to my cell phone and I can tweet once I type in that number. At the same time my evil phone company won't deliver text messages -- I've reached some monthly limit for my data plan even though I never send or receive text messages (problem is I left my phone on while on a car ferry where they provide service charging a huge number of quatloos per minute).

I think this is one of the best things that ever happened to me. I suddenly have huge amounts of time and energy. I assume that no one has been checking my semi defunct blog. (hi no one)

Also twitter is definitely addictive. I recognize withdrawal symptoms (from nicotine addiction) and I am feeling them.

Sunday, May 27, 2018

John Donne, the 1980 Census, and a Journalist whom I wouldst cite if I recalledest his name

I have a fond memory of reading either The Washington Post or the late lamented dead tree Newsweek back in the 1970s. The article discussed that fact, due to times which had been changing, the Bureau of the Census had added a new category "person of the opposite sex sharing living quarters". Kidz theez dayz won't believe that there had been no need to count live in boyfriends and girlfriends back in 1970. Evidently at the Census they immediately started using the acrony POSSLQ (pronounced posselqueue) This lead a journalist (whose genius exceeds my limited memory) to reflect on how the great poets could have benefited, if they had access to this linguistic innovation, & then to rewrite the first stanza of "The Bait" by John Donne as follows (and I fair use both geniuses)

Come live with me, and be my love,

And we will some new pleasures prove

In short there isn't anything I wouldn't do

If you would be my POSSLQ

Friday, May 11, 2018

Trade without trust using block-chain technology

I wrote about this at angrybearblog, but I think I might have joked too much and besides I was ignorant then.

The question is whether there is some feature of blockchains which makes the technology useful if no one trusts anyone else.

I am responding to a brilliant skeptical essay by Kai Stinchcombe. There is an implicit challenge in the essay.

There is no single person in existence who had a problem they wanted to solve, discovered that an available blockchain solution was the best way to solve it, and therefore became a blockchain enthusiast.

I want to try to meet this challenge here in this post. There is a strong hint here (sadly criminal but it doesn’t have to be).

Same with Silk Road, a cryptocurrency-driven online drug bazaar. The key to Silk Road wasn’t the bitcoins (that was just to evade government detection), it was the reputation scores that allowed people to trust criminals. And the reputation scores weren’t tracked on a tamper-proof blockchain, they were tracked by a trusted middleman!

So the challenge is how to have trade without a trusted middleman ?

I think the key aspect of blockchains which is useful for this purpose -- every transaction involves at least three agents, two who contract with each other and a third who makes the block (solving the proof of work problem). This third party is not known to the first two. Furthermore, her claim to have made a valid block is checked by the other blockmakers (called miners in the case of bitcoin). This means that there is a third party who is identified ex post but not when the contract is created and who does not have to be trusted (because her work can be checked). This can be very useful for designing incentive contracts for the other two parties.

Basically, the idea is that if one party asserts that the other has broken the contract or cheated, then the cryptocurrency involved is awarded to the block maker who records that accusation. This makes it possible for each party to punish the other, but does not create an incentive for false accusations -- because the party which gains if there is an accusation is unknown to the accuser so no collusion is possible.

I will describe this in the case of sale of a good or service. Agent A wants to buy the good. The algorithm is:

A describes the good and makes a bid to pay for it listing two dates T1 and T2, three quantities of cryptocurrency which A claims to own X1, X2 and X3, and a fourth quantity X4. T1 is the date the good must be delivered.

Agent A can offer this payment to a specific agent B or can make a general bid that any agent can accept by posting X4.

The bid and acceptance are a tentative draft transaction.

update: They are recorded in the blockchain in the block made by block maker 1 who then owns X2 cryptocurrency end update:

At any time between T1 and T2,Agent A can post a complaint saying the good was not delivered or it was of unacceptably low quality. A complaint is any text which refers to the tentative transaction and includes the word "complaint".

if no complaint is posted by A and T2 has passed, then Agent B can spend X1 and X4 is returned to agent B (the seller), the block maker gets X2, X3 is available again to the to the buyer.

If A files a complaint, then the bid, acceptance and complaint are recorded in the blockchain by block maker 2. The block maker2 owns X1+X3+X4 so the buyer and seller lose all of the posted cryptocurrency.

The quantities X1,X2, X3 and X4 can be positive, zero or negative. Typically X2,X3 and X4 will be small positive numbers. If A has a reputation for not complaining without good reason, then X3 can be zero or even negative (A can propose a contract in which A gets a money back if not satisfied guarantee, it is fairly likely that no seller will accept this offer, but the algorithm allows it).

An alternative parallel use is the advertisement with guarantee. Agent B offers to sell a good for price X1 plus fee X2, deposit required from the buyer X3 and promising to pay additional penalty X4 if the buyer who accepts the offer posts a complaint. If anyone accepts the offer and has X1 + X2+X3 then the contract is just as above. It doesn't matter whether a seller makes an offer and a buyer accepts or a buyer makes a bid and the seller accepts. Again agent B can make the offer to a specified agent A or can make a general offer which can be accepted by anyone who has X1+X3 cryptocurrency

I think this pretty much solves the problem of how can we trade without (much) trust. If the buyer loses an additional X3 for complaining, then the buyer does not have an incentive to file false complaints. I must assume that some peoplea are willing to pay a tiny fee to penalize a seller who doesn't deliver. X3 will be a number worth something like 1 Euro. This means that misbehavior is only punished (by people who pay a small fee to do so) if people get angry when they are cheated. People who don't get angry when cheated can participate in the system, but they are bluffing -- making a threat to complain even though they will never actually complain. People who gain a reputation as wimps who don't complain when cheated will be cheated until they learn to avoid using the techology. That is, agents can develop reputations, and they can be valuable (compared to being a new participant) or costly.

The fee for filing a complaint X3 is freely proposed by the agents. A trusted seller may be able to get buyers after setting a fairly high X3 to prevent nuisance complaints and posting X4 = 0. A trusted buyer can get the good posting X3 = 0 (or maybe even less if really trusted). The 4 parameters make it possible for people to trade even if no one trusts them or to gain an advantage if they are trusted.

The key to the proposal and the reason it must involve blockchains is that penalties are paid to the block maker who records the complaint. The identity of the block maker is not known to the agents until the block recording the complaint is made. Agents have no reason to care about the block maker and no way to collude with the block maker. Since the block maker is just checking public information, the block maker does not have to be trusted. The block makers must check that agents have the cryptocurrency they post (as they currently do for BitCoin etc), that a bid (or offer) was made, that it was accepted, and, in the case of the block maker who records complaints, that a complaint was or was made by a published time T2. As usual, the block makers must also solve proof of work problems.

Throughout I am assuming agents' have a secret key so no one but agent A can file a complaint. I stress that agent A is not required to present any evidence that the complaint is valid. Any reference to the contract which includes the word "complaint" and is sent out by agent A counts as an official final complaint.

The buyer and seller may communicate privately to make sure they agree on what B promises to deliver to A. A sensible seller may wish to do this before accepting a bid. These communications have no effect on the final ownership of cryptocurrency.

The problem with the proposal is that the contracts are potentially vulnerable to renegotiation. A dissatisfied buyer and a seller both lose if the buyer files a complaint so relative to that they gain if the seller gives the buyer some of her money back in exchange for no complaint (this would be a private transaction hidden from the other participants in the system). I do not think this is a problem. The reason is that they buyer can not sign a contract renouncing the right to complain. A dissatisfied buyer may take half her money back then complain being angry both at the poor good or service and the attempt to renegotiate. Also a seller who tries this may get a reputation as a crook.

The problem is the dishonest buyer who theatens to complain and demands a refund or else. This is not likely to be a huge problem as the threat is a bluff. Actually complaining is costly to the buyer. A reputation for making such threats is costly to the buyer. A reputation for giving in to such threats is extremely costly to the seller.

If the buyer can present proof to the seller that the good was no good, then that proof and a threat might cause renegotion. this would not be a problem at all; the block maker would end up with less wealth as no complaint is filed, but the buyer and seller have reached an agreement based on evidence both consider to be convincing.

I think the system works without trust. It does require two things. One is that most people generally tell the truth if they don't have an incentive to lie. The other is that people who genuinely feel they were cheated are angry and willing to pay a small fee to punish the person who cheated them. I think both of these assumptions about psychology are highly plausible and supported by solid experimental evidence.

update2: I think I just rediscovered the concept of a smart contract (note I definitely didn't know what smart contracts are (or will be if none now exist) when I wrote the older post). I think my proposal differs from other smart contract proposals in a few ways which I will now explain.

First, I think the standard idea is that the seller gets X1 if some proof of fulfilment of the contract appears in the blockchain after the block recording the contract. In my proposal, the seller gets X1 if T2 passes without a complaint. In the standard proposed smart contract, a contract recorded in the blockchain without any additional proof of fulfilment works as escrow -- neither party can spend the cryptocurrency until they agree on who owns it. My honest guess is that people won't like a deadline T2 and will not use my proposal. But I think it is useful. The reason is that it limits renegotiation. If a buyer threatens to complain unless she is given a partial refund (and the seller thinks the complaint would be invalid and the threat is an attempt at fraud by renegotiation which I will call "Trumping") then the seller can call the bluff by doing nothing until T2 passes. If control the cryptocurrency is in escrow until the parties reach agreement, then dishonest buyers can Trump (that is do what Donald Trump regularly did). A reputation for threatening to complain and then actually complaining is costly to the buyer (like Trump such buyers will end up dealing only with people who enforce contracts with violence), so I think threats which are bluffs will actually be called.

The other thing that might be unusual about my proposal is that the buyer has final authority to keep cryptocurrency from the seller without having to offer any proof. Block makers just have to check if there has been a complaint. I think this is an important advantage. I think it is essential that it is easy to see if a proposed block is a valid block. Blockchains are maintained not just by the agent who mines the new block and gets a reward, but also by many other agents who verify new blocks and add them to their copies of the blockchain just to keep their blockchain updated so they can keep competing to make the next block. This means it is important that verifying blocks is easy and almost all of the work involved in making a block is solving the proof of work problem. Sellers may collect and communicate extensive information about the production and delivery of the good or service in order to convince buyers that they have done a good job. But there is no need to record this information in the blockchain. I would suggest that, if collected, it be sent privately to the buyer.

Finally, I have payment to seller if there is no complaint. An equally simple proposal would transfer X1 to the seller if the buyer reported satisfaction before T2 (say with a reference to the contract and text including the word "satisfied"). That isn't important. What is important is that they buyer promisees to sacrifice X3 to a block maker in order to penalize the seller for bad performance.

Wednesday, May 02, 2018

The Relative Price of Housing and Subsequent GDP growth in the USA

(pdf of this post available here) The great recession of 2008-9 followed an extraordinary house price bubble. The sluggish was characterized by a very slow recovery of residential investment. Oddly, the extensive revision of macroeconomic models which implied a very low probability of great recessions has not involved a focus on housing. Instead it has focused on financial frictions – essentially it is assumed that the 2008-9 recession was extraordinary because a major financial crisis occurred. Dean Baker dissents (as he often does) arguing that the severity of the recession could have been predicted given the massive decline in housing prices and earlier estimates of the effect of home equity on consumption. This note attempts to being to assess that claim. It also asks if it is possible to forecast GDP growth over the medium term. Finally it is part of the Rip Van Keynes series, because I will use an empirical strategy which has been out of fashion for at least four decades – basically an ad hoc OLS regression (sometimes I even include an exponential trend).

The basic result is that if the relative price of housing is high (compared to an exponential trend) then GDP growth over the following 5 years is low (compared to an exponential trend). Aiming to test out of sample forecasting, I start using 20th century data only.

-7.52 is a fairly impressive t-statistic.

Lnindex L20 is the logarithm of the ratio of the all transactions house price index to the consumer price index lagged 20 quarters. Gdp5 is the growth of the logarithm of real gdp over the past 5 years. Quarter is the calender quarter up to the 4th quarter of 1999 = 1999.75. The data were downloaded from Fred and are described in what might be generously considered a sort of data appendix. One point must be mentioned here – the all transactions house price index is available only starting in 1975, so the first useful observation is growth of GDP from 1975q1 to 1980q1.

The series are quarterly, so the dependent variable is a moving average of changes summed over 20 quarters. In the crudest attempt to deal with this, I calculate Newey West standard errors with 19 lags. These would be valid if log GDP were a random walk with drift (the constant) and trend (growth slowdown).

This regression is at least a hint that 8 years before the great recession began, there was already evidence that extremely high relative price of housing was likely to be followed by low GDP growth. Because the regression is, at best, barely presentable, I focus on out of sample forecasting. pgdp5 is the fitted value which can be considered a forecast of real gdp growth over the following 5 years.

Out of sample the forecasts and outcomes are positively correlated. The correlation of pgdp5 and gdp5 over 2000q1 through 2018q1 is over 0.86. Out of sample forecasts of GDP growth over the following 5 years seem to be quite useful. This may be simply due to the estimated trends. The following regression shows that forecasts of deviations from trend are correlated with deviations from trend.

This is a test of out of sample forecasting performance. It is, to put it mildly, rather more successful than out of sample tests of long term macroeconomic forecasts usually are.

This is a test of out of sample forecasting performance. It is, to put it mildly, rather more successful than out of sample tests of long term macroeconomic forecasts usually are.

The data are, perhaps, more usefully summarized with a graph. Figure 1 (finally) is a scatter of the logarithm of the relative price of housing and GDP growth over the following 5 years.

This ignores even the deterministic trends. Also the whole sample is graphed. Notably while some periods show extraordinarily high relative prices of housing and extraordinarily low subsequent real GDP growth, the GDP growth does not look anomalous. The computer is not surprised by the severity and duration of the great recession given the early 21st century housing bubble.

Here are the time series. L20.lnindexm4 is lnindex lagged 20 quarters – 4.0 (the base years for the all transactions housing price index and the CPI are different).

Notice that the first observation for the index lagged 20 quarters is 1980q1 because the index is available from 1975q1 on.

Here are the series of outcomes and forecasts. The only anomaly is that the great recession was so mild. The computer forecast 5 year gdp growth as low as -10% and it never actually was less than zero. Still this is unusually successful out of sample forecasting of medium term gdp growth.

Robustness Checks

The deterministic trend in the regressions reported above is especially utterly out of fashion. If a time series is integrated (non stationary with a stationary first difference) then there will be spurious mean reversion of deviations from a deterministic trend. T-like statistics from regressions of one integrated series on another do not have a t-distribution. These concerns explain my strong focus on out of sample forecasting. A more standard approach to a nonstationary series is to difference it and hope the resulting series is stationary. So I consider the change in the ratio of the all transactions housing price index to the consumer price index over 5 years index5 = ln(indext /CPIt) – ln(indext-20/CPIt-20). This means that I lose 10 years of data, 5 for the growth of GDP and 5 for the growth of the relative price of housing and the first useful observation is GDP growth up until 1985q1. With a mere 60 quarters of data I get

The out of sample correlation is lower being only 0.37. The scatter is much less impressive (although it does look appealingly like a pouncing cat). Basically, the computer expected a major boom to follow the extreme decline in housing prices from 2006 to 2011.

The decline in the relative price of housing from 2006 on was unprecedented and the simple regression is no more able to forecast the resulting recovery than any other method.

Another robustness check is to use a different series for housing prices. The standard series is the Case-Shiller index, but it is only available from 1987 on making estimates with 20th century data and 5 year lags pointless. Instead, I used an index even cruder than the all transactions house price index. The median price of new homes is available from 1963q1 on. This series can’t be interpreted as a price index as no correction is made for changes in the quality of houses. This makes it much more necessary to include a time trend and much less likely that detrending will really yield a stationary series. That said, the results are similar to those obtained with the all transactions house price index.

lmedian L20 is the log of the ratio of the median price of a new home to the consumer price index lagged 20 quarters.

The correlation out of sample in the 21st century of the predicted 5 year gdp growth and actual 5 year gdp growth is greater than 0.66.

Finally, I consider the growth over 5 years of the log of the ratio of the median new house price to the cpi -- median5

This gives the smallest coefficient and t-statistic, but the computer remains convinced that the variable is hugely important. Again the 21st century correlation of forecasts made using the 5 year difference and outcomes is lower than that of forecasts made with levels and a trend and outcomes. The correlation is just 0.3847 . This is still pretty good for medium term macroeconomic forecasts. Again the problem is that the dramatic decline in house prices from 2006 to 2011 causes the computer to forecast an boom.

Mechanism

It isn’t hard to make at least a plausible guess as to the path from high relative housing prices to low subsequent GDP growth. Housing prices appear to be mean reverting and declining house prices cause low demand through three well known paths. First residential investment depends on the relative price of houses, because the profits of builders depend on those prices. Second consumption is affected by wealth including home equity. Finally, home equity loans relax liquidity constraints.

In fact, there is strong evidence that the relative price of housing is mean reverting and that a reduction is correlated with low contemporaneous GDP growth

In fact the OLS coefficient on lnindex L20 (the 5 year lagged log relative price) is roughly equal to the 2SLS coefficient, suggesting that other pathways might not be too important.

Conclusions

A high relative price of housing is correlated with low subsequent GDP growth over the following five years. This makes it possible to forecast 21st century 5 year growth rates using coefficients estimated with 20th century data. The data suggest the obvious path: mean reversion in housing prices and a negative effect of declining house prices on demand. The extremely simple regression suggests that a great recessin should have followed the extraordinary early 21st century housing bubble. In fact, the model dramatically over estimates the severity of the forecast recession.

Given the extreme ease of forecasting medium term GDP growth, it is odd that so much attention is devoted to models which give useful forecasts only a few quarters out. It is also odd that a huge literature focused on quite different mechanisms was developed after the great recession. But the oddest thing is that, in spite of the very clear evidence, macroeconomists often ignore residential investment and housing prices.