v3.22.4
Fair Value Measurement- Additional Information (Detail) - CAD ($)
$ in Millions
3 Months Ended
Jan. 31, 2023
Oct. 31, 2022
Jan. 31, 2022
Held for Trading for Trading Purpose [member]      
Disclosure of detailed information about financial instruments [line items]      
Transfers out of Level 1 into Level 2 of fair value hierarchy, assets held at end of reporting period $ 838 $ 857 $ 567
Transfers out of Level 2 into Level 1 of fair value hierarchy, assets held at end of reporting period 336    
Derivative instruments [member]      
Disclosure of detailed information about financial instruments [line items]      
Transfers out of Level 1 into Level 2 of fair value hierarchy, assets held at end of reporting period     21
Transfers out of Level 1 into Level 2 of fair value hierarchy, liabilities held at end of reporting period     584
Obligations related to securities sold short [member]      
Disclosure of detailed information about financial instruments [line items]      
Transfers out of Level 1 into Level 2 of fair value hierarchy, assets held at end of reporting period 648 4,844 5,514
Transfers out of Level 2 into Level 1 of fair value hierarchy, assets held at end of reporting period 0   0
Level 3 of fair value hierarchy [member]      
Disclosure of detailed information about financial instruments [line items]      
Net gain (loss) net of hedges was realized for FVTPL assets and FVTPL liabilities $ (8) $ 19 $ 25