@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
Properties
| Property | Modifier | Type | Default value | Description | Overrides | Defined in |
|---|---|---|---|---|---|---|
name | readonly | "NYSE" | 'NYSE' | Short exchange name used as the registry key in getCalendar. | ExchangeCalendar.name | calendars/nyse.ts:974 |
tz | readonly | "America/New_York" | 'America/New_York' | IANA timezone identifier, e.g. 'America/New_York' or 'Europe/London'. | ExchangeCalendar.tz | calendars/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
| Parameter | Type | Description |
|---|---|---|
t | Date | The instant or day to test. |
Returns
boolean
Inherited from
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
| Parameter | Type |
|---|---|
t | Date |
Returns
boolean
Inherited from
next()
next(
t):Date
Defined in: calendars/exchange-calendar.ts:225
Returns the first trading day strictly after t.
Parameters
| Parameter | Type |
|---|---|
t | Date |
Returns
Date
Inherited from
previous()
previous(
t):Date
Defined in: calendars/exchange-calendar.ts:232
Returns the first trading day strictly before t.
Parameters
| Parameter | Type |
|---|---|
t | Date |
Returns
Date
Inherited from
schedule()
schedule(
range): readonlySession[]
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
| Parameter | Type | Description |
|---|---|---|
range | DateRange | Half-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
sessions()
sessions(
range): readonlyDate[]
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
| Parameter | Type |
|---|---|
range | DateRange |
Returns
readonly Date[]