You can’t predict exactly how stocks will behave, but knowing what affects prices will put you ahead of the pack.