@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
| Parameter | Type | Description |
|---|---|---|
t | Date | Current trading day (must itself be a trading day). |
freq | RebalanceFrequency | Rebalance cadence (see RebalanceFrequency). |
calendar | Calendar | Exchange 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.