Abstract: We consider a general stochastic model of frictionless continuous trading. The price process is a semimartingale and the model is incomplete. Our objective is to hedge contingent claims by using trading strategies with a small riskiness. To this end, we introduce a notion of local R-minimality and show its equivalence to a new kind of stochastic optimality equation. This equation is solved by a Girsanov transformation to a minimal equivalent martingale measure. We prove existence and uniqueness of the solution, and we provide several examples. Our approach contains previous treatments of option trading as special cases.