All projects 04 · Markets research

Sell-Opinion Whipsaw

A Sell opinion fires just before earnings; days later the stock is a Buy again. Research into that whipsaw at a bank's advice desk — a 503-stock early-warning cockpit built on real data, with the gaps stated as plainly as the findings.

Status In progress Year 2026 Stack Python · openpyxl · Playwright · self-contained HTML/JS

Overview

At a bank's investment-advice desk, stock opinions run on a three-level scale — Buy, Hold, Sell — and the desk must act on them toward clients. A recurring, contradictory pattern triggered this research: a Sell appears just before quarterly earnings; after the print the price drops below Fair Value, and the opinion flips straight back to Buy within days. Clients are moved out of a position and back in on a signal that reversed almost immediately. That is a whipsaw — operationally costly, and it erodes trust in the advice.

The research question — how often has this actually happened, and what drives it — needs a full opinion-change history. What exists today is a single snapshot: current opinion, one prior opinion, price, Fair Value, next report date, per stock. A snapshot cannot show a three-step cycle over time, so the historical count is not yet possible — and the project says so, on the page and inside the tool. What it delivers instead is what the data honestly supports: a forward-looking cockpit that flags which current Sell opinions are most likely to flip at the next earnings.

The cockpit is a single self-contained HTML file: all 503 stocks in a sortable watchlist — ticker, opinion, price, Fair Value, buffer to FV, days to next report — and a scenario engine. Click any stock and it loads with its real price and FV; beat/meet/miss earnings scenarios estimate the post-earnings price, and the flip-risk score is the summed probability of the scenarios that land below Fair Value. Where real analyst consensus was harvested, it tilts the miss probability.

Universe503 stocks
Median Sell buffer+38% vs FV
Prior Sells upgraded96% — 46/48
Whipsaw-prone now2 / 17 Sells

Approach

01

Ingest & join

Two Excel snapshots parsed with openpyxl. The data refresh added price, Fair Value and ticker but dropped the next-report date — recovered from the original snapshot via an ISIN join, verified consistent.

02

Validate the data

The Fair Value column was confirmed, not assumed: the price-vs-FV buffer correlates monotonically with the opinion across all 503 stocks (Buy −23%, Hold +2%, Sell +38% median). Currency-agnostic by construction — price and FV share a currency per row.

03

Model the chain

Earnings expectation → beat/meet/miss scenario → price reaction → does the new price cross Fair Value → flip risk. Expected move and scenario probabilities are adjustable for what-if analysis.

04

Verify

Every figure and the rendered cockpit checked programmatically — headless-browser render plus assertions on computed values. JNJ resolving to 0% flip risk and Ontex to 100% were confirmed against the underlying arithmetic.

What the question
needs vs what
the data supports

The single most important framing of this project is a gap — and it is stated, not hidden. Counting historical whipsaws needs three things the current data does not have:

opinion historyfull timestamped changes per stock — the data holds exactly one prior opinion earnings dateshistorical prints, to confirm Sells fell just before them — only the next report date exists price / FV over timethe post-earnings drop mechanism — the data is one snapshot, 8 July 2026

A single snapshot cannot show a three-step cycle over time, so the historical whipsaw count is not yet possible. What is possible — and built — is a forward-looking early-warning cockpit that flags which current Sell opinions are most likely to flip at the next earnings. Its final link — price crossing Fair Value actually flipping the opinion — is not yet calibrated, and the tool says so on screen. Until the opinion history arrives, it predicts the crossing: the leading indicator of the flip, not the flip itself.

Timing and
valuation
disagree

CAUGHT

Ontex Group — the contradiction, already live

Carries a Sell opinion while its price (2.30) sits 38% below Fair Value (3.70), with earnings ~22 days out. On valuation it should already be a Buy — exactly the pattern the research is about, materialised in the current snapshot.

0% RISK

Johnson & Johnson — urgent on timing, safe on valuation

Earnings in 7 days, but the price trades 41% above Fair Value — no normal earnings move can cross FV, and the calculator correctly reports 0% flip risk. High on a naïve days-to-earnings watchlist, low on the one that matters.

CLOSEST

Bekaert — the opposite case

Earnings further out (22 days) but only +14% above Fair Value — the closest of the overvalued Sells to a flip. This two-dimensional view is why the cockpit adds a whipsaw-prone metric: Sells within 15% of FV — currently Ontex and Bekaert.

The opinion
engine is
FV‑driven

The Fair Value interpretation was validated, not assumed: across all 503 stocks, the median buffer between price and Fair Value rises monotonically with the opinion. Opinions track price-versus-FV almost mechanically — the finding that justifies using “price crosses FV” as the predictor of a flip.

OpinionMedian buffer to Fair ValueReading
Kopen (Buy)−23%price well below FV
Houden (Hold)+2%price roughly at FV
Verkopen (Sell)+38%price well above FV

A second signal points the same way: of the 48 stocks whose prior opinion was Sell, 46 have since been upgraded (96%). Firm caveat, stated with the number: this is the single most recent change per stock, not the full history — a direction, not a confirmed whipsaw.

Still missing
— by design,
on the list

The build-in-progress checklist, told plainly. Data comes from a bank-internal snapshot plus Alpha Vantage for earnings consensus — where the free tier (25 requests/day) and a European coverage gap are real constraints: US consensus is excellent, European names return empty, and only JNJ has been harvested so far.

NeededUnlocksStatus
Full opinion historyHistorical whipsaw count; calibrating the flip linknot yet available
Historical earnings datesConfirming Sells fell just before printsnot yet available
Consensus per nameScenario engine for all 17 Sells, not just JNJpartial — JNJ only
Per-name expected moveSharper flip risk than one global sliderglobal assumption today
Price / FV time seriesConfirming the post-earnings drop mechanismsnapshot only

Roadmap

01

Broaden consensus coverage

Daily Alpha Vantage harvest of the covered US tickers, spread across days within the 25/day limit — now possible with the refreshed tickers.

02

Per-name expected move

Options-implied move or each stock’s historical earnings-day reaction, replacing the single global slider.

03

Ingest opinion history

Enables the actual historical whipsaw count and calibration of the final link: price crossing FV → opinion flipping.

04

Agent-driven monitoring

The stated end goal: an automated watcher that flags when a fresh Sell opinion enters an earnings window close to Fair Value, and alerts the desk.