when to invest for maximum profit