Stocks rose to record highs on Friday after some of the major financial companies in the U.S. reported strong quarterly results.

The Dow Jones industrial average rose 228.46 points to close at 25,803.19, an all-time high. J.P. Morgan Chase was among the best-performing stocks in the index, rising 1.7 percent.

The also reached a record high, climbing 0.7 percent to 2,786.24 with energy and consumer discretionary as the best-performing sectors. Energy stocks got a boost from rising oil prices.

The index is also enjoying its best 10-day start to a year since 2003. In that time period, the S&P 500 is up 4.2 percent. It gained 5.9 percent during the first 10 days of 2003.

"There is optimism in the market," but there is also uncertainty about this rally, said Cooper Abbott, chairman of Carillon Tower Advisers. That level of uncertainty can be good for the market because it "dampens expectations."

The Nasdaq composite finished 0.7 percent higher at 7,261.06. Amazon shares rose 2.2 percent and broke above $1,300 for the first time.

J.P. Morgan Chase, BlackRock and Wells Fargo all reported better-than-expected quarterly results.