Short answer

Match the original trade to the feed's correction or cancel record using the fields its specification requires. A price far from surrounding trades merits review, but the price difference alone does not prove the trade was invalid.

Keep the original record and its status

Record the security, trade time, venue and any reference identifier. Then follow the feed's correction rules before rebuilding an open, high, low or close. A charting vendor may update a bar later than the market data feed. If you are checking your own fill, compare the broker's execution confirmation and subsequent notices as well.

Worked example or comparison
Basis Evidence or calculation
Worked example or comparison Hypothetical. Trades at $40.00, $62.00 and $40.10 appear in a bar. If the $62.00 trade is canceled and the others qualify, the revised high is $40.10.

Frequently asked question

Should I remove every isolated price outlier?

No. Keep a flagged value until a correction, cancellation or documented data-quality rule establishes how it should be treated.

Source

Primary reference · beta.nyse.com

Related guide

What belongs in a market-data provenance and permission ledger?