Calculations › Market Trends

Show the average daily price trend across all stocks (market benchmark) over the last 90 days

The query

SELECT to_timestamp(tp.datetime)::date AS date, AVG(tp.price) AS avg_price
FROM ticketname tn JOIN ticketprice tp ON tp.ticketnameid = tn.id
WHERE tn.tickettype = 'stock'
  AND tp.datetime >= EXTRACT(EPOCH FROM (NOW() - INTERVAL '90 days'))::bigint
GROUP BY 1
ORDER BY 1;

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

DateAvg price
2026-07-03 121.11
2026-07-06 135.65
2026-07-07 134.79
2026-07-08 132.58
2026-07-09 133.46
2026-07-10 133.33
2026-07-13 132.66
2026-07-14 132.96
2026-07-15 133.31
2026-07-16 133.20
2026-07-17 132.16
2026-07-20 132.08
2026-07-21 132.90
2026-07-22 133.67
2026-07-23 132.29

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