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

# How to Handle Stock Ticker Changes and Reused Tickers

> Handle ticker changes and reused tickers in stock data with SQL: map old tickers like FB and SQ, catch reused symbols, and track renames from daily snapshots.

*By [Fruit Stand Team](https://fruitstand.dev/about.md) · November 21, 2026 · Guides*

A ticker is a label, not an ID. Companies change tickers, and an old ticker
can go to a different security: `FB` was Meta until June 2022 and is now a
ProShares ETF. To handle both, map your old tickers to current ones with a
dated change table, check ISINs, and flag any record dated before its
ticker's first price.

Below are tested Snowflake queries for each step: what happens when you join
old tickers to current price data, a mapping that follows chains of changes
like Fiserv's `FISV` to `FI` and back, a check for reused tickers, and a
daily snapshot that records renames as they happen.

> [!NOTE]
>
> The queries run in Snowflake against `security_vw` and
> `security_price_history_vw` in Fruit Stand's [Historical Stock Prices
> listing](https://app.snowflake.com/marketplace/listing/GZTYZTG3LNFA), which
> we publish. They were run on November 21, 2026, with prices through
> November 20. Ticker change dates are from each company's announcement.

## Renamed tickers and reused tickers

There are two problems, and they need different fixes.

* **A renamed ticker.** The company stays the same and its symbol changes.
  Old records use the old symbol, and price data may file the whole history
  under the new one.
* **A reused ticker.** A symbol that one security gave up is later assigned
  to another. A join on the ticker then returns the wrong security,
  usually with no error.

Five recent changes show both:

| Old ticker | New ticker | Effective | What happened to the old ticker |
| - | - | - | - |
| `FB` | `META` | June 9, 2022 | Reused by the ProShares S\&P 500 Dynamic Buffer ETF in June 2025 |
| `FISV` | `FI` | June 7, 2023 | Fiserv moved from Nasdaq to the NYSE |
| `SQ` | `XYZ` | January 21, 2025 | Not reused yet |
| `FI` | `FISV` | November 11, 2025 | Fiserv moved back to Nasdaq under its old ticker |
| `MMC` | `MRSH` | January 14, 2026 | Not reused yet |

`META` itself was reused: before Meta took it, it belonged to Roundhill's
metaverse ETF, which switched to `METV` on January 31, 2022. And `Q` now belongs to
Qnity Electronics, spun off from DuPont in November 2025.

## Where the history goes after a rename

Many price sources file a company's whole history under its current
ticker. Ours does:

```sql theme={null}
select s.code, s.name, s.isin, min(p.date) as first_price, max(p.date) as last_price
from security_vw s
join security_price_history_vw p
  on p.code = s.code and p.exchange_code = s.exchange_code
where s.exchange_code = 'US'
  and s.code in ('META', 'XYZ', 'MRSH', 'FISV')
group by all
order by s.code;
```

| code | name | isin | first\_price | last\_price |
| - | - | - | - | - |
| FISV | Fiserv, Inc. | US3377381088 | 1986-09-25 | 2026-11-20 |
| META | Meta Platforms Inc. | US30303M1027 | 2012-05-18 | 2026-11-20 |
| MRSH | Marsh & McLennan Companies, Inc. | US5717481023 | 1973-02-21 | 2026-11-20 |
| XYZ | Block, Inc | US8522341036 | 2015-11-19 | 2026-11-20 |

`META` starts on Facebook's IPO day in 2012, and `XYZ` on Square's in 2015.
That is what you want for a chart of today's companies, but it means the old
tickers no longer find anything:

```sql theme={null}
select t.code, s.name, s.type, min(p.date) as first_price
from (values ('FB'), ('SQ'), ('MMC'), ('FI'), ('Q')) as t(code)
left join security_vw s
  on s.code = t.code and s.exchange_code = 'US'
left join security_price_history_vw p
  on p.code = s.code and p.exchange_code = s.exchange_code
group by all
order by t.code;
```

| code | name | type | first\_price |
| - | - | - | - |
| FB | ProShares Trust ProShares S\&P 500 Dynamic Buffer ETF | ETF | 2025-06-26 |
| FI | | | |
| MMC | | | |
| Q | Qnity Electronics, Inc | Common Stock | 2025-10-27 |
| SQ | | | |

`SQ`, `MMC` and `FI` return nothing, which you'll notice. `FB` returns a
different security, which you might not. (`Q` starts on October 27 because
Qnity traded on a when-issued basis for a week before its November 3
debut.)

Not every source works this way. Massive (formerly Polygon.io) [keeps
history as published](https://massive.com/knowledge-base/article/how-does-massive-handle-ticker-changes-and-acquisitions),
so a renamed company has some history under each symbol and you join them
yourself. Check which way yours does it before you write the join.

## What a plain ticker join gets wrong

Say you have trades recorded under the tickers of the day:

```sql theme={null}
create or replace table my_trades (ticker varchar, trade_date date, shares number) as
select * from values
  ('FB',   '2022-03-01'::date, 10),
  ('SQ',   '2024-06-03'::date, 20),
  ('MMC',  '2025-06-02'::date,  5),
  ('FISV', '2020-01-02'::date,  8),
  ('KO',   '2024-01-02'::date, 50);
```

Join them to prices on the ticker, for the trade-date price and the latest
close:

```sql theme={null}
select t.ticker, t.trade_date, t.shares,
       p.close as price_on_trade_date,
       l.close as latest_close,
       l.date  as latest_date
from my_trades t
left join security_price_history_vw p
  on p.code = t.ticker and p.exchange_code = 'US' and p.date = t.trade_date
left join security_price_history_vw l
  on l.code = t.ticker and l.exchange_code = 'US'
qualify row_number() over (partition by t.ticker, t.trade_date order by l.date desc nulls last) = 1
order by t.ticker;
```

| ticker | trade\_date | shares | price\_on\_trade\_date | latest\_close | latest\_date |
| - | - | - | - | - | - |
| FB | 2022-03-01 | 10 | | 42.896 | 2026-11-20 |
| FISV | 2020-01-02 | 8 | 115.52 | 55.88 | 2026-11-20 |
| KO | 2024-01-02 | 50 | 59.82 | 96.99 | 2026-11-20 |
| MMC | 2025-06-02 | 5 | | | |
| SQ | 2024-06-03 | 20 | | | |

`FISV` and `KO` are right. `MMC` and `SQ` come back empty. `FB` is the
dangerous one: it has no trade-date price, but it does have a latest close,
the ETF's $42.90. A portfolio valued this way puts 10 Meta shares at $429
instead of \$5,608.

## Map old tickers to current ones

Keep a table of ticker changes with the date each took effect:

```sql theme={null}
create or replace table ticker_changes (old_code varchar, new_code varchar, effective_date date) as
select * from values
  ('FB',   'META', '2022-06-09'::date),
  ('FISV', 'FI',   '2023-06-07'::date),
  ('SQ',   'XYZ',  '2025-01-21'::date),
  ('FI',   'FISV', '2025-11-11'::date),
  ('MMC',  'MRSH', '2026-01-14'::date);
```

A record maps to a new ticker only if the change took effect after the
record's date. Fiserv shows why a single join isn't enough: a 2020 trade in
`FISV` became `FI` in 2023, then `FISV` again in 2025. A recursive CTE
follows each chain to its end:

```sql theme={null}
create or replace view my_trades_resolved as
with recursive chain (ticker, trade_date, code, as_of) as (
  select ticker, trade_date, ticker, trade_date
  from my_trades
  union all
  select c.ticker, c.trade_date, tc.new_code, tc.effective_date
  from chain c
  join ticker_changes tc
    on tc.old_code = c.code and tc.effective_date > c.as_of
)
select ticker, trade_date, code as current_code
from chain
qualify row_number() over (partition by ticker, trade_date order by as_of desc) = 1;
```

Each step requires a later effective date than the one before, so a symbol
that goes back and forth, like Fiserv's, can't loop forever. Then join on
`current_code`:

```sql theme={null}
select r.ticker, r.current_code, r.trade_date, t.shares,
       p.close as price_on_trade_date,
       l.close as latest_close
from my_trades_resolved r
join my_trades t
  on t.ticker = r.ticker and t.trade_date = r.trade_date
left join security_price_history_vw p
  on p.code = r.current_code and p.exchange_code = 'US' and p.date = r.trade_date
left join security_price_history_vw l
  on l.code = r.current_code and l.exchange_code = 'US'
qualify row_number() over (partition by r.ticker, r.trade_date order by l.date desc nulls last) = 1
order by r.ticker;
```

| ticker | current\_code | trade\_date | shares | price\_on\_trade\_date | latest\_close |
| - | - | - | - | - | - |
| FB | META | 2022-03-01 | 10 | 203.49 | 560.84 |
| FISV | FISV | 2020-01-02 | 8 | 115.52 | 55.88 |
| KO | KO | 2024-01-02 | 50 | 59.82 | 96.99 |
| MMC | MRSH | 2025-06-02 | 5 | 234.76 | 206.22 |
| SQ | XYZ | 2024-06-03 | 20 | 64.3 | 69.66 |

Every trade now has both prices. The `FISV` trade passed through `FI` and
came back to `FISV`. The table is only as complete as your list of changes;
the snapshot section below builds that list for you from now on.

## Or join on the ISIN

If your records carry an ISIN or CUSIP, use it instead of the ticker. A
ticker change doesn't change the ISIN: the announcements from Meta, Block,
Fiserv and Marsh McLennan each say the CUSIP stays the same. Looking up
their ISINs returns today's tickers:

```sql theme={null}
select s.code, s.name, s.exchange, s.isin
from security_vw s
where s.exchange_code = 'US'
  and not s.is_inactive
  and s.isin in ('US30303M1027', 'US8522341036', 'US5717481023', 'US3377381088')
order by s.code;
```

| code | name | exchange | isin |
| - | - | - | - |
| FISV | Fiserv, Inc. | NASDAQ | US3377381088 |
| META | Meta Platforms Inc. | NASDAQ | US30303M1027 |
| MRSH | Marsh & McLennan Companies, Inc. | NYSE | US5717481023 |
| XYZ | Block, Inc | NYSE | US8522341036 |

Three limits:

* **ISINs can be missing.** In our listing about 14,800 securities have
  none: about 7,800 mutual funds and 6,300 common stocks.
* **One ISIN can have more than one ticker.** 38 ISINs map to more than one
  active US ticker in our data, often the same company on an exchange and
  over the counter, such as Guardforce AI's `GFAI` on Nasdaq and `GRDAF`.
  Filter on exchange when that happens.
* **ISINs do change.** A merger, a new holding company or a change of
  domicile can give a company a new CUSIP and ISIN. Those need a mapping row
  like the ticker changes above.

## Catch reused tickers

You can't map a reused ticker without knowing it was reused, so check for
it. A record dated before its ticker's first price in the data is a red
flag: either the ticker belonged to something else then, or the price
history is incomplete.

```sql theme={null}
select t.ticker, t.trade_date, f.first_price, s.name as current_holder
from my_trades t
join (select code, min(date) as first_price
      from security_price_history_vw
      where exchange_code = 'US'
      group by code) f
  on f.code = t.ticker
join security_vw s
  on s.code = t.ticker and s.exchange_code = 'US'
where t.trade_date < f.first_price;
```

| ticker | trade\_date | first\_price | current\_holder |
| - | - | - | - |
| FB | 2022-03-01 | 2025-06-26 | ProShares Trust ProShares S\&P 500 Dynamic Buffer ETF |

Run it on the raw tickers before mapping, and again on `current_code`
after. If you stored prices alongside the trades, also compare them with the
source's close on the same date; a reused ticker usually trades at a very
different price.

The check misses one case: a ticker reused while your record's date is
still inside the new holder's history. If you bought `FB` the ETF in 2026,
nothing is wrong; if a 2026 record says `FB` but means Meta, only the price
comparison or the ISIN catches it.

## Check your price source for an earlier holder's rows

The same problem can sit inside the price data. If a source stitches
history by ticker alone, a reused ticker can carry rows from the previous
holder before a long gap. Look for gaps of more than a year:

```sql theme={null}
with d as (
  select code, date, close,
         lag(date)  over (partition by code order by date) as prev_date,
         lag(close) over (partition by code order by date) as prev_close
  from security_price_history_vw
  where exchange_code = 'US'
)
select d.code, s.name, d.prev_date, d.prev_close, d.date as resumed_on, d.close
from d
join security_vw s
  on s.code = d.code and s.exchange_code = 'US'
where datediff(day, d.prev_date, d.date) > 365
  and s.code in ('ZAP', 'NBIS')
order by d.code;
```

| code | name | prev\_date | prev\_close | resumed\_on | close |
| - | - | - | - | - | - |
| NBIS | Nebius Group N.V. | 2022-02-25 | 18.94 | 2024-10-21 | 20.0 |
| ZAP | Global X U.S. Electrification ETF | 2018-12-11 | 160.0 | 2024-12-18 | 24.012 |

The two gaps mean different things:

* **`ZAP` is an earlier holder's history.** The Global X ETF listed on
  December 18, 2024, but the ticker has rows from 2005 to 2018 at prices up
  to \$274. Those rows aren't this ETF.
* **`NBIS` is one company.** Nebius was Yandex, whose shares were halted on
  February 28, 2022 and resumed on October 21, 2024 under the new name. The
  gap is real and the history before it belongs to the same company.

So a gap is a reason to look, not proof of reuse. Across our listing, 122
active exchange-listed stocks and ETFs have a gap of more than a year, with
95,003 rows before their most recent gap:

```sql theme={null}
with d as (
  select code, date,
         lag(date) over (partition by code order by date) as prev_date
  from security_price_history_vw
  where exchange_code = 'US'
),
restarts as (
  select code, max(date) as restarted_on
  from d
  where datediff(day, prev_date, date) > 365
  group by code
)
select count(*) as tickers,
       sum((select count(*)
            from security_price_history_vw p
            where p.exchange_code = 'US'
              and p.code = r.code
              and p.date < r.restarted_on)) as rows_before_gap
from restarts r
join security_vw s
  on s.code = r.code and s.exchange_code = 'US'
where s.type in ('Common Stock', 'ETF')
  and not s.is_inactive
  and s.exchange in ('NYSE', 'NASDAQ', 'NYSE ARCA', 'AMEX', 'BATS');
```

| tickers | rows\_before\_gap |
| - | - |
| 122 | 95003 |

For backtests where a wrong early row is worse than a missing one, a view
that starts each ticker after its last long gap is the safe default:

```sql theme={null}
create or replace view price_history_since_last_gap as
with d as (
  select p.*,
         lag(date) over (partition by code, exchange_code order by date) as prev_date
  from security_price_history_vw p
),
starts as (
  select code, exchange_code, max(date) as series_start
  from d
  where datediff(day, prev_date, date) > 365
  group by code, exchange_code
)
select d.code, d.exchange_code, d.date, d.open, d.high, d.low, d.close,
       d.adjusted_close, d.volume
from d
left join starts s
  on s.code = d.code and s.exchange_code = d.exchange_code
where d.date >= coalesce(s.series_start, '1900-01-01'::date);
```

```sql theme={null}
select code, min(date) as first_price, count(*) as rows_kept
from price_history_since_last_gap
where exchange_code = 'US' and code in ('ZAP', 'NBIS', 'META')
group by code
order by code;
```

| code | first\_price | rows\_kept |
| - | - | - |
| META | 2012-05-18 | 3649 |
| NBIS | 2024-10-21 | 524 |
| ZAP | 2024-12-18 | 483 |

`META` keeps all its history. `ZAP` drops the earlier holder's rows, and
`NBIS` drops Yandex's, which is the cost of the rule: when you know a gap is
the same company, as with Nebius, query the full history for that ticker
instead.

## Record ticker changes from daily snapshots

A current security list can't tell you what a ticker meant last year. A
copy of it taken every day can. Create a snapshot table and add today's list
once a day:

```sql theme={null}
create table if not exists security_snapshot (
  snapshot_date date, code varchar, exchange_code varchar,
  isin varchar, name varchar, type varchar
);
```

```sql theme={null}
insert into security_snapshot
select current_date, code, exchange_code, isin, name, type
from security_vw
where exchange_code = 'US' and not is_inactive
  and not exists (select 1 from security_snapshot where snapshot_date = current_date);
```

The `not exists` makes a second run on the same day add nothing, so it's
safe to schedule as a daily [Snowflake
task](https://docs.snowflake.com/en/user-guide/tasks-intro). Each snapshot
of the US list is about 49,400 rows.

A rename is an ISIN that moved to a new ticker since the previous snapshot,
where the new ticker wasn't there before and the old ticker no longer has
that ISIN:

```sql theme={null}
with s as (
  select *, dense_rank() over (order by snapshot_date) as day_n
  from security_snapshot
)
select n.isin, n.name, o.code as old_code, n.code as new_code, n.snapshot_date as first_seen
from s n
join s o
  on o.isin = n.isin and o.day_n = n.day_n - 1 and o.code <> n.code
left join s was_there
  on was_there.day_n = n.day_n - 1 and was_there.code = n.code
left join s still_there
  on still_there.day_n = n.day_n and still_there.code = o.code and still_there.isin = o.isin
where was_there.code is null
  and still_there.code is null
order by first_seen desc;
```

A reuse is a ticker whose ISIN changed between snapshots:

```sql theme={null}
with s as (
  select *, dense_rank() over (order by snapshot_date) as day_n
  from security_snapshot
)
select n.code, o.name as old_name, n.name as new_name,
       o.isin as old_isin, n.isin as new_isin, n.snapshot_date as first_seen
from s n
join s o
  on o.code = n.code and o.day_n = n.day_n - 1
where o.isin <> n.isin
order by first_seen desc;
```

Both return nothing until you have two snapshots. We tested them with a
made-up previous day in which Meta still traded as `FB`: the first query
returned `FB` to `META`, and the second returned `FB` changing from Meta's
ISIN to the ProShares ETF's.

Two details matter:

* **Compare consecutive snapshots only.** Comparing all rows that share an
  ISIN on the same day reports every ISIN with two tickers as a rename. Our
  first version of the rename query did that and returned 43 false renames
  from a single snapshot.
* **Skipped days are fine.** `dense_rank` numbers the snapshots you have, so
  a missed day compares with the last one taken. A change that happens and
  reverses between two snapshots is missed.

Feed each detected rename into `ticker_changes` and the mapping above stays
current.

## Mistakes that give wrong numbers

* **Joining old records on the ticker alone.** Renamed tickers come back
  empty; reused ones come back with another security's prices.
* **Mapping without dates.** `FB` means Meta in a 2021 record and an ETF in
  a 2026 one. A mapping without an effective date gets one of them wrong.
* **Following only one step.** Fiserv went `FISV`, `FI`, `FISV`. A single
  join leaves a 2020 trade on the wrong ticker for two of those years.
* **Treating the ISIN as permanent.** It survives ticker changes, not
  every corporate action.
* **Dropping every gap.** Trimming history at a long gap removes earlier
  holders' rows but also real history after a halt, like Nebius's.

## Limits of this approach

* **The change table is yours to keep.** Our listing has no history of
  ticker changes, only the current list, so changes before you start
  taking snapshots have to come from company announcements or another
  source.
* **Delisted securities have no prices.** A security that drops off the US
  list keeps its row in `security_vw` but loses its price history, so old
  records for acquired companies won't find prices under any ticker. See
  the [dataset docs](https://fruitstand.dev/datasets/historical-stock-prices.md#disclosures).
* **Gaps aren't the only sign of reuse.** A ticker can pass straight to a
  new holder with no long gap. The first-price check and ISINs catch more
  of those than gap detection does.

## F.A.Q.

> [accordion] Why do old tickers return no data?
>
> The company changed its ticker and the price source files its whole history under the new one. `SQ` returns nothing in our listing because Block's history, back to Square's 2015 IPO, is under `XYZ`. Map the old ticker to the new one with a dated change table.

> [accordion] What is a reused ticker?
>
> A symbol that one security gave up and another later received. `FB` was Meta's until June 9, 2022, and since June 2025 it has been a ProShares S\&P 500 buffer ETF. A join on `FB` for a 2022 record returns no price; a join for the latest price returns the ETF's.

> [accordion] Is the ISIN a permanent stock identifier?
>
> It survives ticker changes, because the CUSIP inside it stays the same, so it's a better join key than the ticker. It isn't permanent: mergers, new holding companies and changes of domicile can issue a new one, and many OTC stocks and funds have none.

> [accordion] How do I find when a ticker changed?
>
> Company press releases and exchange notices give the effective date. To catch changes going forward, snapshot the security list daily and look for an ISIN that moved to a new ticker between snapshots.

> [accordion] How do I keep reused tickers out of a backtest?
>
> Check that each record's date is on or after the ticker's first price, and look for gaps of more than a year in each ticker's history. Rows before a long gap can belong to an earlier holder of the symbol.

To run these queries on every US stock and ETF, start a free 30-day trial
of the [Historical Stock Prices listing on the Snowflake
Marketplace](https://app.snowflake.com/marketplace/listing/GZTYZTG3LNFA).
It has daily prices, adjusted prices and ISINs for about 49,000 US
securities. The schema is in the [dataset
docs](https://fruitstand.dev/datasets/historical-stock-prices.md). For how this compares with a
permanent-ID database like CRSP, see [CRSP Alternatives in
Snowflake](https://fruitstand.dev/blog/crsp-alternatives-snowflake.md), and for the full ticker list,
[How to Get a List of Every US Stock and ETF Ticker in
SQL](https://fruitstand.dev/blog/list-every-us-stock-etf-ticker-sql.md). Questions? Reach out at
[contact@fruitstand.dev](mailto:contact@fruitstand.dev).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.