Calculations › Market Overview

What is the best single-day % move in the market recently?

The query

WITH latest_day AS (
  SELECT MAX(datetime) AS d FROM ticketprice
),
today_prices AS (
  SELECT tp.ticketnameid, tp.price,
         LAG(tp.price) OVER (PARTITION BY tp.ticketnameid ORDER BY tp.datetime) AS prev_price
  FROM ticketprice tp
  WHERE tp.datetime >= (SELECT d FROM latest_day) - 5*86400
)
SELECT MAX((price - prev_price) / NULLIF(prev_price,0) * 100) AS best_pct_move
FROM today_prices
WHERE prev_price IS NOT NULL AND prev_price >= 0.5 AND price >= 0.5
  AND ABS((price - prev_price) / NULLIF(prev_price,0) * 100) <= 50;

Runs against Cryptobi's market tables — ticketname (symbols), ticketprice (daily prices and volume) and symbolmetadata (sector, exchange, market cap and other reference fields).

Current output

Best move
25.52

Live output, first 1 rows, refreshed periodically. Model estimates are trend projections from recent prices, not financial advice.

Run this on your own holdings, change it, or write your own in SQL or Python — then put it on a dashboard or have it emailed on a schedule. Free, no credit card.

Sign Up Free

Related calculations