Truth: The Strength and Weakness of AI Coding

There was a seismic shift in the AI world recently. In case you didn’t know, a Claude Code update was released just before the Christmas break. It could code awesomely and had a bigger context window, which is sort of like memory and attention span. Scott Cunningham wrote a series of posts demonstrating the power of Claude Code in ways that made economists take notice. Then, ChatGPT Codex was updated and released in January as if to say ‘we are still on the frontier’. The battle between Claude Code and Codex is active as we speak.

The differentiation is becoming clearer, depending on who you talk to. Claude Code feels architectural. It designs a project or system and thrives when you hand it the blueprint and say “Design this properly.” It’s your amazingly productive partner. Codex feels like it’s for the specialist. You tell it exactly what you want. No fluff. No ornamental abstraction unless you request it.

Codex flourishes with prompts like “Refactor this function to eliminate recursion”, or “ Take this response data and apply the Bayesian Dawid-Skene method. It does exactly that. It assumes competence on your part and does not attempt to decorate the output. It assumes that you know what you’re doing. It’s like your RA that can do amazing things if you tell it what task you want completed. Having said all of this, I’ve heard the inverse evaluations too. It probably matters a lot what the programmer brings to the table.

Both Claude Code and Codex are remarkably adept at catching code and syntax errors. That is not mysterious. Code is valid or invalid. The AI writes something, and the environment immediately reveals whether it conforms to the rules. Truth is embedded in the logical structure. When a single error appears, correction is often trivial.

When multiple errors appear, the problem becomes combinatorial. Fix A? Fix B? Change the type? Modify the loop? There are potentially infinite branching possibilities. Even then, the space is constrained. The code must run, or time out. That constraint disciplines the search. The reason these models code so well is that the code itself is the truth. So long as the logic isn’t violated, the axioms lead to the result. The AI anchors on the code to be internally consistent. The model can triangulate because the target is stable and verifiable.

AI struggles when the anchor disappears

Continue reading

Against Eugenics, on its Own Terms

Once upon a time, eugenics was all the rage. It was nascent during the reconstruction era and persisted into the 20th century. It grew out of biological evolutionary theory and emphasized reproductive fitness. In brief, the theory asserted that there are differences in individual fitness and that the more fit living things will survive better and reproduce, eventually becoming a greater part of the population. The ability to compile and evaluate statistics about various human measurements made inferences hard to resist. Of course, researchers were plagued by small sample size, omitted variable bias, and social biases of the day (for example, phrenology inferred fitness characteristics from skull shape).

People employing eugenic thinking, overwhelmingly, supported theories that their own type of person was among the more fit. Eugenicists didn’t promote theories of their own un-fitness. In the progressive era of the early 20th century, eugenics met the prevailing attitude that government could be employed to resolve social and economic ills. This era is when the income tax emerged, prohibition was enacted, the Federal Reserve was formed, and various labor regulations were enacted.

The result was that policy sometimes pursued greater ‘fitness’ among its populations. Rather than systematically encouraging the supposedly more fit with economic incentives, most policy was geared toward reducing the reproductive success of supposedly less fit people. These included forced sterilization, institutionalization, and economic exclusion. Besides rejecting basics individual human dignity, the harm was all the more tragic given that fitness was often poorly specified. That is, policy criteria weren’t dependably related to fitness. Fatal conceit, indeed!

One of my favorite ways to argue is to grant premises and then change details on the margin to see whether the conclusion changes. Let’s do that. Let’s grant that there are innate differences between people that are related to biological success. Since survivability is related to resource acquisition, let’s grant also that economic success overlaps at least somewhat.  Taking that as granted, does pursuit of the historical eugenic policy still follow?

It does not.

There are two mistakes that eugenicists and various sorts of racists and xenophobes made. They assert or imply 1) that fitness characteristics are stable and systematically identifiable, and 2) that policy needed to intentionally select for the fitness characteristics.

Continue reading

Drawbacks of Long Term Thinking

This post is just some thoughts about perspective. I apologize for any lack of organization.

My academic influences include North, Weingast, Coase, Hayek, the field of Public Choice, and others. I’m not an ‘adherent’ to any school of thought. Those guys just provided some insights that I find myself often using.

What lessons did they teach? Plenty. When I see the world of firms, governments, and other institutions, I maintain a sharp distinction between intention and outcome. Any given policy that’s enacted is probably not the welfare maximizing one, but rather must keep special interests relatively happy. So, the presence of special interests is a given and doesn’t get me riled up. When I see an imperfect policy outcome, I think about who had to be enticed to vote for it. We live in a world where ‘first bests’ aren’t usually on the table.

Historically, or in lower income countries, I think about violence. Their rules and laws are not operating in a vacuum of peaceful consent. There is always the threat of violence. Laws are enforced (or not) conditional on whether and what type of violence that may result. All of the ideal legislation is irrelevant if theft and fraud are the lay of the land.

I think about institutional evolution with both internal and external pressures. I’m a bit worried about the persistence of the US republic, or at least worried for its pro-growth policies. I’m not worried about China in the long run. I don’t think they have the institutions that get them to ‘high income’ status. I do think that they are a tactical concern in the short run and that the government does/will have access to great volumes of resources in the medium run. That’s a bit of a concern. But like I said, I’m not super worried in the long run.

Continue reading

Which Economies Grow with Shrinking Populations?

If you didn’t know, China has had negative population growth for the past 4 years. Japan has had negative population growth for the past 15 years. The public and economists both have some decent intuition that a falling population makes falling total output more likely. Economists, however, maintain that income per capita is not so certain to fall. After all, both the numerator and denominator of GDP per capita can fall such that the net effect on the entire ratio is a wash or even increase. In fact, aggregate real output can still continue to grow *if* labor productivity rises faster than the rate of employment decline.

But this is a big if. After all, some of the thrust of endogenous growth theory emphasizes that population growth corresponds to more human brains, which results in more innovation when those brains engage with economic problems. Therefore, in the long run, smaller populations innovate more slowly than larger populations. Furthermore, given that information can cross borders relatively easily no one on the globe is insulated from the effects of lower global population. Because information crosses borders relatively well, the brains-to-riches model doesn’t tell us who will innovate more or experience greater productivity growth.

What follows is not the only answer. There are certainly multiple. For example, recent Nobel Prize winner Joel Mokyr says that both basic science *and* knowledge about applications must grow together. That’s not the route that I’ll elaborate.

Continue reading

Costly University Interviews can be Worthwhile

I’m writing because I am catching up on the backlog of The Answer is Transaction Costs (TAITC), a podcast hosted by Michael Munger. Specifically, in an episode published August 27, 2024, a listener writes asking about what seems to be the extremely costly practice of interviewing college applicants prior to acceptance.

As it turns out, I work at a private university that enacted an interview policy in a quasi-random way and the university president gave me permission to share.

Initially, my university did not interview standard applicants. Our aid packages were poorly designed because applicants tend to look similar on paper. There was a pooling equilibrium at the application stage. As a result, we accepted a high proportion and offered some generous aid packages to students who were not good mission fits and we neglected some who were. Aid packages are scarce resources, and we didn’t have enough information to economize on them well.

The situation was impossible for the admissions team. The amount of aid that they could award was endogenous to the number of applicant deposits because student attendance drives revenue. But, the deposits were endogenous to the aid packages offered! There was a separating equilibrium where some good students attended along with some students who were a poor fit and were over-awarded aid. The latter attended one or two semesters before departing the university, harming retention and revenues. Great but under-awarded students tended not to attend our university. Student morale was also low due to poor fits and their friends leaving.

Continue reading

Rising Chinese Zombie Firms

Have you ever looked up and wondered where the time went? One moment you’re living your life, and the next moment you realize that you’ve just lost time that you’ll never get back? That’s what happened to Japan’s economy at the turn of the century in an episode that’s known as ‘the lost decades’. It was a period of slow or null economic growth. Economists differ with their explanations. One cause was the prevalence of ‘zombie firms’.

Japan’s Economy

Japan had a current account surplus from 1980-2020, which means that they had more savings than they effectively utilized domestically. Metaphorically, they were so full of savings that they exhausted productive domestic investment opportunities and their savings spilled out into other counties in the form of foreign investments. This was driven by high household savings and slow growth in domestic investment demand. The result was the Japanese firms had easy access to credit. Maybe a little too easy…

Private corporate debt ballooned throughout the 1980s. That’s not intrinsically a problem. In the 1990s, households began saving somewhat less, and most firms began to drastically deleverage… But not all firms. The net effect of the mass deleveraging was that interest rates fell.  The firms that remained in debt were the ones that risked insolvency. Less productive firms had slim profits and their Earnings Before Interest, Taxes, Depreciation, and amortization (EBITDA) was slim. So slim, that they couldn’t pay their debts. Faced with the prospect of insolvency, firms did what was sensible. They refinanced at the lower interest rates. Firms went to their banks and to bond markets and rolled over their debt, which they couldn’t afford, and replaced it with debt that had a lower interest rate. This occurred across industries, but especially in non-tradable goods and services that were insulated from international competition. Crisis averted.

Except this process of refinancing, while avoiding acute defaults and a potential financial crises, ensured that the less productive firms would survive. Not exactly failing and not exactly thriving, they could sort of just hold on to something that looks like life. Well, high debt and low profits aren’t much of a life for a firm. It’s more like being undead – like a zombie. Between 1991 and 1996, the share of non-finance firm assets held by zombie firms ballooned from 3% to 16%. The run-up differed by industry: Manufacturing zombie assets rose from 2% to 12%, from 5% to 33% in real estate, and from 11% to 39% in services.  These zombie firms linger on, tying up valuable resources with low-productivity activities and drag on the economy.

China’s Economy

I’m not prone to China hysteria generally. However, I do have uncertainty about the plans and actions of the Chinese government because I don’t know that domestic economic welfare is its priority. That makes forecasting more political and less economic and outside my expertise. Regardless, the Chinese economy is a constraint on the government, whether they like it or not.  And there are some echoes of the Japanese economy’s lost decades.

Continue reading

Tariffs Are Not Smart Industrial Policy

Economists overwhelmingly see tariffs as clearly welfare-reducing. Tariffs on imports result in higher prices, fewer imports, less consumption, and more domestic production. In fact, it is the higher prices that solicit and make profitable the greater domestic production. We don’t get the greater domestic output at the pre-tariff price. We can show graphically that domestic welfare is harmed with either export or import tariffs. The basic economics are very clear.

However, the standard model of international trade makes a huge assumption: Peace. That is, the model assumes that there are secure property rights and no threats of violence. All transactions are consensual. This is where the political scientists, who often don’t understand the model in the first place, say ‘Ah ha!. Silly economists…’ They proceed to argue for tariffs on the grounds of national security and the need for emergency manufacturing capacity. But is an intellectual mistake.  

Just as economists have a good idea for how to increase welfare with exchange, we also have good ideas about how to achieve greater or fewer quantities transacted in particular markets. This is not a case of economists knowing the ideal answer that happens to be politically impossible.  Rather, if it pleases politicians, economists can provide a whole menu of methods to increase US manufacturing, vaccine manufacturing, weapons manufacturing… Heck, we can identify multiple ways to achieve more of just about any good or service. Let the politicians choose from the menu of alternatives.

The problem with tariffs is that they reduce consumer welfare a lot, given some amount of increased production in the protected industry. Importantly, this assumes that the tariffs aren’t hitting inputs to those industries and are only being applied to direct foreign competitors. The below argument is even stronger against imperfectly applied tariffs, like the US tariffs of 2025.

What’s the alternative?

The alternative is a more focused tack. If the government wants more missile or ship production, then what should it do? There’s plenty, but here’s a short list of more effective and less harmful alternatives to tariffs:

Continue reading

Investing: You Vs. All Possible Worlds

This post illustrates a couple of things that I learned this year with an application in finance. I learned about the simplex when I was researching amino acids. I learned some nitty-gritty about portfolio theory. These combined with my pre-existing knowledge about game theory and mixed strategy solutions.

Specifically, I learned a way of visualizing all possible portfolio returns. This post narrowly focuses on 3 so that I can draw a picture. But the idea generalizes to many assets.

Say that I can choose to hold some combination of 3 assets (A, B, & C), each with unique returns of 0%, 20%, and 10%. Obviously, I can maximize my portfolio return by investing all of my value in asset B. But, of course, we rarely know our returns ex ante. So, we take a shot and create the portfolio reflected in the below table. Our ex post performance turns out to be a return of 15%.

That’s great! We feel good and successful. We clearly know what we’re doing and we’re ripe to take on the world of global finance. Hopefully, you suspect that something is amiss. It can’t be this straightforward. And it isn’t. At the very least, we need to know not just what our return was, but also what it could have been. Famously, a monkey throwing darts can choose stocks well. So, how did our portfolio perform relative to the luck of a random draw? Let’s ignore volatility or assume that it’s uncorrelated and equal among the assets.  

Visualizing Success with Two Assets

Say that we had only invested in assets A and B. We can visualize the weights and returns easily. The more weight we place on asset A, the closer our return would have been to zero. The more weight that we place on asset B, the closer our return would have been to 20%.

If we had invested 75% of our value in asset B and 25% in A, then we would have achieved the same return of 15%. In this two-asset case, it is clear to see that a return of 15% is better than the return earned by 75% of the possible portfolios. After all, possible weights are measures on the x-axis line, and the leftward 75% of that line would have earned lower returns.  Another way of saying the same thing is: “Choosing randomly, there was only a 25% that we could have earned a return greater than 15%.”  

Visualizing Success with Three Assets

Continue reading

Consumption Then and Now: 2019-2025

In aggregate, consumer spending on different broad categories of goods is relatively stable. The year 2019 feels like forever ago – and it was more than half a decade ago. But since then we’ve been hit by a pandemic and an AI shock and a trade war, and tariffs, and… plenty. We live in different times. Except, broadly, consumers are spending their money much as they did six years ago. Let’s compare some data from the 2nd quarter of 2019 and 2025.

First the Spending

Consumption spending is categorized in the below table.    

If total consumption spending (not inflation-adjusted) is 100%, then how has the allocation of spending changed? Below is a graph comparing each consumption component’s 2019 share versus 2025. The dotted line denotes an identical share. I haven’t labeled the categories because, suffice it to say, that spending shares are little different. None is more than one percentage point different.

The below figure displays the spending share difference. We’re spending less of our consumption on gasoline and the like, recreational services, and clothing. Surprisingly, we’re also spending less on healthcare and food for off-premises consumption (non-restaurants). However, we’re spending a greater share on housing, recreational goods, food services for on-premises consumption (restaurants). 

Let’s get Real

Continue reading

Do Tariffs Decrease Prices?

Much of what economics has to say about tariffs comes from microeconomic theory. But it’s mostly sectoral in nature. Trade theory has some insights. But the effects on the whole of an economy are either small, specific to undiversified economies, or make representative agent assumptions that avoid much detail. Given that the economics profession has repeatedly said that the Trump tariffs would contribute to inflation, it seems like we should look at the historical evidence.

Lay of the Land

Economists say things like ‘competition drives prices closer to marginal cost’. Whether the competitor lives abroad is irrelevant. More foreign competition means lower prices at home. But that’s a partial equilibrium story. It’s true for a particular type of good or sector. What happens to prices in the larger economy in seemingly unrelated industries? The vanilla thinking that it depends on various elasticities.

I think that the typical economist has a fuzzy idea that the general price level will be higher relative to personal incomes in some sort of real-wages and economic growth mental model. I don’t think that they’re wrong. But that model is a long-run model. As we’ve discovered, people want to know about inflation this month and this year, not the impact on real wages over a five-year period.

Part of the answer is technical. If domestic import prices go up, then we’ll sensibly see lower quantities purchased. The magnitude depends on the availability of substitutes. But what should happen to total import spending? Rarely do we talk about the expenditure elasticity of prices. Rarely do we get a simple ‘price shock’ in a subsector. It’s unclear that total spending on imports, such as on coffee, would rise or fall – not to mention the explicit tax increase. It’s possible that consumers spend more on imports due to higher prices, or less due to newly attractive substitutes. The reason that spending matters is that it drives prices in other parts of the economy.

For example, I argued previously that tariffs reduce dollars sent abroad (regardless of domestic consumer spending inclusive of tariffs) and that fewer dollars will return as asset purchases. I further argued that uncertainty makes our assets less attractive. That puts downward pressure on our asset prices. However, assets don’t show up in the CPI.

According to the above discussion, it’s unclear whether tariffs have a supply or demand impact on the economy. The microeconomics says that it’s a supply-side shock. But the domestic spending implications are a big question mark.

What is a Tariff Shock?

That’s the title of a recent working paper from the Federal Reserve Bank of San Francisco. It’s a fun paper and I won’t review the entirety. They start by summarizing historical documents and interpreting the motivation of tariffs going back to 1870. They argue that tariffs are generally not endogenous to good or bad moments in a business cycle and they’re usually perceived as permanent. The authors create an index  to measure tariff rates.

Here’s the fun part. They run an annual VAR of unemployment, inflation, and their measure of tariffs. Unemployment in negatively correlated with output and reflects the real side of the economy. Along with inflation, we have the axes of the Aggregate Supply & Aggregate Demand model. Tariffs provide the shock – but to supply or demand?.  Below are the IRF results:

Continue reading