{"id":355406,"date":"2024-05-20T23:08:09","date_gmt":"2024-05-20T23:08:09","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=355406"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-20T23:08:09","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=355406","title":{"rendered":"<span>\u041c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434\u0431\u043e\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u0422\u043e\u0440\u0433\u043e\u0432\u044b\u0439 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440 + \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0423\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u0425\u0430\u0431\u0440, \u0434\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c!<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044e\u0441\u044c, \u044f \u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u0412\u043e\u043b\u043a\u043e\u0432, \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 IT \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0418 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u0440\u043e\u0442\u0435\u043d\u044c\u043a\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439 \u0441 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043c\u043e\u0438 \u043f\u0443\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u043b\u0438\u0447\u043d\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438. (\u044d\u0442\u043e \u043d\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435, \u043d\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438, \u043d\u0435 \u0433\u0430\u0434\u0430\u043d\u0438\u0435 \u0438 \u043d\u0435 \u0430\u0441\u0442\u0440\u043e\u043b\u043e\u0433\u0438\u044f).<\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u043c \u043d\u0430\u0448\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 Python \u0438 Jupiter Notebook. \u042d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. \u0412\u0441\u0435 \u043f\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443.<\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430, \u0442\u0435\u043c \u043a\u0442\u043e \u043f\u0438\u0448\u0435\u0442 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0440\u043e\u0431\u043e\u0442\u043e\u0432, \u0438\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u0434\u043b\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u043e\u0442\u043e\u0432, \u0438 \u0434\u0430\u0436\u0435 \u0442\u0435\u043c, \u043a\u0442\u043e \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0447\u0435\u0433\u043e-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0438 \u043d\u043e\u0432\u043e\u0433\u043e.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0435\u043c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0eb\/337\/11e\/0eb33711e873867fdf4f435a96cb509d.png\" alt=\"\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0442\u0440\u0438 \u0440\u0443\u043a\u0438\" title=\"\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0442\u0440\u0438 \u0440\u0443\u043a\u0438\" width=\"1920\" height=\"994\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0eb\/337\/11e\/0eb33711e873867fdf4f435a96cb509d.png\"\/><\/p>\n<div><figcaption>\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0442\u0440\u0438 \u0440\u0443\u043a\u0438<\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u043a\u0443<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f, \u043a\u0430\u043a \u0432\u0441\u0435\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u0430\u043b\u0433\u043e\u0442\u0440\u0435\u0439\u0434\u0438\u043d\u0433\u0430 \u043e\u0447\u0435\u043d\u044c \u0432\u044b\u0441\u043e\u043a\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u0442\u043e-\u0442\u043e \u0443\u0436\u0435 \u043d\u0430\u0448\u0435\u043b \u0441\u0432\u043e\u0439 &#171;\u0437\u043e\u043b\u043e\u0442\u043e\u0439 \u0433\u0440\u0430\u0430\u043b\u044c&#187;. \u041d\u043e \u043c\u044b \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u043c \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445&#8230;<\/p>\n<p>\u041a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442: \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043e\u0431\u0437\u043e\u0440 \u043e\u0431\u0449\u0438\u0445 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439, \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442\u0435 \u0435\u0435, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0435 \u0440\u0438\u0441\u043a-\u043c\u0435\u043d\u0435\u0434\u0436\u043c\u0435\u043d\u0442, \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u0435 \u043d\u0430 \u0440\u044b\u043d\u043e\u043a \u0441 \u043d\u043e\u0432\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u0438 &#8230;. \u0441\u043b\u0438\u0432\u0430\u0435\u0442\u0435 \u0434\u0435\u043f\u043e. \u0417\u0430\u0442\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c &#171;\u043f\u043e\u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0439&#187; \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f.<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0438\u0434\u0435\u0442 \u0443\u043f\u043e\u0440 \u043d\u0430 \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u0445 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439? \u0410 \u0432\u0441\u0435 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0437-\u0437\u0430 \u0438\u0437\u043c\u0435\u043d\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u043a\u043e\u043d\u044a\u044e\u043d\u043a\u0442\u0443\u0440\u044b \u0440\u044b\u043d\u043a\u0430 \u0432\u0430\u0448\u0430 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u0435\u0436\u0434\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0440\u044b\u043d\u043a\u0430, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u043d\u0435\u0433\u043e = \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u043c.<\/p>\n<p>\u0421\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0435\u043a\u0438\u0439 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u043e\u0448\u0438\u0431\u043e\u043a, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0447\u0442\u043e \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u0441 \u0447\u0435\u043c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441\u0430\u043c. (\u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e, \u0447\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u043b\u044f \u0432\u0430\u0441 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0438\u043b\u0438 \u0432\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u0447\u0435\u043c-\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u043c)<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u044e \u043e\u0448\u0438\u0431\u043a\u0438 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0430\u0432\u0442\u043e\u0440<\/summary>\n<div class=\"spoiler__content\">\n<p><strong>0. \u0411\u044b\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c \u0447\u0442\u043e \u0432\u0430\u0448\u0430 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0442\u043e\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/strong><br \/>\u0418\u0437\u043b\u0438\u0448\u043d\u0438\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u043c \u043d\u0435 \u0434\u0430\u0435\u0442 \u0445\u043e\u043b\u043e\u0434\u043d\u043e\u043a\u0440\u043e\u0432\u043d\u043e\u043c\u0443 \u0440\u0430\u0437\u0443\u043c\u0443<br \/>\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<p><strong>1. \u0421\u0430\u043c\u044b\u0439 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u0439, \u044d\u0442\u043e \u043c\u0430\u043b\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/strong><br \/>\u0418\u0437\u0443\u0447\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u043d\u0430 \u0435\u0435 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u044b\u043d\u043e\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445. \u0427\u0430\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445 \u0434\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u044e \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0432 \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0435\u0449\u0435 \u0440\u044b\u043d\u043e\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u0430\u043b\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043a\u043e\u0442\u0438\u0440\u043e\u0432\u043e\u043a.<\/p>\n<p><strong>2. \u041f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u0435 &#171;\u0442\u043e\u0447\u043d\u044b\u0445&#187; \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/strong><br \/>\u041f\u043e\u043f\u044b\u0442\u043a\u0438 \u043f\u043e\u0439\u043c\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u0442\u0435\u0440\u043f\u0438\u0442 \u0444\u0438\u0430\u0441\u043a\u043e \u043f\u0440\u0438 \u0447\u0430\u0441\u0442\u043e\u043c \u043d\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432, \u0443\u0441\u043b\u043e\u0432\u0438\u0439. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0434\u043e\u0441\u0442\u0438\u0447\u044c &#171;\u0433\u0440\u0443\u0431\u043e\u0439&#187; \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438.<\/p>\n<p><strong>3. \u041e\u0442\u0445\u043e\u0434 \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0439 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/strong><br \/>\u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443\u0436\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u044b\u0441\u043b\u0438 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e &#171;\u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c&#187; \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435, \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u043c\u0438, \u0436\u0435\u043b\u0430\u044f \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0441 \u0440\u044b\u043d\u043a\u0430.<\/p>\n<p><strong>4. \u041d\u0435\u0437\u043d\u0430\u043d\u0438\u0435 \u0441\u043b\u0430\u0431\u044b\u0445 \u0441\u0442\u043e\u0440\u043e\u043d \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/strong><br \/>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u043b\u0435\u043d\u0434\u0436\u0435\u0440\u0430 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u0430\u044f \u0432\u043e\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0440\u0435\u0437\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0446\u0435\u043d\u044b.<br \/>\u0418\u043b\u0438 \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043b\u0438\u043a\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0432\u044b\u043d\u0443\u0436\u0434\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0440\u0448\u0438\u0435 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u044b.<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 Binance \u0431\u0438\u0440\u0436\u0438 \u0447\u0435\u0440\u0435\u0437 api \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 3 \u0433\u043e\u0434\u0430. \u0420\u044b\u043d\u043e\u043a \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442 \u043e\u0447\u0435\u043d\u044c \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u044b\u0439, \u0438 \u044d\u0442\u043e \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440, \u0441 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u0423\u0447\u0442\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435\u00a0\u0443\u0441\u043b\u043e\u0432\u0438\u044f:<\/summary>\n<div class=\"spoiler__content\">\n<p>1. \u0412\u043e\u0437\u044c\u043c\u0435\u043c \u0437\u0430 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443, \u0447\u0442\u043e \u0440\u044b\u043d\u043e\u043a \u044d\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c (\u0433\u0434\u0435 \u0432\u0441\u0435 \u0438\u0433\u0440\u043e\u043a\u0438 \u0441 \u0440\u0430\u0432\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430\u043c\u0438)<br \/>2. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u0438\u043d\u0443\u0442\u043d\u044b\u0439 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0430\u0439\u043c \u0434\u043b\u044f \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438, \u0430 \u0441\u0438\u043c\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0441 \u0448\u0430\u0433\u043e\u043c \u0432 1 \u043c\u0438\u043d\u0443\u0442\u0443.<br \/>3. \u0412\u0432\u0435\u0434\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u0442\u0430. \u041f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u0430 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438. (\u043e\u0446\u0435\u043d\u043a\u0430 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0440\u043e\u0441\u0442\u0430 \u0438 \u043f\u0440\u043e\u0441\u0430\u0434\u043a\u0438)<br \/>4. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043f\u043b\u043e\u0441\u0441\u0430 (\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u043b\u0438\u0431\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0446\u0435\u043d\u0430)<br \/>5. \u0412\u0432\u043e\u0434\u0438\u043c \u0444\u0430\u043a\u0442\u043e\u0440 \u043f\u0440\u043e\u0441\u043a\u0430\u043b\u044c\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0446\u0435\u043d\u044b \u0432 0.1%<br \/>6. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044e \u043d\u0430 \u0431\u0438\u0440\u0436\u0435 \u0441 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c (\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0437\u0430\u043f\u0430\u0441 100% \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438)<br \/>7. \u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u0441\u0434\u0435\u043b\u043a\u0438 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b. \u041e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0434\u0435\u043b\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b.<br \/>8. \u0412\u0432\u0435\u0434\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u043e\u0441 \u0431\u043e\u043b\u043b\u0438\u043d\u0434\u0436\u0435\u0440\u0430 \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<br \/>9. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0431\u043e\u0440 take profit \u0438 stop loss<\/p>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u0442\u0435\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043b\u0438\u043d\u0438\u0439 \u0431\u043e\u043b\u043b\u0438\u043d\u0434\u0436\u0435\u0440\u0430. \u041a\u0441\u0442\u0430\u0442\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e, \u0438\u043b\u0438\/\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 (\u0447\u0430\u0441 \u0442\u043e\u0440\u0433\u043e\u0432, \u0437\u0432\u0435\u0437\u0434\u044b, \u0447\u0438\u0441\u043b\u043e \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0439 \u0432 \u043d\u043e\u0432\u043e\u0441\u0442\u044f\u0445 \u043a\u0430\u043a\u043e\u0433\u043e \u0442\u043e \u0441\u043b\u043e\u0432\u0430, \u0438 \u0442.\u0434.). \u041d\u043e \u0441\u0443\u0442\u044c \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438 \u0442\u0443\u0442 \u0436\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0441 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u043e\u043c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0410\u0431\u0441\u0443\u0440\u0434\u043d\u043e\u0441\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u0432\u0441\u044f \u0432 \u0442\u043e\u043c, \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0435\u043c. \u041c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440, \u0438 \u043f\u0440\u043e\u0433\u043d\u0430\u043b\u0438 \u043d\u0430 \u043d\u0435\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439. \u041a\u0430\u0436\u0434\u0430\u044f \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0435 \u0441\u0435\u0440\u0438\u0438 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u043c \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u044f\u043c. \u041f\u043e \u043e\u0434\u043d\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0417\u0430\u0442\u0435\u043c \u044d\u0442\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u044b \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\"># \u0418\u043c\u043f\u043e\u0440\u0442\u044b import warnings warnings.filterwarnings('ignore') import pandas as pd import os import numpy as np import matplotlib.pyplot as plt import random<\/code><\/pre>\n<pre><code class=\"python\"># \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 \u0441 \u0431\u0438\u0440\u0436\u0438 symbols_data_close = {}  path = 'history4\/' for symbol in os.listdir(path)[0:1]:     data = pd.read_csv(f'{path}{symbol}')     symbols_data_close.update({symbol: data['4'].values})<\/code><\/pre>\n<pre><code class=\"python\"># \u0411\u0435\u0440\u0435\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u0442 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u0447\u0442\u043e \u043e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f symbols = list(symbols_data_close.keys()) closdata = symbols_data_close[symbols[0]][:10000] plt.figure(figsize=(20,10)) plt.plot(closdata)<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/201\/16c\/355\/20116c355f12aa43cab64f3dbe903c41.png\" alt=\"\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 SNXUSDT, \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a 1 \u043d\u0435\u0434\u0435\u043b\u044f\" title=\"\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 SNXUSDT, \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a 1 \u043d\u0435\u0434\u0435\u043b\u044f\" width=\"1601\" height=\"813\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/201\/16c\/355\/20116c355f12aa43cab64f3dbe903c41.png\"\/><\/p>\n<div><figcaption>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 SNXUSDT, \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a 1 \u043d\u0435\u0434\u0435\u043b\u044f<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"python\"># \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0447\u0430\u0439\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 def get_generate_params(count=None):      params = {'ma_window': [], 'std_window': [],                'std_rate_up': [], 'std_rate_dw': [],                'take_profit': [], 'stop_profit': []}          params['ma_window'] = np.asarray(np.random.random(count) * 1000 + 1, 'int32')     params['std_window'] = np.asarray(np.random.random(count) * 1000 + 1, 'int32')     params['std_rate_up'] = np.random.random(count) * 8 - 4     params['std_rate_dw'] = np.random.random(count) * 8 - 4          params['take_profit'] = np.random.random(count) * 10     params['stop_profit'] = -np.random.random(count) * 10          return params<\/code><\/pre>\n<pre><code class=\"python\"># \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043f\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c def get_my_strategy(p=None, cdata=None, count=None):     # p -> params          bb_up = []     bb_dw = []          for i in np.arange(count):         ma = pd.Series(cdata).rolling(window=p['ma_window'][i]).mean().values         std = pd.Series(cdata).rolling(window=p['std_window'][i]).std().values                  bb_up.append((ma + std * p['std_rate_up'][i])[1000:])         bb_dw.append((ma - std * p['std_rate_dw'][i])[1000:])          return {'bb_up': bb_up, 'bb_dw': bb_dw, 'closdata': cdata[1000:]}<\/code><\/pre>\n<pre><code class=\"python\"># \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430 def get_rules_result(p=None, strategy=None, operation=None,                      profit=None, max_profit=None, min_profit=None,                       y_index=None, y_index_last=None, x_index=None):          signal = {'in_long': False, 'end_long': False}          if operation is None:         for y_line in strategy['bb_up']:             if y_index_last &lt; y_line[x_index] &lt; y_index:                 signal['in_long'] = True                 return signal               if operation == 'long':                  for ind, (y_line_up, y_line_dw) in enumerate(zip(strategy['bb_up'], strategy['bb_dw'])):                          rule_1 = y_index > y_line_up[x_index] and profit > p['take_profit'][ind] and profit > 0             rule_2 = y_index > y_line_up[x_index] and max_profit - profit > p['take_profit'][ind] and profit > 0             rule_3 = y_index > y_line_up[x_index] and max_profit &lt; -p['take_profit'][ind] and profit > 0                          rule_4 = y_index &lt; y_line_dw[x_index] and profit &lt; p['stop_profit'][ind]                          if rule_1 or rule_2 or rule_3 or rule_4:                 signal['end_long'] = True                 return signal                   return signal<\/code><\/pre>\n<p>\u0412\u044b\u0432\u0435\u0434\u0435\u043c \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0448\u0430 \u043e\u0434\u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f (\u0433\u0440\u0430\u0444\u0438\u043a \u0446\u0435\u043d\u044b \u0438 \u043b\u0438\u043d\u0438\u0438 \u0431\u043e\u043b\u043b\u0438\u043d\u0434\u0436\u0435\u0440\u0430)<\/p>\n<pre><code class=\"python\">countData = 15 # \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u043d\u0438\u0439 \u0431\u043e\u043b\u043b\u0438\u043d\u0434\u0436\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a \u0443\u0447\u0438\u0442\u0443 \u0432 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438  my_strategy = get_my_strategy(     p=get_generate_params(count=countData),      cdata=closdata,      count=countData)  plt.figure(figsize=(20,10)) plt.plot(my_strategy['closdata'], color='black')  for n in np.arange(countData):     plt.plot(my_strategy['bb_up'][n])     plt.plot(my_strategy['bb_dw'][n])<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/249\/6f6\/b6b\/2496f6b6bb41a473dc8f35f7ca31a0a1.png\" alt=\"\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043b\u0438\u043d\u0438\u0438 \u0431\u043e\u043b\u043b\u0438\u043d\u0434\u0436\u0435\u0440\u0430 \u043d\u0430 \u0446\u0435\u043d\u043e\u0432\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435\" title=\"\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043b\u0438\u043d\u0438\u0438 \u0431\u043e\u043b\u043b\u0438\u043d\u0434\u0436\u0435\u0440\u0430 \u043d\u0430 \u0446\u0435\u043d\u043e\u0432\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435\" width=\"1601\" height=\"813\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/249\/6f6\/b6b\/2496f6b6bb41a473dc8f35f7ca31a0a1.png\"\/><\/p>\n<div><figcaption>\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043b\u0438\u043d\u0438\u0438 \u0431\u043e\u043b\u043b\u0438\u043d\u0434\u0436\u0435\u0440\u0430 \u043d\u0430 \u0446\u0435\u043d\u043e\u0432\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u0432\u0438\u0436\u043e\u043a \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430. \u0417\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0434\u0435\u043b\u043a\u0438 \u0432 \u043b\u043e\u043d\u0433.<\/p>\n<pre><code class=\"python\">countData = 10   leverage = 10 # \u043f\u043b\u0435\u0447\u043e params_history = []  for cnt in np.arange(9999999):      # \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b     generate_params = get_generate_params(count=countData)      # \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u0430\u0442\u0435\u0440\u0438\u044e     my_strategy = get_my_strategy(p=generate_params, cdata=closdata, count=countData)      depo = [1000]      operation=None     profit=0     max_profit=0     min_profit=0      # \u043f\u043e \u0448\u0430\u0433\u0430\u043c \u0438\u0434\u0435\u043c \u043f\u043e \u0446\u0435\u043d\u043e\u0432\u043e\u043c\u0443 \u0433\u0440\u0430\u0444\u0438\u043a\u0443     for x, (closedata_last, closedata) in enumerate(zip(my_strategy['closdata'][:-1], my_strategy['closdata'][1:])):         x_index = x + 1          # \u0432\u0445\u043e\u0434 \u0432 \u0441\u0434\u0435\u043b\u043a\u0443 \u043b\u043e\u043d\u0433         if rules_result['in_long']:             rules_result['in_long'] = False              operation = 'long'              size_buy = depo[-1]             price_buy = closedata          # \u043e\u0446\u0435\u043d\u043a\u0430 \u043f\u0440\u043e\u0444\u0438\u0442\u0430, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0441\u0430\u0434\u043a\u0438 \u0438 \u0440\u043e\u0441\u0442\u0430         if operation is not None:              profit = (closedata \/ price_buy - 1) * 100 - 0.3              if profit > max_profit: max_profit = profit             if profit &lt; min_profit: min_profit = profit          # \u0432\u044b\u044f\u0441\u043d\u044f\u0435\u043c \u043d\u0430\u0448\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0435         rules_result = get_rules_result(p=generate_params, strategy=my_strategy, operation=operation,                          profit=profit, max_profit=max_profit, min_profit=min_profit,                           y_index=closedata, y_index_last=closedata_last, x_index=x_index)          depo.append(depo[-1])          # \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0441\u0434\u0435\u043b\u043a\u0438 \u043f\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0443         if rules_result['end_long']:             rules_result['end_long'] = False              depo[-1] = depo[-1] + size_buy * profit \/ 100 * leverage              operation=None             profit=0             max_profit=0             min_profit=0                  depo[-1] = depo[-1] + size_buy * profit \/ 100 * leverage      # \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432     params_history.append({'generate_params': generate_params, 'profit': depo[-1]})     if depo[-1] > 1000: print(round(depo[-1], 1), end=' ')<\/code><\/pre>\n<pre><code>1276.3 1681.9 1072.2 1185.5 1013.5 1419.1 1206.4 1842.5 1260.9 1222.8 1016.5 1084.9 1478.2 1384.9 1022.9 1016.2 1490.1 2235.1 1100.1 1164.0 1076.1 1079.4 1070.4 1245.3 1007.7 1291.8 1101.4 1003.6 1002.8 1125.8 1010.9 1115.4 1197.5 1353.4 1037.5 1179.6 1204.8 1070.2 1334.8 1138.2 1301.0 1490.7 1036.8 1030.5 1400.4 1150.7 1146.6 1218.0 1362.6 1098.4 1695.6 1006.0 1149.5 1126.4 1048.8 1086.0 1137.5 1577.9 1266.4 1246.5 1005.0 1015.9 1031.1 1087.9 1311.0 1389.6 1019.0 1049.1 1210.9 1146.3 1127.8 1366.6 1360.8 1465.9 1101.6 1076.6 1060.4 1044.1 1281.3 1073.3 1047.7 1041.7 1322.0 1012.2 1301.1 1568.1 1056.8 1024.1 1485.3 1106.6 1008.8 1186.8 1007.3 1007.9 1100.6 1834.9 1142.1 1806.9 1352.7 1052.4 1284.5 1045.4 1017.0 1083.4 1229.2 1214.1 1012.2 1398.4 1000.3 1152.4 1003.1 2073.1 1301.3 2235.9 1223.4 1091.3 1011.6 1163.9 1006.3 1084.5 1514.4 1125.3 1334.6 1038.8 1375.3 1136.9 1211.9 1194.3 1746.2 1131.6 1029.2 1132.5 1311.5 1018.0 1355.9 1264.4 1069.1 .............<\/code><\/pre>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432. \u041e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u043d\u0430 96 \u0447\u0430\u0441\u043e\u0432.<\/p>\n<pre><code class=\"python\"># \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b result = pd.DataFrame(params_history).sort_values(by='profit') print('\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439', result.shape[0]) result = result[result['profit'] > 2500] result<\/code><\/pre>\n<p>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 4326132<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th>\n<\/th>\n<th data-colwidth=\"380\" width=\"380\">\n<p>generate_params<\/p>\n<\/th>\n<th>\n<p>profit<\/p>\n<\/th>\n<\/tr>\n<tr>\n<th>\n<p>1355114<\/p>\n<\/th>\n<td data-colwidth=\"380\" width=\"380\">\n<p align=\"left\">{&#8216;ma_window&#8217;: [934, 829, 385, 291, 901, 489, 8&#8230;<\/p>\n<\/td>\n<td>\n<p align=\"left\">2509.731530<\/p>\n<\/td>\n<\/tr>\n<tr>\n<th>\n<p>2748242<\/p>\n<\/th>\n<td data-colwidth=\"380\" width=\"380\">\n<p align=\"left\">{&#8216;ma_window&#8217;: [583, 786, 272, 374, 993, 322, 4&#8230;<\/p>\n<\/td>\n<td>\n<p align=\"left\">2515.246686<\/p>\n<\/td>\n<\/tr>\n<tr>\n<th>\n<p>1168352<\/p>\n<\/th>\n<td data-colwidth=\"380\" width=\"380\">\n<p align=\"left\">{&#8216;ma_window&#8217;: [444, 256, 466, 165, 640, 298, 3&#8230;<\/p>\n<\/td>\n<td>\n<p align=\"left\">2528.583217<\/p>\n<\/td>\n<\/tr>\n<tr>\n<th>\n<p>1056488<\/p>\n<\/th>\n<td data-colwidth=\"380\" width=\"380\">\n<p align=\"left\">{&#8216;ma_window&#8217;: [173, 174, 148, 888, 122, 361, 7&#8230;<\/p>\n<\/td>\n<td>\n<p align=\"left\">2570.601539<\/p>\n<\/td>\n<\/tr>\n<tr>\n<th>\n<p>4090771<\/p>\n<\/th>\n<td data-colwidth=\"380\" width=\"380\">\n<p align=\"left\">{&#8216;ma_window&#8217;: [690, 930, 603, 720, 432, 411, 7&#8230;<\/p>\n<\/td>\n<td>\n<p align=\"left\">2600.638982<\/p>\n<\/td>\n<\/tr>\n<tr>\n<th>\n<p>3174694<\/p>\n<\/th>\n<td data-colwidth=\"380\" width=\"380\">\n<p align=\"left\">{&#8216;ma_window&#8217;: [885, 970, 293, 296, 358, 586, 8&#8230;<\/p>\n<\/td>\n<td>\n<p align=\"left\">2604.829127<\/p>\n<\/td>\n<\/tr>\n<tr>\n<th>\n<p>326805<\/p>\n<\/th>\n<td data-colwidth=\"380\" width=\"380\">\n<p align=\"left\">{&#8216;ma_window&#8217;: [873, 6, 478, 957, 263, 717, 682&#8230;<\/p>\n<\/td>\n<td>\n<p align=\"left\">2605.651078<\/p>\n<\/td>\n<\/tr>\n<tr>\n<th>\n<p>301489<\/p>\n<\/th>\n<td data-colwidth=\"380\" width=\"380\">\n<p align=\"left\">{&#8216;ma_window&#8217;: [372, 474, 59, 65, 545, 820, 969&#8230;<\/p>\n<\/td>\n<td>\n<p align=\"left\">2665.182816<\/p>\n<\/td>\n<\/tr>\n<tr>\n<th>\n<p>3733749<\/p>\n<\/th>\n<td data-colwidth=\"380\" width=\"380\">\n<p align=\"left\">{&#8216;ma_window&#8217;: [176, 31, 183, 29, 92, 9, 552, 5&#8230;<\/p>\n<\/td>\n<td>\n<p align=\"left\">2688.979172<\/p>\n<\/td>\n<\/tr>\n<tr>\n<th>\n<p>863146<\/p>\n<\/th>\n<td data-colwidth=\"380\" width=\"380\">\n<p align=\"left\">{&#8216;ma_window&#8217;: [634, 463, 554, 237, 36, 637, 74&#8230;<\/p>\n<\/td>\n<td>\n<p align=\"left\">2707.697915<\/p>\n<\/td>\n<\/tr>\n<tr>\n<th>\n<p>4280661<\/p>\n<\/th>\n<td data-colwidth=\"380\" width=\"380\">\n<p align=\"left\">{&#8216;ma_window&#8217;: [764, 908, 824, 165, 911, 682, 4&#8230;<\/p>\n<\/td>\n<td>\n<p align=\"left\">2749.313573<\/p>\n<\/td>\n<\/tr>\n<tr>\n<th>\n<p>817925<\/p>\n<\/th>\n<td data-colwidth=\"380\" width=\"380\">\n<p align=\"left\">{&#8216;ma_window&#8217;: [13, 252, 12, 571, 959, 376, 12,&#8230;<\/p>\n<\/td>\n<td>\n<p align=\"left\">3259.250233<\/p>\n<\/td>\n<\/tr>\n<tr>\n<th>\n<p>989229<\/p>\n<\/th>\n<td data-colwidth=\"380\" width=\"380\">\n<p align=\"left\">{&#8216;ma_window&#8217;: [401, 259, 980, 609, 254, 927, 7&#8230;<\/p>\n<\/td>\n<td>\n<p align=\"left\">3725.547182<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/details>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u0442 \u043f\u0440\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u043c \u043f\u043e\u0434\u0431\u043e\u0440\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f <br \/>(3725 &#8212; 1000) \/ 1000 * 100% = 272,5%<\/p>\n<p>\u0418\u0442\u0430\u043a. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f. \u041d\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u0432 \u043d\u0435\u043b\u043e\u0432\u043a\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: \u0434\u043b\u044f \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043c \u043f\u043e\u043f\u0430\u0440\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043d\u0430\u0439\u0434\u0435\u043c \u0441\u0430\u043c\u044b\u0435 &#171;\u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435&#187; \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0438\u0437\u043c\u0435\u043d\u0447\u0438\u0432\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041d\u0430\u0439\u0434\u0435\u043c \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0423\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0435 &#8212; \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435, \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0432\u0441\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. <br \/>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u0443\u0441\u0438\u043b\u0438\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<pre><code>raw_counts = pd.Series(raw_col[0]).value_counts() raw_popul = raw_counts[raw_counts > 5].index.values  col_counts = pd.Series(raw_col[1]).value_counts() col_popul = raw_counts[raw_counts > 5].index.values  popul_params = np.unique(np.concatenate([raw_popul, col_popul])) popul_params<\/code><\/pre>\n<p>array([14, 41, 42, 44, 45, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59])<\/p>\n<pre><code class=\"python\">col_params = table_populParameters.columns  fig, axs = plt.subplots(nrows=4, ncols=4, figsize=(16,12))  for n, ax in enumerate(axs.flatten()):     ax.plot(table_populParameters[col_params[n]].rolling(window=5000).mean())      ax.set_title(f'# param: {col_params[n]}')     ax.set_yticks(())     ax.set_xticks(())   plt.suptitle('\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0440\u043e\u0441\u0442\u0430 \u043f\u0440\u043e\u0444\u0438\u0442\u0430 (\u043e\u0441\u044c \u043e\u0443) \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 (\u043e\u0441\u044c \u043e\u0445)', y = 0.95) plt.subplots_adjust(wspace=0.05) plt.show()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/aba\/3b0\/c2d\/aba3b0c2d9e083272cd546ff55897d3f.png\" alt=\"\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u043e\u0444\u0438\u0442\u0430\" title=\"\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u043e\u0444\u0438\u0442\u0430\" width=\"749\" height=\"602\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/aba\/3b0\/c2d\/aba3b0c2d9e083272cd546ff55897d3f.png\"\/><\/p>\n<div><figcaption>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u043e\u0444\u0438\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0432\u0435\u043b\u0438\u0447\u0438\u043d \u0434\u043b\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0430\u0448\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0431\u044b\u043b\u0430 \u0443\u0436\u0435 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044e \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u0442\u0430). \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 10000 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u043f\u043e \u043d\u0438\u043c \u0441\u0440\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">dict_selectParams = {} for _param in col_params:     dict_selectParams.update(         {_param: table_populParameters[_param].rolling(window=5000).mean().values[-10000:]}) df_selectParams = pd.DataFrame(dict_selectParams)  df_selectParams = pd.DataFrame(dict_selectParams) df_selectParams.loc['mean'] = df_selectParams.mean()  df_selectParams<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2b6\/a6c\/721\/2b6a6c721265bd2fc2687b6eb72c9bff.png\" alt=\"\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432\" title=\"\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432\" width=\"751\" height=\"288\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2b6\/a6c\/721\/2b6a6c721265bd2fc2687b6eb72c9bff.png\"\/><\/p>\n<div><figcaption>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<p>\u0417\u0430\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430\u0448\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0433\u043e\u043d \u043d\u0430 96 \u0447\u0430\u0441\u043e\u0432.<\/p>\n<pre><code class=\"python\"># \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0447\u0430\u0439\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0435\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 def get_generate_params_withFix(count=None):      params = {'ma_window': [], 'std_window': [],                'std_rate_up': [], 'std_rate_dw': [],                'take_profit': [], 'stop_profit': []}          #0-9     params['ma_window'] = np.asarray(np.random.random(count) * 1000 + 1, 'int32')          #10-19     params['std_window'] = np.asarray(np.random.random(count) * 1000 + 1, 'int32')     params['std_window'][4] = 526          #20-29     params['std_rate_up'] = np.random.random(count) * 8 - 4          #30-39     params['std_rate_dw'] = np.random.random(count) * 8 - 4          #40-49     params['take_profit'] = np.random.random(count) * 10     params['take_profit'][[1, 2, 4, 5, 9]] = 5.6          #50-59     params['stop_profit'] = -np.random.random(count) * 10     params['stop_profit'][[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]] = -5.9          return params  #................................................    countData = 10  leverage = 10 params_history = []  for cnt in np.arange(9999999): #     generate_params = get_generate_params(count=countData)     generate_params = get_generate_params_withFix(count=countData)<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0433\u043e\u043d\u044b \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0443 \u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0440\u044b\u043d\u043e\u0447\u043d\u044b\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438. \u041f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e &#171;\u043b\u043e\u043d\u0433\u043e\u0432\u044b\u0445&#187; \u0441\u0434\u0435\u043b\u043e\u043a.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/834\/cac\/4bb\/834cac4bb2788b544c7ad7d2b57d7d42.png\" alt=\"\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 BNBUSDT, \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a 1 \u043d\u0435\u0434\u0435\u043b\u044f\" title=\"\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 BNBUSDT, \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a 1 \u043d\u0435\u0434\u0435\u043b\u044f\" width=\"1606\" height=\"813\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/834\/cac\/4bb\/834cac4bb2788b544c7ad7d2b57d7d42.png\"\/><\/p>\n<div><figcaption>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 BNBUSDT, \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a 1 \u043d\u0435\u0434\u0435\u043b\u044f<\/figcaption><\/div>\n<\/figure>\n<p>\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u0441\u043b\u0443\u0447\u0430\u044f, \u043a\u043e\u0433\u0434\u0430 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u0438\u0437 \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u0439\u0441\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0441\u0432\u043e\u0431\u043e\u0434\u044b) \u0432\u044b\u0432\u0435\u043b\u0430 \u043f\u0440\u043e\u0444\u0438\u0442 \u0432 \u043f\u043b\u044e\u0441. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043b\u043e\u043d\u0433\u043e\u0432\u044b\u0445 \u0441\u0434\u0435\u043b\u043e\u043a, \u0442\u043e \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0443\u0434\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043b\u043e\u043d\u0433\u043e\u0432\u044b\u0445 \u0438 \u0431\u043e\u043a\u043e\u0432\u0438\u043a\u043e\u0432\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u0440\u044b\u043d\u043a\u0430. \u041e\u0434\u043d\u0430\u043a\u043e, \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (\u0441\u043d\u0438\u0436\u0430\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0432\u043e\u0431\u043e\u0434\u044b \u043c\u043e\u0434\u0435\u043b\u0438), \u043d\u0443\u0436\u043d\u043e \u0431\u0440\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0446\u0435\u043b\u044c\u044e \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u0430\u043c\u0430 \u0438\u0434\u0435\u044f \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u043e\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u0438 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043d\u0430 \u0440\u044b\u043d\u043a\u0435. \u0423\u0434\u0430\u0447\u0438.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/762342\/\"> https:\/\/habr.com\/ru\/articles\/762342\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0423\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u0425\u0430\u0431\u0440, \u0434\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c!<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044e\u0441\u044c, \u044f \u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u0412\u043e\u043b\u043a\u043e\u0432, \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 IT \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0418 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u0440\u043e\u0442\u0435\u043d\u044c\u043a\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439 \u0441 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043c\u043e\u0438 \u043f\u0443\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u043b\u0438\u0447\u043d\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438. (\u044d\u0442\u043e \u043d\u0435 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435, \u043d\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438, \u043d\u0435 \u0433\u0430\u0434\u0430\u043d\u0438\u0435 \u0438 \u043d\u0435 \u0430\u0441\u0442\u0440\u043e\u043b\u043e\u0433\u0438\u044f).<\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u043c \u043d\u0430\u0448\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 Python \u0438 Jupiter Notebook. \u042d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. \u0412\u0441\u0435 \u043f\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443.<\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430, \u0442\u0435\u043c \u043a\u0442\u043e \u043f\u0438\u0448\u0435\u0442 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0440\u043e\u0431\u043e\u0442\u043e\u0432, \u0438\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u0434\u043b\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u043e\u0442\u043e\u0432, \u0438 \u0434\u0430\u0436\u0435 \u0442\u0435\u043c, \u043a\u0442\u043e \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0447\u0435\u0433\u043e-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0438 \u043d\u043e\u0432\u043e\u0433\u043e.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0435\u043c.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0442\u0440\u0438 \u0440\u0443\u043a\u0438<\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u043a\u0443<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f, \u043a\u0430\u043a \u0432\u0441\u0435\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u0430\u043b\u0433\u043e\u0442\u0440\u0435\u0439\u0434\u0438\u043d\u0433\u0430 \u043e\u0447\u0435\u043d\u044c \u0432\u044b\u0441\u043e\u043a\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u0442\u043e-\u0442\u043e \u0443\u0436\u0435 \u043d\u0430\u0448\u0435\u043b \u0441\u0432\u043e\u0439 &#171;\u0437\u043e\u043b\u043e\u0442\u043e\u0439 \u0433\u0440\u0430\u0430\u043b\u044c&#187;. \u041d\u043e \u043c\u044b \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u043c \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445&#8230;<\/p>\n<p>\u041a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442: \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043e\u0431\u0437\u043e\u0440 \u043e\u0431\u0449\u0438\u0445 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439, \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442\u0435 \u0435\u0435, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0435 \u0440\u0438\u0441\u043a-\u043c\u0435\u043d\u0435\u0434\u0436\u043c\u0435\u043d\u0442, \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u0435 \u043d\u0430 \u0440\u044b\u043d\u043e\u043a \u0441 \u043d\u043e\u0432\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u0438 &#8230;. \u0441\u043b\u0438\u0432\u0430\u0435\u0442\u0435 \u0434\u0435\u043f\u043e. \u0417\u0430\u0442\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c &#171;\u043f\u043e\u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0439&#187; \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f.<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0438\u0434\u0435\u0442 \u0443\u043f\u043e\u0440 \u043d\u0430 \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u0445 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439? \u0410 \u0432\u0441\u0435 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0437-\u0437\u0430 \u0438\u0437\u043c\u0435\u043d\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u043a\u043e\u043d\u044a\u044e\u043d\u043a\u0442\u0443\u0440\u044b \u0440\u044b\u043d\u043a\u0430 \u0432\u0430\u0448\u0430 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u0435\u0436\u0434\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0440\u044b\u043d\u043a\u0430, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u043d\u0435\u0433\u043e = \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u043c.<\/p>\n<p>\u0421\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0435\u043a\u0438\u0439 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u043e\u0448\u0438\u0431\u043e\u043a, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0447\u0442\u043e \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u0441 \u0447\u0435\u043c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441\u0430\u043c. (\u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e, \u0447\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u043b\u044f \u0432\u0430\u0441 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0438\u043b\u0438 \u0432\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u0447\u0435\u043c-\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u043c)<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u044e \u043e\u0448\u0438\u0431\u043a\u0438 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0430\u0432\u0442\u043e\u0440<\/summary>\n<div class=\"spoiler__content\">\n<p><strong>0. \u0411\u044b\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c \u0447\u0442\u043e \u0432\u0430\u0448\u0430 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0442\u043e\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/strong><br \/>\u0418\u0437\u043b\u0438\u0448\u043d\u0438\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u043c \u043d\u0435 \u0434\u0430\u0435\u0442 \u0445\u043e\u043b\u043e\u0434\u043d\u043e\u043a\u0440\u043e\u0432\u043d\u043e\u043c\u0443 \u0440\u0430\u0437\u0443\u043c\u0443<br \/>\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<p><strong>1. \u0421\u0430\u043c\u044b\u0439 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u0439, \u044d\u0442\u043e \u043c\u0430\u043b\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/strong><br \/>\u0418\u0437\u0443\u0447\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u043d\u0430 \u0435\u0435 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u044b\u043d\u043e\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445. \u0427\u0430\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445 \u0434\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u044e \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0432 \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0435\u0449\u0435 \u0440\u044b\u043d\u043e\u0447\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u0430\u043b\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043a\u043e\u0442\u0438\u0440\u043e\u0432\u043e\u043a.<\/p>\n<p><strong>2. \u041f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u0435 &#171;\u0442\u043e\u0447\u043d\u044b\u0445&#187; \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/strong><br \/>\u041f\u043e\u043f\u044b\u0442\u043a\u0438 \u043f\u043e\u0439\u043c\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u0442\u0435\u0440\u043f\u0438\u0442 \u0444\u0438\u0430\u0441\u043a\u043e \u043f\u0440\u0438 \u0447\u0430\u0441\u0442\u043e\u043c \u043d\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432, \u0443\u0441\u043b\u043e\u0432\u0438\u0439. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0434\u043e\u0441\u0442\u0438\u0447\u044c &#171;\u0433\u0440\u0443\u0431\u043e\u0439&#187; \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438.<\/p>\n<p><strong>3. \u041e\u0442\u0445\u043e\u0434 \u043e\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0439 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/strong><br \/>\u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443\u0436\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u044b\u0441\u043b\u0438 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e &#171;\u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c&#187; \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435, \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u043c\u0438, \u0436\u0435\u043b\u0430\u044f \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0441 \u0440\u044b\u043d\u043a\u0430.<\/p>\n<p><strong>4. \u041d\u0435\u0437\u043d\u0430\u043d\u0438\u0435 \u0441\u043b\u0430\u0431\u044b\u0445 \u0441\u0442\u043e\u0440\u043e\u043d \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/strong><br \/>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u043b\u0435\u043d\u0434\u0436\u0435\u0440\u0430 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u0430\u044f \u0432\u043e\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0440\u0435\u0437\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0446\u0435\u043d\u044b.<br \/>\u0418\u043b\u0438 \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043b\u0438\u043a\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0432\u044b\u043d\u0443\u0436\u0434\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0440\u0448\u0438\u0435 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u044b.<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 Binance \u0431\u0438\u0440\u0436\u0438 \u0447\u0435\u0440\u0435\u0437 api \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 3 \u0433\u043e\u0434\u0430. \u0420\u044b\u043d\u043e\u043a \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442 \u043e\u0447\u0435\u043d\u044c \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u044b\u0439, \u0438 \u044d\u0442\u043e \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440, \u0441 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u0423\u0447\u0442\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435\u00a0\u0443\u0441\u043b\u043e\u0432\u0438\u044f:<\/summary>\n<div class=\"spoiler__content\">\n<p>1. \u0412\u043e\u0437\u044c\u043c\u0435\u043c \u0437\u0430 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443, \u0447\u0442\u043e \u0440\u044b\u043d\u043e\u043a \u044d\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u044c (\u0433\u0434\u0435 \u0432\u0441\u0435 \u0438\u0433\u0440\u043e\u043a\u0438 \u0441 \u0440\u0430\u0432\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u0430\u043c\u0438)<br \/>2. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u0438\u043d\u0443\u0442\u043d\u044b\u0439 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0430\u0439\u043c \u0434\u043b\u044f \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438, \u0430 \u0441\u0438\u043c\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0441 \u0448\u0430\u0433\u043e\u043c \u0432 1 \u043c\u0438\u043d\u0443\u0442\u0443.<br \/>3. \u0412\u0432\u0435\u0434\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u0442\u0430. \u041f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u0430 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438. (\u043e\u0446\u0435\u043d\u043a\u0430 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0440\u043e\u0441\u0442\u0430 \u0438 \u043f\u0440\u043e\u0441\u0430\u0434\u043a\u0438)<br \/>4. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043f\u043b\u043e\u0441\u0441\u0430 (\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u043b\u0438\u0431\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0446\u0435\u043d\u0430)<br \/>5. \u0412\u0432\u043e\u0434\u0438\u043c \u0444\u0430\u043a\u0442\u043e\u0440 \u043f\u0440\u043e\u0441\u043a\u0430\u043b\u044c\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0446\u0435\u043d\u044b \u0432 0.1%<br \/>6. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044e \u043d\u0430 \u0431\u0438\u0440\u0436\u0435 \u0441 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c (\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0437\u0430\u043f\u0430\u0441 100% \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438)<br \/>7. \u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u0441\u0434\u0435\u043b\u043a\u0438 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0436\u0443\u0440\u043d\u0430\u043b. \u041e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0434\u0435\u043b\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b.<br \/>8. \u0412\u0432\u0435\u0434\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u043e\u0441 \u0431\u043e\u043b\u043b\u0438\u043d\u0434\u0436\u0435\u0440\u0430 \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<br \/>9. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0431\u043e\u0440 take profit \u0438 stop loss<\/p>\n<\/div>\n<\/details>\n<p>\u0417\u0430\u0442\u0435\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043b\u0438\u043d\u0438\u0439 \u0431\u043e\u043b\u043b\u0438\u043d\u0434\u0436\u0435\u0440\u0430. \u041a\u0441\u0442\u0430\u0442\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e, \u0438\u043b\u0438\/\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 (\u0447\u0430\u0441 \u0442\u043e\u0440\u0433\u043e\u0432, \u0437\u0432\u0435\u0437\u0434\u044b, \u0447\u0438\u0441\u043b\u043e \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0439 \u0432 \u043d\u043e\u0432\u043e\u0441\u0442\u044f\u0445 \u043a\u0430\u043a\u043e\u0433\u043e \u0442\u043e \u0441\u043b\u043e\u0432\u0430, \u0438 \u0442.\u0434.). \u041d\u043e \u0441\u0443\u0442\u044c \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438 \u0442\u0443\u0442 \u0436\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0441 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u043e\u043c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0410\u0431\u0441\u0443\u0440\u0434\u043d\u043e\u0441\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u0432\u0441\u044f \u0432 \u0442\u043e\u043c, \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0435\u043c. \u041c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440, \u0438 \u043f\u0440\u043e\u0433\u043d\u0430\u043b\u0438 \u043d\u0430 \u043d\u0435\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439. \u041a\u0430\u0436\u0434\u0430\u044f \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0435 \u0441\u0435\u0440\u0438\u0438 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u043c \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u044f\u043c. \u041f\u043e \u043e\u0434\u043d\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0417\u0430\u0442\u0435\u043c \u044d\u0442\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u044b \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0439<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\"># \u0418\u043c\u043f\u043e\u0440\u0442\u044b import warnings warnings.filterwarnings('ignore') import pandas as pd import os import numpy as np import matplotlib.pyplot as plt import random<\/code><\/pre>\n<pre><code class=\"python\"># \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 \u0441 \u0431\u0438\u0440\u0436\u0438 symbols_data_close = {}  path = 'history4\/' for symbol in os.listdir(path)[0:1]:     data = pd.read_csv(f'{path}{symbol}')     symbols_data_close.update({symbol: data['4'].values})<\/code><\/pre>\n<pre><code class=\"python\"># \u0411\u0435\u0440\u0435\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u0442 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u0447\u0442\u043e \u043e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f symbols = list(symbols_data_close.keys()) closdata = symbols_data_close[symbols[0]][:10000] plt.figure(figsize=(20,10)) plt.plot(closdata)<\/code><\/pre>\n<figure class=\"full-width\">\n<div><figcaption>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 SNXUSDT, \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a 1 \u043d\u0435\u0434\u0435\u043b\u044f<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"python\"># \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0447\u0430\u0439\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 def get_generate_params(count=None):      params = {'ma_window': [], 'std_window': [],                'std_rate_up': [], 'std_rate_dw': [],                'take_profit': [], 'stop_profit': []}          params['ma_window'] = np.asarray(np.random.random(count) * 1000 + 1, 'int32')     params['std_window'] = np.asarray(np.random.random(count) * 1000 + 1, 'int32')     params['std_rate_up'] = np.random.random(count) * 8 - 4     params['std_rate_dw'] = np.random.random(count) * 8 - 4          params['take_profit'] = np.random.random(count) * 10     params['stop_profit'] = -np.random.random(count) * 10          return params<\/code><\/pre>\n<pre><code class=\"python\"># \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043f\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c def get_my_strategy(p=None, cdata=None, count=None):     # p -> params          bb_up = []     bb_dw = []          for i in np.arange(count):         ma = pd.Series(cdata).rolling(window=p['ma_window'][i]).mean().values         std = pd.Series(cdata).rolling(window=p['std_window'][i]).std().values                  bb_up.append((ma + std * p['std_rate_up'][i])[1000:])         bb_dw.append((ma - std * p['std_rate_dw'][i])[1000:])          return {'bb_up': bb_up, 'bb_dw': bb_dw, 'closdata': cdata[1000:]}<\/code><\/pre>\n<pre><code class=\"python\"># \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430 def get_rules_result(p=None, strategy=None, operation=None,                      profit=None, max_profit=None, min_profit=None,                       y_index=None, y_index_last=None, x_index=None):          signal = {'in_long': False, 'end_long': False}          if operation is None:         for y_line in strategy['bb_up']:             if y_index_last &lt; y_line[x_index] &lt; y_index:                 signal['in_long'] = True                 return signal               if operation == 'long':                  for ind, (y_line_up, y_line_dw) in enumerate(zip(strategy['bb_up'], strategy['bb_dw'])):                          rule_1 = y_index > y_line_up[x_index] and profit > p['take_profit'][ind] and profit > 0             rule_2 = y_index > y_line_up[x_index] and max_profit - profit > p['take_profit'][ind] and profit > 0             rule_3 = y_index > y_line_up[x_index] and max_profit &lt; -p['take_profit'][ind] and profit > 0                          rule_4 = y_index &lt; y_line_dw[x_index] and profit &lt; p['stop_profit'][ind]                          if rule_1 or rule_2 or rule_3 or rule_4:                 signal['end_long'] = True                 return signal                   return signal<\/code><\/pre>\n<p>\u0412\u044b\u0432\u0435\u0434\u0435\u043c \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0448\u0430 \u043e\u0434\u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f (\u0433\u0440\u0430\u0444\u0438\u043a \u0446\u0435\u043d\u044b \u0438 \u043b\u0438\u043d\u0438\u0438 \u0431\u043e\u043b\u043b\u0438\u043d\u0434\u0436\u0435\u0440\u0430)<\/p>\n<pre><code class=\"python\">countData = 15 # \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u0438\u043d\u0438\u0439 \u0431\u043e\u043b\u043b\u0438\u043d\u0434\u0436\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a \u0443\u0447\u0438\u0442\u0443 \u0432 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438  my_strategy = get_my_strategy(     p=get_generate_params(count=countData),      cdata=closdata,      count=countData)  plt.figure(figsize=(20,10)) plt.plot(my_strategy['closdata'], color='black')  for n in np.arange(countData):     plt.plot(my_strategy['bb_up'][n])     plt.plot(my_strategy['bb_dw'][n])<\/code><\/pre>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043b\u0438\u043d\u0438\u0438 \u0431\u043e\u043b\u043b\u0438\u043d\u0434\u0436\u0435\u0440\u0430 \u043d\u0430 \u0446\u0435\u043d\u043e\u0432\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u0432\u0438\u0436\u043e\u043a \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430. \u0417\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0434\u0435\u043b\u043a\u0438 \u0432 \u043b\u043e\u043d\u0433.<\/p>\n<pre><code class=\"python\">countData = 10   leverage = 10 # \u043f\u043b\u0435\u0447\u043e params_history = []  for cnt in np.arange(9999999):      # \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b     generate_params = get_generate_params(count=countData)      # \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u0430\u0442\u0435\u0440\u0438\u044e     my_strategy = get_my_strategy(p=generate_params, cdata=closdata, count=countData)      depo = [1000]      operation=None     profit=0     max_profit=0     min_profit=0      # \u043f\u043e \u0448\u0430\u0433\u0430\u043c \u0438\u0434\u0435\u043c \u043f\u043e \u0446\u0435\u043d\u043e\u0432\u043e\u043c\u0443 \u0433\u0440\u0430\u0444\u0438\u043a\u0443     for x, (closedata_last, closedata) in enumerate(zip(my_strategy['closdata'][:-1], my_strategy['closdata'][1:])):         x_index = x + 1          # \u0432\u0445\u043e\u0434 \u0432 \u0441\u0434\u0435\u043b\u043a\u0443 \u043b\u043e\u043d\u0433         if rules_result['in_long']:             rules_result['in_long'] = False              operation = 'long'              size_buy = depo[-1]             price_buy = closedata          # \u043e\u0446\u0435\u043d\u043a\u0430 \u043f\u0440\u043e\u0444\u0438\u0442\u0430, \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0441\u0430\u0434\u043a\u0438 \u0438 \u0440\u043e\u0441\u0442\u0430         if operation is not None:              profit = (closedata \/ price_buy - 1) * 100 - 0.3              if profit > max_profit: max_profit = profit             if profit &lt; min_profit: min_profit = profit          # \u0432\u044b\u044f\u0441\u043d\u044f\u0435\u043c \u043d\u0430\u0448\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0435         rules_result = get_rules_result(p=generate_params, strategy=my_strategy, operation=operation,          <\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-355406","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/355406","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=355406"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/355406\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=355406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=355406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=355406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}