SPX Psych Levels + Fair Value for ES/MES and SPY

1 130
SPX Psych Levels + Fair Value for ES/MES and SPY
This is the open-source successor to my protected "SPX Psych Levels for /ES Futures (Fair Value)". It adds SPY, 1h to 4h charts, free Treasury rates, previous-session levels and a configurable info table. The source is available under MPL 2.0 here and on GitHub (see my profile). Future updates will be published here.
What it does
Traders watch round SPX levels (the 100s, 50s and 25s), but ES, MES and SPY never trade at exactly the index price. ES carries a fair-value basis (carry minus dividends) that shrinks toward expiry, and SPY trades near one tenth of SPX plus its own dividend and tracking basis. This script translates each SPX level through that basis, so "SPX 7700" is drawn where it really sits on your ES, MES or SPY chart. It also draws a cash-session ADR envelope.
How the projection works
  • ES / MES: chart level = SPX level + fair-value basis.
  • SPY: chart level = SPX level / 10 + observed basis, where observed basis = SPY - SPX / 10.

The observed basis only updates from chart and SPX bars with matching timestamps during the cash session, smoothed over 5 bars by default. Holiday forward-filled quotes cannot refresh it, and a stale basis re-syncs once when paired cash data returns.
Fair Value Mode (ES / MES)
  • Observed (default): the live, paired ES minus SPX basis. Needs no rate data. It moves more than the model because it reflects real intraday basis changes.
  • Theoretical: a carry model using SPX, days to expiry, a Treasury rate plus a funding spread, and an estimated 1.2% dividend yield.
  • Blended: the model plus half of the observed gap (capped at 6 points before halving). Steadier than Observed.

Model Rate Source (Theoretical and Blended only)
  • Treasury (free), default: TradingView's free US Treasury yields (US01MY, US03MY, US06MY, US01Y). The 3-month rate is 0.6 x IRX + 0.4 x US03M; IRX is a discount rate quoted x10, so it is converted to a bond-equivalent yield first.
  • FRED: DGS1MO / DGS3MO / DGS6MO / DGS1, if your account has access.
  • Fixed backup: no rate requests; a fixed curve marked "est".

Level Tracking
  • Session Anchored (default): holds the basis captured at the session open (18:00 New York for futures, the first bar of the day for SPY), so levels stay put all session.
  • Live Basis: re-projects every bar with the latest observed basis.

The grid
  • 100- and 50-point levels are on by default; 25-point levels are optional.
  • Each session's grid is one evenly spaced ladder centred on a 100, with the same number of 100s on each side (9 lines at a normal ADR). A new session keeps the previous centre unless price opens more than 100 points away, so consecutive days line up.
  • Level Span Mode: Expected Move (ADR-14 by default; ADR-10, VIX, VIX1D or VIX9D) or Fixed Count.
  • Sessions to Show (default 3, up to 41): the current session plus earlier sessions, faded. Each session's lines run only from its own start to its end. TradingView allows 500 lines per script, so on very long lookbacks the oldest sessions drop first.
  • Re-centre Grid on Trend rebuilds the grid if price moves more than one 100 from the centre mid-session.
  • Optional margin-of-error zones around each level.

ADR envelope
Each envelope is the instrument's own 09:30 New York (06:30 Pacific) cash open, plus and minus the average range of the prior 14 completed cash sessions (or 10). The current session is excluded, so the caps stay fixed for the day. ES / MES keep the latest valid envelope overnight; SPY shows it only during the cash session. It is a descriptive range reference, not a probability or a signal.
Info table
Show or hide it, set its position and text size, and pick the rows you want. By default it shows only the fair value.
  • Rows: Fair value / basis, SPX equivalent, nearest levels with distance, nearest 100s, day range vs ADR, ADR+ / ADR- prices, contract.
  • Model rows (ES / MES): model fair value, observed basis vs model, rate breakdown (Treasury + funding + seasonal), Treasury curve, days to expiry, dividend yield.
  • An amber Check row appears only when something needs attention: waiting for SPX data, a stale basis during cash hours, a pending resync, or an estimated model rate.

Supported charts
  • Symbols: ES and MES (continuous and the active dated contract) and SPY. Other symbols show nothing by design.
  • Timeframes: intraday intervals that divide 30 minutes (1 to 30 minutes), plus 1h, 2h, 3h and 4h, which are calculated from completed 5-minute bars. Other timeframes show nothing and do not error.

Notes
  • The levels are a map of where round SPX numbers sit, not signals.
  • The active dated ES contract is chosen by a calendar rule (third Friday of the expiry month minus 4 days).
  • On 1h to 4h charts, older history can be blank if TradingView has no 5-minute data that far back. ADR needs 10 or 14 completed cash sessions to warm up.
  • Fixed backup rates and the dividend yield are estimates, not market quotes.

Thanks to PeterJarvis for suggesting the free IRX / US03M proxy for the 3-month rate.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.