Somewhere in the last ten years, I either watched a film, or read a book (I think, actually, probably the latter) where the central "foe" of the work was a stock-trading artificial intelligence. As I recall, it started with a quant looking at the computer's stock trades, and realizing that a situation where they initially believed the computer had made a rapid series of trades to capitalize on a terrorist attack was instead of a matter of the computer making those trades prior to the attack, suggesting that either the computer predicted the attack, or actually caused it to happen. Said quant does not survive that discovery as they're eliminated via the building's security system as the computer preemptively removes a threat to profitability. For some reason, in my brain, he gets gunned down by the system, although that seems a little too overt a solution.
What I don't recall is how the system gets foiled in the end or, for that matter, who opposes it, although obviously the plot does require someone to figure out and (at least try to) foil the computer's murderous scheme.