pyblp.ProblemResults.compute_prices¶

ProblemResults.
compute_prices
(firm_ids=None, ownership=None, costs=None, prices=None, iteration=None, market_id=None)¶ Estimate equilibrium prices after firm or cost changes, \(p^*\).
Note
To compute equilibrium prices (and shares) associated with a more complicated counterfactual, a
Simulation
for the counterfactual can be initialized with the estimated parameters, structural errors, and marginal costs from these results, and then solved withSimulation.replace_endogenous()
. The returnedSimulationResults
gives more information about the contraction than this method, such as the number of contraction evaluations.Prices are computed in each market by iterating over the \(\zeta\)markup contraction in (46):
(1)¶\[p^* \leftarrow c^* + \zeta^*(p^*),\]in which the markup term from (43) is
(2)¶\[\zeta^*(p^*) = \Lambda^{1}(p^*)[\mathscr{H}^* \odot \Gamma(p^*)]'(p^*  c^*)  \Lambda^{1}(p^*)s(p^*)\]where \(\mathscr{H}^*\) is the ownership matrix associated with firm changes.
Warning
This routine assumes that marginal costs, \(c\), remain constant. This may not be the case if
shares
was included in the formulation for \(X_3\) inProblem
. Parameters
firm_ids (arraylike, optional) – Potentially changed firm IDs. By default, the unchanged
firm_ids
field ofproduct_data
inProblem
will be used.ownership (arraylike, optional) – Potentially changed ownership matrices. By default, standard ownership matrices based on
firm_ids
will be used unless theownership
field ofproduct_data
inProblem
was specified.costs (arraylike) – Potentially changed marginal costs, \(c^*\). By default, unchanged marginal costs are computed with
ProblemResults.compute_costs()
. Costs under a changed ownership structure can be computed by specifying thefirm_ids
orownership
arguments ofProblemResults.compute_costs()
. If marginal costs depend on prices through market shares, they will be updated to reflect different prices during each iteration of the routine. Updated marginal costs can be obtained by instead usingSimulation.replace_endogenous()
.prices (arraylike, optional) – Prices at which the fixed point iteration routine will start. By default, unchanged prices, \(p\), are used as starting values. Other reasonable starting prices include the approximate equilibrium prices computed by
ProblemResults.compute_approximate_prices()
.iteration (Iteration, optional) –
Iteration
configuration for how to solve the fixed point problem in each market. By default,Iteration('simple', {'atol': 1e12})
is used. Analytic Jacobians are not supported for solving this system.market_id (object, optional) – ID of the market in which to compute equilibrium prices. By default, equilibrium prices are computed in all markets and stacked.
 Returns
Estimates of equilibrium prices after any firm or cost changes, \(p^*\).
 Return type
ndarray
Examples