Algorithmic Treasury Optimization