Stochastic Calculus of Variations to Hedge Contingent Claims