How to record loan or investment

For reference, the bank account article can be found here: Setting up your bank accounts