pyblp.ProblemResults.compute_profit_hessians

ProblemResults.compute_profit_hessians(prices=None, costs=None, market_id=None)

Estimate arrays of second derivatives of profits with respect to a prices.

In market \(t\), the value indexed by \((j, k, \ell)\) is

(1)\[\frac{\partial^2 \pi_{jt}}{\partial p_{kt} \partial p_{\ell t}}.\]

Profit Hessians can be used to check second order conditions for firms’ pricing problem. See SimulationResults.profit_hessians and SimulationResults.profit_hessian_eigenvalues for more information.

Parameters
  • prices (array-like, optional) – Prices, \(p\), such as equilibrium prices, \(p^*\), computed by ProblemResults.compute_prices(). By default, unchanged prices are used.

  • costs (array-like) – Marginal costs, \(c\). By default, marginal costs are computed with ProblemResults.compute_costs(). Costs under a changed ownership structure can be computed by specifying the firm_ids or ownership arguments of ProblemResults.compute_costs().

  • market_id (object, optional) – ID of the market in which to compute Hessians. By default, Hessians are computed in all markets and stacked.

Returns

Estimated \(J_t \times J_t \times J_t\) arrays of second derivatives of profits. If market_id was not specified, arrays are estimated in each market \(t\) and stacked. Indices for a market are in the same order as products for the market. If a market has fewer products than others, extra indices will contain numpy.nan.

Return type

ndarray

Examples