v3.22.2.2
Derivative financial instruments and hedging activities - Notional Amount of Derivatives by Term to Maturity (Absolute Amounts) (Detail) - CAD ($)
$ in Millions
Oct. 31, 2022
Oct. 31, 2021
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount $ 7,776,875 $ 6,415,878
Derivative notional amount 26,479,660 23,344,503
Credit derivatives [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 1,000 1,000
Under 1 year [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 10,104,168 8,637,171
1 to 5 years [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 10,260,443 9,163,667
Over 5 years [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 6,115,049 5,543,665
Over-the-counter contracts [member] | Interest rate contracts forward rate agreements [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 807,939 1,028,697
Over-the-counter contracts [member] | Interest rate contracts swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 16,710,150 14,763,913
Over-the-counter contracts [member] | Interest rate contracts options purchased [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 829,368 764,494
Over-the-counter contracts [member] | Interest rate contracts options written [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 848,263 784,205
Over-the-counter contracts [member] | Foreign exchange contracts forward contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 2,275,908 1,789,538
Over-the-counter contracts [member] | Foreign exchange contracts cross currency swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 237,946 213,148
Over-the-counter contracts [member] | Foreign exchange contracts cross currency interest rate swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 2,970,275 2,408,900
Over-the-counter contracts [member] | Foreign exchange contracts options purchased [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 79,335 65,216
Over-the-counter contracts [member] | Foreign exchange contracts options written [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 82,163 72,524
Over-the-counter contracts [member] | Credit derivatives [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 43,515 42,911
Over-the-counter contracts [member] | Other contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 341,532 337,877
Over-the-counter contracts [member] | Under 1 year [member] | Interest rate contracts forward rate agreements [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 763,398 866,704
Over-the-counter contracts [member] | Under 1 year [member] | Interest rate contracts swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 4,994,006 3,936,638
Over-the-counter contracts [member] | Under 1 year [member] | Interest rate contracts options purchased [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 100,504 266,798
Over-the-counter contracts [member] | Under 1 year [member] | Interest rate contracts options written [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 108,770 271,000
Over-the-counter contracts [member] | Under 1 year [member] | Foreign exchange contracts forward contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 2,187,124 1,730,712
Over-the-counter contracts [member] | Under 1 year [member] | Foreign exchange contracts cross currency swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 87,942 82,316
Over-the-counter contracts [member] | Under 1 year [member] | Foreign exchange contracts cross currency interest rate swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 518,244 439,169
Over-the-counter contracts [member] | Under 1 year [member] | Foreign exchange contracts options purchased [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 58,075 46,060
Over-the-counter contracts [member] | Under 1 year [member] | Foreign exchange contracts options written [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 62,266 53,342
Over-the-counter contracts [member] | Under 1 year [member] | Credit derivatives [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 1,143 1,027
Over-the-counter contracts [member] | Under 1 year [member] | Other contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 228,709 218,270
Over-the-counter contracts [member] | 1 to 5 years [member] | Interest rate contracts forward rate agreements [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 44,188 161,835
Over-the-counter contracts [member] | 1 to 5 years [member] | Interest rate contracts swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 6,934,996 6,559,032
Over-the-counter contracts [member] | 1 to 5 years [member] | Interest rate contracts options purchased [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 577,780 312,149
Over-the-counter contracts [member] | 1 to 5 years [member] | Interest rate contracts options written [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 556,652 309,540
Over-the-counter contracts [member] | 1 to 5 years [member] | Foreign exchange contracts forward contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 86,136 56,335
Over-the-counter contracts [member] | 1 to 5 years [member] | Foreign exchange contracts cross currency swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 67,345 57,968
Over-the-counter contracts [member] | 1 to 5 years [member] | Foreign exchange contracts cross currency interest rate swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 1,572,490 1,193,669
Over-the-counter contracts [member] | 1 to 5 years [member] | Foreign exchange contracts options purchased [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 18,061 16,097
Over-the-counter contracts [member] | 1 to 5 years [member] | Foreign exchange contracts options written [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 16,623 16,122
Over-the-counter contracts [member] | 1 to 5 years [member] | Credit derivatives [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 35,621 35,759
Over-the-counter contracts [member] | 1 to 5 years [member] | Other contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 93,431 98,850
Over-the-counter contracts [member] | Over 5 years [member] | Interest rate contracts forward rate agreements [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 353 158
Over-the-counter contracts [member] | Over 5 years [member] | Interest rate contracts swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 4,781,148 4,268,243
Over-the-counter contracts [member] | Over 5 years [member] | Interest rate contracts options purchased [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 151,084 185,547
Over-the-counter contracts [member] | Over 5 years [member] | Interest rate contracts options written [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 182,841 203,665
Over-the-counter contracts [member] | Over 5 years [member] | Foreign exchange contracts forward contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 2,648 2,491
Over-the-counter contracts [member] | Over 5 years [member] | Foreign exchange contracts cross currency swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 82,659 72,864
Over-the-counter contracts [member] | Over 5 years [member] | Foreign exchange contracts cross currency interest rate swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 879,541 776,062
Over-the-counter contracts [member] | Over 5 years [member] | Foreign exchange contracts options purchased [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 3,199 3,059
Over-the-counter contracts [member] | Over 5 years [member] | Foreign exchange contracts options written [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 3,274 3,060
Over-the-counter contracts [member] | Over 5 years [member] | Credit derivatives [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 6,751 6,125
Over-the-counter contracts [member] | Over 5 years [member] | Other contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 19,392 20,757
Exchange-traded contracts [member] | Interest rate contracts options purchased [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 68,526 43,321
Exchange-traded contracts [member] | Interest rate contracts options written [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 22,562 23,572
Exchange-traded contracts [member] | Other contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 630,344 476,649
Exchange-traded contracts [member] | Interest rate contracts, Futures long positions [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 198,901 258,880
Exchange-traded contracts [member] | Interest rate contracts, Futures short positions [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 332,769 270,529
Exchange-traded contracts [member] | Foreign exchange contracts, Futures long positions [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 164 129
Exchange-traded contracts [member] | Under 1 year [member] | Interest rate contracts options purchased [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 56,353 28,071
Exchange-traded contracts [member] | Under 1 year [member] | Interest rate contracts options written [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 16,394 22,272
Exchange-traded contracts [member] | Under 1 year [member] | Other contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 539,103 391,339
Exchange-traded contracts [member] | Under 1 year [member] | Interest rate contracts, Futures long positions [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 148,032 110,285
Exchange-traded contracts [member] | Under 1 year [member] | Interest rate contracts, Futures short positions [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 233,941 173,039
Exchange-traded contracts [member] | Under 1 year [member] | Foreign exchange contracts, Futures long positions [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 164 129
Exchange-traded contracts [member] | 1 to 5 years [member] | Interest rate contracts options purchased [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 12,173 15,250
Exchange-traded contracts [member] | 1 to 5 years [member] | Interest rate contracts options written [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 6,168 1,300
Exchange-traded contracts [member] | 1 to 5 years [member] | Other contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 89,147 84,135
Exchange-traded contracts [member] | 1 to 5 years [member] | Interest rate contracts, Futures long positions [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 50,869 148,262
Exchange-traded contracts [member] | 1 to 5 years [member] | Interest rate contracts, Futures short positions [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 98,763 97,364
Exchange-traded contracts [member] | Over 5 years [member] | Other contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 2,094 1,175
Exchange-traded contracts [member] | Over 5 years [member] | Interest rate contracts, Futures long positions [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount   333
Exchange-traded contracts [member] | Over 5 years [member] | Interest rate contracts, Futures short positions [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 65 126
Trading Derivatives [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 25,651,512 22,733,022
Trading Derivatives [member] | Over-the-counter contracts [member] | Interest rate contracts forward rate agreements [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 806,576 1,015,263
Trading Derivatives [member] | Over-the-counter contracts [member] | Interest rate contracts swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 16,001,414 14,259,757
Trading Derivatives [member] | Over-the-counter contracts [member] | Interest rate contracts options purchased [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 829,368 764,494
Trading Derivatives [member] | Over-the-counter contracts [member] | Interest rate contracts options written [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 848,263 784,205
Trading Derivatives [member] | Over-the-counter contracts [member] | Foreign exchange contracts forward contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 2,230,901 1,753,075
Trading Derivatives [member] | Over-the-counter contracts [member] | Foreign exchange contracts cross currency swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 233,617 204,789
Trading Derivatives [member] | Over-the-counter contracts [member] | Foreign exchange contracts cross currency interest rate swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 2,918,063 2,376,225
Trading Derivatives [member] | Over-the-counter contracts [member] | Foreign exchange contracts options purchased [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 79,335 65,216
Trading Derivatives [member] | Over-the-counter contracts [member] | Foreign exchange contracts options written [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 82,163 72,524
Trading Derivatives [member] | Over-the-counter contracts [member] | Credit derivatives [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 42,785 42,428
Trading Derivatives [member] | Over-the-counter contracts [member] | Other contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 327,860 325,226
Trading Derivatives [member] | Exchange-traded contracts [member] | Interest rate contracts options purchased [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 68,526 43,321
Trading Derivatives [member] | Exchange-traded contracts [member] | Interest rate contracts options written [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 22,562 23,572
Trading Derivatives [member] | Exchange-traded contracts [member] | Other contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 630,344 476,649
Trading Derivatives [member] | Exchange-traded contracts [member] | Interest rate contracts, Futures long positions [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 197,251 256,020
Trading Derivatives [member] | Exchange-traded contracts [member] | Interest rate contracts, Futures short positions [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 332,320 270,129
Trading Derivatives [member] | Exchange-traded contracts [member] | Foreign exchange contracts, Futures long positions [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 164 129
Other than trading [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 828,148 611,481
Other than trading [member] | Over-the-counter contracts [member] | Interest rate contracts forward rate agreements [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 1,363 13,434
Other than trading [member] | Over-the-counter contracts [member] | Interest rate contracts swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 708,736 504,156
Other than trading [member] | Over-the-counter contracts [member] | Foreign exchange contracts forward contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 45,007 36,463
Other than trading [member] | Over-the-counter contracts [member] | Foreign exchange contracts cross currency swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 4,329 8,359
Other than trading [member] | Over-the-counter contracts [member] | Foreign exchange contracts cross currency interest rate swaps [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 52,212 32,675
Other than trading [member] | Over-the-counter contracts [member] | Credit derivatives [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 730 483
Other than trading [member] | Over-the-counter contracts [member] | Other contracts [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 13,672 12,651
Other than trading [member] | Exchange-traded contracts [member] | Interest rate contracts, Futures long positions [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount 1,650 2,860
Other than trading [member] | Exchange-traded contracts [member] | Interest rate contracts, Futures short positions [member]    
Disclosure of information about terms and conditions of hedging instruments and how they affect future cash flows [line items]    
Derivative notional amount $ 449 $ 400