A federal judge in San Francisco on Monday cut short a criminal trial against Robert Bogucki, the former head of Barclays Capital Inc.’s foreign exchange trading in New York, by granting his lawyers’ motion for an acquittal.

A little more than halfway into a trial scheduled to last two weeks, U.S. District Judge Charles Breyer of the Northern District of California found that Bogucki and Barclays were operating as principals on the opposite side of a complicated foreign exchange transaction with Hewlett-Packard, rather than as HP’s agent.