v3.22.2.2
Derivative financial instruments and hedging activities - Summary of Replacement Cost of Derivative Instruments by Risk Rating and by Counterparty Type (Detail) - CAD ($)
$ in Millions
Oct. 31, 2022
Oct. 31, 2021
Disclosure of fair value of derivative instruments [line items]    
Gross positive fair values $ 158,679 $ 96,665
Impact of master netting agreements and applicable margins 116,810 75,721
Replacement cost (after netting agreements) 41,869 20,944
Banks [member]    
Disclosure of fair value of derivative instruments [line items]    
Gross positive fair values 73,616 42,361
Impact of master netting agreements and applicable margins 71,582 41,554
Replacement cost (after netting agreements) 2,034 807
OECD Governmemnts [member]    
Disclosure of fair value of derivative instruments [line items]    
Gross positive fair values 22,727 15,964
Impact of master netting agreements and applicable margins 22,597 15,731
Replacement cost (after netting agreements) 130 233
Other Counterparties [Member]    
Disclosure of fair value of derivative instruments [line items]    
Gross positive fair values 62,336 38,340
Impact of master netting agreements and applicable margins 22,631 18,436
Replacement cost (after netting agreements) 39,705 19,904
Risk rating AAA, AA [member]    
Disclosure of fair value of derivative instruments [line items]    
Gross positive fair values 39,001 22,801
Impact of master netting agreements and applicable margins 21,552 20,545
Replacement cost (after netting agreements) 17,449 2,256
Risk rating A [member]    
Disclosure of fair value of derivative instruments [line items]    
Gross positive fair values 72,983 37,938
Impact of master netting agreements and applicable margins 62,614 33,257
Replacement cost (after netting agreements) 10,369 4,681
Risk rating BBB [member]    
Disclosure of fair value of derivative instruments [line items]    
Gross positive fair values 29,690 16,333
Impact of master netting agreements and applicable margins 21,818 12,050
Replacement cost (after netting agreements) 7,872 4,283
Risk rating BB or lower [member]    
Disclosure of fair value of derivative instruments [line items]    
Gross positive fair values 17,005 19,593
Impact of master netting agreements and applicable margins 10,826 9,869
Replacement cost (after netting agreements) $ 6,179 $ 9,724