A general closed form option pricing formula