Algorithmic Endowment Management