# Budget-feasible set in a portfolio choice problem

I am going through Duffie's Dynamic Asset Pricing book, and already ran into something that confused me on the third page. First, some definitions.

Let $$\{1, \cdots, S\}$$ be a finite set of states, $$D$$ an $$N \times S$$ matrix of security payoffs, where $$D_{ij}$$ is the payoff of security $$i$$ in state $$j$$. The $$N$$ securities have prices $$q \in \mathbb{R}^N$$. A portfolio is a vector $$\theta \in \mathbb{R}^N$$ with market value $$q' \theta \in \mathbb{R}$$ and payoff $$D'\theta \in \mathbb{R}^S$$. Here $$'$$ denotes the transpose.

An agent with utility function $$U : \mathbb{R}^S_+ \to \mathbb{R}$$ and endowment $$e \in \mathbb{R}^S_+$$ wants to solve

$$\sup_{c \in X} U(c),$$ where the budget-feasible set $$X$$ is defined as

$$X = \{e + D'\theta \in \mathbb{R}^S_+ : q' \theta \leq 0 \}.$$

Duffie calls $$q' \theta \leq 0$$ a wealth constraint, but I am struggling to see how one could interpret it as such. Why must the market value of the agent's portfolio be non-positive? The optimization problem can also be stated as

$$\sup_\theta U(e + D'\theta) \hspace{0.5cm} \text{s.t.} \hspace{0.5cm} q' \theta \leq 0,$$ making it more clearly a portfolio choice problem. Still, it does not add much intuition for me.

I am sure I am missing something obvious. Any help in pointing it out would be great!

The agent owns nothing initially but the endowment. If their endowment would be $$0$$ in every state, then it should be clear that their initial wealth is zero, and they could only afford a portfolio whose total price is zero too.
Assume, for example, that the endowment has exactly the same payoff in every state as the first asset. Then the agent could (short) sell one unit of the first asset, which amounts to selling the endowment, receive $$q_1$$ units of money, and now could afford any portfolio $$\theta^*$$ such that $$q\cdot\theta^*\leq q_1$$. The resulting state-contingent consumption is $$D^\top\theta^*.$$ But equivalently, the agent could not sell their endowment and instead choose the portfolio $$\theta=\theta^*-\eta_1$$ with $$\eta_1$$ the first unit vector. Then $$q\cdot\theta=q\cdot(\theta^*-\eta_1)=q\cdot\theta^*-q\cdot\eta_1=q\cdot \theta^*-q_1\leq q_1-q_1=0$$ and the state contingent payoff vector would be $$e+D^\top\theta=D^\top\eta_1 +D^\top\theta=D^\top(\eta_1+\theta)=D^\top\theta^*$$.