Research, risk and manually approved execution tooling for merger arbitrage. The first case is Marvell (MRVL) / Lumentum (LITE): an all-stock deal at a fixed 4.5 MRVL per LITE share, announced 2026-11-02, expected to close in 1H-2028.
Verdict (2026-11-24 close, revised 2026-11-25 after a triple check): potentially attractive, small size only (signal WATCH). The spread is real: the terms come from the merger agreement, and prices were checked against two independent sources.
- Completion odds: a gate-by-gate antitrust analysis puts completion at about 48%: US 93%, both votes 81%, EU 94%, China SAMR 69% (its base rate for comparable US chip deals). That matches the market's ~50%.
- Return: about +5% a year above Treasuries on margin capital at base assumptions, just over the 5% hurdle. The base case includes the $3.2bn regulatory fee on both legs and LITE trading near its factor-model value ($613) if the deal breaks.
- The catch: the market implies LITE would be worth only $494-534 on a break. With the first version's blended break value ($512) the trade is -3% a year; under the stress case it loses.
- Trading: at most one 2-LITE / 9-MRVL lot per $10k. An alert-only ladder watches 23% (one lot) and 27% (second lot from $20k). The Nov 25 close was 23.6%.
- The triple check fixed: a missing fee in the signal, a break value whose central estimate was used as its best case, several simulation bugs, and serious safety bugs in the IBKR tool. Details are in REPORT.md.
Reasoning and sources: docs/REPORT.md. How antitrust news moves each stock, and the trading playbook: docs/ANTITRUST_AND_TRADING.md. Research only, not investment advice.
Interactive version: https://rasmuscodes.github.io/projects/merger-arb/ (static, no trading).
| Path | What |
|---|---|
deals/mrvl_lite.yaml |
Verified deal terms with section-level citations: ratio, collar, dates, outside-date chain, fees, vote standards, efforts covenant, dividend policy. A new deal is a new YAML file. |
mergerarb/analytics/ |
Spread maths and history stats; carry (dividends, borrow, IBKR interest tiers, commissions); standalone (break) prices from pre-deal factor models; probabilities (break-even, market-implied, bottom-up); IBKR Reg T margin and survival-first sizing; 9+ path-simulated scenarios; Monte Carlo with model uncertainty; hedge-ratio comparison; trade/watch/no-trade signal. |
mergerarb/analytics/antitrust.py |
Two-state pricing (how a change in completion odds moves each leg: P&L = Δq × G), a regulatory event tree (US / votes / EU / China SAMR) giving the price impact of every headline, and a news-flow Monte Carlo that tests entry and exit rules. |
mergerarb/execution/ |
Order export (JSON/CSV) and a local-only IBKR trading service: paper by default, typed approval, short-first leg management, partial-fill and unhedged-leg alerts, journal, alert-only spread-trigger ladder (trigger.py), and a no-orders readiness check (python -m mergerarb.execution.readiness). See docs/EXECUTION.md. |
app/streamlit_app.py |
Local dashboard: all research views, plus an optional Execution tab that talks to the local service. |
web/ |
Public static dashboard. A JS port of the model, checked against Python outputs (web/data/parity.json: 102 checks, max difference 0). |
scripts/ |
Data pulls (Yahoo, Treasury, FINRA short interest, option chains), analysis runs, report charts, web snapshot, synthetic sample data, CRSP comparables. |
tests/ |
96 tests: exchange-ratio, P&L, carry and margin maths; quote-freshness labels; scenarios; signal rules; Monte Carlo; antitrust identities and Bayesian consistency; execution safety (approval, duplicates, partial fills, imbalance, rejection, reconnect, service auth); triggers and readiness; dashboard smoke test; full offline pipeline; regression tests for every triple-check fix (test_triple_check.py, test_execution_regressions.py). |
python -m venv .venv
.venv\Scripts\activate # Windows (source .venv/bin/activate elsewhere)
pip install -r requirements.txt
pip install -e .
pytest # 96 tests; the dashboard smoke test is skipped without a local data snapshot
Offline (synthetic sample, labelled everywhere):
MERGERARB_DATA=sample streamlit run app/streamlit_app.py
With fresh data (unofficial Yahoo endpoints; research use; raw files stay local in data/raw/):
python scripts/pull_yahoo.py
python scripts/pull_market_extras.py # Treasury curve, FINRA short interest, option chains
python scripts/run_analysis.py # console summary + outputs/
python scripts/build_report_assets.py # docs/figures + docs/report_numbers.json
python scripts/build_web.py # web/data snapshot + parity vectors
python scripts/run_antitrust.py # headline impacts, gate probabilities, entry-rule simulation
python scripts/build_antitrust_charts.py
python scripts/crash_crosssection.py # break-value evidence: how far 49 names strayed from their factor models
python scripts/antitrust_event_study.py # needs MERGERARB_CRSP_DIR (licensed CRSP) for pre-2025 events
streamlit run app/streamlit_app.py
Before trading anything: install TWS / IB Gateway (paper), enable the API, then run
python -m mergerarb.execution.readiness. It should print READY. It places no orders.
Borrow fees: IBKR's published short-stock availability (via iBorrowDesk, or TWS's Short Stock Availability window) is
entered as an input. The execution service reads shortability live from IBKR (tick 236).
- Quotes are labelled by real freshness. "real-time" appears only for a recent regular-session print from a source that declares itself real-time (Yahoo's is Nasdaq last sale only, not the consolidated tape). Everything else is "delayed N min", "closing print", "stale" or "unavailable". Crossed or stale after-hours bid/ask pairs are flagged and ignored.
- Committed: derived data only (the spread series, model estimates, CRSP-derived comparables statistics), the synthetic sample, and the public-domain Treasury curve. Not committed: raw Yahoo or option snapshots, raw CRSP data, execution journals, tokens, order exports.
- Payoffs. Completion pays the dollar spread minus carry ($101 per LITE share), whatever MRVL does.
- Break price. A break sends LITE to its standalone value. That value is projected from the Oct-28 unaffected price with pre-deal factor models, not reset to the unaffected price, because the sector has since crashed 25-50%. MRVL recovers part of its estimated 21% deal discount.
- Probability. Break-even completion probability is -B/(C-B). Completion probability is decomposed into the two votes, regulators and other risks (labelled judgment). The Monte Carlo draws outcomes and dates, MRVL and LITE standalone paths, and spread dynamics (bridges for completion, widening before breaks). It runs every path through an IBKR-style margin account.
- Sizing. Survival-first: worst plausible stress loss ≤ 10% of equity, excess liquidity ≥ 50%, no margin call in extreme stresses, and a 95% expected shortfall ≤ 20% of equity.
MIT (code). Data sources keep their own terms; see docs/REPORT.md for provenance.