# writing budget constraint with capital gain tax

I have the following budget constraint

Consumption in period 2 = Wealth in period 2 = Wealth in period 1 + Capital gain from risky assets + The endowment

where

Gain of risky assets = # of holding asset in period 1 * (Sell in period 2 – Buy in period 1)

That's, $$= \theta_1 ( S_2 - S_1)$$

and therefore, the budget constraint is

$$C_2 = W_1 +\theta_1 ( S_2 - S_1)+z(D-\bar{D} )$$

Now, I would like to entegre capital gain tax rate $$\tau \in [0, 1]$$ and lump-sum transfer payments $$T_0$$.

I re-write the budget constraint as follow:

$$C_2 = W_1 + (1-\tau)\theta_1 ( S_2 - S_1)+z(D-\bar{D} ) + T_0$$

Is this budget constraint correct or not?