### 2026‑03‑12 · Index Basis Arbitrage Deep Dive & VPN Toolkit

**Summary:** Explored the business model, lifecycle, and economics of index basis‑arbitrage desks; built VPN toolkit for proxy‑switching; tested Tavily with/without proxy.

#### Key Discussions

1. **Index Basis Arbitrage Business Model**
   - **Cash‑and‑carry trade**: Borrow money at HIBOR, buy HSI basket, sell futures; profit from basis convergence.
   - **Stamp‑duty advantage**: Banks with internal inventory avoid 0.13% stamp duty – a 34‑point cost saving per leg that makes the arb viable.
   - **HIBOR sensitivity**: Trade is short funding; a 50 bps HIBOR spike reduces P&L by ~5 points (59% cut).
   - **Lifecycle**: Opportunity ID → trade setup (borrow/buy/sell) → holding (carry accrual) → convergence/unwind → P&L attribution.
   - **Bank advantages**: Cheaper funding (HIBOR flat vs. +spread), stock‑loan rebates, internal inventory for stamp‑duty avoidance, scale economics.

2. **Futures vs. Marked‑Price Mismatch**
   - **Traded futures price** includes liquidity premium, arb‑desk flow, transaction‑cost buffer.
   - **Marked price** (model) = spot × [1 + (HIBOR − div yield) × T]; often stale inputs (HIBOR, dividends) and batch‑cycle latency.
   - **Diagnostic**: Compare timestamps, decompose basis, monitor arb‑desk flow.

3. **VPN Toolkit Development**
   - **Clash Verge automation**: Scripts to test all proxies, select fastest non‑HK (prioritizing US), switch GLOBAL selector.
   - **System‑proxy toggle**: macOS `networksetup` commands to enable/disable HTTP/SOCKS proxy at system level.
   - **Tavily proxy‑vs‑direct test**: No geo‑blocking observed; proxy latency ~4.5 s (same as direct); ADR data quality better via US proxy (cleaner parsing).

4. **Morning‑Report Generation**
   - **Proxy‑on report** generated (TG‑US‑1(hysteria)) and sent.
   - **Proxy‑off report** generated (DIRECT) and sent.
   - **Comparison**: ADR prices differed significantly (Tencent ADR $71.16 vs. $73.96; Alibaba ADR mis‑parsed as 22,060 via direct).
   - **Conclusion**: Use proxy for ADR‑dependent reports; VPN toolkit ready for auto‑switching.

#### Workspace Updates
- **New infrastructure/vpn/**: README, clash_fastest_non_hk.py, clash_speed_test.py, clash‑verge‑ops.md.
- **New trading/execution/data‑cache/**: ex‑dividend‑cache.json, CACHE‑MANIFEST.md.
- **New reports**: 2026‑03‑12‑{proxy,direct,comparison}.md.
- **Updated**: morning‑report‑template.md, pre‑market‑checklist.md, knowledge/INDEX.md.

#### TODOs for Next Session
1. Create knowledge/trading/index‑basis‑arbitrage.md with today's learnings.
2. Implement cache‑first logic for report generation (check ex‑dividend cache before Tavily).
3. Set up automatic cache‑refresh cron job.
4. Validate ADR excess‑move formula with real‑time data.

---
*Memories logged at 22:48 HKT.*