Modified Floyd-Warshall algorithm for risk arbitrage

Traditionally risk arbitrage is the simultaneous purchase of stock in a company being acquired and the sale of stock of the acquirer. Modern risk arbitrage focuses on capturing the spreads between the market value of an announced takeover target and the eventual price at which the acquirer will buy the target's shares. Here we look at the concept of arbitrage, how market makers utilize "true arbitrage," and, finally, how retail investors can take advantage of arbitrage opportunities.