Market analysis calculations
47 worked SQL examples over live market data — biggest movers, sector breakdowns, volatility, 52-week range position, volume anomalies and more. Each one shows the query and its current output. They run against the same data behind every page on this site, and any of them can be dropped into your own dashboard or a scheduled report.
Market Breakdown
- Show the average 30-day % change by sector across all stocks
- Show the average latest price by exchange across all symbols
- Show how many crypto assets fall into each category
- Show the top 10 stocks by latest trading volume
- Show how many stocks fall into each market-cap bucket
- Show the average year-to-date % change by exchange
- Show the average latest trading volume by crypto category
Market Discovery
- Show the top 20 stocks in the market by 30-day % gain (ideas to research)
- Show the top 20 symbols in the market by latest trading volume
- Show all funds tracked on the platform
- Show all crypto assets tracked on the platform by category
- Show the top 20 most volatile stocks in the market with sector (ideas to research)
- Show the top 20 best year-to-date performing stocks with sector (ideas to research)
- Show a sector overview across the market (count, average price, average YTD change)
- Show all currency pairs tracked on the platform
- Show the top 20 stocks in the market by market capitalization
- Which stocks in a sector (e.g. banking) look like a buying opportunity right now? (edit the sector filter)
- Which sector stocks are near their 52-week low with an analyst Buy rating? (edit the sector filter)
- Which materials and commodities moved the most in the last 30 days?
- Where does each material sit in its own 52-week range?
- Which currencies moved the most in the last 30 days?
Market Overview
- How many symbols does the platform track in total?
- What is the average latest price across all stocks?
- What is the best single-day % move in the market recently?
- What % of stocks in the market are up today?
- What is the volatility of the stock market benchmark (last 30 days)?
- What is the average year-to-date % change across all stocks?
- What is the total latest 24-hour trading volume across all tracked crypto pairs?
- How many materials are up this week?
Market Risk
- Show the average stock volatility by sector, last 30 days
- Show the top 10 most volatile stocks in the market, last 30 days
- Get the risk profile (max drawdown, volatility, Sharpe ratio) for a specific symbol (edit the symbol)
- How many stocks had an unusual volume anomaly in the last 30 days?
Market Trends
- Show the price trend for a symbol in the market over the last 30 days (edit the symbol)
- Show the average daily price trend across all stocks (market benchmark) over the last 90 days
- Show a 7-day moving average trend for the stock market benchmark, last 90 days
- Show the cumulative return (indexed to 100) across all stocks, last 90 days
- Show the average daily crypto market price trend, last 90 days
- Show the weekly average price trend for all funds, last 2 years
- Show a rolling 30-day volatility trend for the stock market, last 180 days
- Show the most recent trend-break events detected market-wide (technical analysis event log)
Market: Forecasts
- Get the 7-day forecast price for a specific stock (edit the symbol)
- Get the 3-day forecast % change for a specific crypto (edit the symbol)
- Get the 30-day forecast price for a specific fund (edit the symbol)
- Top 10 stocks by 7-day forecasted % gain, market-wide
- Show a symbol's recent price trend with its 7-day and 30-day forecast overlaid (edit the symbol)