Skip to content

@livefolio/sdk / NYSEExchangeCalendar

Class: NYSEExchangeCalendar

Defined in: calendars/nyse.ts:973

New York Stock Exchange (NYSE) trading-day calendar covering 1885-01-01 to the present. Also applicable to NYSE-equivalent venues (NASDAQ, BATS, DJIA, DOW). Faithful port of pandas_market_calendars' nyse.py.

Era boundaries:

  • Weekmask: Mon–Sat through 1952-09-28; Mon–Fri from 1952-09-29 onward (Saturday trading retired on that date).
  • Regular open: 10:00 ET before 1985-09-30; 09:30 ET from 1985-09-30 onward.
  • Regular close: 15:00 ET before 1952-09-29; 15:30 ET through 1973-12-31; 16:00 ET from 1974-01-02 onward. Saturday closes (pre-1952) are approximated as 12:00.

Holiday coverage includes the full set of regular (rule-derived) and adhoc (literal date set) closures sourced from pandas_market_calendars, spanning historical events from the Ulysses Grant funeral (1885) through the Jimmy Carter national day of mourning (2025).

Extends

Constructors

Constructor

new NYSEExchangeCalendar(): NYSEExchangeCalendar

Returns

NYSEExchangeCalendar

Inherited from

ExchangeCalendar.constructor

Properties

PropertyModifierTypeDefault valueDescriptionOverridesDefined in
namereadonly"NYSE"'NYSE'Short exchange name used as the registry key in getCalendar.ExchangeCalendar.namecalendars/nyse.ts:974
tzreadonly"America/New_York"'America/New_York'IANA timezone identifier, e.g. 'America/New_York' or 'Europe/London'.ExchangeCalendar.tzcalendars/nyse.ts:975

Methods

isEarlyClose()

isEarlyClose(t): boolean

Defined in: calendars/exchange-calendar.ts:262

Returns true if the exchange closes early on the day containing t. Common examples: Black Friday (US), Christmas Eve, New Year's Eve.

Parameters

ParameterTypeDescription
tDateThe instant or day to test.

Returns

boolean

Inherited from

ExchangeCalendar.isEarlyClose


isOpen()

isOpen(t): boolean

Defined in: calendars/exchange-calendar.ts:215

Returns true when t falls on a regular trading day (weekmask check, then holiday check).

Parameters

ParameterType
tDate

Returns

boolean

Inherited from

ExchangeCalendar.isOpen


next()

next(t): Date

Defined in: calendars/exchange-calendar.ts:225

Returns the first trading day strictly after t.

Parameters

ParameterType
tDate

Returns

Date

Inherited from

ExchangeCalendar.next


previous()

previous(t): Date

Defined in: calendars/exchange-calendar.ts:232

Returns the first trading day strictly before t.

Parameters

ParameterType
tDate

Returns

Date

Inherited from

ExchangeCalendar.previous


schedule()

schedule(range): readonly Session[]

Defined in: calendars/exchange-calendar.ts:253

Returns full Session records (date, open instant, close instant) for every trading day in the half-open interval [range.from, range.to).

Parameters

ParameterTypeDescription
rangeDateRangeHalf-open date range.

Returns

readonly Session[]

Ascending array of Session objects. Early-close days have a close earlier than the normal session close.

Inherited from

ExchangeCalendar.schedule


sessions()

sessions(range): readonly Date[]

Defined in: calendars/exchange-calendar.ts:242

Returns UTC midnight Date objects for every trading day in [range.from, range.to). The from bound is inclusive; to is exclusive.

Parameters

ParameterType
rangeDateRange

Returns

readonly Date[]

Inherited from

ExchangeCalendar.sessions

Released under the MIT License.