asgard-ai-platform/algo-price-elasticity
Calculate price elasticity of demand to quantify how price changes affect sales volume. Use this skill when the user needs to estimate demand sensitivity, set optimal prices, or evaluate the revenue impact of price changes — even if they say 'how sensitive are customers to price', 'will a price increase hurt sales', or 'elasticity calculation'.
npx skills add https://github.com/asgard-ai-platform/skills --skill algo-price-elasticity
Price elasticity measures the percentage change in quantity demanded for a 1% change in price. Ed = %ΔQ / %ΔP. |Ed| > 1 = elastic (price-sensitive), |Ed| < 1 = inelastic (price-insensitive). Critical for pricing decisions and revenue optimization.
Trigger conditions:
When NOT to use:
IRON LAW: Elasticity Is NOT Constant Along a Linear Demand Curve
It varies at every price point. At high prices, demand is elastic
(small price increase → big volume drop). At low prices, demand is
inelastic. Always calculate at the SPECIFIC price point of interest.
Revenue-maximizing price is where Ed = -1 (unit elastic).
Collect: price-quantity pairs over time (or across markets). Control for: seasonality, promotions, competitor actions, other confounders.
Gate: Minimum 10 price-quantity observations, confounders identified.
Point elasticity: Ed = (dQ/dP) × (P/Q) at a specific price point
Arc elasticity: Ed = ((Q₂-Q₁)/((Q₂+Q₁)/2)) / ((P₂-P₁)/((P₂+P₁)/2)) between two points
Regression method: log(Q) = α + β×log(P) + controls → β is the elasticity (constant elasticity model)
Check: sign should be negative (price up → quantity down). Cross-validate with holdout periods.
Gate: Elasticity is negative, confidence interval is reasonable.
Return elasticity estimate with revenue impact projection.
{
"elasticity": -1.5,
"interpretation": "elastic — 1% price increase → 1.5% quantity decrease",
"revenue_impact": {"price_change_pct": 10, "quantity_change_pct": -15, "revenue_change_pct": -6.5},
"metadata": {"method": "log-log regression", "r_squared": 0.82, "observations": 52}
}
Input: Price increased 10% from $100 to $110, quantity dropped from 1000 to 850
Expected: Arc elasticity = ((-150/925) / (10/105)) = -1.70 (elastic)
| Input | Expected | Why |
|-------|----------|-----|
| Luxury good | May be positive (Veblen) | Higher price → higher perceived value |
| Necessity (insulin) | Near zero | Demand barely responds to price |
| Perfect substitute available | Very elastic (< -3) | Customers switch immediately |
| Script | Description | Usage |
|--------|-------------|-------|
| scripts/arc_elasticity.py | Compute arc elasticity and revenue impact | python scripts/arc_elasticity.py --help |
Run python scripts/arc_elasticity.py --verify to execute built-in sanity tests.
references/regression-estimation.mdreferences/cross-price.mdTake asgard-ai-platform/algo-price-elasticity from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.