Implement dynamic pricing strategies that adjust prices in real-time based on demand, time, and competition. Use this skill when the user needs to build a dynamic pricing system, implement surge pricing, or optimize prices for perishable inventory — even if they say 'real-time pricing', 'surge pricing', or 'demand-based price adjustment'.
Dynamic pricing adjusts prices in real-time based on demand signals, time, inventory, and competitive conditions. Common in airlines, hotels, ride-sharing, and e-commerce. Objective: maximize revenue (or profit) subject to capacity/inventory constraints.
Trigger conditions:
When NOT to use:
IRON LAW: Dynamic Pricing Requires REAL-TIME Data
Stale data produces prices optimal for PAST conditions, not current ones.
Three data streams must be current:
1. Demand signal (bookings, searches, cart additions)
2. Inventory/capacity status
3. Competitive prices (where applicable)
Update frequency: minutes for ride-sharing, hours for hotels, daily for retail.
Collect: current demand indicators, remaining inventory/capacity, time until expiration/event, competitor prices, price floor/ceiling constraints. Gate: Real-time data feeds connected, business rules defined.
Rule-based: If demand > threshold, increase price by X%. Tiered rules by inventory level.
Demand-curve based: 1. Estimate demand curve at current conditions. 2. Find price that maximizes revenue = P × Q(P). 3. Apply inventory constraint: if capacity is scarce, price up; if excess, price down.
ML-based: Train model to predict demand at each price point given context features. Optimize over predicted demand curve.
Monitor: revenue per unit, booking pace, customer complaints, competitive position. A/B test new pricing rules. Gate: Revenue improved without significant volume loss or customer backlash.
Return recommended price with reasoning and expected impact.
{
"recommended_price": 1200,
"current_price": 999,
"reasoning": {"demand_signal": "high", "inventory_remaining_pct": 15, "competitor_avg": 1100},
"expected_impact": {"revenue_change_pct": 18, "volume_change_pct": -5},
"metadata": {"strategy": "demand-curve", "update_frequency": "hourly"}
}
Input: Hotel room, 3 days until date, 85% occupancy, average competitor price $150 Expected: Price above competitor ($160-170) due to high occupancy, short time horizon.
| Input | Expected | Why |
|---|---|---|
| Zero demand | Drop to floor price | Stimulate demand, recover some revenue |
| Last unit available | Price near ceiling | Scarcity maximizes willingness to pay |
| Competitor flash sale | Don't auto-match if unnecessary | Avoid price war; assess if your product differentiates |
references/revenue-management.mdreferences/fairness-constraints.md