The S&P 500 is bound for 2,700 by the end of the year, according to Brad McMillan, chief investment officer at Commonwealth Financial Network.

That would imply a 7.7% upside from its current level of 2,507. 

But that target is only in play if we continue to see strong earnings growth in the coming quarter, McMillan said, something that's not guaranteed. S&P 500 companies clocked double-digit year-over-year earnings increases for the past two quarters.

McMillan also said it's possible for small cap stocks to stage a bigger rally than the S&P 500 for the remainder of the year. 

The S&P 500 is up roughly 12% since the beginning of 2017.

More From TheStreet:

More from Video

Former U.S. Education Secretary: Voters Are to Blame for Struggling Schools

Former U.S. Education Secretary: Voters Are to Blame for Struggling Schools

Meet Blackbird, the New 'Uber of the Skies'

Meet Blackbird, the New 'Uber of the Skies'

Here's How to Trade Walmart, Nordstrom, Macy's and J.C. Penney After Earnings

Here's How to Trade Walmart, Nordstrom, Macy's and J.C. Penney After Earnings

Here's Why Stock Picking Is Especially Important in the Retail Sector

Here's Why Stock Picking Is Especially Important in the Retail Sector

Tip For Financial Advisors: Think Outside the Box

Tip For Financial Advisors: Think Outside the Box