Files
2nd/10_Wiki/Topics/AI_and_ML/Dynamic Pricing & Offers.md
T
Antigravity Agent f8b21af4be Wiki cleanup: error-doc removal, dedup merge, link normalization
10_Wiki/Topics 대규모 정리:
- 오류 캡처/미완성 stub 문서 227개 제거
- 교차폴더 중복 43클러스터 병합 (63파일 → redirect)
- 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건
- 카테고리 MOC 6개 신규 생성
- Graph 섹션 미해결 related-keyword 링크 10,058건 제거

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 23:52:15 +09:00

7.3 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-dynamic-pricing-offers Dynamic Pricing & Offers 10_Wiki/Topics verified self
dynamic pricing
surge pricing
demand pricing
personalized offer
price optimization
none A 0.92 applied
pricing
dynamic-pricing
optimization
ml
revenue
demand
ecommerce
2026-05-10 pending
language framework
Python scikit-learn / XGBoost / OR-Tools

Dynamic Pricing & Offers

매 한 줄

"매 supply / demand / inventory / context 의 real-time 의 price 의 adjust". 매 Uber surge, 매 airline yield, 매 hotel revenue management. 매 modern: 매 ML + RL + causal inference. 매 ethical: 매 fairness + 매 backlash.

매 핵심

매 method

  • Rule-based: 매 demand-tier.
  • Elasticity model: 매 price-demand curve.
  • MAB / bandit: 매 explore.
  • RL: 매 long-horizon reward.
  • Causal: 매 price 의 effect 의 estimate.

매 famous

  • Uber surge: 매 multiplier.
  • Airline yield: 매 fare class + restriction.
  • Hotel RM: 매 occupancy + LOS.
  • Amazon: 매 millions / day price change.
  • Ticketmaster: 매 dynamic event.

매 ethical / risk

  • Backlash: 매 ride 의 surge during emergency.
  • Discrimination: 매 protected attribute 의 proxy.
  • Trust erosion: 매 frequent change 의 detect.
  • Regulation: 매 EU price personalization disclosure.

매 응용

  1. Ride-hailing: 매 surge.
  2. Travel: 매 yield management.
  3. Retail: 매 markdown.
  4. Energy: 매 time-of-use.
  5. Subscription: 매 win-back offer.
  6. Gaming: 매 IAP discount.

💻 패턴

Price elasticity estimation

import numpy as np
from sklearn.linear_model import LinearRegression

# 매 log-log: log(Q) = a + b * log(P) + ε
def estimate_elasticity(prices, quantities):
    log_p = np.log(prices).reshape(-1, 1)
    log_q = np.log(quantities)
    model = LinearRegression().fit(log_p, log_q)
    elasticity = model.coef_[0]  # 매 typically negative
    return elasticity

Optimal price (revenue maximize)

def optimal_price(cost, base_demand, elasticity, p_min, p_max):
    """매 max revenue: 매 (p - c) * Q(p)."""
    def revenue(p):
        q = base_demand * (p / p_min) ** elasticity
        return (p - cost) * q
    
    from scipy.optimize import minimize_scalar
    result = minimize_scalar(lambda p: -revenue(p), bounds=(p_min, p_max), method='bounded')
    return result.x

Surge multiplier (Uber-style)

def surge_multiplier(active_drivers, pending_requests):
    ratio = pending_requests / max(active_drivers, 1)
    if ratio < 0.5: return 1.0
    elif ratio < 1.0: return 1.2
    elif ratio < 2.0: return 1.5
    elif ratio < 3.0: return 2.0
    else: return min(3.0, 1.0 + ratio * 0.5)

Yield management (hotel)

class YieldManager:
    def __init__(self, total_rooms, days_to_event):
        self.total = total_rooms
        self.dte = days_to_event
        self.booked = 0
    
    def price(self, base_price, demand_signal):
        occupancy = self.booked / self.total
        proximity = max(0, 1 - self.dte / 30)  # 매 closer → urgency
        
        multi = 1 + 0.5 * occupancy + 0.3 * proximity + 0.2 * demand_signal
        return base_price * multi

Contextual bandit price

class PriceBandit:
    def __init__(self, price_options):
        self.prices = price_options
        self.alpha = np.ones(len(price_options))
        self.beta = np.ones(len(price_options))
    
    def select(self, context):
        # 매 Thompson sample
        samples = np.random.beta(self.alpha, self.beta)
        return self.prices[np.argmax(samples)]
    
    def update(self, price_idx, purchased):
        if purchased: self.alpha[price_idx] += 1
        else: self.beta[price_idx] += 1

Personalized offer

def personalized_discount(user, base_price, cost):
    """매 user lifetime value 의 discount 의 fund."""
    ltv = predict_ltv(user)
    sensitivity = predict_price_sensitivity(user)
    
    if sensitivity > 0.8 and ltv > base_price * 5:
        # 매 churn risk + valuable → 매 deep discount
        return base_price * 0.7
    elif sensitivity > 0.5:
        return base_price * 0.9
    return base_price

Win-back offer

def winback_offer(user):
    if user.last_active_days_ago < 30: return None
    if user.churn_score > 0.7:
        return {
            'type': 'discount',
            'value': 0.5,
            'expires': now() + timedelta(days=7),
            'urgency': 'high',
        }
    return None

Causal effect of price (DoWhy)

import dowhy
def estimate_price_causal_effect(df):
    model = dowhy.CausalModel(
        data=df,
        treatment='price',
        outcome='purchased',
        common_causes=['user_segment', 'season', 'inventory'],
    )
    estimand = model.identify_effect()
    estimate = model.estimate_effect(estimand, method_name='backdoor.linear_regression')
    return estimate.value  # 매 price 의 1 unit 의 purchase 의 marginal effect

Anti-discrimination check

def fairness_audit(prices_by_segment):
    """매 protected attribute 의 disparate pricing."""
    grouped = prices_by_segment.groupby('protected_attr')['price']
    means = grouped.mean()
    if (means.max() - means.min()) / means.mean() > 0.05:
        return 'WARN: >5% pricing disparity by protected attribute'
    return 'OK'

Inventory-aware (markdown)

def markdown(item, days_remaining, inventory):
    """매 perishable / seasonal 의 markdown."""
    if days_remaining < 7:
        if inventory > 50: return 0.5
        elif inventory > 20: return 0.7
        else: return 0.9
    return 1.0

A/B testing dynamic pricing

def split_test(user_id):
    bucket = hash(user_id) % 100
    if bucket < 50: return 'control', static_price
    elif bucket < 75: return 'A', dynamic_price_v1
    else: return 'B', dynamic_price_v2

매 결정 기준

상황 Approach
Real-time supply/demand Surge multiplier
Long-horizon Yield management
Few price tiers Bandit
Continuous price Elasticity model + optimize
Personalization Bandit + user features
High-stakes Causal estimation

기본값: 매 elasticity model + 매 inventory-aware + 매 personalization (LTV) + 매 fairness audit + 매 A/B.

🔗 Graph

🤖 LLM 활용

언제: 매 inventory perishable. 매 demand variable. 매 personalization. 언제 X: 매 regulated commodity. 매 trust-critical (medication).

안티패턴

  • No fairness audit: 매 discrimination.
  • No inventory awareness: 매 stockout / waste.
  • Surge without cap: 매 emergency price gouge.
  • No experimentation: 매 elasticity 의 stale.
  • Personalize without disclosure: 매 EU compliance.

🧪 검증 / 중복

  • Verified (Pricing literature, Uber/Amazon engineering posts).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — pricing + 매 elasticity / surge / yield / bandit / fairness code