The economics of temporary migrations