Skip to content

@livefolio/sdk / LSEExchangeCalendar

Class: LSEExchangeCalendar

Defined in: calendars/lse.ts:238

London Stock Exchange (LSE) trading-day calendar. Faithful port of pandas_market_calendars' lse.py and holidays/uk.py. Historical coverage begins 1801-01-01, aligned with the start of the modern exchange after the Banking and Financial Dealings Act 1971 codified the current bank-holiday framework.

Session: 08:00–16:30 Europe/London. The exchange observes BST (UTC+1) in summer and GMT (UTC+0) in winter — DST handling is delegated to luxon via the Europe/London IANA timezone, so wall-clock session times are stable across the DST transition while their UTC equivalents shift by one hour.

Early closes: Christmas Eve (Dec 24) and New Year's Eve (Dec 31) close at 12:30. Both use previous_friday observance — when the calendar date falls on a weekend, the early close moves to the prior Friday.

Era boundaries: bank-holiday exceptions for Royal Jubilees and VE-Day anniversaries are implemented by splitting affected Spring Bank Holiday and Early May Bank Holiday rules into era-bounded shards (matching upstream start_date / end_date markers) and adding the displaced dates as adhoc closures.

Extends

Constructors

Constructor

new LSEExchangeCalendar(): LSEExchangeCalendar

Returns

LSEExchangeCalendar

Inherited from

ExchangeCalendar.constructor

Properties

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

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.