Trade deficit and the capital account

Hey guys. Going through the CFA L1 material, and am confused about something. My book says:

“Because a trade deficit (surplus) must be offset by a surplus (deficit) in the capital account, we can also view the effects of a change in exchange rates on capital flows rather than on goods flows.”

Why does a trade deficit “have to be” offset by a surplus in the capital account? Can you please give an example? I may not have a 100% understanding of what makes up a “capital account”.

For example, if there is a trade deficit, the imports are worth more than the exports. The net value of this trade deficit requires the domestic country to purchase more money of the foreign currency to pay for the imports (i.e. pay the foreign companies that produce the imports into the domestic country). When the foreign currency is purchased, and that money is spent in the foreign country, the foreign country gets THEIR money back. However, the foreign country (or some foreign money exchange entity) still has a bunch of your domestic currency that it got from the money exchange that you did.

If this entity chooses to invest this money back in your country (i.e. purchase domestic real estate), I am presuming this increases the “capital account” and makes the equation true. However, what if this entity just sits on the money and doesn’t invest your domestic currency and just waits… How is the “capital account” have a surplus in this case?

Also, as a secondary question, in the equation (G - T) + (X - M) = (S - I), where does the “capital account” amount belong? Is it fully contained in the “I” - investments?

Thank you!

here’s another idea. Forget Eco altogether. Take a look at the mock exams and see what types of questions repeat themselves and then focus on that. I skipped 50% of eco and still got 70+ result and L1…