algo-price-dynamic
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDynamic Pricing
动态定价
Overview
概述
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.
动态定价会根据需求信号、时间、库存和竞争状况实时调整价格,常见于航空、酒店、网约车和电商行业。目标是在产能/库存限制下实现收入(或利润)最大化。
When to Use
适用场景
Trigger conditions:
- Pricing perishable inventory (hotel rooms, airline seats, event tickets)
- Implementing demand-responsive pricing for e-commerce
- Building surge pricing or time-based pricing systems
When NOT to use:
- For one-time pricing decisions (use Van Westendorp or conjoint)
- When price changes are impractical (regulated markets, long-term contracts)
触发条件:
- 为易腐库存定价(如酒店客房、航班座位、活动门票)
- 为电商平台实施需求响应式定价
- 构建高峰定价或基于时间的定价系统
不适用场景:
- 一次性定价决策(此时应使用Van Westendorp模型或联合分析法)
- 价格调整不可行的场景(如受监管市场、长期合同约束)
Algorithm
算法
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.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.Phase 1: Input Validation
阶段1:输入验证
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.
收集:当前需求指标、剩余库存/产能、距到期/活动的时间、竞争对手价格、价格上下限约束。
准入条件: 已连接实时数据馈源,已定义业务规则。
Phase 2: Core Algorithm
阶段2:核心算法
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.
基于规则: 若需求超过阈值,将价格提高X%;根据库存水平设置分层规则。
基于需求曲线: 1. 估算当前条件下的需求曲线;2. 找到能使收入(收入=P×Q(P))最大化的价格;3. 应用库存约束:若产能不足则提价,若产能过剩则降价。
基于机器学习(ML): 训练模型,结合上下文特征预测每个价格点的需求,然后基于预测的需求曲线进行优化。
Phase 3: Verification
阶段3:验证
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.
监控:单位收入、预订速度、客户投诉量、竞争地位。对新定价规则进行A/B测试。
准入条件: 收入有所提升,且未出现销量大幅下滑或客户强烈不满。
Phase 4: Output
阶段4:输出
Return recommended price with reasoning and expected impact.
返回推荐价格,并附上理由和预期影响。
Output Format
输出格式
json
{
"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"}
}json
{
"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"}
}Examples
示例
Sample I/O
示例输入输出
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.
输入: 酒店客房,距入住日还有3天,入住率85%,竞争对手平均价格150美元
预期输出: 由于入住率高且时间紧迫,定价应高于竞争对手(160-170美元)
Edge Cases
边缘情况
| 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 |
| 输入 | 预期输出 | 原因 |
|---|---|---|
| 需求为零 | 降至最低限价 | 刺激需求,挽回部分收入 |
| 仅剩最后一个单位 | 定价接近最高限价 | 稀缺性可最大化用户支付意愿 |
| 竞争对手推出闪购活动 | 非必要时不要自动跟进降价 | 避免价格战;评估自身产品是否具备差异化优势 |
Gotchas
注意事项
- Customer fairness perception: Visible price discrimination (same product, different prices for different users) generates backlash. Segment by time, channel, or bundle — not by individual.
- Price war spiraling: Automated competitive pricing can create a race to the bottom. Set absolute floors and rate-of-change limits.
- Demand cannibalization: If customers learn prices drop later, they wait. This is the "strategic customer" problem — don't train customers to delay.
- Regulatory risk: Dynamic pricing may violate anti-gouging laws during emergencies. Build in legal constraint rules.
- A/B testing bias: Testing different prices creates revenue measurement challenges. The control group at the "wrong" price loses money by design.
- 客户公平感: 明显的价格歧视(同一产品对不同用户收取不同价格)会引发不满。应按时间、渠道或套餐进行细分,而非针对个人。
- 价格战恶性循环: 自动化竞争定价可能引发竞相降价。需设置绝对最低限价和价格变动率限制。
- 需求分流: 若客户得知后续会降价,他们会持币观望。这就是“策略型客户”问题——不要让客户养成延迟购买的习惯。
- 监管风险: 在紧急情况下,动态定价可能违反反哄抬物价法规。需内置法律约束规则。
- A/B测试偏差: 测试不同价格会给收入衡量带来挑战。对照组若采用“错误”价格,本质上会造成收入损失。
References
参考资料
- For revenue management models (airline/hotel), see
references/revenue-management.md - For fairness constraints in dynamic pricing, see
references/fairness-constraints.md
- 如需了解收入管理模型(航空/酒店领域),请参阅
references/revenue-management.md - 如需了解动态定价中的公平性约束,请参阅
references/fairness-constraints.md