Calculations › Market Discovery

Show the top 20 most volatile stocks in the market with sector (ideas to research)

The query

-- table market-wide: top 20 most volatile stocks (discovery)
WITH recent AS (
  SELECT tp.ticketnameid, tp.price,
         LAG(tp.price) OVER (PARTITION BY tp.ticketnameid ORDER BY tp.datetime) AS prev_price
  FROM ticketprice tp JOIN ticketname tn ON tn.id = tp.ticketnameid
  WHERE tn.tickettype = 'stock' AND tp.price >= 1
    AND tp.datetime >= EXTRACT(EPOCH FROM (NOW() - INTERVAL '30 days'))::bigint
),
vol AS (
  SELECT ticketnameid, STDDEV((price - prev_price) / NULLIF(prev_price,0) * 100) AS volatility
  FROM recent WHERE prev_price IS NOT NULL
  GROUP BY ticketnameid
  HAVING COUNT(*) >= 15
)
SELECT tn.ticket AS symbol, COALESCE(sm.name, tn.ticketname, tn.ticket) AS name, sm.sector, v.volatility
FROM vol v
JOIN ticketname tn ON tn.id = v.ticketnameid
LEFT JOIN symbolmetadata sm ON sm.ticketnameid = v.ticketnameid
ORDER BY v.volatility DESC
LIMIT 20;

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

SymbolNameSectorVolatility
SUMMAS.ST Summa Defence Oyj Industrials 30.44
2020.OL 2020 Bulkers Ltd. Industrials 25.28
NANEXA.ST Nanexa AB (publ) Healthcare 23.58
IMPC.ST Impact Coatings AB (publ) Industrials 11.16
HFRTO-B.ST HF Reverse (RTO) AB Financial Services 9.67
SBB-D.ST Samhällsbyggnadsbolaget i Norden AB (publ) Real Estate 8.42
PSNY Polestar Automotive Holding UK PLC Consumer Cyclical 7.09
GIGA.ST Gigasun AB (publ) Technology 7.00
ONCO.ST Oncopeptides AB (publ) Healthcare 6.88
SIVE.ST Sivers Semiconductors AB (publ) Technology 6.44
MSTR Strategy Inc Technology 6.40
ACCON.ST Acconeer AB (publ) Technology 5.99
BUSER.ST Bambuser AB (publ) Technology 5.77
BYND Beyond Meat, Inc. Consumer Defensive 5.49
COIN Coinbase Global, Inc. Financial Services 5.33

Live output, first 15 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