Robots are now managing investment portfolios. Here’s how it works