Terry53029
Level 15
Level 15

Suggest you start with Pub 551. https://www.irs.gov/publications/p551