Valuation of financial derivatives under regime switching models