Supply and Demand Accounting

Regression models of real estate prices don’t account for supply and demand affects. The supplydemand module has models that work in tandem with location choice models to estimate supply and demand and adjust real estate prices to compensate for mismatches.

API

Tools for modeling how supply and demand affect real estate prices.

urbansim.models.supplydemand.supply_and_demand(lcm, choosers, alternatives, alt_segmenter, price_col, base_multiplier=None, clip_change_low=0.75, clip_change_high=1.25, iterations=5, multiplier_func=None)[source]

Adjust real estate prices to compensate for supply and demand effects.

Parameters
lcmLocationChoiceModel

Used to calculate the probability of agents choosing among alternatives. Must be fully configured and fitted.

chooserspandas.DataFrame
alternativespandas.DataFrame
alt_segmenterstr, array, or pandas.Series

Will be used to segment alternatives and probabilities to do comparisons of supply and demand by submarket. If a string, it is expected to be the name of a column in alternatives. If a Series it should have the same index as alternatives.

price_colstr

The name of the column in alternatives that corresponds to price. This column is what is adjusted by this model.

base_multiplierpandas.Series, optional

A series describing a starting multiplier for submarket prices. Index should be submarket IDs.

clip_change_lowfloat, optional

The minimum amount by which to multiply prices each iteration.

clip_change_highfloat, optional

The maximum amount by which to multiply prices each iteration.

iterationsint, optional

Number of times to update prices based on supply/demand comparisons.

multiplier_funcfunction (returns Series, boolean)

A function which takes separate demand and supply Series and returns a tuple where the first item is a Series with the ratio of new price to old price (all indexes should be the same) - by default the ratio of demand to supply is the ratio of the new price to the old price. The second return value is a boolean which when True tells this module to stop looping (that convergence has been satisfied)

Returns
new_pricespandas.Series

Equivalent of the price_col in alternatives.

submarkets_ratiospandas.Series

Price adjustment ratio for each submarket. If base_multiplier is given this will be a cummulative multiplier including the base_multiplier and the multipliers calculated for this year.