Operation Steps for This Example:

1.  Copy data/ArbitrageData.csv to the dolphindb/server directory, i.e., the server folder under the DolphinDB service installation path.
2. Import data/arbitrage_monitoring.json to Dashboard.
3.  Run data/data_input.dos to create the database and tables, and import the data into the tables.
4.  Run data/loadMatchEngine.dos to load the simulated matching engine. Note: This script only needs to be run once after restarting the DolphinDB service.
5.  Run scripts 01 through 10 sequentially to build the arbitrage order-slicing system.
6.  Run script 11 or execute the Java/Python API code to submit parent orders to the subscribed stream table.
7.  Observe the results displayed on the data dashboard:
      The Parent Order Monitor shows the submitted parent orders and the calculated total profit.
      The Child Order Monitor shows the bid orders placed by the slicing system when the price spread exceeds the threshold, and the ask orders placed when the spread falls below the threshold.
      The Market Replay Monitor displays the trend of the lastPrice for both spot and futures contracts. The slicing system calculates the price spread based on the lastPrice.
      The Arbitrage Result Monitor shows the arbitrage records for successfully executed child orders and the total profit per child order.