Portfolio optimization and long-term dependence