ezyquant.utils.is_rebalance_weekly#
- ezyquant.utils.is_rebalance_weekly(trade_date_index: DatetimeIndex, rebalance_at: int) Series #
Return a series of bool, True if the date is a rebalance date. Always rebalance on first day of index.
- Parameters:
trade_date_index (pd.DatetimeIndex) – Trade date index.
rebalance_at (int) – Day of week to rebalance (e.g. 1 is Monday or 5 is Friday).
- Returns:
Series of bool. True if the date is a rebalance date.
- Return type:
pd.Series