taxes

if i bought a car in PA for cash then traded it in at a loss can i write off the loss