Skip to content

Commit

Permalink
Implement restrictions to the decision to sell one's home
Browse files Browse the repository at this point in the history
These new restrictions include:
- Do not sell if maximum mortgage price limit would bring the household to rent anyway
- Do not sell if a cash purchase would not lead to an increase in quality
  • Loading branch information
adrian-carro committed Apr 28, 2022
1 parent 712b51d commit c9e6607
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/main/java/housing/Household.java
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ private void bidForAHome() {
********************************************************/
private boolean decideToSellHouse(House h) {
if(h == home) {
return(behaviour.decideToSellHome());
return(behaviour.decideToSellHome(this, h));
} else {
return(behaviour.decideToSellInvestmentProperty(h, this));
}
Expand Down
29 changes: 23 additions & 6 deletions src/main/java/housing/HouseholdBehaviour.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,30 @@ public class HouseholdBehaviour {

/**
* This method implements a household's decision to sell their owner-occupied property. On average, households sell
* owner-occupied houses every 11 years, due to exogenous reasons not addressed in the model.
*
* @return True if the owner-occupier decides to sell the house and false otherwise.
* owner-occupied houses every X years, due to exogenous reasons not addressed in the model.
* @param me the household considering selling
* @param h the house that might be put for sale
* @return True if the owner-occupier decides to sell the house, false otherwise
*/
boolean decideToSellHome() {
// TODO: This if implies BTL agents never sell their homes, need to explain in paper!
return !isPropertyInvestor() && (prng.nextDouble() < config.derivedParams.MONTHLY_P_SELL);
boolean decideToSellHome(Household me, House h) {
// Quick decisions...
// ...households with the BTL flag never sell their homes
if (isPropertyInvestor()) {
return false;
}
// ...do not consider selling if maximum mortgage price constraint would make the household choose renting
if ((me.getDesiredPurchasePrice() > Model.bank.getMaxMortgagePrice(me, true)) && (me.getAge() > 35.0)) {
return false;
}
// ...do not consider selling if the household's current net wealth would not allow it to move up in quality
double netWealth = me.getBankBalance() + housingMarketStats.getExpAvSalePriceForQuality(h.getQuality())
- ((MortgageAgreement) me.getHousePayments().get(h)).principal;
if ((housingMarketStats.getMaxQualityForPrice(netWealth) <= h.getQuality()) && (me.getAge() > 45.0)) {
return false;
}

// Finally, if none of the above kicks in, apply the calibrated monthly probability to sell
return prng.nextDouble() < config.derivedParams.MONTHLY_P_SELL;
}

/**
Expand Down

0 comments on commit c9e6607

Please sign in to comment.