Stocks ticked higher Monday as investors looked past this weekend’s failed coup attempt in Turkey and nudged the Standard & Poor’s 500 index to another record.

The S&P 500 rose 5.15 points, or 0.2 percent, to 2,166.89. It was the fifth time in the last six days that the index set a closing high. The Dow Jones industrial average rose 16.50, or 0.1 percent, to 18,533.05. The Nasdaq composite rose 26.19, or 0.5 percent, to 5,055.78.

advertisement | advertise on newsday

The stock market has been on a mostly upward swing since February, notwithstanding a few setbacks, after shrugging off worries about fragile economies overseas, weaker profits at home and, most recently, Friday’s military uprising in Turkey.

Technology stocks led the way Monday, rising 0.7 percent after SoftBank Group agreed to buy British chip designer ARM Holdings for $32 billion.

Financial stocks gained after Bank of America reported earnings that were better than analysts were expecting. Banks have been struggling with low interest rates, which limit the profits they can earn from making loans.

Bank of America nevertheless reported a smaller decline in earnings than analysts forecast, due in part to higher trading revenue and cost cuts. Its stock rose 45 cents, or 3.3 percent, to $14.11.