Dividend Optimizer — Forward Yield and Entropy

Two complementary optimizers for dividend portfolios: a forward-yield share allocator and an entropy-regularized continuous-weight variant

Overview

This page documents two dividend-focused optimizers available in the backend:

  • Forward-Yield Allocator (share-based): builds a discrete-share portfolio to maximize expected cash yield subject to risk and allocation caps. It uses raw Close prices (no auto-adjust) and TTM dividends to estimate forward yield per security.

  • Entropy-regularized Optimizer (continuous weights): maximizes a weighted combination of portfolio dividend yield and portfolio entropy to promote diversification, with an optional volatility cap.

    H(w)=iwilogwiH(\mathbf{w}) = -\sum_i w_i \log w_i

Parameters

Forward yields are computed from TTM (trailing-twelve-month) dividends over a rolling window and the most recent raw Close prices.

stocks: list of selections, each with ticker and exchange (NSE/BSE) to identify the security.
budget: optional INR amount; when provided, outputs integer share allocation and cash deployment stats.
entropy_weight (λ): strength of diversification via entropy in the objective (default 0.05).
price_lookback_days: days of price history used to estimate covariance for risk constraints.
yield_lookback_days: window length (days) for aggregating TTM dividends used in forward-yield estimation.
min_weight_floor (ε): lower bound on each weight to ensure feasibility and avoid zero allocations.
vol_cap: optional annualized volatility limit applied through wTΣw\mathbf{w}^T \Sigma \mathbf{w}.
use_median_ttm: if true, smooths TTM by taking the 90-day median of the rolling TTM series for stability.

Mathematical Explanation: Forward-Yield and Share Allocation

For each ticker ii, compute trailing-twelve-month dividends over a rolling window and last close price PiP_i to estimate forward yield:

yi=TTMiPiy_i = \dfrac{\mathrm{TTM}_i}{P_i}

Portfolio yield with weights w\mathbf{w} is:

yp=iwiyiy_p = \sum_i w_i y_i

Here yiy_i denotes the individual forward yield of asset ii, and ypy_p denotes the portfolio forward yield.

With a risk cap (optional):

wTΣwσmax2,iwi=1,wiϵ\mathbf{w}^T \Sigma \mathbf{w} \le \sigma^2_{max}, \quad \sum_i w_i = 1, \quad w_i \ge \epsilon

Entropy-Regularized Variant

Objective (maximize expected dividend yield plus diversification):

maxw0  yTw+λH(w)\max_{\mathbf{w} \ge 0} \; \mathbf{y}^T \mathbf{w} + \lambda H(\mathbf{w})

Subject to:

iwi=1\sum_i w_i = 1 (weights sum to one)
wiϵw_i \ge \epsilon (long-only with a minimum floor)
wTΣwσmax2\mathbf{w}^T \Sigma \mathbf{w} \le \sigma^2_{max} (optional annualized volatility cap)

Here H(w)=iwilogwiH(\mathbf{w}) = -\sum_i w_i \log w_i and Σ\Sigma is the covariance of daily returns scaled by 252.

Related Topics

Entropy (Portfolio Diversity)

A measure of diversification used in the optimizer objective.

CVaR & CDaR

Tail and drawdown risk measures that can complement income portfolios.