Optimal Trading with Speed-Dependent Transaction Cost Rates: A Flexible Framework - BizPub.ai