investment legal definition