Historically , stock market investments have done better than simple savings accounts but , as anyone heavily into shares in 2008 can attest , invest at the wrong time and your nest egg can shrink -- or almost vanish .