I've been reading some introductory macroeconomics and I'm struggling to understand one of the basic accounting identities. In a closed economy with a fixed money supply it's clear that every dollar saved is a dollar invested. I'm happy with the standard story.
What I don't understand is how the identity works when money is created privately. I can go to a bank an ask for a million dollar business loan. The bank grants me the loan, and creates an asset (the loan) and a liability (the money in my account). I then invest the money. It seems from this example that I have created a million dollars of investment without creating any offsetting savings. Of course, I have to pay off the loan at some point, but then shouldn't the identity be something like investment = savings + debt?
What am I missing?