Apple shares to close year with worst performance since 2008