Depending on how you set up the collection, the owner of each row should be tied to the current user logged in, their id gets added on creation of the row in the Owner system field. However this would not work with a logged out /unregistered user as you would get a blank cell for that row.
You can then just pull the data from the member table using this id when retrieving a row from your investment collection.
in your code, If the form hasn’t been submitted when this runs, it will find the first row in the collection and add the current member to it. This row could be another members data that gets overwritten or switched.