Calculations › Market Discovery

Which sector stocks are near their 52-week low with an analyst Buy rating? (edit the sector filter)

The query

SELECT tn.ticket AS symbol, sm.name, sm.sector,
  ROUND(tp_latest.price::numeric, 2) AS price,
  ROUND(sm.fifty_two_week_low::numeric, 2) AS fifty_two_week_low,
  ROUND(sm.fifty_two_week_high::numeric, 2) AS fifty_two_week_high,
  ROUND(((tp_latest.price - sm.fifty_two_week_low) / NULLIF(sm.fifty_two_week_high - sm.fifty_two_week_low, 0))::numeric, 4) AS pct_of_52w_range,
  sm.recommendation_key
FROM ticketname tn
JOIN symbolmetadata sm ON sm.ticketnameid = tn.id
JOIN LATERAL (
  SELECT price FROM ticketprice tp WHERE tp.ticketnameid = tn.id ORDER BY tp.datetime DESC LIMIT 1
) tp_latest ON true
WHERE tn.tickettype = 'stock'
  -- "Banking" is filed under Yahoo's "Financial Services" sector (also covers insurers, fintech, asset managers).
  -- Other sectors in this data: Technology, Healthcare, Industrials, Consumer Cyclical, Communication Services,
  -- Real Estate, Basic Materials, Consumer Defensive, Energy, Utilities.
  AND sm.sector = 'Financial Services'
  AND sm.market_cap > 100000000
  AND sm.recommendation_key IN ('buy', 'strong_buy')
  AND sm.fifty_two_week_high IS NOT NULL AND sm.fifty_two_week_low IS NOT NULL
ORDER BY pct_of_52w_range ASC
LIMIT 15

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

SymbolNameSectorPriceFifty two week lowFifty two week high% of 52w rangeAnalyst view
QLIRO.ST Qliro AB (publ) Financial Services 16.10 16.55 24.90 -0.05 buy
KLAR Klarna Group plc Financial Services 12.39 12.06 47.48 0.01 buy
SAMPO.HE Sampo Oyj Financial Services 8.73 8.64 10.39 0.05 buy
VEFAB.ST VEF AB (publ) Financial Services 1.80 1.67 2.50 0.15 strong_buy
COIN Coinbase Global, Inc. Financial Services 186.41 139.18 402.16 0.18 buy
ENITY.ST Enity Holding AB Financial Services 75.50 66.30 114.88 0.19 strong_buy
VNV.ST VNV Global AB (publ) Financial Services 18.36 16 26.68 0.22 strong_buy
EQT.ST EQT AB (publ) Financial Services 288 259 383 0.23 buy
NOBA.ST NOBA Bank Group AB Financial Services 87.90 74.20 126 0.26 buy
MARA MARA Holdings, Inc. Financial Services 11.33 6.66 23.45 0.28 buy
KINV-B.ST Kinnevik AB Financial Services 62.06 46.78 91.26 0.34 buy
BAC Bank of America Corporation Financial Services 54.43 46.12 65.23 0.43 buy
BLK BlackRock, Inc. Financial Services 1058.29 917.39 1219.94 0.47 buy
JPM JPMorgan Chase & Co. Financial Services 330.83 279.10 366.50 0.59 buy
MA Mastercard Incorporated Financial Services 551.47 464.52 601.62 0.63 strong_buy

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