Portfolio choice with housing (model 35): down payment, mortgage repayment, home equity, and housing value dynamics

Dear Robert,

I am finally working on model 35, which is part of my research. However, I am having some coding issues. From what I understand, housing models can be categorized into at least three groups:

  1. All households start as renters and become homeowners at an age that is endogenously determined by the model (e.g., Fratantoni [2001] {Homeownership, committed expenditure risk, and the stockholding puzzle | Oxford Economic Papers | Oxford Academic}). Once they become homeowners, they cannot change the quantity of housing.

  2. All households start as renters in the first period (which may represent 5-10 years for computational reasons). In the second period, they become homeowners. In the third and subsequent periods, homeowners may purchase a new house or remain in their current one, and this pattern repeats (e.g., Cocco [2005] {Portfolio Choice in the Presence of Housing | The Review of Financial Studies | Oxford Academic}).

  3. All households start as renters in the first period (which may represent 5-10 years for computational reasons). In the second period, some renters endogenously become homeowners while others remain renters. In the third period, renters may stay renters or become homeowners, while homeowners may stay in their current house, buy a new house, or go back to renting, and so on (e.g., Hu [2005] {https://www.sciencedirect.com/science/article/abs/pii/S0094119005000148}).

Models in the first group are suitable for analysing the effects of housing consumption and mortgage debt. Models in the other groups are valuable for assessing the riskiness of housing, as they include housing trading. The riskiness can be measured through house price variability and background risk (positive correlation between house prices and income or stock returns). I think model 35 belongs to the second group but could be simplified to fit the first group. It would be great if the VFI toolkit could support all these types of housing models. However, I am writing to you about a different issue. Sorry for the lengthy introduction.

I am trying to adapt model 35 into a group 1 model with a more detailed focus on mortgage debt and home equity. Here is what I am aiming for:

A house is valued at 10 times the yearly income. Households finance the house with a down payment and a 20-year mortgage. In the year of purchase, the household pays the down payment (20% of the house value) and 1/20th of the mortgage (80% of the house value). Consequently, home equity starts at 20% of the house value and gradually increases to 100% over the next 20 years. The outstanding debt starts at 100% of the house value and decreases to 0% over 20 years. The housing value equals the market value, which may be affected by house price risk and background risk. Once households own their house, they do not sell it.

{I have reduced the number of housing grids from six to two, where 0 represents renting and 1 represents homeowning. The model successfully defines the age of homeownership endogenously, which is fine. However, with the grids set as (0:1), the housing value can only be zero or one. This is problematic because home equity should start with the down payment and then gradually increase to the full value. I am able to modify the budget constraints in the return function to include the down payment, mortgage payments, and maintenance costs based on housing status. However, I am unable to program mortgage debt repayment to stop after 20 years. I am also struggling to program the dynamics of home equity, mortgage debt, and housing value.}

Robert, is it possible to create a subtype of model 35, similar to models in group 1, that focuses on fundamental housing aspects like down payments, mortgage repayment, home equity, and housing value? Could you please provide me with some advice? Thank you very much!

Type 1: ā€œAll households start as renters and become homeowners at an age that is endogenously determined by the model (e.g., Fratantoni [2001]). Once they become homeowners, they cannot change the quantity of housing.ā€

I have not looked at Fratantoni 2001 yet (can you please include a link to the doi?). If you want to let them buy a house, but then never adjust, you can set it up as housing being binary [0,1], and then use the return function to give F=-Inf is they ever try to sell the house. Sounds like you already figured this out.

From the sounds of things though you want/need to keep track of the number of years since they bought the house. There would be two options, either have an endogenous state variable that counts years since they bought the house (so [0,1,…,19,20,21] as 21 grid points, then just use the return fn so that once they buy house (0 to 1), they are forced to increase the number by 1 every period until they reach 21 (which is 20 years after the bought house and so they can just stay in this), you could then make repayments/etc based on this state which counts years since they bought house. Alternatively, if you are happy to, e.g., require that everyone buy a house in first 10 periods of model (or never buy), you could use an endogenous state variable [0,1,…,9,10], which is 0 before a house and then records the model period they buy in (e.g 0 to 6 if buy house in period 6), and then you can easily calculate how many years they have had the house based on the current period and the period they purchased.

Do you also need different values of the house? Or just the endogenous year of buying the house? [Sounds like the answer is no, just one value of the house, namely 10x earnings]

PS. The toolkit does not currently have a way to exploit the fact that ā€˜years since purchased house’ is really just kind of residual to the model. So it will be solving a substantially harder question than necessary but should probably still run.

2 Likes

PPS. Actually, the age of house could probably be done quite nicely as a semi-exogenous state. But unfortunately I don’t think those work with riskyasset (is not currently coded to handle that combo)

Thank you for your quick response. It’s quite late here, so I will respond tomorrow.

Sure, I added links in the previous post. Although the Fratantoni [2001] model isn’t exactly what I’m aiming for, it’s a good starting point for more detailed housing models.

Yes, I tried a binary housing grid [0,1], and it works to some extent. Homeownership is defined endogenously, which is good, and it lasts indefinitely, which is also fine. However, I can’t set it so that households repay the mortgage only for 20 years and then are mortgage-free afterward. I tried modifying conditions in the return function, where if hā€²āˆ’h ≠ 0, the mortgage should be 1 for age i to i+20 but it didn’t work.

I could solve this by setting housing as an exogenous investment in a model without housing (e.g., model 31) because then it’s possible to specify the age at which households purchase a house and the periods when they will repay the debt. However, I need homeownership to be defined endogenously, as in model 35.

Using an endogenous state variable that counts the years since households bought a house ([0,1,…,19,20,21] as 21 grid points) seems like a solution. However, I need households to exit this interval after 20 years. I understand your suggestion conceptually but am unsure how to implement it. Could you please help me with integrating this idea into model 35?

Yes, I’d like the value of the house to change over the 20 years following purchase. In the first year of homeownership, the down payment should increase the housing value as a one-time boost (20% of the house value, approximately 2 years of income), while mortgage repayments should increase the housing value annually over the next 20 years (each year by 1/20 of 80% of the house value). At the same time, the down payment should reduce savings once, and the mortgage should reduce income annually for the next 20 years. (Other factors, like rent, maintenance costs, transaction costs, etc., can be added easily.)

I think adding this mechanism would enhance the current model 35 since down payment, mortgage repayment, home equity, and housing value dynamics are fundamental in housing models.

2 Likes

My thought was that 21 (or 22) would just be absorbing and represented ā€œown a house with no mortgageā€

I interpret this as that the gross value of the house is constant, and you are only talking about the net-of-mortgage value increasing (so we can model this as a constant house value, together with a decresing mortgage, and the net of these is increasing).

I will likely have time next week to set up a modified version of life-cycle model 35 that does this.

2 Likes

This is great! Thank you! Please let me know if you need someone to test the model, provide data regarding parameters, etc.

Yes, I was thinking that house value is constant in the fundamental setting we’re discussing. (Of course, if house value were to depend on market housing prices, then two additional important concepts could be introduced. First, variability in housing prices may increase the riskiness of housing, thereby decreasing households’ share of stocks. Second, if house prices are positively correlated with income, stock returns, or other household wealth sources, this could further amplify the riskiness of housing as an asset. Naturally, if households did not trade in housing, this concept would be less relevant. However, in reality, households may consider replacing an old house with a new one, so it is not unimportant. I’m just thinking aloud here; I’m also not sure how difficult this would be to implement.)

1 Like

I’ve realised that this really should use a semi-exogenous state, rather than a second endogenous state. Currently this is not possible (semi-exo with a riskyasset), but I will code it. However I won’t be coding it until January as I don’t have time until then.

All of which is to say I will do this properly, but not until January. Apologies for the delay but I think it will be worth doing properly as it will be both faster and use less memory.

2 Likes

Thank you, Robert. I hope the time until January passes quickly. :slight_smile:

2 Likes

Hi Robert, I have been thinking a lot about the updated model 35. I do not want to pressure you, just wondering when you expect this model to be available?

2 Likes

Now :grinning:

General idea of this model: riskyasset+semiz

Model is BIG: three decision variables, two endogenous states, four semi-exogenous states, and one exogenous markov state. As a result, I don’t have many points on each grid.

There are two endogenous states: housing (a standard endo state) and assets (a riskyasset state). These are both just like in Life-Cycle Model 35, nothing new with these. The first two decision variables are also just like in Life-Cycle Model 35 (riskyshare & savings), and so is the one exogenous markov state (which is exogenous earnings). Model is about making portfolio-choice decisions, and owning a house (which you can buy/sell at any age, and which comes in a few different sizes).

What is new is the third decision variable and the four semi-exogenous states (semiz). These are adding the following features: House prices can move up and down (first two semiz). You have a mortgage which cannot be modified (US mortgage markets are all messed up due to Fannie/Freddie, so is a plausible approximation, looks stupid in countries with sane mortgage markets, but the US is not one of them), and so you have to pay a certain amount for your mortgage (if you have one), and the mortgage has a fixed duration (third semiz). You can choose the size of downpayment when buying a house (fourth semiz, and most of the decision variable). Note, in a country with ā€˜sane’ mortgages, you could just use the Life-Cycle Model 35, and only add the first two semiz, with the decision variable taking only three values.

Because this model is so massive, I can only run it with smaller grids (on GPU with 8gb GDDR memory). Model period is now 5 years, this was particularly important as it reduces not only the number of model periods, but even more importantly in this model it reduces the number of points we need to keep track of how many years we have owned the house (which we need for the mortgage), 30 years is now just 6 periods, instead of 30 periods.

One thing this model does that none of the previous riskyasset examples bothered with (because they solved easy enough anyway) is take advantage of the fact that model evaluates on grids for n_d(1) and n_d(2) (which are aprimeFn inputs) but linearly-interpolates for n_a(2) (the riskyasset itself). Hence we can get best computational speed-accuracy outcomes by putting more points in n_d(1) and n_d(2), and less in n_a(2). This model is so big that having less n_a(2) is actually needed to run, but since they will be linearly interpolated between it is fairly minor.

I have only implemented a single combo of riskyasset+semiz at the moment (with z, without e, with the standard asset). I probably won’t do the other combos until the second half of this year (unless someone requests a specific combo, in which case I will do that one).

—---------

Comparing this model to the three papers you mentioned (and thinking purely about the state space of the model) the model above is substantially larger. I don’t promise I get the following correct, I am just briefly reading over the models:

Fratantoni (2001): Eliminate the first, second and fourth semiz states, and you get something like Fratantoni (2001). We track the mortgage duration (and the third decision variable is now just three values). Houses have to be purchased in period 2 (which obviously makes problem to be solved much smaller, but is not something toolkit could currently exploit anyway). Add an exogenous i.i.d shock in period 2 (to house price when purchasing). Sell house in period 7, with another i.i.d shock to house price (looks like the two shocks on buy and sell are i.i.d., not certain). Model has just 7 periods. So this can be solved with current VFI Toolkit features.

Cocco (2005): This is largely just life-cycle Model 35, as mortgages can be costlessly modified at any time (and hence you don’t track mortgage, just use collateral constraint against housing; see their Footnote 10). Add an exogenous i.i.d shock (alongside the markov, to determine earnings). Implied that uses lots of points for housing. Add in another exogenous i.i.d, which is binary valued, and is the ā€˜must sell house shock’. There is also a fixed-cost the first time you buy invest riskyshare>0, which could either be done as a binary endogenous state, or as a semi-exo state with binary value, and a binary decision variable to control it. Model has just 11 periods. So this can be solved with current VFI Toolkit features.

Hu (2005): Eliminate the first, second, and fourth semiz states, and you get Hu (2005). So the only thing we track is the mortgage duration (and the third decision variable is now just three values). Add in a second exogenous markov, which is binary valued, and is the ā€˜must sell house shock’. There is something about housing returns, but is a bit odd as it does not impact the price of a house if you buy one so not really sure what is up there, clearly some mathematical sophistry trying to get the core of the concept of a house return without having to model a house price. Implied that uses lots of points for housing. Model has just 5 periods. I don’t fully understand the trick around house prices (didn’t spend long on it either) but I think this can be solved with current VFI Toolkit features.

2 Likes

Note: Epstein-Zin preferences aren’t implemented yet, but should be able to do that next week. Will edit this post once done.

PS. You cannot currently use an i.i.d. e shock together with riskyasset+semiz. I will implement this later in the year. [Until this is done, some of the above three cannot actually be done exactly as is in toolkit.]

PPS. This hasn’t had the kind of testing of most toolkit features, so if you see some odd behaviour let me know and I will take a look (pretty sure it is all working right, but haven’t done proper testing).

PPPS. If you get out of memory error, you can always delete the ā€˜olddownpayment’ fourth semi-exogenous state, as even without this the model is still bigger than those in the three papers you mentioned.

1 Like

Wow, really nice! Now the toolkit can replicate Cocco (2005). It is a seminal paper in the household finance literature

1 Like

Robert, this is great! So happy for your post! Thank you so much! :slight_smile: :slight_smile: :slight_smile:

I am taking time off until Tuesday. I will try to run it when I come back and will study it in detail in the future. This model seems to be excellent! I think it has strong potential, both on its own and for using some parts of it in isolation within another model. For example, modelling leverage is a fundamental issue not only in mortgages for purchasing housing but also in financing other resources.

1 Like

The possibility of using Epstein-Zin preferences would be super! :+1:

3 Likes

@robertdkirkby Is there a document that explains the model equations for this new example? I’m not really interested into this model, at the moment, but I think it might be useful for other people who are into household finance and would like to use the toolkit.

2 Likes

For example, modelling leverage is a fundamental issue not only in mortgages for purchasing housing but also in financing other resources.

Yes, there are many heterogeneous-agent macro models with housing and collateral constraint where leverage is key. One example is Kaplan, Mitman and Violante (2020): ā€œThe Housing Boom and Bust: Model Meets Evidenceā€ published in the Journal of Political Economy (code is available here). In these models the GE aspect becomes important too (while most finance papers that I’ve seen are in partial equilibrium). But if you model aggregate shocks (such as financial shocks to the collateral constraint) as MIT shocks then the toolkit can do it.

2 Likes

pdf of model will be done when I do Epstein-Zin codes, so hopefully next week

3 Likes

working on the EZ prefs, just realised the ReturnFn I uploaded still contained my ā€œDo something stupidā€ where I put very specific things into return fn so that I knew exactly what the answer should be for the semi-exo states and I could see in the life-cycle profile graphs that things were working correctly, oops :rofl: I’ll clean it up when I upload the EZ prefs

1 Like