Despite a last-minute minor sell-off late Friday, the S&P 500 and Dow Jones Industrial Average managed to post first-half 2017 gains of 8.2% and 8%, respectively, which is a phenomenal six months for investors. Further, there was some positive economic data out of Chicago. The Chicago Business Barometer, a regional index of business conditions in the Chicago area, rose from May's 59.4 reading up to 65.7 during June. While those numbers may seem arbitrary, June marked the highest level in over three years, which emphasizes that the U.S. economy is humming along nicely.

There were many more intriguing things in the markets this week than Chicago data -- here are some highlights. 

Seriously bad timing

There is an incredible amount of work that goes into becoming a public company. Just valuing and correctly pricing your company's stock to persuade investors that the business story is one worth buying into required an immense amount of time, effort, and preparation.

Blue Apron (APRN) had been preparing and filed its original S-1 documentation with the SEC at the beginning of the month, right before Amazon.com's (AMZN -0.16%) bombshell acquisition of Whole Foods Market (WFM). The well-known meal-kit delivery service then amended its S-1 with the SEC to adjust its stock offering price range from between $15 and $17 to between $10 and $11 -- and nothing shows confidence like a stock shedding 35% of its value before it even goes public.

An assortment of fresh meats and vegetables spread out on a table.

Image source: Getty Images.

While the meal-delivery concept is popular, there are relatively no barriers to entry, and there is already a long list of competitors in the space taking similar approaches. Further, with Amazon's purchase of Whole Foods, it's eyeballing the same target consumer.

"It's a very high-end, desirable customer base, but it is very limited," Kurt Jetta, chief executive officer of retail and consumer-analytics provider Tabs Analytics, told Bloomberg in an interview. "They are both just clawing for that share of the wallet, and now you'll have a stronger presence from Amazon-Whole Foods."

Despite competition, the company posted a 133% revenue increase in 2016, up to $795.4 million. However, the top line during the first quarter slowed to 42% growth. Sure, that's still a strong pace, but the significant deceleration leaves investors skeptical about how much room there is to grow in this market. Blue Apron, like many companies going public, isn't yet profitable, and the industry will probably need some consolidation to entice investors to buy into the story -- but Amazon's entry into the grocery business comes at the worst time for Blue Apron.

Who saw this coming?

The auto industry is accelerating toward a future of driverless car technology. It's one of the most exciting times in the industry in decades, as automakers and tech companies combine to completely change the way we think about vehicles and travel. But this week brought us a partnership that nobody saw coming: Alphabet's (GOOGL -0.30%) (GOOG -0.21%) Waymo division and Avis Budget Group (CAR -3.07%).

Avis started the week announcing its agreement with Waymo, Alphabet's driverless-car program, to offer fleet support and maintenance services for Waymo's self-driving program through its network of Avis Car Rental and Budget Car Rental locations in the Phoenix area. Although the two companies are almost polar opposites, the agreement does make sense for both parties. Consider that Waymo gains physical access to a wide-reaching network of roughly 11,000 store locations capable of maintenance in 25 countries, which could come in handy if Waymo expands the reach of its driverless testing.

On the flip side, Avis' rental business has been struggling. That's no secret, and management's task has been focused on creating new revenue streams. That's one reason Avis now owns Zipcar and is focused on creating mobility businesses, and this development with Waymo and its parent Alphabet gives it a serious name brand and credibility in the rapidly evolving driverless-car arena.

Avis is serious about its enhanced mobility projects, and it has to be to keep investors around, predicting that it has a $50 million to $100 million opportunity over the next five years in the space. It also anticipates its margin growth to come from such programs, aiming to grow its margins from roughly 10% to between 13% to 15% over the same five-year timespan.

Of course, these mobility ambitions are much easier said than done, and investors have been quick to sell Avis shares. The stock is down more than 50% over the past three years. Avis has a long battle ahead of it. On the other hand, this is a very smart development for the company, and it gives investors a fighting chance as the auto industry accelerates toward a wildly different future.