In \cite{ScholzeDeformation} Scholze describes a formula, similar to those classically known as Langlands-Kottwitz type formulas, describing the trace of the cohomology of certain PEL type Shimura varieties at sub-hyperspecial level as sums of volume factors, orbital integrals, and twisted orbital integrals. The contribution to this formula arising from the prescence of non-hyperspecial level is encapsulated in the twisted orbital integral, the integrand of which can be described entirely in terms of cohomology of certain locally defined deformation spaces of $p$-divisible groups. In this thesis we extend these results, with some mild restrictions, to the case of abelian type Shimura varieties.