We define a trace map for every cohomological correspondence in the motivic stable homotopy category over a general base scheme, which takes values in the twisted bivariant groups. Local contributions to the trace map give rise to quadratic refinements of the classical local terms, and some A 1 \mathbb {A}^1 -enumerative invariants, such as the local A 1 \mathbb {A}^1 -Brouwer degree and the Euler class with support, can be interpreted as local terms. We prove an analogue of a theorem of Varshavsky, which states that for a contracting correspondence, the local terms agree with the naive local terms.