Method and system for high frequency trading
A method for high frequency trading is provided, which is performed by one or more processors, and includes generating input data based on market data for a target item, generating prediction data for the target item for each of a plurality of future time points by inputting the generated input data to a machine learning model, and generating order data for the target item based on the generated prediction data.
1 . A method for generating output data based on reference data of a target item, wherein the method is performed by a pre-processing circuit connected to a plurality of application-specific integrated circuits dedicated for a machine learning model, the method comprising:
receiving, by the pre-processing circuit, reference data from one or more external systems which are external to the pre-processing circuit and the plurality of application-specific integrated circuits;
selecting, by the pre-processing circuit, an application-specific integrated circuit of the plurality of application-specific integrated circuits and a batch size of a plurality of batch sizes based on a plurality of latencies, each of the plurality of latencies being associated with a respective one of the plurality of application-specific integrated circuits and a respective one of the plurality of batch sizes;
generating, by the pre-processing circuit, input data having the selected batch size for the machine learning model;
transmitting, by the pre-processing circuit, the input data having the selected batch size to the selected application-specific integrated circuit, wherein the selected application-specific integrated circuit is configured to perform the machine learning model based on the transmitted input data having the selected batch size, and the machine learning model generates prediction data for the target item for each of a plurality of future time points based on the transmitted input data having the selected batch size;
calculating, by the pre-processing circuit, a latency for output data;
selecting, by the pre-processing circuit, one future time point from among the plurality of future time points based on the latency for the output data; and
generating, by the pre-processing circuit, the output data for the target item corresponding to the selected future time point based on the generated prediction data.
2 . The method according to claim 1 , wherein the selecting the one future time point from among the plurality of future time points includes selecting, from among the plurality of future time points, an earliest future time point after the latency for the output data.
3 . The method according to claim 1 , wherein the selecting the one future time point from among the plurality of future time points includes:
selecting, from among the plurality of future time points, one or more future time points after the latency for the output data;
calculating an anticipated profit for each of the selected one or more future time points; and
selecting a future time point at which the calculated anticipated profit is maximum.
4 . The method according to claim 1 , wherein
the calculating the latency for the output data includes calculating the latency for the output data based on at least one of a data rate, input and output bandwidths between the pre-processing circuit and the selected application-specific integrated circuit, sizes of input and output data, a computation speed of the machine learning model by the selected application-specific integrated circuit, a processing speed of the pre-processing circuit, or a busy state of the selected application-specific integrated circuit.
5 . The method according to claim 4 , wherein the latency for the output data includes a time taken for the reference data to be pre-processed by the pre-processing circuit, a time taken for transferring the pre-processed data from the pre-processing circuit to the selected application-specific integrated circuit, a time taken for the selected application-specific integrated circuit to complete the computation of the machine learning model, a time taken for the computation result to be transmitted from the selected application-specific integrated circuit to the pre-processing circuit, and a time taken for the pre-processing circuit to generate the output data based on the computation result.
6 . The method according to claim 1 , further comprising transmitting the generated output data to a server.
7 . The method according to claim 1 , wherein the machine learning model is trained to infer prediction data for a specific item at a plurality of time points which are later than a specific time point, based on a training set including the reference data and ground truth data for the specific item at the specific time point.
8 . A non-transitory computer-readable recording medium storing instructions that, when executed by a pre-processing circuit connected to a plurality of application-specific integrated circuits is dedicated for a machine learning model, cause the pre-processing circuit to:
receive reference data from one or more external systems which are external to the pre-processing circuit and the plurality of application-specific integrated circuits;
select an application-specific integrated circuit of the plurality of application-specific integrated circuits and a batch size of a plurality of batch sizes based on the plurality of latencies, each of the plurality of latencies being associated with a respective one of the plurality of application-specific integrated circuits and a respective one of the plurality of batch sizes;
generate input data having the selected batch size for the machine learning model;
transmit the input data having the selected batch size to the selected application-specific integrated circuit, wherein the selected application-specific integrated circuit is configured to perform the machine learning model based on the transmitted input data having the selected batch size, and the machine learning model generates prediction data for the target item for each of a plurality of future time points based on the transmitted input data having the selected batch size;
calculate a latency for output data;
select one future time point from among the plurality of future time points based on the latency for the output data; and
generate the output data for the target item corresponding to the selected future time point based on the generated prediction data.
9 . An information processing system, comprising:
a pre-processing circuit for pre-processing;
a plurality of application-specific integrated circuits connected to the pre-processing circuit dedicated for a machine learning model,
wherein the pre-processing circuit is configured to:
receive reference data from one or more external systems which are external to the pre-processing circuit and the plurality of application-specific integrated circuits,
select an application-specific integrated circuit of the plurality of application-specific integrated circuits and a batch size of a plurality of batch sizes based on the plurality of latencies, each of the plurality of latencies being associated with a respective one of the plurality of application-specific integrated circuits and a respective one of the plurality of batch sizes,
generate input data having the selected batch size for the machine learning model,
transmit the input data having the selected batch size to the selected application-specific integrated circuit, wherein the selected application-specific integrated circuit is configured to perform the machine learning model based on the transmitted input data having the selected batch size, and the machine learning model generates prediction data for the target item for each of a plurality of future time points based on the transmitted input data having the selected batch size,
calculate a latency for output data,
select one future time point from among the plurality of future time points based on the latency for the output data, and
generate output data for the target item corresponding to the selected future time point based on the generated prediction data.
10 . The information processing system according to claim 9 , wherein the selecting the one future time point from among the plurality of future time points includes selecting, from among the plurality of future time points, an earliest future time point after the latency for the output data.
11 . The information processing system according to claim 9 , wherein the selecting the one future time point from among the plurality of future time points includes:
selecting, from among the plurality of future time points, one or more future time points after the latency for the output data;
calculating an anticipated profit for each of the selected one or more future time points; and
selecting a future time point at which the calculated anticipated profit is maximum.
12 . The information processing system according to claim 9 , wherein the calculating the latency for the output data includes calculating the latency for the output data based on at least one of a data rate, input and output bandwidths between the pre-processing circuit and the selected application-specific integrated circuit, sizes of input and output data, a computation speed of the machine learning model by the selected application-specific integrated circuit, a processing speed of the pre-processing circuit, or a busy state of the selected application-specific integrated circuit.
13 . The information processing system according to claim 9 , wherein the machine learning model is trained to infer the prediction data for a specific item at the plurality of time points which are later than a specific time point, based on a training set including the reference data and ground truth data for the specific item at the specific time point.