Fair value of financial instrument - Summary of Fair Value of Assets and Liabilities Measured at Fair Value on a Recurring Basis and Classified Using Fair Value Hierarchy (Parenthetical) (Detail) - CAD ($) $ in Millions |
Oct. 31, 2022 |
Oct. 31, 2021 |
---|---|---|
Disclosure of Detailed Information about Financial Instruments [line Items] | ||
Trading securities | $ 148,205 | $ 139,240 |
Investment securities | 170,018 | 145,484 |
Residential mortgage-backed securities [member] | ||
Disclosure of Detailed Information about Financial Instruments [line Items] | ||
Trading securities | 12,273 | 13,124 |
Investment securities | 23,362 | 13,542 |
Commercial mortgage-backed securities [member] | ||
Disclosure of Detailed Information about Financial Instruments [line Items] | ||
Trading securities | 0 | 0 |
Investment securities | $ 2,755 | $ 2,592 |