In a discrete-time setting, we study arbitrage concepts in the presence of convex trading constraints. We show that solvability of portfolio optimization problems is equivalent to absence of arbitrage of the first kind, a condition weaker than classical absence of arbitrage opportunities. We center our analysis on this characterization of market viability and derive versions of the fundamental theorems of asset pricing based on portfolio optimization arguments. By considering specifically a disc...