v3.22.2.2
Derecognition of financial assets - Summary of Carrying Amount and Fair Value of Transferred Assets Did Not Qualify for Derecognition (Detail) - CAD ($)
$ in Millions
Oct. 31, 2022
Oct. 31, 2021
Disclosure of Transferred Financial Assets That are Not Derecognised in Their Entirety [Line Items]    
Carrying amount of transferred assets that do not qualify for derecognition $ 306,759 $ 296,253
Carrying amount of associated liabilities 306,124 295,970
Fair value of transferred assets 305,121 296,343
Fair value of associated liabilities 304,847 296,274
Fair value of net position 274 69
Canadian residential mortgage loans [member]    
Disclosure of Transferred Financial Assets That are Not Derecognised in Their Entirety [Line Items]    
Carrying amount of transferred assets that do not qualify for derecognition 32,812 34,052
Carrying amount of associated liabilities 32,177 33,769
Fair value of transferred assets 31,174 34,142
Fair value of associated liabilities 30,900 34,073
Fair value of net position 274 69
Securities Sold Under Repurchase Agreements [member]    
Disclosure of Transferred Financial Assets That are Not Derecognised in Their Entirety [Line Items]    
Carrying amount of transferred assets that do not qualify for derecognition 258,615 252,920
Carrying amount of associated liabilities 258,615 252,920
Fair value of transferred assets 258,615 252,920
Fair value of associated liabilities 258,615 252,920
Securities Loaned [Member]    
Disclosure of Transferred Financial Assets That are Not Derecognised in Their Entirety [Line Items]    
Carrying amount of transferred assets that do not qualify for derecognition 15,332 9,281
Carrying amount of associated liabilities 15,332 9,281
Fair value of transferred assets 15,332 9,281
Fair value of associated liabilities $ 15,332 $ 9,281