Risk Management in Automated Trading