design patterns and derivatives pricing