So far, 2018 has had an up quarter and then a down quarter for the number of RIA mergers and acquisitions that have transpired, according to TD Ameritrade.

How the rest of the year plays out will depend on whether firms stay motivated to achieve the benefits of scale, said TD Ameritrade Institutional in its FA Insight Mergers and Acquisitions Activity Update released Monday.

“The collective results through the first half of 2018 suggest the year is shaping up to be another active one for advisory firm mergers and acquisitions,” the report said. “A deeper look at quarterly trends portrays a possible slowdown, however. It will depend on whether the potential negative impacts of shorter-term cyclical factors outweigh longer-term motivations for firms to contract,” including growth goals, succession planning and economics of scale that create profitability.

TD Ameritrade predicted at the end of 2017 that RIA mergers and acquisition would skyrocket in the first part of this year, which it did. In January alone, 17 deals were announced, which led to a record-breaking quarter of 30 transactions. But then the second quarter saw a dramatic slow down with only nine deals.

TD Ameritrade counts deals involving RIAs or independent trust companies managing at least $50 million in AUM or generating at least $500,000 in annual revenue.

In 2017, the first and second quarters were much more equal with 19 deals in the first quarter and 17 in the second.

“The roller coaster ride, thus far, is not a complete surprise. Our previous update speculated that the end-of-year slowdown in 2017 would be temporary,” TD Ameritrade said. “Uncertainty in late 2017 regarding tax reform may have stalled some deals. By the second quarter, not only was the backlog of deferred deals likely cleared, but new market forces surfaced that could be temporarily slowing activity again,” including a cooling stock market and signs of rising interest rates.

Deals for the most part were smaller in the first half of 2018 with the median target firm assets under management of $391 million compared with $424 million across all of 2017, an 8 percent decline.