An algebraic spin and statistics theorem