Skip to content

@livefolio/sdk / isRebalanceDay

Function: isRebalanceDay()

isRebalanceDay(t, freq, calendar): boolean

Defined in: tactical/from-spec.ts:112

Returns true when t is the last trading day of its rebalance period according to freq and calendar. The check is: periodKey(t) !== periodKey(next(t)). For 'Daily' cadence this always returns true.

Parameters

ParameterTypeDescription
tDateCurrent trading day (must itself be a trading day).
freqRebalanceFrequencyRebalance cadence (see RebalanceFrequency).
calendarCalendarExchange calendar used to find the next trading day.

Returns

boolean

true if today is the last day of its period and orders should be issued.

Released under the MIT License.