Do stock reduce AGI?

I bought stock this year since I dispensable AGI (adjusted gross income). Does this lower my AGI and thus lower my taxes? I know I am taxed on capital gains. But how to stock affect my AGI?