{"id":258887,"date":"2015-06-08T17:29:02","date_gmt":"2015-06-08T13:29:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=258887"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=258887","title":{"rendered":"\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u0430 \u0430\u043a\u0446\u0438\u0439 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f"},"content":{"rendered":"<p>       <b>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430:<\/b> <i>\u0412 \u043d\u0430\u0448\u0435\u043c \u0431\u043b\u043e\u0433\u0435 \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u043e\u0431 <a href=\"http:\/\/habrahabr.ru\/post\/212335\/\">\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f<\/a> \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0440\u043e\u0431\u043e\u0442\u043e\u0432 \u0438 \u0434\u0430\u0436\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/itinvest\/blog\/205886\/\">\u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0440\u0436\u0435\u0432\u043e\u0433\u043e<\/a> \u0442\u0438\u043a\u0435\u0440\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c\u044e \u0435\u0435 \u0430\u043a\u0446\u0438\u0439. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0430\u0432\u0442\u043e\u0440\u043e\u0439 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0446\u0435\u043d \u043d\u0430 \u0430\u043a\u0446\u0438\u0439 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0431\u0443\u0434\u0443\u0449\u0438\u0439 \u043a\u0443\u0440\u0441 \u0430\u043a\u0446\u0438\u0439.<\/i><\/p>\n<p>  <a href=\"http:\/\/habrahabr.ru\/company\/itinvest\/blog\/259803\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/026\/3cd\/080\/0263cd0805874e50a6e9f68448f9e767.jpg\"\/><\/a><\/p>\n<h5>\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0431\u0437\u043e\u0440<\/h5>\n<p>  \u042d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 <a href=\"https:\/\/raw.github.com\/ezhulenev\/scala-openbook\/master\/assets\/Modeling-high-frequency-limit-order-book-dynamics-with-support-vector-machines.pdf\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a>, \u043d\u043e\u0441\u044f\u0449\u0435\u0439 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u00ab\u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f \u043b\u0438\u043c\u0438\u0442\u043d\u044b\u0445 \u043e\u0440\u0434\u0435\u0440\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043e\u043f\u043e\u0440\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432\u00bb. \u0413\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044f \u0441\u0442\u0443\u043f\u0435\u043d\u044c\u043a\u0430 \u0437\u0430 \u0441\u0442\u0443\u043f\u0435\u043d\u044c\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e \u0438\u0434\u0435\u0438, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <a href=\"https:\/\/spark.apache.org\/\">Spark<\/a> \u0438 <a href=\"https:\/\/spark.apache.org\/mllib\/\">Spark MLLib<\/a>. \u0410\u0432\u0442\u043e\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u044f \u0436\u0435 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b \u043e\u0440\u0434\u0435\u0440\u043e\u0432 \u0438\u0437 \u041d\u044c\u044e-\u0419\u043e\u0440\u043a\u0441\u043a\u043e\u0439 \u0444\u043e\u043d\u0434\u043e\u0432\u043e\u0439 \u0431\u0438\u0440\u0436\u0438 (<a href=\"http:\/\/www.nyxdata.com\/Data-Products\/NYSE-OpenBook-History\">NYSE<\/a>) (\u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430 <a href=\"ftp:\/\/ftp.nyxdata.com\/Historical%20Data%20Samples\/TAQ%20NYSE%20OpenBook\/\">NYSE FTP<\/a>), \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443, \u0440\u0430\u0431\u043e\u0442\u0430\u044f \u0441\u043e Spark, \u044f \u043c\u043e\u0433\u0443 \u043b\u0435\u0433\u043a\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u043e\u043f\u043e\u0440\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432, \u044f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c <a href=\"http:\/\/spark.apache.org\/docs\/latest\/mllib-decision-tree.html\">\u0434\u0435\u0440\u0435\u0432\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0439<\/a> \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Spark MLLib \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u043b\u0430\u0441\u0441\u043e\u0432\u0443\u044e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e. <\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0433\u043b\u0443\u0431\u0436\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e. \u042f \u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0443 \u043f\u043e\u043b\u043d\u044b\u0439 \u043e\u0431\u0437\u043e\u0440 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u043b\u0438 \u0434\u0432\u0443\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445, \u043d\u043e \u043c\u0435\u043d\u0435\u0435 \u043d\u0430\u0443\u0447\u043d\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u2013 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0431\u043e\u0440\u0430 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u0446\u0435\u043b\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u0438\u0441\u0445\u043e\u0434\u0430.<a name=\"habracut\"><\/a><\/p>\n<h4>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043c\u043e\u0434\u0435\u043b\u0438<\/h4>\n<p>  \u0410\u0432\u0442\u043e\u0440\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0438\u0437 \u043d\u0435\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u043e\u0440\u0434\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043d\u0430\u0431\u043e\u0440 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u043f\u043e\u0440\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0438\u043b\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0439), \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u0430 \u0446\u0435\u043d\u043d\u044b\u0445 \u0431\u0443\u043c\u0430\u0433 (\u0432\u044b\u0440\u0430\u0441\u0442\u0435\u0442, \u0441\u043d\u0438\u0437\u0438\u0442\u0441\u044f, \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f). \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043d\u044b\u043c\u0438 \u0438\u043c \u043c\u0435\u0442\u043a\u0430\u043c\u0438 (\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0446\u0435\u043d\u044b) \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0442\u0440\u043e\u0438\u0442 \u043c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u0432 \u043e\u0434\u043d\u0443 \u0438\u0437 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439.<\/p>\n<pre><code class=\"cs\">Time(sec)            Price($)   Volume      Event Type      Direction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 34203.011926972      598.68     10          submission      ask 34203.011926973      594.47     15          submission      bid 34203.011926974      594.49     20          submission      bid 34203.011926981      597.68     30          submission      ask 34203.011926991      594.47     15          execution       ask 34203.011927072      597.68     10          cancellation    ask 34203.011927082      599.88     12          submission      ask 34203.011927097      598.38     11          submission      ask <\/code><\/pre>\n<p>  \u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0442\u043e\u0440\u0433\u043e\u0432\u0443\u044e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u043e\u0440\u0434\u0435\u0440\u0430, \u043e\u0442\u043c\u0435\u043d\u0443 \u043e\u0440\u0434\u0435\u0440\u0430 \u0438\u043b\u0438 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435. \u0412\u0440\u0435\u043c\u044f \u043f\u0440\u0438\u0431\u044b\u0442\u0438\u044f \u043e\u0442\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043f\u043e\u043b\u0443\u043d\u043e\u0447\u0438 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445 \u0438 \u043d\u0430\u043d\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445, \u0446\u0435\u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0432 \u0430\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u0438\u0445 \u0434\u043e\u043b\u043b\u0430\u0440\u0430\u0445, \u0430 \u043e\u0431\u044a\u0435\u043c \u2013 \u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u043a\u0446\u0438\u0439. Ask \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u044f \u043f\u0440\u043e\u0434\u0430\u044e \u0438 \u043f\u0440\u043e\u0448\u0443 \u0437\u0430 \u0441\u0432\u043e\u044e \u0447\u0430\u0441\u0442\u044c \u0430\u043a\u0446\u0438\u0439 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c, Bid \u0436\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u044f \u0445\u043e\u0447\u0443 \u043a\u0443\u043f\u0438\u0442\u044c \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u0435.<\/p>\n<p>  \u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f \u043e\u0440\u0434\u0435\u0440\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e <a href=\"http:\/\/www.investopedia.com\/terms\/o\/order-book.asp\">\u043f\u043e\u0440\u0442\u0444\u0435\u043b\u0435 \u043e\u0440\u0434\u0435\u0440\u043e\u0432<\/a> (order book) \u0438 <a href=\"http:\/\/www.investopedia.com\/university\/intro-to-order-types\/limit-orders.asp\">\u043f\u043e\u0440\u0442\u0444\u0435\u043b\u0435 \u043b\u0438\u043c\u0438\u0442\u043d\u044b\u0445 \u043e\u0440\u0434\u0435\u0440\u043e\u0432<\/a> \u0432 Investopedia. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u0438. \u041e\u0431\u0449\u0430\u044f \u0438\u0434\u0435\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u0430.<br \/>  \u042d\u0442\u043e \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0440\u0434\u0435\u0440\u043e\u0432 \u043d\u0430 \u043f\u0440\u043e\u0434\u0430\u0436\u0443 \u0438 \u043f\u043e\u043a\u0443\u043f\u043a\u0443 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0446\u0435\u043d\u043d\u043e\u0439 \u0431\u0443\u043c\u0430\u0433\u0438 \u0438\u043b\u0438 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e \u0443\u0440\u043e\u0432\u043d\u044e \u0446\u0435\u043d.<\/p>\n<h4>\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 <\/h4>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u0438 \u043e\u0440\u0434\u0435\u0440\u043e\u0432 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0438\u0437 \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u043e\u0440\u0434\u0435\u0440\u043e\u0432, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f <code>\u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/code>.<\/p>\n<p>  \u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 \u0442\u0440\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438: \u0431\u0430\u0437\u0438\u0441\u043d\u044b\u0435, \u043d\u0435\u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0411\u0430\u0437\u0438\u0441\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u2013 \u044d\u0442\u043e \u0446\u0435\u043d\u044b \u0438 \u043e\u0431\u044a\u0435\u043c\u044b, \u043a\u0430\u043a \u0441 \u0444\u043b\u0430\u0433\u043e\u043c ask, \u0442\u0430\u043a \u0438 \u0441 \u0444\u043b\u0430\u0433\u043e\u043c bid, \u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 n = 10 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 (\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0443\u0440\u043e\u0432\u043d\u0438 \u0446\u0435\u043d \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f \u043e\u0440\u0434\u0435\u0440\u043e\u0432 \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u0438\u0437 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f \u043e\u0440\u0434\u0435\u0440\u043e\u0432. \u041d\u0435\u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c \u0431\u0430\u0437\u0438\u0441\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430. \u0421\u044e\u0434\u0430 \u0432\u0445\u043e\u0434\u044f\u0442 bid-ask \u0441\u043f\u0440\u0435\u0434 \u0438 \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0446\u0435\u043d\u0430 \u0441\u043f\u0440\u0435\u0434\u0430, \u0446\u0435\u043d\u043e\u0432\u044b\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0446\u0435\u043d\u0430 \u0438 \u043e\u0431\u044a\u0435\u043c \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0446\u0435\u043d\u043e\u0432\u044b\u0445 \u0443\u0440\u043e\u0432\u043d\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u043d\u0430\u0431\u043e\u0440\u0430\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 <code>v2<\/code>, <code>v3<\/code> \u0438 <code>v5<\/code> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u041d\u0430\u0431\u043e\u0440 v5 \u043d\u0443\u0436\u0435\u043d, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u044e\u0449\u0443\u044e\u0441\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432 \u0446\u0435\u043d\u0435 \u0438 \u043e\u0431\u044a\u0435\u043c\u0435 \u0430\u043a\u0446\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 ask \u0438 bid. \u0417\u0430\u0442\u0435\u043c, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u0430\u0445, \u043c\u044b \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438. \u0411\u043e\u043b\u044c\u0448\u0435 \u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/raw.github.com\/ezhulenev\/scala-openbook\/master\/assets\/Modeling-high-frequency-limit-order-book-dynamics-with-support-vector-machines.pdf\">\u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/002\/dbb\/11c\/002dbb11c8684dcfa7df22732d236e2d.png\"\/><\/p>\n<h4>\u0420\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>  \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0430\u043a\u0446\u0438\u0439 (1 \u0441\u0435\u043a\u0443\u043d\u0434\u0430, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443). \u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0443\u0445 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u0435\u0439 \u043e\u0440\u0434\u0435\u0440\u043e\u0432: \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f \u043e\u0440\u0434\u0435\u0440\u043e\u0432 \u0438 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f \u043e\u0440\u0434\u0435\u0440\u043e\u0432, \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e \u043f\u0440\u043e\u0448\u0435\u0441\u0442\u0432\u0438\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. <\/p>\n<p>  \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043a\u0443 <code>MeanPriceMove<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>Stationary<\/code>, <code>Up<\/code> \u0438\u043b\u0438 <code>Down<\/code> (\u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f, \u0432\u044b\u0440\u0430\u0441\u0442\u0435\u0442, \u0441\u043d\u0438\u0437\u0438\u0442\u0441\u044f).<\/p>\n<pre><code class=\"cs\">trait Label[L] extends Serializable { label =&gt;   def apply(current: OrderBook, future: OrderBook): Option[L] }  sealed trait MeanPriceMove  object MeanPriceMove {   case object Up extends MeanPriceMove   case object Down extends MeanPriceMove   case object Stationary extends MeanPriceMove }  object MeanPriceMovementLabel extends Label[MeanPriceMove] {    private[this] val basicSet = BasicSet.apply(BasicSet.Config.default)    def apply(current: OrderBook, future: OrderBook): Option[MeanPriceMove] = {     val currentMeanPrice = basicSet.meanPrice(current)     val futureMeanPrice = basicSet.meanPrice(future)      val cell: Cell[MeanPriceMove] =        currentMeanPrice.zipMap(futureMeanPrice) {         (currentMeanValue, futureMeanValue) =&gt;           if (currentMeanValue == futureMeanValue)             MeanPriceMove.Stationary           else if (currentMeanValue &gt; futureMeanValue)             MeanPriceMove.Down           else             MeanPriceMove.Up         }      cell.toOption   } } <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0416\u0443\u0440\u043d\u0430\u043b\u044b \u043e\u0440\u0434\u0435\u0440\u043e\u0432<\/h4>\n<p>  \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b\u044b \u043e\u0440\u0434\u0435\u0440\u043e\u0432 <a href=\"http:\/\/www.nyxdata.com\/Data-Products\/NYSE-OpenBook-History\">NYSE TAQ OpenBook<\/a> \u0438 \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/github.com\/ezhulenev\/scala-openbook\">Scala OpenBook<\/a>. \u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0434\u043d\u0435\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0430 <a href=\"ftp:\/\/ftp.nyxdata.com\/Historical%20Data%20Samples\/TAQ%20NYSE%20OpenBook\/\">NYSE FTP<\/a> \u2013 \u0435\u0433\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c.<\/p>\n<p>  \u0411\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 TAQ (Trades and Quotes) \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u043a\u0430\u043d\u0430 \u0446\u0435\u043d \u0432 \u0431\u0430\u0437\u0438\u0441\u0435 T+1 \u0434\u043b\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0445 \u0440\u044b\u043d\u043a\u043e\u0432. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 TAQ \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439, \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0440\u044b\u043d\u043e\u0447\u043d\u044b\u0445 \u0442\u0440\u0435\u043d\u0434\u043e\u0432 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u044b\u043d\u043a\u043e\u0432 \u0441 \u0446\u0435\u043b\u044c\u044e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0430\u0443\u0434\u0438\u0442\u0430.<\/p>\n<h4>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>  <code>OrderBook<\/code> \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0434\u0432\u0435 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0433\u0434\u0435 \u043a\u043b\u044e\u0447\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0446\u0435\u043d\u0430, \u0430 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u043e\u0439 \u2013 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u043a\u0446\u0438\u0439.<\/p>\n<pre><code class=\"cs\">case class OrderBook(symbol: String,                      buy: TreeMap[Int, Int] = TreeMap.empty,                      sell: TreeMap[Int, Int] = TreeMap.empty) <\/code><\/pre>\n<p>  <\/p>\n<h4>\u041d\u0430\u0431\u043e\u0440\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/h4>\n<p>  \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 <code>Cell<\/code> \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/github.com\/pellucidanalytics\/framian\">Framian<\/a> \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432: <code>Value<\/code>, <code>NA<\/code> \u0438\u043b\u0438 <code>NM<\/code>.<\/p>\n<p>  \u041a\u0430\u043a \u0431\u044b\u043b\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0442\u0440\u0438 \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u044b\u0445 \u0434\u0432\u0443\u0445 \u0438\u0437 \u043d\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 <code>OrderBook<\/code>, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0436\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b <code>OrdersTrail<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e \u0441\u0432\u043e\u0435\u0439 \u0441\u0443\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u043c \u043e\u0440\u0434\u0435\u0440\u043e\u0432, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u043e\u043a\u043e\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435.<\/p>\n<pre><code class=\"cs\">sealed trait BasicAttribute[T] extends Serializable { self =&gt;   def apply(orderBook: OrderBook): Cell[T]    def map[T2](f: T =&gt; T2): BasicAttribute[T2] = new BasicAttribute[T2] {     def apply(orderBook: OrderBook): Cell[T2] = self(orderBook).map(f)   } } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">sealed trait TimeInsensitiveAttribute[T] extends Serializable { self =&gt;   def apply(orderBook: OrderBook): Cell[T]    def map[T2](f: T =&gt; T2): TimeInsensitiveAttribute[T2] = new TimeInsensitiveAttribute[T2] {     def apply(orderBook: OrderBook): Cell[T2] = self(orderBook).map(f)   } } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">trait TimeSensitiveAttribute[T] extends Serializable { self =&gt;   def apply(ordersTrail: Vector[OpenBookMsg]): Cell[T]    def map[T2](f: T =&gt; T2): TimeSensitiveAttribute[T2] = new TimeSensitiveAttribute[T2] {     def apply(ordersTrail: Vector[OpenBookMsg]): Cell[T2] = self(ordersTrail).map(f)   } } <\/code><\/pre>\n<p>  \u0430 \u0432\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0440\u0430\u0441\u0447\u0435\u0442 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432:<\/p>\n<pre><code class=\"cs\">class BasicSet private[attribute] (val config: BasicSet.Config) extends Serializable {   private[attribute] def askPrice(orderBook: OrderBook)(i: Int): Cell[Int] = {     Cell.fromOption {       orderBook.sell.keySet.drop(i - 1).headOption     }   }    private[attribute] def bidPrice(orderBook: OrderBook)(i: Int): Cell[Int] = {     Cell.fromOption {       val bidPrices = orderBook.buy.keySet       if (bidPrices.size &gt;= i) {         bidPrices.drop(bidPrices.size - i).headOption       } else None     }   }    private def attribute[T](f: OrderBook =&gt; Cell[T]): BasicAttribute[T] = new BasicAttribute[T] {     def apply(orderBook: OrderBook): Cell[T] = f(orderBook)   }    def askPrice(i: Int): BasicAttribute[Int] = attribute(askPrice(_)(i))    def bidPrice(i: Int): BasicAttribute[Int] = attribute(bidPrice(_)(i))   val meanPrice: BasicAttribute[Double] = {     val ask1 = askPrice(1)     val bid1 = bidPrice(1)     BasicAttribute.from(orderBook =&gt;       ask1(orderBook).zipMap(bid1(orderBook)) {         (ask, bid) =&gt; (ask.toDouble + bid.toDouble) \/ 2       })   } } <\/code><\/pre>\n<p>  <\/p>\n<h4>\u041c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043e\u0440\u0434\u0435\u0440\u043e\u0432, \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e <code>LabeledPointsExtractor<\/code>:<\/p>\n<pre><code class=\"cs\">class LabeledPointsExtractor[L: LabelEncode] {    def labeledPoints(orders: Vector[OpenBookMsg]): Vector[LabeledPoint] = {     log.debug(s&quot;Extract labeled points from orders log. Log size: ${orders.size}&quot;)      \/\/ ...   } } <\/code><\/pre>\n<p>  \u0430 \u0432\u043e\u0442 \u0442\u0430\u043a \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u043b\u0443\u0447\u0448\u0435\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u043b\u0434\u0435\u0440\u0430:<\/p>\n<pre><code class=\"cs\">val extractor = {     import com.scalafi.dynamics.attribute.LabeledPointsExtractor._     (LabeledPointsExtractor.newBuilder()       += basic(_.askPrice(1))       += basic(_.bidPrice(1))       += basic(_.meanPrice)       ).result(symbol, MeanPriceMovementLabel, LabeledPointsExtractor.Config(1.millisecond))   } <\/code><\/pre>\n<p>  <code>Extractor<\/code> \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>MeanPriceMovementLabel<\/code> \u0441 \u0442\u0440\u0435\u043c\u044f \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438: \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c (ask price), \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u0446\u0435\u043d\u0430 (bid price) \u0438 \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0446\u0435\u043d\u0430 (mean price).<\/p>\n<h4>\u0417\u0430\u043f\u0443\u0441\u043a \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/h4>\n<p>  \u0412 \u00ab\u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u00bb \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e 36 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0438\u0437 \u0432\u0441\u0435\u0445 3 \u043d\u0430\u0431\u043e\u0440\u043e\u0432. \u0422\u0435\u0441\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u044b\u0445 \u0441 NYSE FTP: <code>EQY_US_NYSE_BOOK_20130403<\/code> \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 <code>EQY_US_NYSE_BOOK_20130404<\/code> \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<pre><code class=\"cs\">object DecisionTreeDynamics extends App with ConfiguredSparkContext with FeaturesExtractor {   private val log = LoggerFactory.getLogger(this.getClass)    case class Config(training: String = &quot;&quot;,                     validation: String = &quot;&quot;,                     filter: Option[String] = None,                     symbol: Option[String] = None)    val parser = new OptionParser[Config](&quot;Order Book Dynamics&quot;) {     \/\/ ....   }    parser.parse(args, Config()) map { implicit config =&gt;     val trainingFiles = openBookFiles(&quot;Training&quot;, config.training, config.filter)     val validationFiles = openBookFiles(&quot;Validation&quot;, config.validation, config.filter)      val trainingOrderLog = orderLog(trainingFiles)     log.info(s&quot;Training order log size: ${trainingOrderLog.count()}&quot;)      \/\/ Configure DecisionTree model     val labelEncode = implicitly[LabelEncode[MeanPriceMove]]     val numClasses = labelEncode.numClasses     val categoricalFeaturesInfo = Map.empty[Int, Int]     val impurity = &quot;gini&quot;     val maxDepth = 5     val maxBins = 100      val trainingData = trainingOrderLog.extractLabeledData(featuresExtractor(_: String))     val trainedModels = (trainingData map { case LabeledOrderLog(symbol, labeledPoints) =&gt;       log.info(s&quot;$symbol: Train Decision Tree model. Training data size: ${labeledPoints.count()}&quot;)       val model = DecisionTree.trainClassifier(labeledPoints, numClasses, categoricalFeaturesInfo, impurity, maxDepth, maxBins)       val labelCounts = labeledPoints.map(_.label).countByValue().map {         case (key, count) =&gt; (labelEncode.decode(key.toInt), count)       }       log.info(s&quot;$symbol: Label counts: [${labelCounts.mkString(&quot;, &quot;)}]&quot;)       symbol -&gt; model     }).toMap      val validationOrderLog = orderLog(validationFiles)     log.info(s&quot;Validation order log size: ${validationOrderLog.count()}&quot;)     val validationData = validationOrderLog.extractLabeledData(featuresExtractor(_: String))      \/\/ Evaluate model on validation data and compute training error     validationData.map { case LabeledOrderLog(symbol, labeledPoints) =&gt;        val model = trainedModels(symbol)        log.info(s&quot;$symbol: Evaluate model on validation data. Validation data size: ${labeledPoints.count()}&quot;)       log.info(s&quot;$symbol: Learned classification tree model: $model&quot;)        val labelAndPrediction = labeledPoints.map { point =&gt;         val prediction = model.predict(point.features)         (point.label, prediction)       }       val trainingError = labelAndPrediction.filter(r =&gt; r._1 != r._2).count().toDouble \/ labeledPoints.count       log.info(s&quot;$symbol: Training Error = &quot; + trainingError)     }   } } <\/code><\/pre>\n<p>  <\/p>\n<h4>\u041e\u0448\u0438\u0431\u043a\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u0437\u044f\u0442\u043e\u0433\u043e \u0442\u0438\u043a\u0435\u0440\u0430 <code>ORCL<\/code>:<\/p>\n<pre><code class=\"xml\">ORCL: Train Decision Tree model. Training data size: 64064 ORCL: Trained model in 3740 millis ORCL: Label counts: [Stationary -&gt; 42137, Down -&gt; 10714, Up -&gt; 11213] ORCL: Evaluate model on validation data. Validation data size: 54749 ORCL: Training Error = 0.28603262160039455 <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c, \u044d\u0442\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043c\u043e\u0433\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 70% \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <b>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/b>: \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u044d\u0442\u043e \u043d\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0431\u044b\u043b\u044c\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u0440\u0435\u0439\u0434\u0438\u043d\u0433\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044f \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e, \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043b\u0438 \u043c\u043e\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043b\u044e\u0431\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0446\u0435\u043d \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u0432 70% \u0441 95%-\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e. \u041c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u00ab\u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u00bb \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0438 \u043a\u0443\u0440\u0441\u043e\u0432 \u0446\u0435\u043d\u043d\u044b\u0445 \u0431\u0443\u043c\u0430\u0433, \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0438\u0437\u0434\u0435\u0440\u0436\u0435\u043a. \u041d\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u0443\u0436\u0435 \u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0435\u043b\u043e\u0447\u0430\u0445, \u0438\u043c\u0435\u044e\u0449\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. <\/p>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e\u0435 \u0432 \u043f\u043b\u0430\u043d\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445: \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0434\u0432\u0443\u043c \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u043c \u0434\u043d\u044f\u043c \u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u044b \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0443\u044e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u0434\u0435\u043d\u044c\u0433\u0438 \u0432 \u043c\u0438\u0440\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u044f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430.<\/p>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h4>\n<p>  \u042f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u043b \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0431\u043e\u043b\u044c\u0448\u0435\u043c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0435, \u0447\u0435\u043c \u0442\u043e\u0442, \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0432 \u0441\u0444\u0435\u0440\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0431\u0435\u0437 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0431\u043e\u0440\u043e\u043a. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u0438\u0437 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<blockquote><p><a href=\"https:\/\/github.com\/ezhulenev\/orderbook-dynamics\">\u041a\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0413\u0438\u0442\u0445\u0430\u0431\u0435<\/a><\/p><\/blockquote>\n<p>  <\/p>\n<h5><b>\u041e\u0444\u0444\u0442\u043e\u043f: <\/b>\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f <a href=\"http:\/\/habrahabr.ru\/company\/itinvest\/blog\/259517\/\">\u043a\u043e\u043d\u043a\u0443\u0440\u0441 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432<\/a> \u043e\u0442 <a href=\"http:\/\/www.itinvest.ru\/\">ITinvest<\/a> \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 StockSharp \u2014 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435 StockSharp \u043d\u0430 \u0413\u0438\u0442\u0445\u0430\u0431\u0435, \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0439\u0442\u0435 \u0434\u0435\u043d\u0435\u0436\u043d\u043e\u0435 \u0432\u043e\u0437\u043d\u0430\u0433\u0440\u0430\u0436\u0434\u0435\u043d\u0438\u0435 \u0437\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0439 \u043a\u043e\u043c\u043c\u0438\u0442.<\/h5>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/259803\/\"> http:\/\/habrahabr.ru\/post\/259803\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <b>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430:<\/b> <i>\u0412 \u043d\u0430\u0448\u0435\u043c \u0431\u043b\u043e\u0433\u0435 \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u043e\u0431 <a href=\"http:\/\/habrahabr.ru\/post\/212335\/\">\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f<\/a> \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0440\u043e\u0431\u043e\u0442\u043e\u0432 \u0438 \u0434\u0430\u0436\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/itinvest\/blog\/205886\/\">\u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0438\u0440\u0436\u0435\u0432\u043e\u0433\u043e<\/a> \u0442\u0438\u043a\u0435\u0440\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c\u044e \u0435\u0435 \u0430\u043a\u0446\u0438\u0439. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0430\u0432\u0442\u043e\u0440\u043e\u0439 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0446\u0435\u043d \u043d\u0430 \u0430\u043a\u0446\u0438\u0439 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0431\u0443\u0434\u0443\u0449\u0438\u0439 \u043a\u0443\u0440\u0441 \u0430\u043a\u0446\u0438\u0439.<\/i><\/p>\n<p>  <a href=\"http:\/\/habrahabr.ru\/company\/itinvest\/blog\/259803\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/026\/3cd\/080\/0263cd0805874e50a6e9f68448f9e767.jpg\"\/><\/a><\/p>\n<h5>\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0431\u0437\u043e\u0440<\/h5>\n<p>  \u042d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 <a href=\"https:\/\/raw.github.com\/ezhulenev\/scala-openbook\/master\/assets\/Modeling-high-frequency-limit-order-book-dynamics-with-support-vector-machines.pdf\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a>, \u043d\u043e\u0441\u044f\u0449\u0435\u0439 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u00ab\u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0447\u0430\u0441\u0442\u043e\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f \u043b\u0438\u043c\u0438\u0442\u043d\u044b\u0445 \u043e\u0440\u0434\u0435\u0440\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043e\u043f\u043e\u0440\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432\u00bb. \u0413\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044f \u0441\u0442\u0443\u043f\u0435\u043d\u044c\u043a\u0430 \u0437\u0430 \u0441\u0442\u0443\u043f\u0435\u043d\u044c\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e \u0438\u0434\u0435\u0438, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <a href=\"https:\/\/spark.apache.org\/\">Spark<\/a> \u0438 <a href=\"https:\/\/spark.apache.org\/mllib\/\">Spark MLLib<\/a>. \u0410\u0432\u0442\u043e\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u044f \u0436\u0435 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b \u043e\u0440\u0434\u0435\u0440\u043e\u0432 \u0438\u0437 \u041d\u044c\u044e-\u0419\u043e\u0440\u043a\u0441\u043a\u043e\u0439 \u0444\u043e\u043d\u0434\u043e\u0432\u043e\u0439 \u0431\u0438\u0440\u0436\u0438 (<a href=\"http:\/\/www.nyxdata.com\/Data-Products\/NYSE-OpenBook-History\">NYSE<\/a>) (\u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430 <a href=\"ftp:\/\/ftp.nyxdata.com\/Historical%20Data%20Samples\/TAQ%20NYSE%20OpenBook\/\">NYSE FTP<\/a>), \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443, \u0440\u0430\u0431\u043e\u0442\u0430\u044f \u0441\u043e Spark, \u044f \u043c\u043e\u0433\u0443 \u043b\u0435\u0433\u043a\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u043e\u043f\u043e\u0440\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432, \u044f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c <a href=\"http:\/\/spark.apache.org\/docs\/latest\/mllib-decision-tree.html\">\u0434\u0435\u0440\u0435\u0432\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0439<\/a> \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Spark MLLib \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u043b\u0430\u0441\u0441\u043e\u0432\u0443\u044e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e. <\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0433\u043b\u0443\u0431\u0436\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e. \u042f \u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0443 \u043f\u043e\u043b\u043d\u044b\u0439 \u043e\u0431\u0437\u043e\u0440 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u043b\u0438 \u0434\u0432\u0443\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445, \u043d\u043e \u043c\u0435\u043d\u0435\u0435 \u043d\u0430\u0443\u0447\u043d\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u2013 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0431\u043e\u0440\u0430 \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u0446\u0435\u043b\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u0438\u0441\u0445\u043e\u0434\u0430.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-258887","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=258887"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258887\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=258887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=258887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=258887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}