Short answer

Use the exchange's trading calendar to identify scheduled closures. Keep a closed date separate from a trading session whose price is missing.

Distinguish a calendar row from a new observation

For a trading-session analysis, move from one actual eligible close to the next. For a daily holdings ledger, you may carry forward the previous observation for valuation and label the carried value. Counting it as a new zero-return trading session can change volatility and sample-size calculations. If the market should have been open, investigate outages, halts or the security's listing status before filling the gap.

Worked example or comparison
Basis Evidence or calculation
Worked example or comparison Illustrative: Friday close $50, Monday holiday, Tuesday close $51. The observed trading-session return is 2% from Friday to Tuesday. Monday supplies no new trade.

Frequently asked question

Should an early-close session be removed?

It is still a trading session. Keep the recorded close and distinguish shortened hours from a full-day closure.

Source

Primary reference · nyse.com

Related guide

How do you compare historical stock prices across a split?