This paper formulates and studies a general continuous-time behavioral portfolio selection model under Kahneman and Tversky's (cumulative) prospect theory, featuring S-shaped utility (value) functions and probability distortions. Unlike the conventional expected utility maximization model, such a behavioral model could be easily misformulated (a.k.a. ill-posed) if its di erent components do not coordinate well with each other. Certain classes of an ill-posed model are identi ed. A systematic approach, which is fundamentally di erent from the ones employed for the utility model, is developed to solve a well-posed model, assuming a complete market and general It^o processes for asset prices. The optimal terminal wealth positions, derived in fairly explicit forms, possess surprisingly simple structure reminiscent of a gambling policy betting on a good state of the world while accepting a xed, known loss in case of a bad one. An example with a two-piece CRRA utility is presented to i...