WO2020179070A1 - 取引プログラム、取引方法及び取引装置 - Google Patents

取引プログラム、取引方法及び取引装置 Download PDF

Info

Publication number
WO2020179070A1
WO2020179070A1 PCT/JP2019/009190 JP2019009190W WO2020179070A1 WO 2020179070 A1 WO2020179070 A1 WO 2020179070A1 JP 2019009190 W JP2019009190 W JP 2019009190W WO 2020179070 A1 WO2020179070 A1 WO 2020179070A1
Authority
WO
WIPO (PCT)
Prior art keywords
order
buy
sell
orders
price
Prior art date
Application number
PCT/JP2019/009190
Other languages
English (en)
French (fr)
Inventor
清水 俊宏
章仁 中村
資広 小崎
章紘 桑原
Original Assignee
富士通株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富士通株式会社 filed Critical 富士通株式会社
Priority to JP2021503380A priority Critical patent/JP7205614B2/ja
Priority to PCT/JP2019/009190 priority patent/WO2020179070A1/ja
Publication of WO2020179070A1 publication Critical patent/WO2020179070A1/ja
Priority to US17/409,907 priority patent/US11748809B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • the present invention relates to a trading program, a trading method, and a trading device.
  • Itayose and Zaraba when trading stocks. Itayose is a transaction in which orders from the acceptance of orders to the start of trading are put together, the trading is completed, and the opening price is determined. Zaraba is a transaction in which an order has already been placed and a new order has been placed, or a new order has been placed between them.
  • FIG. 23 is a diagram showing an example of board information in stock trading.
  • the middle column shows the limit price
  • the left column shows the number of sell orders corresponding to the price
  • the right column shows the number of buy orders corresponding to the price.
  • one sheet is the number of unit shares. For example, the number of sell orders for which the sell limit is 102 yen is 4, and the number of buy orders for which the buy limit is 102 yen is 3.
  • the execution device fills sell and buy orders in order from the cheapest sell order to the highest buy order. Then, the contracting device stops the contract when the sell order and the buy order have the same price, and sets the price at this time as the current price. Then, all executed trades are executed at the current price.
  • FIG. 24 is a diagram for explaining stock trading.
  • the contracting device first contracts four sales of 98 yen and four sales of 104 yen.
  • the contracting device contracts three sells of 99 yen and three buys of 102 yen.
  • the contracting device contracts two sells of 99 yen and two buys of 101 yen.
  • the contracting device contracts three 100-yen sells and three 100-yen buys, and ends the contract.
  • the contracting device contracts a total of 12 cases for 100 yen, and the current value is 100 yen.
  • This transaction support facility includes matching means and processing means.
  • the matching means matches the provider and the consumer who offered the price even if the offer price offered by the provider and the purchase price offered by the consumer do not match for each product or service.
  • the processing means performs processing for establishing a transaction at a price that meets the offered price between the matched consumer and provider.
  • the central market system receives trade application information including at least data indicating whether to sell or sell and data indicating a price from the market client system. Then, this central market system stores the received sales application information, collates the stored data related to the purchase with the data related to the sale, and completes the transaction, and at least the market related to the contracted sales application information. Notify the client system about the deal.
  • the present invention in one aspect, aims to increase the number of contracts in transactions.
  • the trading program causes the computer to execute a process of acquiring the number of sell orders for each sell limit and the number of buy orders for each buy limit. Then, in the trading program, the sell limit of the sell order in the set of the sell order and the buy order is the buy order based on the number of sell orders for each sell limit and the buy order for each buy limit acquired on the computer. A process for executing a contract that is less than or equal to the bid limit is executed. Then, the transaction program causes the computer to execute processing for determining a contract price for each contract.
  • the present invention can increase the number of contracts in trading.
  • FIG. 1 is a diagram showing an example of iterating by the contracting device according to the first embodiment.
  • FIG. 2 is a diagram showing an example of setting the contract price of the contract shown in FIG.
  • FIG. 3 is a diagram showing an example of setting the stock price next to the contract shown in FIG.
  • FIG. 4 is a diagram showing how to bring the matching together.
  • FIG. 5 is a diagram for explaining a matching algorithm by the contracting apparatus according to the first embodiment.
  • FIG. 6 is a diagram showing a configuration of a trading system according to the first embodiment.
  • FIG. 7 is a diagram illustrating an example of the balanced binary tree.
  • FIG. 8 is a diagram showing an example in which an order management device manages an order using a balanced binary tree.
  • FIG. 9 is a flowchart showing the flow of processing by the contracting device.
  • FIG. 10 is a flowchart showing the flow of processing by the matching unit.
  • FIG. 11 is a diagram illustrating the configuration of the transaction system according to the second embodiment.
  • FIG. 12 is a diagram showing a matching example by the first matching method.
  • FIG. 13 is a flowchart showing the flow of processing by the first matching method.
  • FIG. 14 is a diagram showing a contract example by the second matching method.
  • FIG. 15 is a flowchart showing the flow of processing by the second matching method.
  • FIG. 16 is a diagram for explaining the third matching method.
  • FIG. 17 is a flowchart showing the flow of processing by the third matching method.
  • FIG. 18 is a diagram showing an example of mating rules.
  • FIG. 19 is a flowchart showing the flow of processing by the fourth matching method.
  • FIG. 20A is a diagram for explaining the maximum flow problem of network flow.
  • FIG. 20B is a diagram for explaining the formulation of a board as a network flow.
  • FIG. 20C is a diagram showing the maximum flow of the network flow shown in FIG. 14B.
  • FIG. 21 is a flowchart showing a processing flow by the fifth matching method.
  • FIG. 22 is a diagram showing a hardware configuration of a computer that executes a contract program according to a first embodiment and a second embodiment.
  • FIG. 23 is a diagram showing an example of board information in stock trading.
  • FIG. 24 is a diagram for explaining the itayose of stock trading.
  • FIG. 1 is a diagram illustrating an example of a transaction by the contracting device according to the first embodiment.
  • the contracting devices according to the first embodiment are four cases of selling 98 yen and four cases of buying 98 yen, five cases of selling 99 yen and five cases of buying 100 yen, and three cases of selling 100 yen. And 3 cases of buying 102 yen, 3 cases of selling 103 yen and 3 cases of buying 104 yen, totaling 15 cases.
  • the contract constant is increased by three.
  • the contract method such as maximizing the contract constant and minimizing the contract price step is used. You can choose.
  • the contract price can be set to any value that is not less than the sell limit price and not more than the buy limit price. For example, assuming that the sell limit price is s yen, the buy limit price is b (s ⁇ b) yen, and the current price is p yen, the contract device according to the first embodiment is the contract price if p is included in the interval [s, b].
  • the contracting device sets the contract price to s yen when p ⁇ s and the contract price to b yen when b ⁇ p.
  • FIG. 2 is a diagram showing an example of setting the contract price of the contract shown in FIG.
  • FIG. 3 is a diagram showing an example of setting the stock price next to the contract shown in FIG. As shown in FIG. 3, the next stock price is (98 ⁇ 4 + 100 ⁇ 5 + 100 ⁇ 3 + 103 ⁇ 3) / 15 ⁇ 100.07 yen.
  • the contracting device merges new sell orders higher than p yen and new buy orders below p yen with existing orders and treats them as existing orders.
  • the new sell order is moved to the cheaper one, and the existing buy order is moved to the cheapest one of each sell order amount or more.
  • the maximum contract number is specified for the new sell order of p yen or less.
  • the new buy order is moved to the higher side, and the existing sell order is moved to the highest side below each buy order amount.
  • the maximum contraction constant is specified for a new buy order higher than p yen.
  • FIG. 4 is a diagram showing how matching is performed.
  • the number surrounded by the unshaded ellipse indicates the limit price of the existing order
  • the number enclosed by the shaded ellipse indicates the limit price of the new order.
  • the current value is 100 yen.
  • FIG. 4 (a) shows a certain matching of an existing order and a new order
  • FIG. 4 (b) shows a matching of the matching of FIG. 4 (a).
  • a new sell of 97 yen and an existing buy of 99 yen are matched, a new sell of 98 yen and an existing buy of 100 yen are matched, and 102 yen.
  • the new purchase of the item and the existing sale of 102 yen are matched.
  • the contracting device matches and matches these three cases as shown in FIG. 4(b).
  • a new sell order of 100 yen or less and an existing buy order a new sell of 97 yen is sent to the cheaper side and an existing 99 yen is sold. Match the buy of 97 yen with the buy of 97 yen that was sent to the cheapest one above the sell order amount.
  • a new sale of 98 yen is sent to the cheaper one, and an existing buy of 100 yen is sent to the cheapest one, which is 99 yen or more. Match with buying.
  • a new buy of 102 yen is sent to the higher side and a buy of 105 yen and an existing sale of 102 yen are bought. Match with the sale of 104 yen sent to the highest order amount or less.
  • FIG. 5 is a diagram for explaining a matching algorithm by the contracting device according to the first embodiment.
  • the contracting apparatus according to the first embodiment specifies the maximum contracting constant as 2 by performing the alignment shown in FIG. 4 for new sell orders of p yen or less.
  • the contracting device according to the first embodiment identifies and matches the minimum existing buy of 97 yen or more for a new sale of 97 yen, and 98 for a new sale of 98 yen. Identify and match the smallest existing buy of JPY or above.
  • the contracting apparatus can limit the matching search space and specify the maximum contracting constant for a new sell order of p yen or less at high speed.
  • the contracting apparatus specifies the maximum contracting constant as 2 by performing the alignment shown in FIG. 4 for a new buy order higher than p yen.
  • the contracting device identifies and matches the maximum existing sale of 105 yen or less for a new purchase of 105 yen, and 102 for a new purchase of 102 yen. Identify and match the largest existing sell that is less than or equal to the yen.
  • the contracting apparatus can limit the matching search space and specify the maximum contracting constant for a new buy order higher than p yen at high speed.
  • the contracting apparatus matches the remaining new sell order and the remaining new buy order, and specifies the maximum contract constant between the new orders as 1. ..
  • the contracting apparatus specifies the total maximum contracting constant k as 5 by summing the maximum contracting constants of FIGS. 5 (a) to 5 (c). Then, as shown in FIG. 5D, the contracting device according to the first embodiment replaces the matching specified in FIGS. 5A to 5C with the matching that consumes the preferential price order.
  • the preferential price represents a low price in a sell order and a high price in a buy order.
  • the contracting apparatus extracts k sell orders in order from the cheapest one, extracts k buy orders in order from the highest one, and matches the sell order and the buy order so that there is no intersection. Create a match that consumes a preferential price order.
  • FIG. 6 is a diagram showing a configuration of a trading system according to the first embodiment.
  • the transaction system 1 according to the first embodiment includes a reception device 11, an order management device 12, and a contract device 13.
  • the acceptance device 11, the order management device 12, and the contracting device 13 are connected by the internal network 2.
  • the reception device 11 receives the order information and transmits it to the order management device 12.
  • the order information includes, for example, an orderer identifier that identifies the orderer, a brand, a buy / sell distinction, a limit price, the number of shares, and the like.
  • the reception device 11 receives, for example, order information transmitted from the information processing device via an external network.
  • the information processing device for example, transmits order information based on an order entered by an investor using a mouse or a keyboard.
  • the acceptance device 11 receives the contract result from the order management device 12 and transmits it to the information processing device.
  • the contract result includes, for example, an orderer identifier, a brand, distinction between buying and selling, a contract price, and the number of contract shares.
  • the acceptance apparatus 11 transmits the contract result to the information processing apparatus that is the transmission source of the order information, using the IP address associated with the orderer identifier, for example.
  • the order management device 12 manages order information by adding, for example, an order identifier that identifies an order.
  • the order management device 12 stores all the order information received by the reception device 11.
  • the order management device 12 transmits new order information and the current price to the execution device 13 for each brand.
  • the order management device 12 receives the contract information for each brand from the contract device 13 and updates the order information.
  • the order management device 12 creates a contract result based on the contract information and transmits it to the reception device 11.
  • the contract information includes, for example, a sell limit price, a buy limit price, a contract price, and the number of contract shares for one or more contracts.
  • the order management device 12 merges a new sell order higher than the current price and a new buy order lower than the current price into the existing order based on the instruction from the execution device 13.
  • the order management device 12 responds to the order search request from the contracting device 13.
  • the search request for orders from the contract device 13 includes a search request for buy orders above a predetermined price and a search request for sell orders below a predetermined price.
  • the order management device 12 manages orders using a balanced binary tree.
  • a balanced binary tree is a binary tree that automatically tries to keep the height of the tree (the number of layers from the root) as small as possible.
  • FIG. 7 is a diagram showing an example of a balanced binary tree.
  • each node has a value, and every node connects to two right and left descendant nodes. Further, the value of the node of the left descendant of the current node is smaller than the value of the current node, and the value of the node of the right descendant of the current node is larger than the value of the current node.
  • NIL indicates no offspring.
  • Equivalent binary trees include AVL-Tree, red-black trees, Treap, and Splay.
  • FIG. 8 is a diagram showing an example in which the order management device 12 manages an order using a balanced binary tree.
  • FIG. 8 shows a case where the sell order is managed, but the order management device 12 manages the buy order in the same manner.
  • the order management device 12 manages the order price and the number of cases by using the node. For each node, the price of the left descendant node is lower than the current node and the price of the right descendant node is higher than the current node.
  • the order management device 12 performs a balancing process when inserting data in order to prevent the height of the tree from increasing.
  • the balance processing differs depending on AVL-Tree, red-black tree, Treap, Splay, and the like.
  • the order management device 12 searches for a balanced binary tree from the root, and since 97 yen is smaller than 101 yen, it advances to the left child and proceeds to 97 yen. Is higher than 95 yen, so proceed to the right child. Then, since 97 yen is smaller than 98 yen, the order management device 12 proceeds to the child on the left and reaches the node of 96 yen. Then, since there is node beyond the 96 yen node, the order management device 12 responds with the sale of 96 yen as the search result.
  • the order management device 12 when the order management device 12 receives the search request for the sell order of the predetermined price or less, the order management device 12 responds with the information of the sell order having the maximum price of the predetermined price or less as the search result. Further, when the sell order below the predetermined price is not found, the order management device 12 responds that the sell order does not exist.
  • the order management device 12 when the order management device 12 receives a search request for a buy order having a predetermined price or higher, the order management device 12 responds with information on a buy order having a predetermined price or higher and the lowest price as a search result. Further, the order management device 12 responds that there is no buy order when no buy order having a price equal to or higher than the predetermined price is found.
  • the order management device 12 can respond to the order search request from the execution device 13 at high speed by managing the order using the balanced binary tree.
  • the order management device 12 can perform a search with a calculation amount of O(log(N)).
  • the execution device 13 receives new order information and the current price for each stock from the order management device 12 via the internal network 2, executes the sell order and the buy order, and executes the execution price. And decide the next stock price.
  • the information of each sell order includes a sell limit price and the number of sell orders
  • the information of each buy order includes a buy limit price and the number of buy orders.
  • the contracting device 13 transmits contract information to the order management device 12 for each brand via the internal network 2.
  • the contracting device 13 includes an acquisition unit 21, a matching unit 22, a price determination unit 23, and an output unit 24.
  • the acquisition unit 21 receives, from the order management device 12 via the internal network 2, information on new orders and current values for each brand.
  • Matching unit 22 matches sell orders and buy orders for each brand.
  • the matching unit 22 performs matching at a limit price or at a price that is more advantageous to the investor than the limit price, regardless of the current price.
  • the matching unit 22 has a merging unit 41, a first matching unit 42, a second matching unit 43, a third matching unit 44, a specific unit 45, and a fixing unit 46.
  • the merging unit 41 instructs the order management device 12 to merge the sell order higher than the current price and the buy order less than the current price with the existing order.
  • the first matching unit 42 determines whether or not there is an existing buy order equal to or more than the sell limit price of the new sell order, and if there is an existing buy order, the new sell order and the existing buy order are determined. To match.
  • the first matching unit 42 requests the order management device 12 to search for an existing buy order that is equal to or higher than the sell limit of the new sell order, so that there is an existing buy order that is equal to or higher than the sell limit of the new sell order. Determine whether or not.
  • the first matching unit 42 matches a new sell order with an existing buy order that is equal to or higher than the sell limit price of the new sell order and has the minimum buy limit price.
  • the second matching unit 43 determines whether or not there is an existing sell order below the buy limit of the new buy order, and if there is an existing sell order, the new buy order and the existing sell order. To match.
  • the second matching unit 43 requests the order management device 12 to search for an existing sell order that is equal to or less than the buy limit of the new buy order, so that there is an existing sell order that is equal to or greater than the buy limit of the new buy order. Determine whether or not.
  • the second matching unit 43 matches the new buy order with the existing sell order having the maximum sell limit below the buy limit of the new buy order.
  • the third matching unit 44 matches the new sell order remaining after the processing by the merging unit 41, the first matching unit 42, and the second matching unit 43 with the new buy order.
  • the specifying unit 45 specifies the maximum contraction by totaling the number of matching by the first matching unit 42, the number of matching by the second matching unit 43, and the number of matching by the third matching unit 44.
  • the confirmation unit 46 identifies the matching that digests the priority price order based on the maximum contract constant specified by the specific unit 45, and confirms the execution.
  • the price determination unit 23 determines the contract price for each matching and the next stock price for each issue based on the matching by the matching unit 22.
  • the price determination unit 23 has a contract price determination unit 31 and a next price determination unit 32.
  • the contract price determination unit 31 also sets the contract price when p is included in the interval [s, b]. Let p yen. On the other hand, when p is not included in the section [s, b], the contract price determination unit 31 sets the contract price to a value closest to p yen, that is, if p ⁇ s, the contract price is s yen, b. If ⁇ p, the contract price is b yen.
  • the next price determination unit 32 determines the next stock price based on the contract price determined by the contract price determination unit 31. For example, the next price determination unit 32 sets the average value of all contract prices as the next stock price.
  • the output unit 24 transmits the contract information for each brand to the order management device 12 via the internal network 2.
  • FIG. 9 is a flowchart showing the flow of processing by the contracting device 13.
  • the contracting device 13 performs the process shown in FIG. 9 for each brand.
  • the execution device 13 receives information and a current price of a new sell order and a new buy order from the order management device 12 (step S1).
  • the contracting device 13 determines the matching of trading (step S2).
  • the contracting device 13 does not limit the current price, and performs matching if the price is more favorable to the investor than the limit price or the limit price.
  • the contracting device 13 determines the contract price for each matching (step S3), and determines the next stock price (step S4).
  • the contract device 13 transmits the contract information to the order management device 12 (step S5).
  • the contracting device 13 is not bound by the current price, and if the price is more favorable to the investor than the limit price or the limit price, the trading is matched and the contract price is determined for each matching, so that the contract constant can be increased. it can.
  • FIG. 10 is a flowchart showing the flow of processing by the matching unit 22.
  • the matching unit 22 acquires the information and the current price of the newly arrived sell order and buy order from the acquisition unit 21 (step S11), and determines whether the sell order is higher than the current price or is equal to or lower than the current price.
  • the buy order is merged with the existing order (step S12).
  • the matching unit 22 s 1 a new sell order cheap order, s 2, and..., And s m, b 1, b 2 , ⁇ , and b n a new buy order to a higher order ( Step S13).
  • the matching unit 22 repeats the processing of the following steps S14 and S15 while increasing i from 1. That is, the matching unit 22, s i yen or more existing buy orders b which is not matched, it is determined whether there (step S14), and the existing buy order b that is not matched by s i yen If they exist, s i and b are matched (step S15).
  • the matching unit 22 increases i to m and repeats the processing of step S14 and step S15 while there is an existing buy order b that is not matched at s i yen or more.
  • the matching unit 22 identifies m as the number of matching for a new sell order.
  • the matching unit 22 exits from the repetition and specifies i ⁇ 1 as the matching number for the new sell order.
  • the matching unit 22 repeats the processing of steps S16 and S17 described below while increasing i from 1. That is, the matching unit 22, b i ⁇ existing Sell not apply s not matched below to determine whether there (step S16), and the existing not match below b i ⁇ sell orders s If there exists, b i and s are matched (step S17).
  • Matching unit 22 while the order s existing selling not match below b i £ is present, by increasing the i to n repeats the processing of step S16 and step S17.
  • the matching unit 22 identifies n as the number of matching for a new buy order.
  • the matching unit 22 exits from the repetition and specifies i ⁇ 1 as the matching number for the new buy order.
  • the matching unit 22 matches the remaining new sell order and the remaining new buy order as much as possible (step S18), and specifies the matched number as the matching number between the new orders. Then, the matching unit 22 specifies the maximum contraction constant by adding the number of matches for the new sell order, the number of matches for the new buy order, and the number of matches between the new orders (step S19). Then, the matching unit 22 identifies the matching that digests the order of the preferential price based on the maximum contract constant and confirms it as a contract (step S20).
  • the matching unit 22 specifies the maximum contraction by matching a new sell order and an existing buy order, a new buy order and an existing sell order, and a new sell order and a new buy order. To do. Then, the matching unit 22 can specify the execution by specifying the matching that digests the order of the preferential price based on the maximum contract constant.
  • the merging unit 41 merges a new sell order higher than the current price and a new buy order lower than the current price into the existing order. Then, the first matching unit 42 determines whether or not there is an existing buy order that is equal to or greater than the sell limit price of the new sell order that is equal to or less than the current price, and if there is an existing buy order, it is equal to or less than the current price. Match new sell orders to existing buy orders. Then, the second matching unit 43 determines whether or not there is an existing sell order that is lower than the buy limit of the new buy order that is higher than the current price, and if there is an existing sell order, the current price is used. Match high new buy orders with existing sell orders.
  • the third matching unit 44 matches the remaining new sell order with the remaining new buy order.
  • the specifying unit 45 determines the matching number of new sell orders below the current price and existing buy orders, the matching number of new buy orders higher than the current price and existing sell orders, and the remaining new sell orders.
  • the maximum contraction is specified by summing the matching numbers of the remaining new buy orders.
  • the confirmation unit 46 identifies the matching that digests the priority price order and confirms the execution based on the maximum contract constant specified by the specific unit 45. Therefore, the execution device 13 can increase the execution constant in the rough field.
  • the merging unit 41 requests the order management device 12 to merge a new sell order higher than the current price and a new buy order lower than the current price into the existing order.
  • the first matching unit 42 requests the order management device 12 to search for an existing buy order that is equal to or higher than the sell limit price of the new sell order for each new sell order, so that the new sell order is equal to or lower than the current price. Determines if there are existing buy orders above the sell limit of.
  • the second matching unit 43 requests the order management device 12 to search for an existing sell order that is equal to or less than the buy limit of the new buy order for each new buy order, so that the new buy order is higher than the current price. Determines if there is an existing sell order below the buy limit of. Therefore, the contracting device 13 can accurately match the sell order and the buy order based on the order information managed by the order management device 12.
  • the order management device 12 manages the order information by using the balanced binary tree, the search for the existing buy order equal to or higher than the sell limit price of the new sell order and the search for the new buy order are performed. It is possible to search for existing sell orders below the buy limit at high speed.
  • the transaction system 1 has the reception device 11, the order management device 12, and the contract device 13 has been described, but the functions of the reception device 11, the order management device 12, and the contract device 13 are combined into one.
  • the transaction device may be collectively configured.
  • arbitrary two functions, such as the functions of the reception apparatus 11 and the order management apparatus 12 may be combined into one, to form one apparatus.
  • the trading system 1 may trade other securities and goods.
  • the trading system may process all orders at regular intervals such as 0.1 milliseconds. Therefore, in a second embodiment, a trading system that processes all orders at regular intervals will be described.
  • FIG. 11 is a diagram showing a configuration of a trading system according to the second embodiment.
  • the functional parts having the same roles as those shown in FIG. 6 are designated by the same reference numerals, and detailed description thereof will be omitted.
  • the trading system 1a according to the second embodiment has an order management device 12a instead of the order management device 12 as compared with the trading system 1 shown in FIG. 6, and instead of the execution device 13.
  • the order management device 12a has the same function as the order management device 12, but instead of transmitting new order information and the current price to the execution device 13a, the sell limit price, the number of sell orders, and the buy price are set at regular intervals. The limit price and the number of buy orders are transmitted to the contracting device 13a for each brand.
  • the order management device 12a transmits order information to the execution device 13a regardless of whether a new order or an existing order is used. Further, the order management device 12a is not required by the contract device 13a to search for a buy order above a predetermined price and to search for a sell order below a predetermined price. For this reason, the order management device 12a does not use a balanced binary tree for order management.
  • the contracting device 13a has an acquisition unit 21a instead of the acquisition unit 21 and a matching unit 22a instead of the matching unit 22 as compared with the contracting device 13 shown in FIG.
  • the acquisition unit 21a receives the sell limit and the number of sell orders, and the buy limit and the number of buy orders from the order management device 12a for each issue at regular intervals, regardless of whether the new order or the existing order is used.
  • the matching unit 22a performs matching if the price is more favorable to the investor than the limit price or the limit price, regardless of the current price.
  • the matching unit 22a matches a sell order and a buy order, but does not distinguish between a new order and an existing order.
  • the matching unit 22a uses one of the following five matching methods to match a sell order and a buy order. In the first matching method, the matching unit 22a performs matching by a full search.
  • the matching unit 22a creates a list A of j sell orders and a list B of j buy orders. Then, the matching unit 22a performs a recording process of selecting one combination of j cases of A and j cases of B and recording, as a matching candidate, a combination of which the sell limit price is equal to or less than the buy limit price for all j cases. The matching unit 22a executes this recording process for all combinations while changing the combination of j cases of A and j cases of B. Furthermore, the matching unit 22a executes this recording process for all combinations of A and B while changing A or B. Further, the matching unit 22a performs this recording process while changing the number j of matching cases from 1 to u. Here, u is the smaller of the number of sell orders and the number of buy orders.
  • the matching unit 22a selects the optimum matching from the matching candidates.
  • the optimum matching includes, for example, the lowest average sell limit price, the highest average buy limit price, the maximum number of matches, and the few matches between the same securities companies.
  • FIG. 12 is a diagram showing a matching example by the first matching method.
  • j 12.
  • Two buy orders for yen, one sell order for 101 yen, and one buy order for 102 yen are one matching candidate.
  • FIG. 13 is a flowchart showing a processing flow by the first matching method.
  • the matching unit 22a sets j to 1 (step S21) and creates a list A of j sell orders and a list B of j buy orders (step S22). Then, the matching unit 22a selects one combination of j cases of A and j cases of B (step S23), and determines whether or not the sell limit price is equal to or less than the buy limit price for all j cases (step S24). .. Then, when the sell limit price is equal to or less than the buy limit price for all j cases, the matching unit 22a records the selected combination as a matching candidate (step S25).
  • the matching unit 22a determines whether or not all the combinations of j of A and j of B have been selected (step S26), and if there is a combination that has not been selected, the process returns to step S23. On the other hand, when all the combinations are selected, the matching unit 22a determines whether all the combinations A and B have been selected (step S27), and when some of the combinations A and B are not selected. A or B is changed (step S28), and the process returns to step S23.
  • the matching unit 22a adds 1 to j (step S29) and determines whether j is u or less (step S30). Then, the matching unit 22a returns to step S22 when j is less than or equal to u, and selects one optimal matching from the matching candidates when j is less than or equal to u (step S31).
  • the matching unit 22a can identify matching candidates by performing matching by full search.
  • the matching unit 22a fills a sell order and a buy order by performing matching by random selection. Specifically, the matching unit 22a creates a list A of j sell orders and a list B of j buy orders. Then, the matching unit 22a randomly selects one item from A and B one by one, determines whether the sell limit price is equal to or less than the buy limit price, and selects a combination in which the sell limit price is equal to or less than the buy limit price for all j cases of A and B. A recording process for recording as a matching candidate is performed. The matching unit 22a executes this recording process for all combinations of A and B while changing A or B. Further, the matching unit 22a performs this recording process while changing the number of matching cases j from 1 to u. Then, the matching unit 22a selects the optimum matching from the matching candidates.
  • FIG. 14 is a diagram showing a contract example by the second matching method.
  • j 11.
  • Three buy orders for yen, one sell order for 101 yen, and one buy order for 102 yen are one matching candidate.
  • FIG. 15 is a flowchart showing a processing flow by the second matching method.
  • the matching unit 22a sets j to 1 (step S41) and creates a list A of j sell orders and a list B of j buy orders (step S42). Then, the matching unit 22a randomly selects one case of A and one case of B (step S43), and determines whether the sell limit price is equal to or less than the buy limit price (step S44). The matching unit 22a deletes the selected item from A and B.
  • the matching unit 22a proceeds to step S47, and if the sell limit price is less than or equal to the buy limit price, determines whether or not the determination has been made for all j cases (Ste S45). Then, the matching unit 22a returns to step S43 when there is a sell order and a buy order that have not been subjected to the determination, and randomly selects when the determination is performed for all j cases. The j combinations that have been performed are recorded as matching candidates (step S46).
  • the matching unit 22a determines whether or not all the combinations of A and B have been selected (step S47), and if some of the combinations of A and B are not selected, A or B is changed. (Step S48), the process returns to step S43.
  • the matching unit 22a adds 1 to j (step S49) and determines whether j is u or less (step S50). Then, the matching unit 22a returns to step S42 when j is u or less, and selects one optimal match from the matching candidates when j is not u or less (step S51).
  • the matching unit 22a can identify matching candidates by performing matching by random selection.
  • the matching unit 22a performs matching by the branch and bound method. Specifically, the matching unit 22a performs a depth-first search in matching a sell order and a buy order, and if it is determined that an optimum match cannot be obtained even if a deeper search is performed at a certain search point, a deeper search is performed. Do not do.
  • FIG. 16 is a diagram for explaining a third matching method.
  • the matching unit 22a has four sell orders of 102 yen, four buy orders of 104 yen, one sell order of 101 yen, one buy order of 102 yen, and two orders of 100 yen.
  • the search is performed in the order of the sell order and the two buy orders of 101 yen.
  • the matching unit 22a next searches for four sell orders of 98 yen and four buy orders of 100 yen, it determines that the optimum matching cannot be obtained even if a deeper search is performed.
  • Delete 4 sell orders for 98 yen and 4 buy orders for 100 yen it determines that the optimum matching cannot be obtained even if a deeper search is performed.
  • Delete 4 sell orders for 98 yen and 4 buy orders for 100 yen is performed from five sell orders of 99 yen and five buy orders of 100 yen.
  • FIG. 17 is a flowchart showing a processing flow by the third matching method.
  • the matching unit 22a determines whether or not there is a sell order s and a buy order b that have not been matched (step S63), and they exist. In that case, (s, b) is added to S (step S64), and the process returns to step S62. On the other hand, when there is no sell order s and buy order b that have not been matched yet, the matching unit 22a determines S as matching (step S65).
  • step S62 If it is determined in step S62 that there is no possibility of finding the optimum solution, the matching unit 22a deletes the beginning of S (step S66) and returns to step S62.
  • the matching unit 22a can improve the search efficiency by pruning.
  • the matching unit 22a matches a sell order and a buy order using a genetic algorithm. Specifically, the matching unit 22a determines a mating rule for two matching plans, mates the two matching plans according to the mating rule, and creates a next-generation matching plan. The matching unit 22a creates a better matching plan by repeating the creation of the next-generation matching plan. The matching unit 22a creates, for example, a matching plan for thousands of generations.
  • FIG. 18 is a diagram showing an example of a mating rule.
  • the matching unit 22a creates a next-generation matching plan by combining the two matching plans.
  • the matching unit 22a adjusts. For example, in FIG. 18, by mating, matching of 4 sell orders of 102 yen and 4 buy orders of 104 yen, and matching of 3 sell orders of 103 yen and 3 buy orders of 104 yen are performed. Share. In such a case, the matching unit 22a makes adjustments such as reducing the number of orders for each matching so that the matching does not occur.
  • FIG. 19 is a flowchart showing a processing flow by the fourth matching method.
  • the matching unit 22a generates the first generation (step S71). For example, the matching unit 22a generates a certain number of matchings by one sell and one buy to make it the first generation.
  • the matching unit 22a randomly selects and mates the two individuals of the previous generation to generate the next generation (step S72). Then, the matching unit 22a examines the matching and leaves a better one (step S73). Then, the matching unit 22a determines whether or not the predetermined generation has been reached (step S74). If the predetermined generation has not been reached, the process returns to step S72. To do.
  • FIG. 20A is a diagram for explaining the maximum flow problem of network flow.
  • the maximum flow problem is that in order to flow as much water as possible from the apex s (source) to the apex t (sink) along the sides of the graph, how much water should be flowed on which side. It's a matter of asking what to do.
  • the maximum capacity for flowing water is set on each side.
  • FIG. 20A (b) shows the solution, and the fraction of each side is the volume in the denominator and the flow rate in the numerator. In FIG. 20A (b), a maximum of 10 water flows from s to t.
  • FIG. 20B is a diagram for explaining the formulation of the board as a network flow.
  • the matching unit 22a creates vertices corresponding to s (source), t (sink), sell limit price, and buy limit price.
  • the capacity between the selling apex and the buying apex is ⁇ (no restriction)
  • the capacity of the side from s to the selling apex is the number of selling orders of the selling limit of the selling apex, and from the buying apex.
  • the capacity of the side to t is the number of buy orders at the buy limit of the buy peak.
  • the capacity of the side from s to the selling apex of 98 yen is 5
  • the capacity of the side from s to the selling apex is 0,
  • the capacity of the side from s to the selling apex is 0.
  • the capacity of the side from s to the selling peak of 101 yen is 2, and the capacity of the side from s to the selling peak of 102 yen is 1.
  • the capacity of the side from the buying apex of 98 yen to t is 1
  • the capacity of the side from the buying apex of 99 yen to t is 4
  • the capacity of the side from the buying apex of 100 yen to t is 100. It is 10.
  • the capacity of the side from the buying apex of 101 yen to t is 2, and the capacity of the side from the buying apex of 102 yen to t is 3.
  • FIG. 20C is a diagram showing the maximum flow of the network flow shown in FIG. 20B.
  • the flow rate on each side indicates the number of matching, and the total number of matching is 11.
  • 1 case of selling 98 yen and 1 case of buying 98 yen 4 cases of selling 98 yen and 4 cases of buying 99 yen, 3 cases of selling 100 yen and 3 cases of buying 100 yen, 2 cases of selling 101 yen Matching is performed for a total of 11 cases including two cases of buying 101 yen and one case of selling 102 yen and one case of buying 102 yen.
  • the matching unit 22a uses an algorithm such as Hopcroft-Karp, Dinic, Edmonds-Karp as an algorithm for solving the maximum flow problem. Assuming that the number of vertices is V and the number of sides is E, the computational complexity of Hopcroft-Karp is O (E ⁇ V), the computational complexity of Dinic is O (V 2 E), and the computational complexity of Edmonds-Karp is O. (VE 2 ).
  • FIG. 21 is a flow chart showing the flow of processing by the fifth matching method.
  • the matching unit 22a creates a network flow based on the sell order and the buy order (step S81). Then, the matching unit 22a generates the maximum flow (step S82) and extracts the matching from the flow rate of the maximum flow (step S83).
  • the matching unit 22a can identify the matching with the maximum matching number by formulating the board as a network flow.
  • the matching unit 22a performs matching based on the information of all sell orders and buy orders at regular time intervals without distinguishing between new orders and existing orders. To do. Therefore, for a brand with a small number of orders, the matching process can be performed at high speed without sending a search request to the order management device 12a during the matching process.
  • the transaction system 1a may perform a transaction at Itayose.
  • contracting devices 13 and 13a have been described in the first and second embodiments, by realizing the configuration of the contracting devices 13 and 13a by software, a contracting program having the same function can be obtained. Therefore, a computer that executes the contract program will be described.
  • FIG. 22 is a diagram illustrating a hardware configuration of a computer that executes the contract program according to the first and second embodiments.
  • the computer 50 has a main memory 51, a CPU (Central Processing Unit) 52, a LAN (Local Area Network) interface 53, and an HDD (Hard Disk Drive) 54. Further, the computer 50 has a super IO (Input Output) 55, a DVI (Digital Visual Interface) 56, and an ODD (Optical Disk Drive) 57.
  • IO Input Output
  • DVI Digital Visual Interface
  • ODD Optical Disk Drive
  • the main memory 51 is a memory for storing a program, a result during execution of the program, and the like.
  • the CPU 52 is a central processing unit that reads a program from the main memory 51 and executes the program.
  • the CPU 52 includes a chip set having a memory controller.
  • the LAN interface 53 is an interface for connecting the computer 50 to another computer via a LAN.
  • the HDD 54 is a disk device that stores programs and data
  • the Super IO 55 is an interface for connecting an input device such as a mouse and a keyboard.
  • the DVI 56 is an interface for connecting a liquid crystal display device
  • the ODD 57 is a device for reading and writing DVDs.
  • the LAN interface 53 is connected to the CPU 52 by PCI Express (PCIe), and the HDD 54 and ODD 57 are connected to the CPU 52 by SATA (Serial Advanced Technology Attachment).
  • the super IO 55 is connected to the CPU 52 by LPC (Low Pin Count).
  • the contract program executed by the computer 50 is stored in a DVD, which is an example of a recording medium readable by the computer 50, read from the DVD by the ODD 57, and installed in the computer 50.
  • the contract program is stored in a database or the like of another computer system connected via the LAN interface 53, read from these databases, and installed in the computer 50.
  • the installed contract program is stored in the HDD 54, read out to the main memory 51, and executed by the CPU 52.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

約定装置(13)の取得部(21)が、注文管理装置(12)から銘柄ごとに、売り注文と買い注文の情報を取得する。そして、マッチング部(22)が、売り注文と買い注文のマッチングを行う。このとき、マッチング部(22)は、現在値にとらわれず、指値又は指値より投資家にとって有利な価格であればマッチングを行う。そして、約定価格決定部(31)が、マッチング部(22)によるマッチングに基づいて、マッチングごとに約定価格を決定する。

Description

取引プログラム、取引方法及び取引装置
 本発明は、取引プログラム、取引方法及び取引装置に関する。
 株などの取引においては、板寄せとザラ場がある。板寄せとは、注文を受け付けてから売買開始までの注文をまとめ、売買を成立させて始値を決定する取引である。ザラ場とは、すでに発注されている注文と新たに発注された注文、あるいは、新たに発注された注文同士で売買を成立させる取引である。
 取引には、売り注文の売り指値及び売り注文数と買い注文の買い指値及び買い注文数を示す板情報が用いられる。図23は、株取引における板情報の一例を示す図である。図23において、中列は指値の価格、左列は価格に対応する売り注文の枚数、右列は価格に対応する買い注文の枚数を示す。ここで、1枚は単位株数である。例えば、102円を売り指値とする売り注文の枚数は4であり、102円を買い指値とする買い注文の枚数は3である。
 株取引では、約定装置は、売り注文の安い順、買い注文の高い順に順番に売り注文と買い注文を約定させる。そして、約定装置は、売り注文と買い注文が同一価格となったところで約定をやめ、この時の価格を現在値とする。そして、約定した全ての取引は全て現在値で行われる。
 図24は、株取引を説明するための図である。図24に示すように、約定装置は、まず、98円の売り4件と104円の買い4件を約定させる。次に、約定装置は、99円の売り3件と102円の買い3件を約定させる。次に、約定装置は、99円の売り2件と101円の買い2件を約定させる。そして、約定装置は、100円の売り3件と100円の買い3件を約定させ、約定を終了する。この場合、約定装置は、合計で12件を100円で約定させ、現在値を100円とする。
 なお、従来技術として、複数の商品又は役務それぞれについて、提供を希望する提供者と購買を希望する需要者との間での取引を支援する取引支援設備がある。この取引支援設備は、マッチング手段と処理手段を備える。マッチング手段は、各商品又は役務について提供者の提示した提供価格と需要者の提示した購買価格とが一致しない場合でも、それら価格を提示した提供者と需要者とをマッチングさせる。処理手段は、マッチングされた需要者と提供者との間でそれらの提示した価格を満たす価格での取引を成立させるための処理を行う。
 また、従来技術として、円滑な運営を可能としかつ参加者の要望に柔軟に対応できる効果的な電子市場を実現できる中央市場システムがある。この中央市場システムは、市場クライアントシステムから、少なくとも売買の別を示すデータと価格を示すデータとを含む売買申込情報を受け付ける。そして、この中央市場システムは、受け付けた売買申込情報を格納し、格納した購買に係るデータと販売に係るデータとを照合して取り引きを成立させる処理を行い、少なくとも成約した売買申込情報に係る市場クライアントシステムに成約に関する情報を通知する。
再公表WO2001/075721号公報 特開平10-320494号公報
 図24に示した取引には、現在値より高い売り注文と、現在値より安い買い注文と、現在値の売り注文又は現在値の買い注文のいずれかとが決済されずに保留になるため、保留分は板に残ってしまい、約定数が少ないという問題がある。
 本発明は、1つの側面では、取引における約定数を増やすことを目的とする。
 1つの態様では、取引プログラムは、コンピュータに、売り指値ごとの売り注文数と買い指値ごとの買い注文数を取得する処理を実行させる。そして、取引プログラムは、コンピュータに、取得した売り指値ごとの売り注文数と買い指値ごとの買い注文数に基づいて、売り注文と買い注文の組のうち該売り注文の売り指値が該買い注文の買い指値以下である組を約定させる処理を実行させる。そして、取引プログラムは、コンピュータに、約定ごとに約定価格を決定する処理を実行させる。
 本発明は、1つの側面では、取引における約定数を増やすことができる。
図1は、実施例1に係る約定装置による板寄せの例を示す図である。 図2は、図1に示した約定の約定価格の設定例を示す図である。 図3は、図1に示した約定の次の株価の設定例を示す図である。 図4は、マッチングの寄せ方を示す図である。 図5は、実施例1に係る約定装置によるマッチングアルゴリズムを説明するための図である。 図6は、実施例1に係る取引システムの構成を示す図である。 図7は、平衡二分木の一例を示す図である。 図8は、注文管理装置が平衡二分木を用いて注文を管理する例を示す図である。 図9は、約定装置による処理のフローを示すフローチャートである。 図10は、マッチング部による処理のフローを示すフローチャートである。 図11は、実施例2に係る取引システムの構成を示す図である。 図12は、第1のマッチング方法によるマッチング例を示す図である。 図13は、第1のマッチング方法による処理のフローを示すフローチャートである。 図14は、第2のマッチング方法による約定例を示す図である。 図15は、第2のマッチング方法による処理のフローを示すフローチャートである。 図16は、第3のマッチング方法を説明するための図である。 図17は、第3のマッチング方法による処理のフローを示すフローチャートである。 図18は、交配ルールの一例を示す図である。 図19は、第4のマッチング方法による処理のフローを示すフローチャートである。 図20Aは、ネットワークフローの最大フロー問題を説明するための図である。 図20Bは、板のネットワークフローとしての定式化を説明するための図である。 図20Cは、図14Bに示したネットワークフローの最大フローを示す図である。 図21は、第5のマッチング方法による処理のフローを示すフローチャートである。 図22は、実施例1及び実施例2に係る約定プログラムを実行するコンピュータのハードウェア構成を示す図である。 図23は、株取引における板情報の一例を示す図である。 図24は、株取引の板寄せを説明するための図である。
 以下に、本願の開示する取引プログラム、取引方法及び取引装置の実施例を図面に基づいて詳細に説明する。なお、実施例は開示の技術を限定するものではない。
 図1は、実施例1に係る約定装置による取引の例を示す図である。図1に示すように、実施例1に係る約定装置は、98円売りの4件と98円買いの4件、99円売りの5件と100円買いの5件、100円売りの3件と102円買いの3件、103円売りの3件と104円買いの3件の合計15件を約定させる。図24に示した場合と比較して、実施例1に係る約定装置による取引方式では、約定数が3件増える。
 このように、実施例1に係る約定装置による取引では、どの売り注文とどの買い注文を約定させるかに自由度ができるため、約定数の最大化や約定値段差の最小化などの約定方式の選択が可能になる。また、実施例1に係る約定装置による取引では、約定価格は売り指値以上買い指値以下の任意の値が設定可能である。例えば、売り指値をs円、買い指値をb(s≦b)円、現在値をp円とすると、実施例1に係る約定装置は、区間[s,b]にpが含まれるなら約定価格もp円とし、区間[s,b]にpが含まれないなら約定価格をp円に最も近い値とする。すなわち、実施例1に係る約定装置は、p<sであれば約定価格をs円、b<pであれば約定価格をb円とする。
 図2は、図1に示した約定の約定価格の設定例を示す図である。図2に示すように、98円売りの4件と98円買いの4件の約定価格は、s=98、b=98<p=100であるので、98円であり、99円売りの5件と100円買いの5件の約定価格は、s=99、b=100=pであるので、100円である。また、100円売りの3件と102円買いの3件の約定価格は、s=100=p、b=102であるので、100円であり、103円売りの3件と104円買いの3件の約定価格は、p<s=103、b=104であるので、103円である。
 また、実施例1に係る約定装置は、全ての約定価格の平均値を次の株価とする。図3は、図1に示した約定の次の株価の設定例を示す図である。図3に示すように、次の株価は、(98×4+100×5+100×3+103×3)/15≒100.07円である。
 次に、ザラ場における売り注文と買い注文のマッチングについて説明する。実施例1に係る約定装置は、現在値をp円とすると、p円より高い新規の売り注文及びp円以下の新規の買い注文は既存の注文にマージし、既存注文として扱う。
 そして、実施例1に係る約定装置は、p円以下の新規の売り注文については、新規の売り注文は安い方へ寄せ、既存の買い注文は各売り注文額以上の最も安い方へ寄せてマッチングを行うことで、p円以下の新規の売り注文に関して最大約定数を特定する。また、実施例1に係る約定装置は、p円より高い新規の買い注文については、新規の買い注文は高い方へ寄せ、既存の売り注文は各買い注文額以下の最も高い方へ寄せてマッチングを行うことで、p円より高い新規の買い注文に関して最大約定数を特定する。
 図4は、マッチングの寄せ方を示す図である。図4において、網掛けのない楕円で囲まれた数字は既存の注文の指値を示し、網掛けのある楕円で囲まれた数字は新規の注文の指値を示す。また、現在値は100円である。図4(a)は、既存の注文と新規の注文の、あるマッチングを示し、図4(b)は、図4(a)のマッチングが寄せられたマッチングを示す。
 図4(a)に示すように、あるマッチングでは、97円の新規の売りと99円の既存の買いがマッチングされ、98円の新規の売りと100円の既存の買いがマッチングされ、102円の新規の買いと102円の既存の売りがマッチングされる。
 実施例1に係る約定装置は、これらの3件を、図4(b)に示すように、寄せてマッチングさせる。実施例1に係る約定装置は、100円以下の新規の売り注文と既存の買い注文とのマッチングについては、97円の新規の売りを安い方へ寄せた97円の売りと、99円の既存の買いを売り注文額以上の最も安い方へ寄せた97円の買いとをマッチングさせる。同様に、実施例1に係る約定装置は、98円の新規の売りを安い方へ寄せた98円の売りと、100円の既存の買いを売り注文額以上の最も安い方へ寄せた99円の買いとをマッチングさせる。
 また、実施例1に係る約定装置は、100円より高い新規の買い注文のマッチングについては、102円の新規の買いを高い方へ寄せた105円の買いと、102円の既存の売りを買い注文額以下の最も高い方へ寄せた104円の売りとをマッチングさせる。
 図5は、実施例1に係る約定装置によるマッチングアルゴリズムを説明するための図である。実施例1に係る約定装置は、図5(a)に示すように、p円以下の新規の売り注文については、図4に示した寄せを行って最大約定数を2と特定する。寄せを行うために、実施例1に係る約定装置は、97円の新規の売りについては、97円以上の最小の既存の買いを特定してマッチングさせ、98円の新規の売りについては、98円以上の最小の既存の買いを特定してマッチングさせる。
 このように、実施例1に係る約定装置は、p円以下の新規の売り注文については、新規の売り注文は安い方へ寄せ、既存の買い注文は各売り注文額以上の最も安い方へ寄せてマッチングを行う。したがって、実施例1に係る約定装置は、マッチングの探索空間を限定し、p円以下の新規の売り注文に関する最大約定数を高速に特定することができる。
 そして、実施例1に係る約定装置は、図5(b)に示すように、p円より高い新規の買い注文については、図4に示した寄せを行って最大約定数を2と特定する。なお、図4では、寄せを説明するために、105円の新規の買いと104円の既存の売りとのマッチングしか示されていないが、図5(b)では、最大約定数のマッチングが示されている。寄せを行うために、実施例1に係る約定装置は、105円の新規の買いについては、105円以下の最大の既存の売りを特定してマッチングさせ、102円の新規の買いについては、102円以下の最大の既存の売りを特定してマッチングさせる。
 このように、実施例1に係る約定装置は、p円より高い新規の買い注文については、新規の買い注文は高い方へ寄せ、既存の売り注文は各買い注文額以下の最も高い方へ寄せてマッチングを行う。したがって、実施例1に係る約定装置は、マッチングの探索空間を限定し、p円より高い新規の買い注文に関する最大約定数を高速に特定することができる。
 そして、実施例1に係る約定装置は、図5(c)に示すように、残った新規の売り注文と残った新規の買い注文をマッチングさせ、新規注文同士の最大約定数を1と特定する。
 そして、実施例1に係る約定装置は、図5(a)~図5(c)の最大約定数を合計することで、全体の最大約定数kを5と特定する。そして、実施例1に係る約定装置は、図5(d)に示すように、図5(a)~図5(c)で特定したマッチングを優先的な価格の注文を消化するマッチングに置き換える。ここで、優先的な価格とは、売り注文では安い価格を表し、買い注文では高い価格を表す。実施例1に係る約定装置は、売り注文を安い方から順にk個抽出し、買い注文を高い方から順にk個抽出し、交差がないように、売り注文と買い注文をマッチングさせることで、優先的な価格の注文を消化するマッチングを作成する。
 次に、実施例1に係る取引システムの構成について説明する。図6は、実施例1に係る取引システムの構成を示す図である。図6に示すように、実施例1に係る取引システム1は、受付装置11と、注文管理装置12と、約定装置13とを有する。受付装置11と注文管理装置12と約定装置13は内部ネットワーク2で接続される。
 受付装置11は、注文情報を受け付け、注文管理装置12に送信する。注文情報には、例えば、注文者を識別する注文者識別子、銘柄、売り買いの区別、指値、株数などが含まれる。受付装置11は、例えば、外部ネットワークを介して情報処理装置から送信される注文情報を受信する。情報処理装置は、例えば、投資家がマウスやキーボードを用いて入力した注文に基づいて注文情報を送信する。
 また、受付装置11は、注文管理装置12から約定結果を受信して情報処理装置へ送信する。約定結果には、例えば、注文者識別子、銘柄、売り買いの区別、約定価格、約定株数などが含まれる。受付装置11は、例えば、注文者識別子に対応付けられたIPアドレスを用いて、注文情報の送信元の情報処理装置に約定結果を送信する。
 注文管理装置12は、注文情報を例えば注文を識別する注文識別子を付加して管理する。注文管理装置12は、受付装置11により受け付けられた注文情報を全て記憶する。また、注文管理装置12は、銘柄ごとに、新規の注文の情報と現在値を約定装置13に送信する。また、注文管理装置12は、銘柄ごとに約定情報を約定装置13から受信し、注文情報を更新する。また、注文管理装置12は、約定情報に基づいて約定結果を作成し、受付装置11に送信する。約定情報には、1つ以上の約定について、例えば、売り指値、買い指値、約定価格、約定株数などが含まれる。
 また、注文管理装置12は、約定装置13からの指示に基づいて、現在値より高い新規売り注文及び現在値以下の新規の買い注文を既存の注文にマージする。
 また、注文管理装置12は、約定装置13からの注文の探索要求に応答する。約定装置13からの注文の探索要求には、所定の価格以上の買い注文の探索要求、所定の価格以下の売り注文の探索要求が含まれる。これらの探索要求への応答を速くするために、注文管理装置12は、平衡二分木を用いて注文を管理する。平衡二分木は、木の高さ(根からの階層の数)を自動的にできるだけ小さく維持しようとする二分木である。
 図7は、平衡二分木の一例を示す図である。図7に示すように、平衡二分木では、各ノードは値を有し、どのノードも左右2つの子孫ノードと接続する。また、現ノードの左の子孫のノードが有する値は現ノードが有する値より小さく、現ノードの右の子孫のノードが有する値は現ノードが有する値より大きい。NILは子孫がないことを示す。平衡二分木には、AVL-Tree、赤黒木、Treap、Splayなどがある。
 図8は、注文管理装置12が平衡二分木を用いて注文を管理する例を示す図である。図8では、売り注文について管理する場合を示すが、注文管理装置12は、買い注文についても同様に管理する。図8に示すように、注文管理装置12は、ノードを用いて注文価格と件数を管理する。各ノードについて、左の子孫のノードの価格は現ノードより小さく、右の子孫のノードの価格は現ノードより大きい。注文管理装置12は、木の高さの増大を防ぐためにデータの挿入時にバランス処理を行う。バランス処理は、AVL-Tree、赤黒木、Treap、Splayなどで異なる。
 例えば、97円以下の売り注文の探索要求を約定装置13から受けると、注文管理装置12は、平衡二分木を根から探索し、97円は101円より小さいので左の子ヘ進み、97円は95円より大きいので右の子に進む。そして、注文管理装置12は、97円は98円より小さいので左の子ヘ進み、96円のノードに到達する。そして、96円のノードより先はないので、注文管理装置12は、96円の売りを探索結果として応答する。
 すなわち、注文管理装置12は、所定の価格以下の売り注文の探索要求を受信すると、所定の価格以下で価格が最大の売り注文の情報を探索結果として応答する。また、注文管理装置12は、所定の価格以下の売り注文が見つからない場合には、売り注文が存在しないことを応答する。
 同様に、注文管理装置12は、所定の価格以上の買い注文の探索要求を受信すると、所定の価格以上で価格が最小の買い注文の情報を探索結果として応答する。また、注文管理装置12は、所定の価格以上の買い注文が見つからない場合には、買い注文が存在しないことを応答する。
 このように、注文管理装置12は、平衡二分木を用いて注文を管理することで、約定装置13からの注文の探索要求に高速に応答することができる。管理する注文の数をNとすると、注文管理装置12は、O(log(N))の計算量で探索を行うことができる。
 図6に戻って、約定装置13は、内部ネットワーク2を介して注文管理装置12から、銘柄ごとに、新規の注文の情報と現在値を受信し、売り注文と買い注文を約定させ、約定価格と次の株価を決定する。各売り注文の情報には、売り指値と売り注文数が含まれ、各買い注文の情報には、買い指値と買い注文数が含まれる。また、約定装置13は、内部ネットワーク2を介して、銘柄ごとに、約定情報を注文管理装置12に送信する。
 約定装置13は、取得部21と、マッチング部22と、価格決定部23と、出力部24とを有する。取得部21は、内部ネットワーク2を介して注文管理装置12から、銘柄ごとに、新規の注文の情報と現在値を受信する。
 マッチング部22は、銘柄ごとに売り注文と買い注文のマッチングを行う。マッチング部22は、現在値にとらわれず、指値又は指値より投資家にとって有利な価格であればマッチングを行う。
 マッチング部22は、マージ部41と、第1マッチング部42と、第2マッチング部43と、第3マッチング部44と、特定部45と、確定部46とを有する。
 マージ部41は、注文管理装置12に指示して、現在値より高い売り注文及び現在値以下の買い注文を既存注文にマージする。
 第1マッチング部42は、新規の売り注文の売り指値以上の既存の買い注文が存在するか否かを判定し、既存の買い注文が存在する場合には、新規の売り注文と既存の買い注文をマッチングさせる。第1マッチング部42は、新規の売り注文の売り指値以上の既存の買い注文の探索を注文管理装置12に依頼することで、新規の売り注文の売り指値以上の既存の買い注文が存在するか否かを判定する。第1マッチング部42は、新規の売り注文を、新規の売り注文の売り指値以上で買い指値が最小の既存の買い注文とマッチングさせる。
 第2マッチング部43は、新規の買い注文の買い指値以下の既存の売り注文が存在するか否かを判定し、既存の売り注文が存在する場合には、新規の買い注文と既存の売り注文をマッチングさせる。第2マッチング部43は、新規の買い注文の買い指値以下の既存の売り注文の探索を注文管理装置12に依頼することで、新規の買い注文の買い指値以上の既存の売り注文が存在するか否かを判定する。第2マッチング部43は、新規の買い注文を、新規の買い注文の買い指値以下で売り指値が最大の既存の売り注文とマッチングさせる。
 第3マッチング部44は、マージ部41、第1マッチング部42及び第2マッチング部43による処理後に残った新規の売り注文と新規の買い注文とをマッチングさせる。
 特定部45は、第1マッチング部42によるマッチング数、第2マッチング部43によるマッチング数、及び、第3マッチング部44によるマッチング数を合計して最大約定数を特定する。
 確定部46は、特定部45により特定された最大約定数に基づいて、優先的な価格の注文を消化するマッチングを特定して約定を確定する。
 価格決定部23は、マッチング部22によるマッチングに基づいて、マッチングごとの約定価格と銘柄ごとの次の株価を決定する。価格決定部23は、約定価格決定部31と次価格決定部32とを有する。
 約定価格決定部31は、売り指値をs円、買い指値をb(s≦b)円、現在値をp円とすると、区間[s,b]にpが含まれる場合には、約定価格もp円とする。一方、区間[s,b]にpが含まれない場合には、約定価格決定部31は、約定価格をp円に最も近い値、すなわち、p<sであれば約定価格をs円、b<pであれば約定価格をb円とする。
 次価格決定部32は、約定価格決定部31により決定された約定価格に基づいて、次の株価を決定する。例えば、次価格決定部32は、全ての約定価格の平均値を次の株価とする。
 出力部24は、銘柄ごとに約定情報を注文管理装置12に内部ネットワーク2を介して送信する。
 次に、約定装置13による処理のフローについて説明する。図9は、約定装置13による処理のフローを示すフローチャートである。なお、約定装置13は、銘柄ごとに図9に示す処理を行う。図9に示すように、約定装置13は、注文管理装置12から新規の売り注文及び新規の買い注文の情報と現在値を受信する(ステップS1)。
 そして、約定装置13は、売買のマッチングを決定する(ステップS2)。約定装置13は、現在値にとらわれず、指値又は指値より投資家にとって有利な価格であればマッチングを行う。そして、約定装置13は、マッチングごとに約定価格を決定し(ステップS3)、次の株価を決定する(ステップS4)。そして、約定装置13は、注文管理装置12に、約定情報を送信する(ステップS5)。
 このように、約定装置13は、現在値にとらわれず、指値又は指値より投資家にとって有利な価格であれば売買のマッチングを行い、マッチングごとに約定価格を決定するので、約定数を増やすことができる。
 次に、マッチング部22による処理のフローについて説明する。図10は、マッチング部22による処理のフローを示すフローチャートである。図10に示すように、マッチング部22は、取得部21から、新たに届いた売り注文及び買い注文の情報と現在値を取得し(ステップS11)、現在値より高い売り注文及び現在値以下の買い注文を既存注文にマージする(ステップS12)。そして、マッチング部22は、新たな売り注文を安い順にs1、s2、・・・、smとし、新たな買い注文を高い順にb1、b2、・・・、bnとする(ステップS13)。
 そして、マッチング部22は、iを1から増加させながら以下のステップS14とステップS15の処理を繰り返す。すなわち、マッチング部22は、si円以上でマッチしていない既存の買い注文bは存在するか否かを判定し(ステップS14)、si円以上でマッチしていない既存の買い注文bが存在する場合には、siとbをマッチングさせる(ステップS15)。
 マッチング部22は、si円以上でマッチしていない既存の買い注文bが存在する間は、iをmまで増加させてステップS14とステップS15の処理を繰り返す。繰り返し処理が完了した場合には、マッチング部22は、mを新たな売り注文についてのマッチング数として特定する。一方、si円以上でマッチしていない既存の買い注文bが存在しない場合には、マッチング部22は、繰り返しから抜け出し、i-1を新たな売り注文についてのマッチング数として特定する。
 そして、マッチング部22は、iを1から増加させながら以下のステップS16とステップS17の処理を繰り返す。すなわち、マッチング部22は、bi円以下でマッチしていない既存の売りい注文sは存在するか否かを判定し(ステップS16)、bi円以下でマッチしていない既存の売り注文sが存在する場合には、biとsをマッチングさせる(ステップS17)。
 マッチング部22は、bi円以下でマッチしていない既存の売り注文sが存在する間は、iをnまで増加させてステップS16とステップS17の処理を繰り返す。繰り返し処理が完了した場合には、マッチング部22は、nを新たな買い注文についてのマッチング数として特定する。一方、bi円以下でマッチしていない既存の売り注文sが存在しない場合には、マッチング部22は、繰り返しから抜け出し、i-1を新たな買い注文についてのマッチング数として特定する。
 そして、マッチング部22は、残った新規の売り注文と残った新規の買い注文をできる限りマッチングさせ(ステップS18)、マッチングさせた数を新規注文同士のマッチング数として特定する。そして、マッチング部22は、新たな売り注文についてのマッチング数と新たな買い注文についてのマッチング数と新規注文同士のマッチング数を加えて最大約定数を特定する(ステップS19)。そして、マッチング部22は、最大約定数に基づいて、優先的な価格の注文を消化するマッチングを特定して約定として確定する(ステップS20)。
 このように、マッチング部22は、新規の売り注文と既存の買い注文、新規の買い注文と既存の売り注文、及び、新規の売り注文と新規の買い注文をマッチングさせることで最大約定数を特定する。そして、マッチング部22は、最大約定数に基づいて、優先的な価格の注文を消化するマッチングを特定することで、約定を特定することができる。
 上述してきたように、実施例1では、マージ部41が、現在値より高い新規の売り注文及び現在値以下の新規の買い注文を既存注文にマージする。そして、第1マッチング部42が、現在値以下の新規の売り注文の売り指値以上の既存の買い注文が存在するか否かを判定し、既存の買い注文が存在する場合には、現在値以下の新規の売り注文と既存の買い注文をマッチングさせる。そして、第2マッチング部43が、現在値より高い新規の買い注文の買い指値以下の既存の売り注文が存在するか否かを判定し、既存の売り注文が存在する場合には、現在値より高い新規の買い注文と既存の売り注文をマッチングさせる。そして、第3マッチング部44が、残った新規の売り注文と残った新規の買い注文とをマッチングさせる。そして、特定部45が、現在値以下の新規の売り注文と既存の買い注文のマッチング数、現在値より高い新規の買い注文と既存の売り注文のマッチング数、及び、残りの新規の売り注文と残りの新規の買い注文のマッチング数を合計して最大約定数を特定する。そして、確定部46が、特定部45により特定された最大約定数に基づいて、優先的な価格の注文を消化するマッチングを特定して約定を確定する。したがって、約定装置13は、ザラ場における約定数を増やすことができる。
 また、実施例1では、マージ部41は、注文管理装置12に依頼して、現在値より高い新規の売り注文及び現在値以下の新規の買い注文を既存注文にマージする。また、第1マッチング部42は、新規の売り注文ごとに、新規の売り注文の売り指値以上の既存の買い注文の探索を注文管理装置12に依頼することで、現在値以下の新規の売り注文の売り指値以上の既存の買い注文が存在するか否かを判定する。また、第2マッチング部43は、新規の買い注文ごとに、新規の買い注文の買い指値以下の既存の売り注文の探索を注文管理装置12に依頼することで、現在値より高い新規の買い注文の買い指値以下の既存の売り注文が存在するか否かを判定する。したがって、約定装置13は、注文管理装置12が管理する注文情報に基づいて、売り注文と買い注文を正確にマッチングさせることができる。
 また、実施例1では、注文管理装置12は、平衡二分木を用いて注文の情報を管理するので、新規の売り注文の売り指値以上の既存の買い注文の探索、及び、新規の買い注文の買い指値以下の既存の売り注文の探索を高速に行うことができる。
 なお、実施例1では、取引システム1が受付装置11と注文管理装置12と約定装置13とを有する場合について説明したが、受付装置11と注文管理装置12と約定装置13の機能を1つにまとめて取引装置を構成してもよい。あるいは、受付装置11と注文管理装置12の機能を1つにまとめるなど、任意の2つの機能を1つにまとめて1つの装置としてもよい。
 また、実施例1では、株を取引する場合について説明したが、取引システム1は、他の有価証券や品物を取引してもよい。
 なお、上記実施例1では、新規に届いた注文を随時処理する場合について説明したが、取引システムは、例えば0.1ミリ秒など一定の時間ごとに全注文を処理してもよい。そこで、実施例2では、一定の時間ごとに全注文を処理する取引システムについて説明する。
 図11は、実施例2に係る取引システムの構成を示す図である。なお、ここでは説明の便宜上、図6に示した各部と同様の役割を果たす機能部については同一符号を付すこととしてその詳細な説明を省略する。図11に示すように、実施例2に係る取引システム1aは、図6に示した取引システム1と比較して、注文管理装置12の代わりに注文管理装置12aを有し、約定装置13の代わりに約定装置13aを有する。
 注文管理装置12aは、注文管理装置12と同様の機能を有するが、新規の注文の情報と現在値を約定装置13aに送信する代わりに、一定の時間ごとに、売り指値と売り注文数、買い指値と買い注文数を銘柄ごとに約定装置13aに送信する。注文管理装置12aは、新規注文と既存注文の区別なく、注文情報を約定装置13aに送信する。また、注文管理装置12aは、所定の価格以上の買い注文の探索、所定の価格以下の売り注文の探索を約定装置13aから要求されることはない。このために、注文管理装置12aは、注文の管理に平衡二分木を用いることはない。
 約定装置13aは、図6に示した約定装置13と比較して、取得部21の代わりに取得部21aを有し、マッチング部22の代わりにマッチング部22aを有する。
 取得部21aは、一定の時間ごとに、新規注文と既存注文の区別なく、売り指値と売り注文数、買い指値と買い注文数を銘柄ごとに注文管理装置12aから受信する。
 マッチング部22aは、マッチング部22と同様に、現在値にとらわれず、指値又は指値より投資家にとって有利な価格であればマッチングを行う。マッチング部22aは、売り注文と買い注文をマッチングさせるが、新規注文と既存注文の区別なく、マッチングさせる。
 マッチング部22aは、以下の5つのマッチング方法のうちのいずれかのマッチング方法を用いて売り注文と買い注文のマッチングを行う。第1のマッチング方法では、マッチング部22aは、全探索によるマッチングを行う。
 具体的には、マッチング部22aは、売り注文j件のリストAと買い注文j件のリストBを作成する。そして、マッチング部22aは、Aのj件とBのj件の組み合わせを1つ選択し、j件全てについて売り指値が買い指値以下である組み合わせをマッチング候補として記録する記録処理を行う。マッチング部22aは、この記録処理を、Aのj件とBのj件の組み合わせを変えながら全組み合わせについて実行する。さらに、マッチング部22aは、この記録処理を、A又はBを変更しながら、AとBの全組み合わせてについて実行する。さらに、マッチング部22aは、この記録処理を、マッチング件数jを1からuまで変化させながら行う。ここで、uは、売り注文数と買い注文数の小さい方である。
 そして、マッチング部22aは、マッチング候補の中から最適なマッチングを選択する。ここで、最適なマッチングとは、例えば、売り指値の平均が最も安い、買い指値の平均が最も高い、マッチング数が最大である、同一証券会社間のマッチングが少ないなどがある。
 図12は、第1のマッチング方法によるマッチング例を示す図である。図12では、j=12である。図12では、98円の4件の売り注文と98円の4件の買い注文、99円の5件の売り注文と100円の5件の買い注文、100円の2件の売り注文と101円の2件の買い注文、101円の1件の売り注文と102円の1件の買い注文が1つのマッチング候補である。
 図13は、第1のマッチング方法による処理のフローを示すフローチャートである。図13に示すように、マッチング部22aは、jを1とし(ステップS21)、売り注文j件のリストAと買い注文j件のリストBを作成する(ステップS22)。そして、マッチング部22aは、Aのj件とBのj件の組み合わせを1つ選択し(ステップS23)、j件全てについて売り指値が買い指値以下であるか否かを判定する(ステップS24)。そして、マッチング部22aは、j件全てについて売り指値が買い指値以下である場合には、選択した組み合わせをマッチング候補として記録する(ステップS25)。
 そして、マッチング部22aは、Aのj件とBのj件の全組み合わせを選択したか否かを判定し(ステップS26)、選択していない組み合わせがある場合には、ステップS23へ戻る。一方、全組み合わせを選択した場合には、マッチング部22aは、AとBの全組み合わせを選択したか否かを判定し(ステップS27)、AとBの組み合わせで選択していないものがある場合には、A又はBを変更し(ステップS28)、ステップS23へ戻る。
 一方、AとBの全組み合わせを選択した場合には、マッチング部22aは、jに1を加え(ステップS29)、jがu以下であるか否かを判定する(ステップS30)。そして、マッチング部22aは、jがu以下である場合には、ステップS22へ戻り、jがu以下でない場合には、マッチング候補から最適なマッチングを1つ選択する(ステップS31)。
 このように、マッチング部22aは、全探索によるマッチングを行うことで、マッチング候補を特定することができる。
 第2のマッチング方法では、マッチング部22aは、ランダムな選択によるマッチングを行うことで売り注文と買い注文を約定させる。具体的には、マッチング部22aは、売り注文j件のリストAと買い注文j件のリストBを作成する。そして、マッチング部22aは、AとBからランダムに1件ずつ選択して売り指値が買い指値以下であるかを判定し、AとBのj件全てについて売り指値が買い指値以下である組み合わせをマッチング候補として記録する記録処理を行う。マッチング部22aは、この記録処理を、A又はBを変更しながら、AとBの全組み合わせてについて実行する。さらに、マッチング部22aは、この記録処理を、マッチング件数jを1からuまで変化させながら行う。そして、マッチング部22aは、マッチング候補の中から最適なマッチングを選択する。
 図14は、第2のマッチング方法による約定例を示す図である。図8では、j=11である。図14では、98円の2件の売り注文と101円の2件の買い注文、99円の5件の売り注文と100円の5件の買い注文、100円の3件の売り注文と104円の3件の買い注文、101円の1件の売り注文と102円の1件の買い注文が1つのマッチング候補である。
 図15は、第2のマッチング方法による処理のフローを示すフローチャートである。図15に示すように、マッチング部22aは、jを1とし(ステップS41)、売り注文j件のリストAと買い注文j件のリストBを作成する(ステップS42)。そして、マッチング部22aは、Aの1件とBの1件をランダムに選択し(ステップS43)、売り指値が買い指値以下であるか否かを判定する(ステップS44)。なお、マッチング部22aは、選択した1件をA、Bから削除する。
 そして、マッチング部22aは、売り指値が買い指値以下でない場合には、ステップS47へ進み、売り指値が買い指値以下である場合には、j件全てについて当該判定を行ったか否かを判定する(ステップS45)。そして、マッチング部22aは、当該判定を行っていない売り注文及び買い注文がA及びBそれぞれにある場合には、ステップS43に戻り、j件全てについて当該判定を行った場合には、ランダムに選択したj件の組み合わせをマッチング候補として記録する(ステップS46)。
 そして、マッチング部22aは、AとBの全組み合わせを選択したか否かを判定し(ステップS47)、AとBの組み合わせで選択していないものがある場合には、A又はBを変更し(ステップS48)、ステップS43へ戻る。
 一方、AとBの全組み合わせを選択した場合には、マッチング部22aは、jに1を加え(ステップS49)、jがu以下であるか否かを判定する(ステップS50)。そして、マッチング部22aは、jがu以下である場合には、ステップS42へ戻り、jがu以下でない場合には、マッチング候補から最適なマッチングを1つ選択する(ステップS51)。
 このように、マッチング部22aは、ランダムな選択によるマッチングを行うことで、マッチング候補を特定することができる。
 第3のマッチング方法では、マッチング部22aは、分岐限定法によるマッチングを行う。具体的には、マッチング部22aは、売り注文と買い注文のマッチングにおいて深さ優先探索を行い、ある探索点でより深い探索を行っても最適なマッチングは得られないと判定すると、より深い探索を行わない。
 図16は、第3のマッチング方法を説明するための図である。図16では、マッチング部22aは、102円の4件の売り注文と104円の4件の買い注文、101円の1件の売り注文と102円の1件の買い注文、100円の2件の売り注文と101円の2件の買い注文の順に探索を行う。そして、マッチング部22aは、次に98円の4件の売り注文と100円の4件の買い注文を探索した際に、これ以上深い探索を行っても最適なマッチングは得られないと判定し、98円の4件の売り注文と100円の4件の買い注文を削除する。そして、99円の5件の売り注文と100円の5件の買い注文から次の探索を行う。
 図17は、第3のマッチング方法による処理のフローを示すフローチャートである。図17に示すように、マッチング部22aは、空のスタックS={}を作成し(ステップS61)、Sの内容を精査して最適解が見つかる可能性があるか否かを判定する(ステップS62)。
 そして、最適解が見つかる可能性があると判定した場合には、マッチング部22aは、まだマッチングしていない売り注文sと買い注文bが存在するか否かを判定し(ステップS63)、存在する場合には、Sに(s,b)を追加し(ステップS64)、ステップS62へ戻る。一方、まだマッチングしていない売り注文sと買い注文bが存在しない場合には、マッチング部22aは、Sをマッチングと決定する(ステップS65)。
 また、ステップS62において最適解が見つかる可能性はないと判定した場合には、マッチング部22aは、Sの先頭を削除し(ステップS66)、ステップS62へ戻る。
 このように、マッチング部22aは、枝刈りをすることで探索効率を向上することができる。
 第4のマッチング方法では、マッチング部22aは、遺伝的アルゴリズムを用いて売り注文と買い注文のマッチングを行う。具体的には、マッチング部22aは、2つのマッチング案の交配ルールを決めておき、交配ルールによって2つのマッチング案を交配させ、次世代のマッチング案を作る。マッチング部22aは、次世代のマッチング案の作成を繰り返すことで、よりよいマッチング案を作成する。マッチング部22aは、例えば、数千世代のマッチング案を作成する。
 図18は、交配ルールの一例を示す図である。図18に示すように、マッチング部22aは、2つのマッチング案をまとめることで次世代のマッチング案を作る。ただし、2つのマッチング案をまとめることでマッチングがかち合う場合には、マッチング部22aは、調整する。例えば、図18では、交配により、102円の4件の売り注文と104円の4件の買い注文のマッチングと、103円の3件の売り注文と104円の3件の買い注文のマッチングがかち合う。このような場合、マッチング部22aは、例えば、かち合わないように各マッチングの注文件数を減らすなどの調整を行う。
 図19は、第4のマッチング方法による処理のフローを示すフローチャートである。図19に示すように、マッチング部22aは、第一世代を生成する(ステップS71)。マッチング部22aは、例えば、売り1件と買い1件によるマッチングを一定の数生成して第一世代とする。
 そして、マッチング部22aは、前世代の2個体をランダムに選んで交配させて次の世代を生成する(ステップS72)。そして、マッチング部22aは、マッチングを吟味し、より優れたものを残す(ステップS73)。そして、マッチング部22aは、所定の世代に到達したか否かを判定し(ステップS74)、到達していない場合には、ステップS72に戻り、到達した場合には、所定の世代をマッチング結果とする。
 第5のマッチング方法では、マッチング部22aは、板をネットワークフローとして定式化することで、マッチング数を最大化するマッチングを行う。図20Aは、ネットワークフローの最大フロー問題を説明するための図である。図20Aに示すように、最大フロー問題とは、グラフの辺に沿って頂点s(ソース)から頂点t(シンク)までできるだけ多く水を流すには、どの辺にどのくらいの量を流すようにすればよいかを求める問題である。ただし、図20A(a)に示すように、各辺には水を流せる最大容量が設定されている。図20A(b)は、解を示し、各辺の分数は、分母が容量で分子が流量である。図20A(b)では、sからtまで最大10の水が流れる。
 図20Bは、板のネットワークフローとしての定式化を説明するための図である。図20Bに示すように、マッチング部22aは、s(ソース)、t(シンク)、売り指値、買い指値に応じた頂点を作成する。そして、マッチング部22aは、売り頂点と買い頂点との間の容量は∞(制約なし)とし、sから売り頂点への辺の容量は、売り頂点の売り指値の売り注文数とし、買い頂点からtへの辺の容量は、買い頂点の買い指値の買い注文数とする。
 図20Bでは、sから98円の売り頂点への辺の容量は5でり、sから99円の売り頂点への辺の容量は0であり、sから100円の売り頂点への辺の容量は3である。また、sから101円の売り頂点への辺の容量は2であり、sから102円の売り頂点への辺の容量は1である。
 同様に、98円の買い頂点からtへの辺の容量は1であり、99円の買い頂点からtへの辺の容量は4であり、100円の買い頂点からtへの辺の容量は10である。また、101円の買い頂点からtへの辺の容量は2であり、102円の買い頂点からtへの辺の容量は3である。
 図20Cは、図20Bに示したネットワークフローの最大フローを示す図である。図20Cでは、各辺の流量がマッチング数を示し、マッチング数の合計は11である。例えば、98円売りの1件と98円買いの1件、98円売りの4件と99円買いの4件、100円売りの3件と100円買いの3件、101円売りの2件と101円買いの2件、102円売りの1件と102円買いの1件の合計11件のマッチングが行われる。
 マッチング部22aは、最大フロー問題を解くアルゴリズムとして、Hopcroft-Karp、Dinic、Edmonds-Karpなどのアルゴリズムを用いる。頂点数をV、辺数をEとすると、Hopcroft-Karpの計算量はO(E√V)であり、Dinicの計算量はO(V2E)であり、Edmonds-Karpの計算量はO(VE2)である。
 図21は、第5のマッチング方法による処理のフローを示すフローチャートである。図21に示すように、マッチング部22aは、売り注文と買い注文をもとにネットワークフローを作成する(ステップS81)。そして、マッチング部22aは、最大フローを生成し(ステップS82)、最大フローの流量からマッチングを抽出する(ステップS83)。
 このように、マッチング部22aは、板をネットワークフローとしての定式化することで、マッチング数が最大のマッチングを特定することができる。
 上述してきたように、実施例2では、マッチング部22aは、新規の注文と既存の注文とを区別することなく、一定の時間ごとに、全ての売り注文及び買い注文の情報に基づいてマッチングを行う。したがって、注文数が少ない銘柄については、マッチング処理中に注文管理装置12aに探索要求を送ることなく、高速にマッチング処理を行うことができる。
 なお、実施例2では、ザラ場において取引を行う場合について説明したが、取引システム1aは、板寄せにおいて取引を行ってもよい。
 また、実施例1及び2では、約定装置13及び13aについて説明したが、約定装置13及び13aが有する構成をソフトウェアによって実現することで、同様の機能を有する約定プログラムを得ることができる。そこで、約定プログラムを実行するコンピュータについて説明する。
 図22は、実施例1及び2に係る約定プログラムを実行するコンピュータのハードウェア構成を示す図である。図22に示すように、コンピュータ50は、メインメモリ51と、CPU(Central Processing Unit)52と、LAN(Local Area Network)インタフェース53と、HDD(Hard Disk Drive)54とを有する。また、コンピュータ50は、スーパーIO(Input Output)55と、DVI(Digital Visual Interface)56と、ODD(Optical Disk Drive)57とを有する。
 メインメモリ51は、プログラムやプログラムの実行途中結果等を記憶するメモリである。CPU52は、メインメモリ51からプログラムを読み出して実行する中央処理装置である。CPU52は、メモリコントローラを有するチップセットを含む。
 LANインタフェース53は、コンピュータ50をLAN経由で他のコンピュータに接続するためのインタフェースである。HDD54は、プログラムやデータを格納するディスク装置であり、スーパーIO55は、マウスやキーボード等の入力装置を接続するためのインタフェースである。DVI56は、液晶表示装置を接続するインタフェースであり、ODD57は、DVDの読み書きを行う装置である。
 LANインタフェース53は、PCIエクスプレス(PCIe)によりCPU52に接続され、HDD54及びODD57は、SATA(Serial Advanced Technology Attachment)によりCPU52に接続される。スーパーIO55は、LPC(Low Pin Count)によりCPU52に接続される。
 そして、コンピュータ50において実行される約定プログラムは、コンピュータ50により読み出し可能な記録媒体の一例であるDVDに記憶され、ODD57によってDVDから読み出されてコンピュータ50にインストールされる。あるいは、約定プログラムは、LANインタフェース53を介して接続された他のコンピュータシステムのデータベース等に記憶され、これらのデータベースから読み出されてコンピュータ50にインストールされる。そして、インストールされた約定プログラムは、HDD54に記憶され、メインメモリ51に読み出されてCPU52によって実行される。
  1,1a  取引システム
  2  内部ネットワーク
 11  受付装置
 12,12a  注文管理装置
 13,13a  約定装置
 21,21a  取得部
 22,22a  マッチング部
 23  価格決定部
 24  出力部
 31  約定価格決定部
 32  次価格決定部
 41  マージ部
 42  第1マッチング部
 43  第2マッチング部
 44  第3マッチング部
 45  特定部
 46  確定部
 50  コンピュータ
 51  メインメモリ
 52  CPU
 53  LANインタフェース
 54  HDD
 55  スーパーIO
 56  DVI
 57  ODD

Claims (10)

  1.  コンピュータに、
     売り指値ごとの売り注文数と買い指値ごとの買い注文数を取得し、
     取得した売り指値ごとの売り注文数と買い指値ごとの買い注文数に基づいて、売り注文と買い注文の組のうち該売り注文の売り指値が該買い注文の買い指値以下である組を約定させ、
     約定ごとに約定価格を決定する
     処理を実行させることを特徴とする取引プログラム。
  2.  前記取得する処理は、
     新規の注文について、売り指値ごとの売り注文数と買い指値ごとの買い注文数を取得し、
     前記約定させる処理は、
     現在値より高い新規の売り注文及び現在値以下の新規の買い注文を既存注文にマージし、
     現在値以下の新規の売り注文の売り指値以上の既存の買い注文が存在するか否かを判定し、既存の買い注文が存在する場合には、該現在値以下の新規の売り注文と該既存の買い注文をマッチングさせ、
     現在値より高い新規の買い注文の買い指値以下の既存の売り注文が存在するか否かを判定し、既存の売り注文が存在する場合には、該現在値より高い新規の買い注文と該既存の売り注文をマッチングさせ、
     残りの新規の売り注文と残りの新規の買い注文とをマッチングさせ、
     現在値以下の新規の売り注文と既存の買い注文のマッチング数、現在値より高い新規の買い注文と既存の売り注文のマッチング数、及び、残った新規の売り注文と残った新規の買い注文のマッチング数を合計して約定数を特定し、
     特定した約定数に基づいて、優先的な価格の注文を消化するマッチングを特定して約定させる
     ことを特徴とする請求項1に記載の取引プログラム。
  3.  前記取得する処理は、注文を平衡二分木を用いて管理する注文管理装置から取得し、
     現在値より高い新規の売り注文及び現在値以下の新規の買い注文を既存注文にマージする処理は、前記注文管理装置に依頼し、
     現在値以下の新規の売り注文の売り指値以上の既存の買い注文が存在するか否かを判定する処理は、新規の売り注文ごとに、新規の売り注文の売り指値以上の既存の買い注文の探索を前記注文管理装置に依頼することで判定し、
     現在値より高い新規の買い注文の買い指値以下の既存の売り注文が存在するか否かを判定する処理は、新規の買い注文ごとに、新規の買い注文の買い指値以下の既存の売り注文の探索を前記注文管理装置に依頼することで判定する
     ことを特徴とする請求項2に記載の取引プログラム。
  4.  前記特定する処理は、最大約定数を特定し、
     前記約定させる処理は、特定した最大約定数に基づいて、優先的な価格の注文を消化するマッチングを特定して約定させることを特徴とする請求項2又は3に記載の取引プログラム。
  5.  コンピュータが、
     売り指値ごとの売り注文数と買い指値ごとの買い注文数を取得し、
     取得した売り指値ごとの売り注文数と買い指値ごとの買い注文数に基づいて、売り注文と買い注文の組のうち該売り注文の売り指値が該買い注文の買い指値以下である組を約定させ、
     約定ごとに約定価格を決定する
     処理を実行することを特徴とする取引方法。
  6.  前記取得する処理は、
     新規の注文について、売り指値ごとの売り注文数と買い指値ごとの買い注文数を取得し、
     前記約定させる処理は、
     現在値より高い新規の売り注文及び現在値以下の新規の買い注文を既存注文にマージし、
     現在値以下の新規の売り注文の売り指値以上の既存の買い注文が存在するか否かを判定し、既存の買い注文が存在する場合には、該現在値以下の新規の売り注文と該既存の買い注文をマッチングさせ、
     現在値より高い新規の買い注文の買い指値以下の既存の売り注文が存在するか否かを判定し、既存の売り注文が存在する場合には、該現在値より高い新規の買い注文と該既存の売り注文をマッチングさせ、
     残りの新規の売り注文と残りの新規の買い注文とをマッチングさせ、
     現在値以下の新規の売り注文と既存の買い注文のマッチング数、現在値より高い新規の買い注文と既存の売り注文のマッチング数、及び、残った新規の売り注文と残った新規の買い注文のマッチング数を合計して約定数を特定し、
     特定した約定数に基づいて、優先的な価格の注文を消化するマッチングを特定して約定させる
     ことを特徴とする請求項5に記載の取引方法。
  7.  前記特定する処理は、最大約定数を特定し、
     前記約定させる処理は、特定した最大約定数に基づいて、優先的な価格の注文を消化するマッチングを特定して約定させることを特徴とする請求項6に記載の取引方法。
  8.  売り指値ごとの売り注文数と買い指値ごとの買い注文数を取得する取得部と、
     前記取得部により取得された売り指値ごとの売り注文数と買い指値ごとの買い注文数に基づいて、売り注文と買い注文の組のうち該売り注文の売り指値が該買い注文の買い指値以下である組を約定させる約定部と、
     前記約定部により約定された約定ごとに約定価格を決定する決定部と
     を有することを特徴とする取引装置。
  9.  前記取得部は、新規注文について、売り指値ごとの売り注文数と買い指値ごとの買い注文数を取得し、
     前記約定部は、
     現在値より高い新規の売り注文及び現在値以下の新規の買い注文を既存注文にマージするマージ部と、
     現在値以下の新規の売り注文の売り指値以上の既存の買い注文が存在するか否かを判定し、既存の買い注文が存在する場合には、該現在値以下の新規の売り注文と該既存の買い注文をマッチングさせる第1マッチング部と、
     現在値より高い新規の買い注文の買い指値以下の既存の売り注文が存在するか否かを判定し、既存の売り注文が存在する場合には、該現在値より高い新規の買い注文と該既存の売り注文をマッチングさせる第2マッチング部と、
     前記マージ部と前記第1マッチング部と前記第2マッチング部による処理後に残された新規の売り注文と新規の買い注文とをマッチングさせる第3マッチング部と、
     前記第1マッチング部によるマッチング数と、前記第2マッチング部によるマッチング数と、前記第3マッチング部によるマッチング数を合計して約定数を特定する特定部と、
     前記特定部により特定された約定数に基づいて、優先的な価格の注文を消化するマッチングを特定して約定させる確定部と
     を有することを特徴とする請求項8に記載の取引装置。
  10.  前記特定部は、最大約定数を特定し、
     前記確定部は、前記特定部により特定された最大約定数に基づいて、優先的な価格の注文を消化するマッチングを特定して約定させることを特徴とする請求項9に記載の取引装置。
PCT/JP2019/009190 2019-03-07 2019-03-07 取引プログラム、取引方法及び取引装置 WO2020179070A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2021503380A JP7205614B2 (ja) 2019-03-07 2019-03-07 取引プログラム、取引方法及び取引装置
PCT/JP2019/009190 WO2020179070A1 (ja) 2019-03-07 2019-03-07 取引プログラム、取引方法及び取引装置
US17/409,907 US11748809B2 (en) 2019-03-07 2021-08-24 Computer-readable recording medium storing trading program, trading method and trading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2019/009190 WO2020179070A1 (ja) 2019-03-07 2019-03-07 取引プログラム、取引方法及び取引装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/409,907 Continuation US11748809B2 (en) 2019-03-07 2021-08-24 Computer-readable recording medium storing trading program, trading method and trading device

Publications (1)

Publication Number Publication Date
WO2020179070A1 true WO2020179070A1 (ja) 2020-09-10

Family

ID=72338538

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/009190 WO2020179070A1 (ja) 2019-03-07 2019-03-07 取引プログラム、取引方法及び取引装置

Country Status (3)

Country Link
US (1) US11748809B2 (ja)
JP (1) JP7205614B2 (ja)
WO (1) WO2020179070A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001075721A1 (fr) * 2000-04-03 2001-10-11 Makoto Dojo Dispositif de support de transactions et procede de support de transactions
US20090132412A1 (en) * 2001-05-30 2009-05-21 Morgan Stanley Price improvement crossing system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3413076B2 (ja) 1997-03-18 2003-06-03 株式会社東芝 中央市場システム及び電子市場システム
EP1131764A2 (en) * 1998-10-30 2001-09-12 OptiMark, Inc. Crossing network and method
WO2002052369A2 (en) * 2000-11-08 2002-07-04 Financial Markets Solutions, Inc. System and method for a universal trading platform
US10346911B2 (en) * 2014-06-09 2019-07-09 Nasdaq, Inc. Private fund exchange system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001075721A1 (fr) * 2000-04-03 2001-10-11 Makoto Dojo Dispositif de support de transactions et procede de support de transactions
US20090132412A1 (en) * 2001-05-30 2009-05-21 Morgan Stanley Price improvement crossing system

Also Published As

Publication number Publication date
JP7205614B2 (ja) 2023-01-17
US20210383474A1 (en) 2021-12-09
US11748809B2 (en) 2023-09-05
JPWO2020179070A1 (ja) 2021-10-21

Similar Documents

Publication Publication Date Title
US7729977B2 (en) Method and system for grouping merchandise, services and users and for trading merchandise and services
US11972485B2 (en) Computer implemented method for compiling a portfolio of assets
JP4815540B1 (ja) 金融商品取引管理装置、プログラム
KR102446990B1 (ko) 이종 기축 자산 기반 동종 암호 화폐들 사이의 유동성을 제공하는 방법 및 장치
US7801769B1 (en) Computing a set of K-best solutions to an auction winner-determination problem
Dhillon et al. Interpreting the role of disruptive technologies in e‐businesses
WO2020179070A1 (ja) 取引プログラム、取引方法及び取引装置
JP7211485B2 (ja) 取引プログラム、取引方法及び取引装置
US20190057445A1 (en) System And Processes To Reduce And Redirect Inaccuracies In Computationally Irreducible Electronic Exchange Data Systems
KR20010049220A (ko) 거래우선순위 결정방법 및 장치, 거래시스템 및 기록매체
Chen et al. Knowledge‐based view of the use of an intermediary in new product manufacturing outsourcing
JP7168063B2 (ja) 取引プログラム、取引方法及び取引装置
JP7124950B2 (ja) 取引プログラム、取引方法及び取引装置
US20210027315A1 (en) Generating decision trees from directed acyclic graph (dag) knowledge bases
JP5793007B2 (ja) 金融商品取引管理装置、金融商品取引管理方法、プログラム
Tu An application of web‐based data mining: selling strategies for online auctions
Wu et al. Multi-agent bidding and contracting for non-storable goods
US11532046B1 (en) Fixed income recommender system
KR20230133746A (ko) Ip 포트폴리오 단위로 투자가 가능한 블록체인 기반의 지식재산권 투자 플랫폼
JP6989140B2 (ja) 資産運用管理サーバ
JP6196354B2 (ja) 金融商品取引管理装置、金融商品取引管理方法、プログラム
Hu et al. Supply chain debt financing in competition
Hu Specific Capacity Investment in Supply Chains With Renegotiation
JP5977406B2 (ja) 金融商品取引管理装置、金融商品取引管理方法、プログラム
JP2018198082A (ja) 金融商品取引管理装置、金融商品取引管理方法、プログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19918136

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021503380

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19918136

Country of ref document: EP

Kind code of ref document: A1