> ## Documentation Index
> Fetch the complete documentation index at: https://api.unusualwhales.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> API requests use the base URL https://api.unusualwhales.com and require a bearer token in the `Authorization` header (`Authorization: Bearer <API_KEY>`). Create and manage API tokens at https://unusualwhales.com/dashboard/api.
> For live market data inside an AI tool, use the Unusual Whales MCP server at https://unusualwhales.com/public-api/mcp.
> Instructions for agents using Unusual Whales tools: https://unusualwhales.com/skill.md

# Compare moves with implied volatility

> learn how to build volatility filters

Building on what we learned from our options volume filtering
we can apply the same to volatility filters.

```text wrap theme={null}
where iv7d > 0 and iv30d > 0
  and (iv7d / iv30d >= 1.5 or iv7d / iv30d <= 1 / 1.5)
  and option_volume >= 10K
```

This selects a ratio of at least `1.5` or at most approximately `0.6667`.

<CodeGroup>
  ```bash cURL wrap theme={null}
  curl --fail-with-body --get 'https://api.unusualwhales.com/api/screener/stocks' \
    --header "Authorization: Bearer $UW_API_KEY" \
    --data-urlencode 'query=where iv7d > 0 and iv30d > 0 and (iv7d / iv30d >= 1.5 or iv7d / iv30d <= 1 / 1.5) and option_volume >= 10K' \
    --data-urlencode 'limit=10'
  ```
</CodeGroup>

Here are some starting examples:

## Find stocks trading at least one expected move away from their 20 day EMA.

```text wrap theme={null}
where implied_move_7 > 0 
        and abs(price - ema_20) >= implied_move_7
```

## Find stocks moving at least two implied standard deviations.

```test wrap theme={null}
where abs(z_score) >= 2
```

It is the shortest example so far but it is quite powerful. First we need to understand
how z\_score is defined:

```test wrap theme={null}
z_score = ((close - prev_close) / prev_close) * sqrt(251) / volatility_30
```

Z score measures the price change since the previous close relative to an IV based daily move.

For example if a ticker has 30% IV the approximate 1 day standard deviation is 1.89%. A 4% gain gives a score of approximately +2.11.

So in this case a 4% gain is for a 30% IV stock 2 sigma moves. If the IV is 60% it is then "just" one sigma move.
For a ticker with 15% it would be a 4 sigma move. It is important to understand here that IV describes
the magnitude of potential movements of a ticker, either up or down. The higher the IV the more expensive
the options are and the market is pricing a bigger move which is why a 4% move on a stock is then surprising
when the market didn't price or even significantly underpriced it. With the z score you can filter for such tickers.
