v3.22.2.2
Fair value of financial instrument - Summary of Net Gains (Losses) From Financial Instruments Classified and Designated as at Fair Value Through Profit or Loss (Detail) - CAD ($)
$ in Millions
12 Months Ended
Oct. 31, 2022
Oct. 31, 2021
Disclosure of detailed information about financial instruments [line items]    
Net gains (losses) from financial instruments classified and designated as at fair value through profit or loss $ 1,161 $ 2,040
Interest Rate and Credit [member] | By product line [member]    
Disclosure of detailed information about financial instruments [line items]    
Net gains (losses) from financial instruments classified and designated as at fair value through profit or loss 1,251 1,033
Equities [member] | By product line [member]    
Disclosure of detailed information about financial instruments [line items]    
Net gains (losses) from financial instruments classified and designated as at fair value through profit or loss (843) 57
Foreign Exchange and Commodities [member] | By product line [member]    
Disclosure of detailed information about financial instruments [line items]    
Net gains (losses) from financial instruments classified and designated as at fair value through profit or loss 753 950
Financial Instruments At Fair Value Through Profit Or Loss Classified As Fair Value Through Profit Loss Category [member]    
Disclosure of detailed information about financial instruments [line items]    
Net gains (losses) from financial instruments classified and designated as at fair value through profit or loss (7,382) 3,447
Financial Instruments At Fair Value Through Profit Or Loss Designated upon Initial Recognition Category [member]    
Disclosure of detailed information about financial instruments [line items]    
Net gains (losses) from financial instruments classified and designated as at fair value through profit or loss $ 8,543 $ (1,407)