Macau AI Profit Engine

Enter your granted access code to continue

Skip to content
Payment Pending — Your subscription renewal is due. Contact finance@hotel.mo to avoid service interruption.
Phase 1

Market Intelligence & Crisis Analysis

Occupancy Rate ▲ 2.3%
91.6%
Overnight Visitor Drop ▼ YoY
-6.6%
Same-Day Arrivals — steady
62%
3-Star ADR ▼ 13.8%
MOP 898
~$111 USD

The Profit-Yield Crisis

Occupancy Paradox

Hotels are filling rooms at 91.6% capacity, yet revenue is declining. High occupancy masks a deeper ADR erosion problem — hotels are discounting to fill beds rather than optimizing yield.

ADR Trap

3-star properties have seen a 13.8% ADR decline to MOP 898. This race-to-the-bottom pricing erodes margins while maintaining the illusion of strong demand through high occupancy numbers.

Target Segment

The “Value-Quality” Traveler: visitors who want quality hotel experiences but are price-conscious. 62% arrive same-day from mainland China, making real-time pricing essential.

ADR Decline by Hotel Category

Phase 2

Strategic & Tactical Demand Drivers

Strategic Drivers — Seasonal Pricing

Transit Catalyst — LRT Barra Station

LRT Barra Station Impact

The new Light Rail Transit Barra Station connects Macau Peninsula hotels directly to the border gate and casino district. This reduces transit friction for same-day visitors, creating opportunities for “unplanned overnight” conversions through strategic pricing triggers.

62% same-day visitors 15-min border access Direct casino link

Tactical Triggers

TriggerThresholdAI Action
Heat Index> 33°CIncrease ADR 8–10% — heat drives demand for air-conditioned accommodation
Border Wait> 60 minutesActivate “Unplanned Overnight” bundles — long waits incentivize staying
Event Density Surge> 175k visitors/dayIncrease rates 20% — e.g., ATEEZ at Venetian Arena, March 28
Ferry Delay> 45 minutesActivate overnight bundles (15% premium) — stranded travelers need rooms
RMB/MOP Rate> 1.14Currency premium for mainland visitors — higher exchange = perceived discount
Occupancy> 85%Scarcity premium (10% buffer) — high demand justifies yield optimization
Phase 3

Success-Based Business Model

Success Fee
15%

of Incremental Yield

Operating Cost
$78.78

/month per hotel

Revenue Flow

Total Revenue
AI-optimized pricing
Baseline Revenue
Pre-AI average
=
Incremental Yield
Net improvement
×
15% Fee
Success payment

The hotel only pays when the AI demonstrably increases revenue. Zero risk, pure upside alignment.

Phase 4

Full-Stack AI Architecture

Three-Layer Architecture

Orchestration
CrewAI Flows
Intelligence
DeepSeek-V3Extraction
DeepSeek-R1Reasoning
Execution
Python Scrapers
Border Data
Weather Data
Phase 5

Data Factory — Signal Intelligence

15+ Real-Time Data Sources

PSP
Macau PSP Border Monitor

Real-time crossing wait times, daily visitor counts

Critical
SMG
SMG Weather Service

Temperature, heat index, severe weather alerts

Critical
DSEC
Statistics & Census Service

Monthly occupancy rates, visitor spending data

High
MGTO
MGTO Events Calendar

Upcoming events, festival schedules, concert data

High
FRY
TurboJET / Cotai Water Jet

Ferry schedules, delay notifications, capacity data

Medium
OTA
Ctrip / Meituan OTA Monitor

OTA rate monitoring, competitor pricing signals

Critical
WX
OpenWeatherMap API

Real-time temperature, humidity, forecast data

Medium
XHS
Xiaohongshu (小红书)

Travel sentiment, trending Macau content & reviews

High
WC
WeChat Moments

Trending topics, travel intent signals from social

Medium
DY
Douyin (抖音)

Location check-ins, viral travel content analysis

Medium
TA
TripAdvisor

Review sentiment scoring, competitive reputation

High
GMG
DSEC Gaming Revenue

Monthly casino GGR, gaming sector health indicator

High
CHN
China Holiday Calendar

Public holidays, Golden Week, school breaks forecast

Critical
CAM
Border Gate Cameras

Crowd density estimation via computer vision

Medium
FLG
Fliggy (飞猪)

Alibaba OTA rates, package deal monitoring

High

Signal Processing Pipeline

Collect15+ Sources
CacheRedis TTL
Anomaly Filter3σ Detection
SmoothingExponential
Feature StorePostgreSQL
Pricing AgentAI Output
Data Volume12,847 signals/hr
Avg Latency142ms
Anomalies Filtered23 (0.18%)
Pipeline Status● Healthy

Signal Processor

class SignalProcessor:
    """Process raw data signals with anomaly detection and smoothing."""

    def __init__(self, z_threshold=3.0, alpha=0.3):
        self.z_threshold = z_threshold
        self.alpha = alpha  # Exponential smoothing factor
        self.history = defaultdict(list)

    def process(self, source: str, value: float) -> dict:
        self.history[source].append(value)
        window = self.history[source][-100:]

        # Anomaly detection via Z-score
        mean = np.mean(window)
        std = np.std(window) or 1e-6
        z_score = abs(value - mean) / std
        is_anomaly = z_score > self.z_threshold

        # Exponential smoothing
        if len(window) < 2:
            smoothed = value
        else:
            smoothed = self.alpha * value + (1 - self.alpha) * window[-2]

        return {
            'source': source,
            'raw': value,
            'smoothed': round(smoothed, 4),
            'z_score': round(z_score, 2),
            'is_anomaly': is_anomaly,
            'action': 'FILTERED' if is_anomaly else 'PASSED'
        }

Smart OTA Collection (Anti-Detection)

Headless Chrome
User-Agent Rotation
Request Throttling
IP Proxy Pool
Cookie Management
OTA SourceSelector TargetRate LimitStatus
Ctrip.hotel-price .price-num5 req/minActive
Meituan.price-wrapper .total3 req/minActive
Fliggy.price-box .price4 req/minActive
class OTAScraper:
    """Anti-detection OTA price collector using undetected-chromedriver."""

    def __init__(self):
        self.options = uc.ChromeOptions()
        self.options.add_argument('--headless=new')
        self.user_agents = self._load_user_agents()
        self.proxy_pool = ProxyRotator()

    async def collect_price(self, source: str, hotel_id: str):
        driver = uc.Chrome(options=self.options)
        driver.execute_cdp_cmd('Network.setUserAgentOverride', {
            'userAgent': random.choice(self.user_agents)
        })
        await asyncio.sleep(random.uniform(2, 5))  # Human-like delay
        # ... price extraction logic
        return {'source': source, 'price': extracted_price}

OTA Channel Inventory Parity

Real-time room inventory status across major OTA channels. When channels show "tight supply," consumer panic-buying psychology enables higher ADR.

CtripCtrip / Trip.com
Visible Rooms8
StatusTight Supply
MeituanMeituan Hotel
Visible Rooms12
StatusModerate
FliggyFliggy (飞猪)
Visible Rooms15
StatusNormal
DirectDirect Booking
Visible Rooms18
StatusNormal
Channel inventory parity check: OTA-visible scarcity signals enable ADR micro-adjustments (+2-5%)
ML Engine

ML Prediction Engine

Ensemble Model Architecture

XGBoostTabular Features60% Weight
LSTM + AttentionTime-Series40% Weight
Weighted EnsembleDynamic Rebalancing
Price RecommendationMOP ± Confidence Interval

XGBoost Feature Importance

LSTM Architecture

Input30 days × 20 features
LSTM (128 units)Sequence encoding
Dropout (0.3)Regularization
LSTM (64 units)Pattern extraction
Attention LayerContext weighting
LSTM (32 units)Final encoding
Dense → OutputPrice prediction
MAPE▲ Best
4.2%

Mean Absolute % Error

R² Score▲ 0.68
0.68

Practical ceiling for Macau volatility

MAE▲ Low
MOP 38

Mean Absolute Error

Forecast Accuracy▲ 91.3%
91.3%

7-day horizon

Ensemble Model Service

class EnsembleModelService:
    """Weighted ensemble combining XGBoost and LSTM predictions."""

    def __init__(self, xgb_weight=0.6, lstm_weight=0.4):
        self.xgb_model = XGBRegressor(n_estimators=500, max_depth=8)
        self.lstm_model = LSTMPricePredictor(
            input_dim=20, hidden_dims=[128, 64, 32],
            attention=True, dropout=0.3
        )
        self.weights = {'xgb': xgb_weight, 'lstm': lstm_weight}
        self.scaler = RobustScaler()
        self.drift_detector = DDM()  # Drift Detection Method

    def predict(self, features: dict, sequence: np.ndarray) -> dict:
        xgb_input = self.scaler.transform(pd.DataFrame([features]))
        xgb_pred = self.xgb_model.predict(xgb_input)[0]
        lstm_input = torch.FloatTensor(sequence).unsqueeze(0)
        lstm_pred = self.lstm_model(lstm_input).item()
        ensemble_pred = (
            self.weights['xgb'] * xgb_pred +
            self.weights['lstm'] * lstm_pred
        )
        ci_low, ci_high = self._bootstrap_ci(features, sequence)
        return {
            'price': round(ensemble_pred, 2),
            'confidence_interval': (ci_low, ci_high),
            'xgb_contribution': xgb_pred,
            'lstm_contribution': lstm_pred,
            'drift_score': self.drift_detector.score
        }

Regional Supply Intelligence (v8)

Supply-side features integrated into the ensemble model to predict scarcity-driven pricing opportunities before occupancy thresholds are reached.

#2
active_neighborhood_inventory

Real-time available 3-star rooms within 2km radius. When area supply drops below 15%, price elasticity collapses — aggressive pricing enabled.

Importance: 0.88
#4
competitor_inventory_level

Competing hotels’ remaining room count. If 5 nearby competitors all below 10 rooms, supply exhaustion triggers ceiling-price recommendation.

Importance: 0.72
#5
upper_tier_vacancy_rate

4-5 star hotel vacancy rate. When upper tier hits “Last Room Available,” demand cascades to 3-star — cross-category spillover effect.

Importance: 0.65
#7
zhuhai_anchor_ratio

Macau ADR / Zhuhai ADR ratio. When gap exceeds 3.5×, loss-to-Zhuhai risk spikes. Constrains aggressive pricing to prevent cross-border leakage.

Importance: 0.52
#9
ota_inventory_count

OTA-visible room count across Ctrip, Meituan, Fliggy. Scarcity signals on OTA channels boost conversion rate — enables micro-ADR uplift.

Importance: 0.41
Economic Intel

Economic Intelligence

Price Elasticity Matrix

SegmentWeekdayWeekendHoliday
Leisure-1.8-1.2-0.6
Business-0.4-0.5-0.3
Group-1.1-0.9-0.5
High Sensitivity (< -1.5) Medium (-0.7 to -1.5) Low (> -0.7)

Optimal Price Finder

Recommended Price
MOP 952
Elasticity: -1.8Revenue: +8.2%

Revenue Lift Attribution

7-Day Demand Forecast

Anomaly Detection

Mar 5, 14:22Z: 3.2

Sudden border crossing surge — 40% above rolling average. Likely event-driven.

Mar 4, 09:15Z: 2.1

OTA pricing anomaly — competitor 3-star dropped 18% below market. Possible error.

Mar 3, 21:45Z: 1.9

Xiaohongshu sentiment spike — viral Macau food tour post driving search interest.

Weighted Competitor Position Analysis

CompetitorWeightTheir ADRGap
Grand Lisboa30%MOP 1,082-17.0%
Wynn Palace25%MOP 1,250-28.2%
MGM Cotai25%MOP 1,180-23.9%
Sands Cotai20%MOP 1,150-21.9%
OptimalWeighted Avg: MOP 1,163 | Our ADR: MOP 952 | Gap: -18.1%

Weather & Event Impact Model

Typhoon Signal 1+5%
Typhoon Signal 3+20%
Typhoon Signal 8+40%
Heatwave >35°C+25%
Rain >5mm/hr+15%
Stranded Traveler
(<6hr to typhoon)
+30%
class AdvancedWeatherModel:
    TYPHOON_MULTIPLIERS = {1: 1.05, 3: 1.20, 8: 1.40, 10: 1.60}
    HEATWAVE_THRESHOLD = 35  # Celsius
    RAIN_THRESHOLD = 5       # mm/hr

    def calculate_premium(self, weather: dict) -> float:
        premium = 1.0
        if signal := weather.get('typhoon_signal'):
            premium *= self.TYPHOON_MULTIPLIERS.get(signal, 1.0)
            if weather.get('hours_to_landfall', 999) < 6:
                premium *= 1.30  # Stranded traveler premium
        if weather.get('temperature', 0) > self.HEATWAVE_THRESHOLD:
            premium *= 1.25
        if weather.get('rainfall_mm', 0) > self.RAIN_THRESHOLD:
            premium *= 1.15
        return round(premium, 3)

Price Sensitivity Map — Macau Districts

Low Sensitivity Medium High Sensitivity
Phase 6

Pricing Engine

Yield-Intensity Formula

Price = Base × (1 + ΣMultipliers) × e(Occupancy × 0.45)

Exponential scarcity factor ensures prices accelerate as inventory tightens

Quick Presets

Step 1

Baseline ADR

MOP 898~$111 USD

Weekday March 2026 average for 3-star Macau Peninsula hotels.

Step 2

Trigger Multipliers

Heat > 33°C
1.08×
Border > 60m
1.12×
Density > 175k
1.15×
Ferry > 45m
1.05×
Occupancy >85%
1.10×
Step 3

Value-Gap Ceiling Rule

5-Star AvgMOP 1,391
30% Below = Dynamic Ceiling
Price CeilingMOP 973

Dynamic ceiling based on real-time 5-star average

Live Pricing Simulator

25°C40°C
0 min120 min
100k250k
0 min180 min
Recommended ADR
MOP 898
~$111 USD
Heat 1.00×Border 1.00×Density 1.00×Ferry 1.00×Occupancy 1.00×Location 1.00×Currency 1.00×
Within dynamic ceiling (MOP 973)

Cross-Border Price Barrier (Zhuhai Linkage)

Zhuhai port-area hotels act as virtual auxiliary supply. When Zhuhai is also full or border friction is high, Macau gains pricing sovereignty.

0% (Empty)100% (Sold Out)
MOP 150MOP 600
Zhuhai Anchor Factor 1.00× Neutral — moderate Zhuhai supply
Border Friction Factor 1.00× Linked to Border Wait slider above
Cross-Border Ratio 2.99× Macau ADR / Zhuhai ADR — Safe
Border-Adjusted Price MOP 898 After all cross-border factors applied
Price = Base × MacauScarcity × ZhuhaiAnchor × FrictionFactor — capped at MOP 973
Phase 7

Yield Command Center

Success Fee Pool▲ 8.1%
MOP 4,280

Accumulated this month

Avg ADR Lift▲ 12.4%
+$13.80
AI RecommendationsActive
142

Incremental Profit Lift — 30 Days

Historical Performance Playback

A/B Strategy Comparison

Conservative Sentiment

ADRMOP 932
Occupancy93.2%
RevPARMOP 869
Sentiment4.4/5
VS

Max Yield

ADRMOP 968
Occupancy88.7%
RevPARMOP 859
Sentiment3.9/5

Revenue Leakage Tracker

Estimated Missed Yield (This Week)MOP 12,340
6-9 AM
9-12 PM
12-3 PM
3-6 PM
6-9 PM
9-12 AM
Low leakage Medium High leakage

Same-Day Conversion

Mainland visitor walk-in conversion probability

Veto Probability — March 2026

Low Risk Medium High Risk

Monthly Earnings Calculator

Total Revenue LiftMOP 28,530Daily: (AI ADR - Baseline) × 100 rooms
Your Success Fee (15%)MOP 4,280MOP 28,530 × 0.15
Avg Daily LiftMOP 951(MOP 951 ADR - MOP 898 Base) × 100

Recent Price Overrides

TimeOld PriceNew PriceReasonMultipliers
Border Status42 min wait
Temperature (Live)31°C
Event StatusATEEZ — Mar 28

Smart Alert Settings

WeChat Alert Architecture

Real-time pricing opportunity alerts pushed directly to management via WeChat Work for instant verification or veto.

ModelMonitorEvaluates Optimal Price
≥15% ThresholdAlert Payload Generated
WeChat WorkCard + Approve/Veto
Decision LoggedAudit Trail + Engine
5% (High Volume)20% (Critical Only)
Notification Channels

Veto Response Statistics (7-Day)

Alerts Sent 24
Approved 18
Vetoed 4
Timed Out 2
Approval Rate 75%
Avg Response 4.2 min

15-minute response window — defaults to Conservative Sentiment strategy if no action taken.

async def check_pricing_opportunity(recommended_price, current_adr):
    """
    Identifies if a pricing increase meets the notification threshold.
    """
    increase_pct = (recommended_price - current_adr) / current_adr

    if increase_pct >= 0.15:  # Calibrated to 15% for v9 pilot
        alert_payload = {
            "type": "REVENUE_OPPORTUNITY",
            "severity": "high",
            "message": f"AI identified {increase_pct:.1%} increase opportunity.",
            "details": f"Recommended: MOP {recommended_price} | Current: MOP {current_adr}",
            "action_required": "Confirm or Veto within 15 mins"
        }
        # Pushes to the registered WeChat webhook
        await trigger_wechat_webhook(alert_payload)

Supply-Demand Imbalance Alert

When city-wide 3-star room supply drops below critical thresholds, the system triggers "Max Yield" strategy recommendations.

City-Wide 3-Star Availability 247 rooms
100
200
0 (Sold Out)200 (Warning)400+
Supply Adequate

Normal pricing mode. 247 rooms available across 12 properties.

Kill-Switch Workflow

IssuanceFastAPI Backend
VerificationAPI Gateway
WithdrawalSupabase Dashboard
DenialAlibaba Cloud WAF
ActionDatabase StatusUser Experience
Active Serviceis_active: trueFull access to command center and live signals.
Pending Paymentis_active: trueAccess continues; warning banner displayed.
Access Withdrawnis_active: falseImmediate logout; redirected to “Service Suspended” gate.

Competitor Watcher

Price parity is healthy

No 4-star undercutting detected.

Monitoring 5 nearby 4-star properties

Booking Pace Monitor

On Track

42% booked, 90 days out. Normal pace.

Price Freshness

2 min ago

Optimal

Neighborhood Price Heatmap

High Demand ZoneStable Zone

React Dashboard Code

function YieldCommandCenter() {
  const { data: signals } = useQuery('signals', fetchSignals);
  const { data: metrics } = useQuery('metrics', fetchMetrics);

  return (
    <DashboardLayout>
      <KPIRow>
        <KPICard label="Success Fee Pool" value={metrics?.feePool} format="currency" trend={metrics?.feeTrend} variant="success" />
        <KPICard label="Avg ADR Lift" value={metrics?.adrLift} format="percentage" trend={metrics?.liftTrend} />
      </KPIRow>
      <ProfitChart data={metrics?.dailyProfit} />
      <SignalPanel signals={signals} />
    </DashboardLayout>
  );
}
Phase 8

AI Partnership Agreement

Key Partnership Terms

AI-Powered Dynamic Pricing Collaboration

Veto Power

Hotel management maintains final veto authority over all AI-recommended pricing changes. The system recommends; humans decide.

Data Masking

All personally identifiable information is masked using Faker library for PDPA compliance. Only aggregated, anonymized demand signals are processed.

Trial Period

90-day pilot with full performance analytics. No success fees during the first 30 days.

Success Metrics

  • ADR improvement ≥ 8% over baseline
  • RevPAR growth maintained or improved
  • Guest satisfaction scores held ≥ 4.0/5.0
  • Pricing recommendation acceptance rate ≥ 70%

RAM/IAM Access Levels

User RoleAccess MethodSecurity Requirement
Revenue ManagersLive URL via RAM UserMFA + Office IP Whitelist
Operations StaffWebhook AlertsSigned/Encrypted Webhook URLs
Automated AgentsAPI Keys / STS90-Day Key Rotation + Minimal Scoped Access

Management Final Approval

Please sign below to authorize the AI pricing partnership agreement.

Production

Production Architecture

Deployment Checklist

System Health

Primary Data Collector

Healthy

Secondary Data Collector

Standby

Cache Fallback

Inactive

Circuit Breaker States

ClosedNormal operation
OpenRequests blocked
Half-OpenTesting recovery
Simulated Error Rate: 1.2% (threshold: 5%)
1Primary API
2Secondary API
3Redis Cache
4Historical Avg

CI/CD Pipeline

✓ Checkout
✓ Build
✓ Push
✓ Deploy
✓ Smoke Test
API Gateway: Healthy
Supabase: Connected
Overall: PASS
name: Deploy Pricing Engine
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: docker build -t macau-engine .
      - run: docker push registry/macau-engine:latest
      - run: kubectl apply -f k8s/deployment.yaml
      - name: Smoke Test
        run: |
          curl -sf https://api.macau-engine.com/healthz
          curl -sf https://api.macau-engine.com/predict/test

Docker Compose Architecture

Frontend:3000
API Server:8000
Redis:6379
PostgreSQL:5432
Prometheus:9090
Grafana:3001

Kubernetes Deployment

Replicas3
Auto-Scale At80% CPU
Health Check/healthz
Max Replicas8
apiVersion: apps/v1
kind: Deployment
metadata:
  name: pricing-engine
spec:
  replicas: 3
  selector:
    matchLabels:
      app: pricing-engine
  template:
    spec:
      containers:
      - name: pricing-engine
        image: macau-engine:latest
        resources:
          limits:
            cpu: "2"
            memory: "4Gi"
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8000

Infrastructure Architecture

Alibaba Cloud HKCompute & Storage
Security CenterThreat Detection
Agent SOCAI Monitoring
Pricing EngineCrewAI + DeepSeek

WeChat Work Interactive Card Payload

async def trigger_wechat_webhook(alert_payload):
    """
    Sends a structured card to WeChat Work with Approval/Veto buttons.
    """
    wechat_card = {
        "msgtype": "template_card",
        "template_card": {
            "card_type": "button_interaction",
            "main_title": {"title": alert_payload["message"]},
            "sub_title_text": alert_payload["details"],
            "button_list": [
                {
                    "text": "Approve Increase",
                    "style": 1,  # Green button
                    "key": f"APPROVE_{alert_payload['opportunity_id']}"
                },
                {
                    "text": "Veto (Keep Base)",
                    "style": 2,  # Red button
                    "key": f"VETO_{alert_payload['opportunity_id']}"
                }
            ]
        }
    }
    async with aiohttp.ClientSession() as session:
        await session.post(WECHAT_WORK_WEBHOOK, json=wechat_card)

Veto Response Handler (FastAPI)

Receives management decisions from WeChat Work buttons and updates the Pricing Engine in real-time.

@app.post("/api/v1/veto-handler")
async def handle_management_decision(payload: dict):
    """
    Receives button interaction from WeChat Work
    and updates the Pricing Engine accordingly.
    """
    decision_key = payload["button_key"]  # e.g., "VETO_12345"
    action, opp_id = decision_key.split("_")

    if action == "VETO":
        # Lock price to MOP 898 baseline in the Feature Store
        await feature_store.store_feature("price_lock", opp_id, 898.0)
        # Log veto event for the Shadow Report audit
        logger.warning(f"Management VETO for Opportunity {opp_id} recorded.")

    else:
        # Authorize the AI to push the high-yield price
        await feature_store.store_feature(
            "price_lock", opp_id, payload["recommended_price"]
        )
        logger.info(f"Management APPROVED increase for Opportunity {opp_id}.")

    return {"status": "success", "action": action}
Response Window: 15 minutes Default on Timeout: Conservative Sentiment Audit: Logged to Shadow Report

Border-Adjusted Pricing Engine (v8)

def calculate_border_adjusted_price(
    macau_base: float,
    macau_occupancy: float,
    zhuhai_supply: float,
    clearance_time: int,
    local_ceiling: float = 973
) -> dict:
    """v8: Cross-border price barrier with Zhuhai linkage."""

    # 1. Macau local scarcity score
    macau_scarcity = 1.15 if macau_occupancy > 0.85 else 1.0

    # 2. Zhuhai price anchor factor
    #    If Zhuhai also full (<10% vacancy) → release pricing power
    #    If Zhuhai has excess supply (>40%) → suppress Macau markup
    if zhuhai_supply < 0.10:
        zhuhai_anchor = 1.25  # Zhuhai sold out → Macau sovereignty
    elif zhuhai_supply > 0.40:
        zhuhai_anchor = 0.85  # Zhuhai plenty → constrain pricing
    else:
        zhuhai_anchor = 1.0   # Neutral zone

    # 3. Border friction factor (clearance time as "cutoff" index)
    #    >60min wait → travelers won't cross back to Zhuhai
    friction_factor = 1.12 if clearance_time > 60 else 1.0

    # 4. Supply attrition composite
    supply_factor = (1 / max(zhuhai_supply, 0.05)) ** 0.3

    # 5. Final adjusted price (capped at dynamic ceiling)
    adjusted = macau_base * macau_scarcity * zhuhai_anchor * friction_factor
    return {
        "adjusted_price": min(round(adjusted, 2), local_ceiling),
        "factors": {
            "macau_scarcity": macau_scarcity,
            "zhuhai_anchor": zhuhai_anchor,
            "friction_factor": friction_factor,
            "supply_attrition": round(supply_factor, 3)
        },
        "ceiling_hit": adjusted >= local_ceiling
    }

Access Code Validation Middleware

from fastapi import Header, HTTPException

async def verify_subscription_access(access_code: str = Header(...)):
    # Query your Supabase 'subscriptions' table
    sub_data = supabase.table("subscriptions").select("*").eq(
        "code", access_code
    ).single().execute()

    if not sub_data.data or not sub_data.data['is_active']:
        raise HTTPException(
            status_code=403,
            detail="Access withdrawn. Please contact finance."
        )

    return sub_data.data
Security

Security & Documentation

Model FactSheet

  • Training data sourced from Macau PSP (border crossings) and SMG (meteorological services)
  • Ensemble model: XGBoost (60%) + LSTM with Attention (40%) — dynamic rebalancing
  • Model accuracy: MAPE 4.2% | R² 0.94 | MAE MOP 38
  • Feature count: 20 features across 15+ real-time data sources
  • Retraining schedule: Weekly incremental, monthly full retrain
  • Baseline freeze: MOP 898 (3-star Macau Peninsula, March 2026 weekday avg)

Operational Guardrails

  • Auto-Veto: AI recommendations are automatically rejected if they exceed the 30% value-gap ceiling (MOP 1,015 based on 73% of 5-star average MOP 1,391)
  • Value-Gap Logic: Price ceiling dynamically adjusts with real-time 5-star market average to maintain competitive positioning
  • Management Override: Hotel management retains final veto authority over all AI-recommended pricing changes
  • Guest Sentiment Guard: Pricing automatically softens when guest satisfaction scores drop below 4.0/5.0
  • Rate Parity Check: Ensures AI-recommended rates don’t undercut OTA published rates by more than 5%
  • Circuit Breaker: Automatically falls back to baseline pricing when data source reliability drops below 95%

System Health Guide

  • Circuit Breaker States: Closed (normal) → Open (blocked, error rate >5%) → Half-Open (testing recovery). Click states in Production section to simulate.
  • Drift Alerts: Score 0.0–0.3 = Within Tolerance (green), 0.3–0.6 = Elevated (yellow, investigate), 0.6+ = Retrain Needed (red, immediate action)
  • API Rate Limits: PSP Border (30/min), SMG Weather (60/min), Ctrip OTA (5/min — throttled). Red bars indicate >80% utilization.
  • Data Freshness: Green (<1hr), Yellow (1–4hr, acceptable), Red (>4hr, stale — triggers alert)
  • Failover Cascade: Primary API → Secondary API → Redis Cache → Historical Average (last resort)
  • Key Rotation: Access codes rotated every 90 days. API keys rotated quarterly. MFA tokens refreshed on login.

Network Security Layers

LayerProtectionConfiguration
VPC / Network ACLSubnet-level traffic restrictionAllow only trusted subnets
Security GroupsIP Whitelisting (inbound rules)Hotel office + manager IPs only
WAFSQL injection, XSS, Geo-blockingBlock traffic outside Macau/China
SSL/TLSData-in-transit encryptionHTTPS enforced, HSTS enabled
URL SigningTemporary authorized URLsExpiry-based token validation
Observatory

System Observatory

Model Drift Detection

Current Drift Score0.12Within Tolerance
0.0 (No Drift)0.6 (Warning)1.0 (Retrain)

Feature Store Status

Redis (Online Store)

Latency: <10ms • 847 features cached

PostgreSQL (Offline Store)

Batch updated: 2h ago • 2.4M rows

Prometheus Metrics

Request Latency (p99)142ms
Prediction Count (24h)12,847
Error Rate0.02%
Cache Hit Ratio94.7%

Live API Rate Limits

PSP Border
11/30 req/min
SMG Weather
25/60 req/min
Ctrip OTA
4/5 req/min
DSEC Stats
2/20 req/min
Xiaohongshu
9/20 req/min

Advanced Metrics Dashboard

MAPE3.8%
RevPAR Index108.3
Market Share12.4%
ADR Premium+6.0%

Alert Configuration

Price StalenessActive

Alert when price data is > 4 hours old

Model DriftActive

Alert when drift score exceeds 0.6

Revenue AnomalyActive

Alert on > 15% deviation from forecast

API FailureWarning

Alert on 3+ consecutive API failures

Performance Dashboard (Live)

Signal Type Action Matrix

Real-time signal classification drives automated pricing actions with UI warnings for management oversight.

Increase Hyper-Pacing
Demand exceeds forecast — High Risk of Leakage
Monitoring
Increase Typhoon Signal 8
Stranded Traveler Premium (+40%) Recommended
Inactive
Decrease ADR Bias > 3%
Systematic Overpricing Detected — Revenue Risk
Monitoring
Hold API Failure
Circuit Breaker OPEN — Reverting to Static Baseline
Nominal

Cross-Category Spillover Monitor

When upper-tier hotels (4-5 star) approach capacity, demand cascades downward to 3-star properties, granting temporary pricing power.

★★★★★5-Star Hotels
18% vacantNear Capacity
Demand Spillover
★★★★4-Star Hotels
25% vacantModerate
Demand Spillover
★★★3-Star Hotels (You)
35% vacantNormal Demand
Spillover Inactive — upper tiers have sufficient capacity

Dynamic Supply Attrition Index

Port congestion and ferry delays reduce the effective pool of travelers who can leave Macau, creating locked-in demand for overnight stays.

Port Congestion Index 1.0×
×
Supply Scarcity 1.0×
=
Attrition Index 1.00 Standard Pricing
Index = Congestion Factor × Scarcity Factor — values > 1.5 trigger aggressive pricing strategy

Security Monitoring

ActionTrail Audit

Active
Events Logged (24h)1,247
Unique Users8
Failed Logins3
Last Reviewed2h ago

CloudMonitor Alerts

Active
Active Rules12
Alerts (7d)4
CPU AlertNormal
Memory AlertNormal

WAF Status

Active
Blocked (24h)47
Geo-Blocked23
SQLi Attempts2
XSS Attempts1

Access Audit Log

Key Rotation Schedule

Credential TypeLast RotatedNext RotationStatus
Access CodesMar 1, 2026Jun 1, 2026Current
API Keys (STS)Feb 15, 2026May 15, 2026Current
WAF RulesJan 20, 2026Apr 20, 2026Current
SSL CertificateDec 1, 2025Dec 1, 2026Current

Live Model Accuracy Tracker

All Metrics Passing Engine: XGBoost+LSTM Ensemble
R² Score Target: > 0.85
0.874
Explains 87.4% of market variance
MAPE Target: < 10%
3.8%
Mean absolute prediction error
Pricing Bias Target: < 3%
+1.4%
Slight underpricing (favorable)
Revenue Lift Target: > 8%
+8.5%
vs. static MOP 898 baseline
Ceiling: MOP 1,015 (73% of 5-star) Ceiling Overshoot: 0.0% Model Version: v9-ensemble Peak Window: 19:00–21:00 (+6.5%)
v9 Pilot

Shadow Mode — 30-Day Live Validation

v9 model runs in shadow mode alongside the production engine. Shadow prices are logged but not applied to guests. This validates accuracy against live market conditions before full deployment.

Shadow Day● Active
Day 1

of 30-day validation window

Shadow vs Live Delta▲ Tracking
+MOP 0

Avg daily revenue gap

Shadow MAPE▲ Target <10%
--

Running prediction accuracy

Acceptance Forecast▲ Target ≥70%
--

Projected approval rate

Shadow Price Log (Live)

Every pricing cycle, shadow v9 generates a recommendation that is logged but never applied. Production continues using v8.

TimestampLive PriceShadow v9 PriceDeltaWould Approve?

30-Day Milestone Timeline

Day 1–7

Baseline calibration. Compare v9 shadow prices against live v8 output.

Day 8–14

Veto threshold validation. Monitor 15% threshold acceptance rate in simulation.

Day 15–21

Peak window analysis. Focus on 19:00–21:00 leakage delta between shadow and live.

Day 22–30

Final decision. If shadow MAPE < 10% and acceptance ≥ 70%, recommend v9 full deployment.

Shadow vs Production Price Comparison

v9 Analytics

19:00–21:00 Peak Leakage Monitor

Model testing identified the 19:00–21:00 window as the highest revenue leakage period. This panel provides granular hourly monitoring focused on this critical two-hour window.

Peak Window Status● Monitoring
Standby

Activates during 19:00–21:00

Est. Leakage (Peak)▼ Revenue at risk
MOP 0

Missed yield in window

Peak Demand Index▲ Dynamic
1.00×

19:00–21:00 multiplier

Capture Rate▲ Target
0%

Revenue recovered vs leakage

Hourly Revenue Leakage Heatmap

Each cell shows estimated revenue leakage per hour. Red intensity = higher missed yield. Peak window (19:00–21:00) is highlighted.

Low Medium High Critical

7-Day Peak Window Leakage Trend

Peak Window Mitigation Actions

ActionImpactStatus
Enable +6.5% peak premium during 19:00–21:00Recover ~MOP 2,100/weekActive
Pre-position WeChat alerts at 18:45 for manager readinessReduce veto response time by 40%Active
Auto-trigger Max Yield if supply < 100 rooms during peakCapture scarcity premiumPending
Suppress OTA rate parity check during peak (Ctrip sync delay)Avoid auto-match to lower OTA rateUnder Review
Training

Manager Training Module

Before live pilot begins, all duty managers must understand the v8 supply-side indicators that drive pricing recommendations. This module covers each indicator, how to read it, and when to approve or veto.

Training Completion Status

Module 1: Supply Fundamentals0%
Module 2: Reading the Dashboard0%
Module 3: Approve/Veto Decision Framework0%
Module 4: Peak Window Management0%

Module 1: Supply-Side Indicator Reference

IndicatorWhat It MeasuresThresholdAction When Triggered
active_neighborhood_inventoryAvailable 3-star rooms within 2km< 15% availableApprove aggressive pricing — guests have no alternatives
competitor_inventory_levelNearby competitor remaining roomsAll < 10 rooms eachApprove ceiling-price recommendation
upper_tier_vacancy_rate4-5 star hotel vacancy< 10% vacantSpillover active — approve premium pricing
zhuhai_anchor_ratioMacau ADR / Zhuhai ADR> 3.5×VETO — demand will divert to Zhuhai
ota_inventory_countOTA-visible room availability< 8 rooms on any channelApprove micro-ADR uplift (scarcity signal)
supply_composite_capCombined supply-side multiplier> 1.3×System auto-compresses — verify output is reasonable

Module 2: Reading Supply Signals on the Dashboard

Zhuhai Cross-Border Panel

Watch the Anchor Ratio display. When it exceeds 3.5×, the red alert activates. This is your strongest veto signal. A guest can take a 5-minute bus to Zhuhai and save 70%.

Spillover Monitor

When the trigger reads "SPILLOVER ACTIVE", 5-star hotels are near capacity and demand is cascading down. This justifies a premium. Approve recommendations during spillover events.

Supply Scarcity Gauge

Check the city-wide 3-star availability. Below 100 rooms = extreme scarcity. The Max Yield toggle enables ceiling-price recommendations. Only activate with GM approval.

OTA Inventory Panel

When any OTA channel shows "Tight Supply" (< 8 rooms), scarcity is visible to guests. They expect to pay more. Approve small ADR lifts in these windows.

Module 3: Approve/Veto Decision Framework

✓ When to APPROVE

  • Spillover is active (upper tier near capacity)
  • City-wide supply < 200 rooms
  • OTA channels showing tight supply
  • Price increase ≤ 15% over current ADR
  • Zhuhai anchor ratio < 2.5×
  • No major event cancellation in last 24h

✗ When to VETO

  • Zhuhai anchor ratio > 3.5× (cross-border leakage)
  • Competitor prices dropped > 10% in last hour
  • Guest satisfaction scores below 4.0/5
  • Supply composite exceeds 1.5× (over-adjustment risk)
  • Typhoon signal is active but downgrading
  • Group booking cancellation detected

Module 4: Managing the 19:00–21:00 Peak

The peak leakage window requires heightened attention. During this 2-hour period, walk-in demand spikes and pricing sensitivity drops.

1
Pre-position at 18:45

Review the Peak Leakage panel 15 minutes before the window opens. Know the current supply state.

2
Fast-approve during peak

The 15-minute veto window is critical. If indicators support the recommendation, approve within 5 minutes to capture the opportunity.

3
Monitor the composite cap

The system auto-compresses supply-side multipliers above 1.3×. If you see the composite cap active, the system is already protecting against over-pricing.

4
Post-peak debrief

After 21:00, review the peak leakage heatmap. Note which hours had the highest missed yield for the next day’s preparation.

Executive View

12-Month ROI Dashboard

YTD Net Profit Lift▲ Cumulative
MOP 542,800

April 2025 – March 2026

Annual ROI▲ 842%
842%

vs. operating cost of $78.78/mo

Avg Monthly Lift▲ consistent
MOP 45,233

Per month average

AI-Enhanced Revenue vs Static Baseline — 12 Months

ROI Attribution — Shapley Values

AI-AttributedMOP 376,540
Baseline RevenueMOP 125,400
External FactorsMOP 40,860
Attribution Window: 24-hour lookback Confidence Threshold: 85% Model: Multi-touch (Shapley)
class ROIAttributionModel:
    def __init__(self, lookback_hours=24, confidence=0.85):
        self.lookback = lookback_hours
        self.confidence_threshold = confidence

    def shapley_attribution(self, revenue_data: pd.DataFrame) -> dict:
        """Multi-touch attribution using Shapley values."""
        channels = ['ai_pricing', 'events', 'weather', 'seasonal']
        shapley_values = {}
        for channel in channels:
            marginal = self._marginal_contribution(revenue_data, channel)
            shapley_values[channel] = marginal
        total = sum(shapley_values.values())
        return {k: round(v/total * 100, 1) for k, v in shapley_values.items()}

7-Day Shadow Report

Missed YieldMOP 8,420
Trigger Frequency142 events
Ceiling Safety97.3%
Avg RecommendationMOP 952

Competitor Displacement Analysis

HotelCategoryTheir ADROur ADRParity Status
Grand Lisboa Palace4-StarMOP 1,082MOP 952Healthy Gap
Hotel Riviera3-StarMOP 920MOP 952Premium +3.5%
Hotel Sintra3-StarMOP 880MOP 952Premium +8.2%
Emperor Hotel4-StarMOP 1,050MOP 952Healthy Gap
Hotel Guia3-StarMOP 860MOP 952Premium +10.7%

Automated Report Templates

Daily Revenue Optimization Summary
ADR performance, trigger activations, and yield lift for the past 24 hours.
Weekly Competitive Position Dashboard
Competitor pricing analysis, market share trends, and positioning recommendations.
Monthly ROI Analysis + Executive Summary
Comprehensive P&L impact, Shapley attribution, and strategic recommendations.

Go-Live Readiness Checklist

83% Complete
Data pipeline validated (15+ sources)
ML models trained & tested (MAPE 4.2%)
Circuit breakers configured
Monitoring & alerting active
Shadow mode report validated
Hotel management approval secured
PDPA compliance reviewed
Secret rotation completed
MOP 898 baseline freeze confirmed
Veto training completed
Smoke test passed
Production deployment scheduled
Admin

Access Code Administration

Generate, manage, and monitor subscription access codes

Code Generator

All Access Codes (4)

Access Code Hotel Status Expires Actions

Code Statistics

4 Total Codes
3 Active
1 Pending Payment
1 Withdrawn

Admin Audit Log

System Init 4 default access codes loaded

v10 Value-Capture Engine

v10 NEW
Dynamic Ceiling
MOP 1,096
Max when 5★ full (+8%)
Peak Urgency
+6.5%
19:00–21:00 walk-in boost
Zhuhai Intercept
Active
Cross-border price sync
OTA Advisory
Monitor
Channel optimization

Dynamic Ceiling Monitor

ConditionCeilingRelief
5★ Vacancy < 5% MOP 1,096 +8.0%
5★ + 4★ Both < 10% MOP 1,045 +3.0%
Normal conditions MOP 1,015 0%
Current: Normal (MOP 1,015)

Peak Window Urgency (19:00–21:00)

Hour: 19:00–21:00 Outside window
Occupancy > 75% Checking…
Border wait > 40 min Checking…
Urgency Premium: Standby

Channel Optimization Advisory

🟢
Normal

All channels open — standard distribution

🟡
Reduce OTA

Reduce Ctrip/Trip.com allocation, prioritize direct bookings

🔴
Close OTA

Close OTA channels — direct bookings only (saves ~15% commission)

v11 Policy-Adaptation Engine

V11 NEW
Density Rebase
1.23×
172k/day new baseline
Currency Effect
−20%
Elasticity reduction at 1.16 MOP/RMB
Supply Pressure
+185 rooms
Anticipated new inventory
Traffic Dampener
−15%
Smart traffic peak reduction

Macro Environment Dashboard

Factor Current Value Model Impact Status
RMB/MOP Rate 1.161 Elasticity ×0.80 🟡 Active
Visitor Density Peak 172k/day Baseline rebased +23% 🔴 Record
Non-Mainland Share 12% Blended elasticity 🟢 Tracking

Supply Evolution Tracker

Jul 2026 [weight: 0.15]
Hotel Lisboa (Renovated) — 400 rooms, 4★ ↗
Sep 2026 [weight: 0.10]
Grand Emperor (Refurb) — 300 rooms, 4★ ↗
Dec 2026 [weight: 0.25]
Macau Landmark Hotel — 450 rooms, 3★ ↗
Net supply pressure: +185 effective rooms

Adaptive Learning Controls

Aggression Factor 1.0 (Neutral)
Conservative
0.5
Aggressive
1.5
Drift Threshold 2.68% MAPE — within 6% limit
0% 2.68% current 6% threshold
Yield Optimization +1.5% ↑
Upward price bias active
Retraining Status
Monitoring — no drift detected

Smart Traffic Management Impact on Border Wait Signal

Without Smart Traffic
Peak hour border weight: 100% signal
With Smart Traffic (v11)
Peak hour border weight: 85% signal (−15% dampened)
14:0015:0016:0017:0018:0019:0020:0021:0022:00