Feb 24 (Reuters) - Royal Bank of Canada executives cautioned on Wednesday that the company's 2021 credit performance hinges on the outlook for government support after its quarterly profit beat estimates on much lower than expected provisions for loan losses.

RBC, Canada's top lender, also flagged a moderation in trading activity this year.

National Bank of Canada, which also beat profit expectations, said trading revenues could decline if volumes come off following recent surges, some of which Chief Executive Louis Vachon attributed to "pockets of irrational exuberance" and distortions caused by quantitative easing.

Both banks posted record earnings in their capital markets businesses in the first quarter.

RBC and National Bank, the smallest of Canada's six major lenders, followed rivals Bank of Montreal and Bank of Nova Scotia in posting better-than-expected profits that have also now surpassed pre-pandemic levels.

Canadian banks have largely avoided an increase in soured loans thanks to several government assistance measures, expected to end this summer.

While BMO and RBC released some reserves on performing loans during the quarter, signaling an improving outlook for loan losses, RBC said delinquencies will still increase for the remainder of 2021, accompanied by a rise in impaired loan provisions.

RBC Chief Risk Officer Graeme Hepworth told analysts the degree to which the government support is extended or transformed "will drive ... the expectations and implications for our credit performance in the latter half of the year."

National Bank executives said that while loan losses could be lower than initially thought, the bank is maintaining its provisions on performing loans.

Despite the somewhat murky credit picture, RBC executives said they were heartened by expected improvement in the second half on expectations of growth in higher-margin loans like commercial and credit cards as businesses reopen and the economy recovers.

RBC shares rose 0.3% to C$112.53 in afternoon trading in Toronto, while National Bank stock was up 4.6% at C$79.30, both heading for their highest close on record. The Toronto stock benchmark was up 0.9%.

Canadian lending rose 6% in the three months through January at RBC but this was driven entirely by increases in residential mortgages.

RBC expects continued mortgage growth will help drive a consumer-led recovery in its Canadian banking unit, based on a forecast of high-single-digit growth in Canadian housing prices this year, following a record year in 2020 for resale activity.

RBC reported adjusted cash earnings of C$2.69 per share versus analysts' expectations of C$2.26. National Bank's adjusted income rose to C$2.15 per share, compared with estimates of C$1.71. (Reporting by Nichola Saminather in Toronto and Noor Zainab Hussain in Bengaluru; Additional reporting by Sohini Podder in Bengaluru Editing by Amy Caren Daniel, Matthew Lewis and Marguerita Choy)