In this paper, we consider the problem of hedging contingent claims on a stock under transaction costs and stochastic volatility. Extensive research has clearly demonstrated that the volatility of most stocks is not constant over time. As small changes of the volatility can have a major impact on the value of contingent claims, hedging strategies should try to eliminate this volatility risk. We propose a stochastic optimization model for hedging contingent claims that takes into account the effects of stochastic volatility, transaction costs and trading restrictions. Simulation results show that our approach could improve performance considerably compared to traditional hedging strategies.