Can VFI agents trade? An auction question

This may be a naive question, but here goes…

Imagine a model where the household problem is to maximize consumption subject to labor vs. leisure, ROI on financial assets (shares in firms), and buying vs. renting houses.

The firm problem is to maximize profits based on output minus cost of labor*wages, issuing shares and paying dividends on those shares, and selling houses for profit to households that want to buy houses at that price.

We could imagine that at each step of the lifecycle there are a certain number of agents who want to buy houses, a certain number who want to sell houses, and the firm has a certain capacity to produce houses profitably at a price (to make up the difference between households buying and selling houses). Households would need to discount their houses to sell successfully the firm’s new price house.

A google search tells me that VFI is a well-known technique for modeling auctions. Is it sensible to try to implement an auction step in a VFIToolkit Life-Cycle or OLG model? If so, what would the pseudo-code look like?

I suspect that google got a bit confused between ‘Walrasian auctioneer’ and ‘auctions’. Walrasian auctioneer is just a technical way to give an alternative view of perfect competition equilibrium.

Most auctions are static and so can be solved statically. For example

shows solving some auctions. A multi-round auction is dynamic, so would be more complex, but you don’t see them often in models (outside of the literature that does nothing but model auctions).

I expect if you have a different auction each period, you could set up the static auctions as a complicated kind of general eqm condition (might have to be hand coded) and then use VFI to handle the dynammics of having an auction each period.

We could imagine that at each step of the lifecycle there are a certain number of agents who want to buy houses, a certain number who want to sell houses, and the firm has a certain capacity to produce houses profitably at a price (to make up the difference between households buying and selling houses). Households would need to discount their houses to sell successfully the firm’s new price house.

This just sounds like a description of perfect competition: there is a price of houses that is determined by the ‘house construction firm’ marginal cost (or free entry), and all buy/sell of houses occurs at this price. [If you don’t allow ‘deconstructing houses’ you would need to also spell out what happens with selling houses than buying houses.]

Models with houses in general eqm (that is, that have a house market that must clear) tend to take one of two approaches. The one you described (a ‘house construction production fn’ the marginal product of which determines house price). Or a ‘search-and-matching’ market for housing (which is a complex form of general equilibrium condition).

How does this sound:

When in the GEq step, agents with ages create a diverse market of buyers and sellers (younger agents might be buyers with older agents being sellers). Agents with infinite horizons are (by their PTypes) always sellers or buyers. We find the price(s) that maximally clears the markets by looking at who wants to buy/sell at the assumed value. Then we feed the buy/sell prices into the next GEq step, which may cause some buyers to decide to sell or some sellers decide to buy. The GEq is satisfied when prices (with a certain sized wedge between them) stabilize across the ages and the firms.

Is that a reasonable strategy for trading or is it fundamentally flawed?

Sounds about right.

Technically since we only look at the stationary general eqm (I’m assuming no transition path here) we don’t actually have to spell out exactly how we get from ‘not yet clear market’ to ‘clear market’ as we are only considering outcomes in which we do have ‘clear market’, but what you are describing is intuitively how the model is doing this (that is essentially what the code is doing when we are solving for the stationary general eqm by trying to get the GeneralEqmEqns to be zeros, although it might be done, e.g., in prices rather than quantities).

1 Like

For viewers of this channel watching from home, I can now estimate my housing demand using the CustomModelStats feature:

function CustomStats=Electrify_HouseholdCustomModelStats(V,Policy,StationaryDist,Parameters,FnsToEvaluate, ...
        n_d,n_a,n_z,N_j,d_grid,a_grid,z_gridvals_J,pi_z_J,heteroagentoptions,vfoptions,simoptions)
CustomStats=struct();

% Houses come in 4 sizes (1..4)
CFnsToEvaluate.H1buy = @(labor,buyhouse,sprime,aprime,hprime,s,a,h,solarpv,z,e) h~=hprime && hprime==1;
CFnsToEvaluate.H2buy = @(labor,buyhouse,sprime,aprime,hprime,s,a,h,solarpv,z,e) h~=hprime && hprime==2;
CFnsToEvaluate.H3buy = @(labor,buyhouse,sprime,aprime,hprime,s,a,h,solarpv,z,e) h~=hprime && hprime==3;
CFnsToEvaluate.H4buy = @(labor,buyhouse,sprime,aprime,hprime,s,a,h,solarpv,z,e) h~=hprime && hprime==4;
CFnsToEvaluate.H1sell = @(labor,buyhouse,sprime,aprime,hprime,s,a,h,solarpv,z,e) h~=hprime && h==1;
CFnsToEvaluate.H2sell = @(labor,buyhouse,sprime,aprime,hprime,s,a,h,solarpv,z,e) h~=hprime && h==2;
CFnsToEvaluate.H3sell = @(labor,buyhouse,sprime,aprime,hprime,s,a,h,solarpv,z,e) h~=hprime && h==3;
CFnsToEvaluate.H4sell = @(labor,buyhouse,sprime,aprime,hprime,s,a,h,solarpv,z,e) h~=hprime && h==4;
CFnsToEvaluate.H_u = @(labor,buyhouse,sprime,aprime,hprime,s,a,h,solarpv,z,e) (h>0); % Unit house holdings
CFnsToEvaluate.PV_u = @(labor,buyhouse,sprime,aprime,hprime,s,a,h,solarpv,z,e) (solarpv>0); % Unit solarpv holdings

AgeConditionalStats=LifeCycleProfiles_FHorz_Case1(StationaryDist,Policy,CFnsToEvaluate,Parameters,[],n_d,n_a,n_z,N_j,d_grid,a_grid,z_gridvals_J,simoptions);

mean_buyers=[AgeConditionalStats.H1buy.Mean; AgeConditionalStats.H2buy.Mean; AgeConditionalStats.H3buy.Mean; AgeConditionalStats.H4buy.Mean];
mean_sellers=[AgeConditionalStats.H1sell.Mean; AgeConditionalStats.H2sell.Mean; AgeConditionalStats.H3sell.Mean; AgeConditionalStats.H4sell.Mean];

hbuyers=1000*mean_buyers.*Parameters.mewj;
hsellers=1000*mean_sellers.*Parameters.mewj;
hunits=(1:4)';

% Compute the demand independently of buyers and sellers, in case of rounding error
hdemand=sum(round(hbuyers-hsellers),2).*hunits;
hdemand_total=sum(hdemand);

CustomStats.hbuyers_total=sum(sum(round(hbuyers),2).*hunits);
CustomStats.hsellers_total=sum(sum(round(hsellers),2).*hunits);
CustomStats.hdemand_total=hdemand_total;

% CustomStats tells the factory how many net house units need to be built
% It does not specify how many of what size house to build
% Typically for this model, we need about 42 units +/- 6, which can then be scaled as needed to other economic statistics

return
2 Likes