  The theory of $\Theta$-stratifications generalizes a classical stratification
of the moduli of vector bundles on a smooth curve, the Harder-Narasimhan-Shatz
stratification, to any moduli problem that can be represented by an algebraic
stack. Using derived algebraic geometry, we develop a structure theory, which
is a refinement of the theory of local cohomology, for the derived category of
quasi-coherent complexes on an algebraic stack equipped with a
$\Theta$-stratification. We then apply this to the $D$-equivalence conjecture,
which predicts that birationally equivalent Calabi-Yau manifolds have
equivalent derived categories of coherent sheaves. We prove that any two
projective Calabi-Yau manifolds that are birationally equivalent to a smooth
moduli space of Gieseker semistable coherent sheaves on a $K3$ surface have
equivalent derived categories. This establishes the first known case of the
$D$-equivalence conjecture for a birational equivalence class in dimension
greater than three.
