  Financial portfolio construction problems are often formulated as quadratic
and discrete (combinatorial) optimization that belong to the nondeterministic
polynomial time (NP)-hard class in computational complexity theory. Ising
machines are hardware devices that work in quantum-mechanical/quantum-inspired
principles for quickly solving NP-hard optimization problems, which potentially
enable making trading decisions based on NP-hard optimization in the time
constraints for high-speed trading strategies. Here we report a real-time stock
trading system that determines long(buying)/short(selling) positions through
NP-hard portfolio optimization for improving the Sharpe ratio using an embedded
Ising machine based on a quantum-inspired algorithm called simulated
bifurcation. The Ising machine selects a balanced (delta-neutral) group of
stocks from an $N$-stock universe according to an objective function involving
maximizing instantaneous expected returns defined as deviations from
volume-weighted average prices and minimizing the summation of statistical
correlation factors (for diversification). It has been demonstrated in the
Tokyo Stock Exchange that the trading strategy based on NP-hard portfolio
optimization for $N$=128 is executable with the FPGA (field-programmable gate
array)-based trading system with a response latency of 164 $\mu$s.
