{"id":290830,"date":"2018-10-15T20:15:02","date_gmt":"2018-10-15T16:15:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=290830"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=290830","title":{"rendered":"\u041e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b Amazon \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0444\u043e\u043d\u0434\u043e\u0432\u044b\u0445 \u0440\u044b\u043d\u043a\u0430\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0433\u0434\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0431\u0443\u043c\u0430\u0433\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u0440\u0430\u0437 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u043d\u043e\u0432\u043e\u0441\u0442\u044f\u0445 \u043e \u0441\u0430\u043d\u043a\u0446\u0438\u044f\u0445 \u043f\u0440\u043e\u0442\u0438\u0432 \u0435\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0432\u0437\u043b\u0435\u0442\u0435\u0442\u044c \u0434\u043e \u043d\u0435\u0431\u0435\u0441 \u043d\u0430 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u043e\u043c \u043e\u0442\u0447\u0435\u0442\u0435 \u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f\u0445 \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u043e\u0432 \u043e \u0441\u0432\u0435\u0440\u0445\u043f\u0440\u0438\u0431\u044b\u043b\u044c\u043d\u044b\u0445 \u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u0430\u0445. <\/p>\n<p>  \u041a\u0430\u043a \u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u043e \u043b\u0438 \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u043d\u043e\u0439 \u0431\u0443\u043c\u0430\u0433\u043e\u0439 \u0434\u043e\u0445\u043e\u0434 \u0438\u043b\u0438 \u043e\u0434\u043d\u0438 \u043b\u0438\u0448\u044c \u0443\u0431\u044b\u0442\u043a\u0438 \u0438 \u0440\u0430\u0437\u043e\u0447\u0430\u0440\u043e\u0432\u0430\u043d\u0438\u0435?   <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/q3\/2q\/zs\/q32qzs8fmzzpilpnbmfcek6l57a.png\"><\/div>\n<p><a href=\"https:\/\/www.Vecteezy.com\">(\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a)<\/a><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0412\u0430\u043c \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e \u0446\u0435\u043d\u043d\u044b\u043c \u0431\u0443\u043c\u0430\u0433\u0430\u043c. <br \/>  \u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0441\u0442\u0438 \u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0411\u0440\u043e\u043a\u0435\u0440 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u0431\u0440\u043e\u043a\u0435\u0440\u0441\u043a\u0438\u0445 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0444\u043e\u043d\u0434\u043e\u0432\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c \u0432 AWS Quicksight. <br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438<\/h2>\n<p>  \u041c\u043d\u043e\u0433\u0438\u0435 \u0442\u0440\u0435\u043d\u0438\u043d\u0433\u0438 \u0438 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u0443\u0440\u043e\u043a\u0438 \u0442\u0432\u0435\u0440\u0434\u044f\u0442 \u043d\u0430\u043c \u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0439\u0434\u0435\u0440\u0441\u043a\u043e\u0433\u043e \u0436\u0443\u0440\u043d\u0430\u043b\u0430, \u0433\u0434\u0435 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0434\u0435\u043b\u043a\u0438 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u043f\u043e\u0434\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438\u0442\u043e\u0433\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438. \u0421\u043e\u0433\u043b\u0430\u0441\u0435\u043d, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430 \u0411\u0438\u0440\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0438\u0441\u0446\u0438\u043f\u043b\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0435\u0439\u0434\u0435\u0440\u0430, \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0438 \u0437\u0434\u043e\u0440\u043e\u0432\u043e \u0443\u0442\u043e\u043c\u0438\u0442\u044c \u043e\u0442 \u043d\u0443\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<p>  \u041f\u0440\u0438\u0437\u043d\u0430\u044e\u0441\u044c, \u043f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u0438 \u044f \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0441\u0442\u0430\u0440\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0432\u0435\u0442\u0443 \u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u0430, \u0441\u043a\u0440\u0443\u043f\u0443\u043b\u0451\u0437\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0434\u0435\u043b\u043a\u0443 \u0441 \u0435\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 Excel, \u0441\u0442\u0440\u043e\u0438\u043b \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u0442\u0447\u0435\u0442\u044b, \u0441\u0432\u043e\u0434\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b, \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u0431\u0443\u0434\u0443\u0449\u0438\u0435 \u0441\u0434\u0435\u043b\u043a\u0438, \u043d\u043e\u2026 \u043c\u043d\u0435 \u0432\u0441\u0435 \u044d\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0434\u043e\u0435\u043b\u043e.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u0435\u0441\u0442\u0438 \u0436\u0443\u0440\u043d\u0430\u043b \u0442\u0440\u0435\u0439\u0434\u0435\u0440\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e &#8212; \u044d\u0442\u043e \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e?<\/b><\/p>\n<div class=\"spoiler_text\">\n<ul>\n<li>\u0440\u0443\u0447\u043d\u043e\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u0430 (\u0434\u0430\u0436\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0432 \u0432\u0438\u0434\u0435 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0441\u0434\u0435\u043b\u043e\u043a \u0437\u0430 \u0434\u0435\u043d\u044c) \u0431\u044b\u0441\u0442\u0440\u043e \u0443\u0442\u043e\u043c\u043b\u044f\u0435\u0442;<\/li>\n<li>\u0432\u044b\u0441\u043e\u043a \u0440\u0438\u0441\u043a \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u043b\u0438 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u043f\u0440\u0438 \u0440\u0443\u0447\u043d\u043e\u043c \u0432\u0432\u043e\u0434\u0435;<\/li>\n<li>\u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u043a, \u0447\u0442\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0442\u0440\u0435\u0439\u0434\u0435\u0440 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u043c \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u043e\u043c \u0438 \u043e\u043d \u0432\u0441\u0435 \u0440\u0435\u0436\u0435 \u0438 \u0440\u0435\u0436\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u044d\u0442\u043e\u043c\u0443 \u0436\u0443\u0440\u043d\u0430\u043b\u0443, \u0430 \u043f\u043e\u0442\u043e\u043c \u0438 \u0432\u043e\u0432\u0441\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u0442 \u043e \u043d\u0435\u043c (\u043c\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439); \u043d\u0443, \u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446,<\/li>\n<li>\u043c\u044b \u0443\u043c\u0435\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u044d\u0442\u0438\u043c \u043d\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043d\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441? \u0418\u0442\u0430\u043a, \u043f\u043e\u0433\u043d\u0430\u043b\u0438!<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<p>  \u0417\u0430\u0447\u0430\u0441\u0442\u0443\u044e, \u0431\u0440\u043e\u043a\u0435\u0440\u0441\u043a\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u2014 \u044d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u0432\u043e\u0438\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e \u0432\u0441\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c. \u0421\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u0430 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0441\u0442\u044c \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432\u0441\u0435 \u043b\u0443\u0447\u0448\u0435 \u0438 \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u0434\u0430\u0436\u0435 \u0443 \u0441\u0430\u043c\u044b\u0445 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0445 \u0438\u0437 \u043d\u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0431\u044b\u0442\u044c \u0442\u043e\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0445\u043e\u0442\u044f\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438 \u043f\u044b\u0442\u043b\u0438\u0432\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b. <\/p>\n<p>  \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0411\u0440\u043e\u043a\u0435\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0432 \u043b\u0438\u0447\u043d\u043e\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u0431\u0440\u043e\u043a\u0435\u0440\u0441\u043a\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 XML, \u043d\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0418\u0418\u0421 \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0431\u0440\u043e\u043a\u0435\u0440\u0441\u043a\u0438\u0439 \u0441\u0447\u0435\u0442 \u043d\u0430 \u041c\u043e\u0441\u043a\u043e\u0432\u0441\u043a\u043e\u0439 \u0444\u043e\u043d\u0434\u043e\u0432\u043e\u0439 \u0431\u0438\u0440\u0436\u0435 (MOEX) \u2013 \u044d\u0442\u043e \u0431\u0443\u0434\u0443\u0442 \u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u0442\u0447\u0435\u0442\u0430, \u0430 \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u0441\u0447\u0435\u0442 \u043d\u0430 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0441\u043a\u043e\u0439 \u0444\u043e\u043d\u0434\u043e\u0432\u043e\u0439 \u0431\u0438\u0440\u0436\u0435 (SPB), \u0442\u043e \u043a \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0432\u0443\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0441\u044f \u0435\u0449\u0435 \u043e\u0434\u0438\u043d. <br \/>  \u0418\u0442\u043e\u0433\u043e, \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0440\u0438 \u0444\u0430\u0439\u043b\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 XML.<\/p>\n<p>  \u0412\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0435 \u043e\u0442\u0447\u0435\u0442\u044b \u043d\u0430 MOEX \u0438 SPB \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u043c\u0438, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0447\u0435\u0441\u0442\u044c \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0430 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h2>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h2>\n<p>  \u041d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435 \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vv\/uq\/ed\/vvuqedfvl-l8tnghx3v6vtujabc.jpeg\"><\/div>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0430\u0440\u0441\u0435\u0440\u0430<\/h2>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0432 \u041b\u0438\u0447\u043d\u043e\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u043e\u0442\u0447\u0435\u0442\u044b \u043f\u043e \u0432\u0441\u0435\u043c \u0442\u0440\u0435\u043c \u0441\u0447\u0435\u0442\u0430\u043c \u0437\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 (\u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u0437\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0433\u043e\u0434), \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 XML \u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0432 \u043e\u0434\u043d\u0443 \u043f\u0430\u043f\u043a\u0443. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044c, \u043d\u043e \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043a \u0440\u044b\u043d\u043e\u0447\u043d\u044b\u043c \u0440\u0435\u0430\u043b\u0438\u044f\u043c.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/og\/ig\/xw\/ogigxw4yganahuuzbdqecsbqmry.png\"><\/div>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0443 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043d\u0430\u043c\u0438 \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u0430 \u041c\u0438\u0441\u0442\u0435\u0440\u0430 \u0425 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044c \u0438\u0437 \u043f\u044f\u0442\u0438 \u0431\u0443\u043c\u0430\u0433:<\/p>\n<ol>\n<li>\u0412 \u043e\u0442\u0447\u0435\u0442\u0435 \u043f\u043e \u0431\u0438\u0440\u0436\u0435 SPB \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0435 \u0431\u0443\u043c\u0430\u0433\u0438: Apple \u0438 Microsoft;<\/li>\n<li>\u0412 \u043e\u0442\u0447\u0435\u0442\u0435 \u043f\u043e \u0431\u0438\u0440\u0436\u0435 MOEX (\u0431\u0440\u043e\u043a\u0435\u0440\u0441\u043a\u0438\u0439) \u043e\u0434\u043d\u0430 \u0431\u0443\u043c\u0430\u0433\u0430: \u0424\u0421\u041a \u0415\u042d\u0421;<\/li>\n<li>\u0412 \u043e\u0442\u0447\u0435\u0442\u0435 \u043f\u043e \u0431\u0438\u0440\u0436\u0435 MOEX (\u0418\u0418\u0421) \u0434\u0432\u0435 \u0431\u0443\u043c\u0430\u0433\u0438: \u041c\u041c\u041a \u0438 \u041e\u0424\u0417 24019;<\/li>\n<\/ol>\n<p>  \u041f\u043e \u043d\u0430\u0448\u0438\u043c \u043f\u044f\u0442\u0438 \u0431\u0443\u043c\u0430\u0433\u0430\u043c \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0434\u0435\u043b\u043a\u0438 \u043f\u043e \u043f\u043e\u043a\u0443\u043f\u043a\u0435\/\u043f\u0440\u043e\u0434\u0430\u0436\u0435, \u0432\u044b\u043f\u043b\u0430\u0442\u0430 \u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u043e\u0432 \u0438 \u043a\u0443\u043f\u043e\u043d\u0430, \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0446\u0435\u043d\u0430 \u0438 \u0442.\u0434. \u041c\u044b \u0436\u0435 \u0445\u043e\u0442\u0438\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e: \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0432\u0441\u0435\u0445 \u0432\u044b\u043f\u043b\u0430\u0442, \u0441\u0434\u0435\u043b\u043e\u043a \u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u044b\u043d\u043e\u0447\u043d\u043e\u0439 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u0418 \u0442\u0443\u0442 \u0432 \u0434\u0435\u043b\u043e \u0432\u0441\u0442\u0443\u043f\u0430\u0435\u0442 Python, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0432 \u043e\u0434\u0438\u043d \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u0437 \u0432\u0441\u0435\u0445 \u043e\u0442\u0447\u0435\u0442\u043e\u0432:<\/p>\n<pre><code class=\"python\">my_files_list = [join('Data\/', f) for f in listdir('Data\/') if isfile(join('Data\/', f))] my_xml_data = []  # \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 for f in my_files_list:     tree = ET.parse(f)     root = tree.getroot()     my_xml_data.append(root)<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u0414\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438, \u0438\u0437 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li>\u041f\u043e\u0437\u0438\u0446\u0438\u0438 \u0431\u0443\u043c\u0430\u0433 \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u0435;<\/li>\n<li>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u0441\u0434\u0435\u043b\u043a\u0438;<\/li>\n<li>\u041d\u0435\u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0441\u0447\u0435\u0442\u0443;<\/li>\n<li>\u0421\u0440\u0435\u0434\u043d\u0438\u0435 \u0446\u0435\u043d\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u043e\u0437\u0438\u0446\u0438\u0439<\/li>\n<\/ul>\n<\/blockquote>\n<p>  \u0421 \u0446\u0435\u043b\u044c\u044e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0432\u044b\u0431\u043e\u0440\u043a\u0438, \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432. <\/p>\n<pre><code class=\"python\">dict_stocks = {'stock_name': [], 'account': [], 'currency': [], 'current_cost': [], 'current_cost_rub': [], 'saldo' : []} dict_deals  = {'stock_name': [], 'account': [], 'date_oper': [], 'type_oper': [], 'quantity': [], 'price': [], 'currency': [], 'brokerage': [], 'result': []} dict_flows  = {'stock_name': [], 'account': [], 'date_oper': [], 'type_oper': [], 'result': [], 'currency': []} dict_avg_price = {'stock_name': [], 'account': [], 'avg_open_price' : []}<\/code><\/pre>\n<p>  \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0432 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u044d\u0442\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u0438. <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043b\u043e\u0432\u0430\u0440\u044c  dict_stocks<\/b><\/p>\n<div class=\"spoiler_text\">\u0421\u043b\u043e\u0432\u0430\u0440\u044c dict_stocks \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u0449\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044e:<\/p>\n<ul>\n<li>\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0443\u043c\u0430\u0433\u0438 (stock_name);<\/li>\n<li>\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0430 (SPB, MOEX BROK, MOEX IIS) (account);<\/li>\n<li>\u0412\u0430\u043b\u044e\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432 \u043f\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0443\u043c\u0430\u0433\u0435 (currency);<\/li>\n<li>\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c (\u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0442\u0447\u0435\u0442\u0430 \u0432 \u041b\u0438\u0447\u043d\u043e\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0411\u0440\u043e\u043a\u0435\u0440) (current_cost). \u0417\u0434\u0435\u0441\u044c \u0445\u043e\u0447\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u043b\u044f \u0441\u0432\u0435\u0440\u0445\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u043c\u043e\u0436\u043d\u043e \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0432\u043d\u0435\u0441\u0442\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0446\u0435\u043d\u043d\u043e\u0439 \u0431\u0443\u043c\u0430\u0433\u0438 \u0438\u0437 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0438\u043b\u0438 \u0441 \u0441\u0430\u0439\u0442\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0431\u0438\u0440\u0436\u0438;<\/li>\n<li>\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0446\u0435\u043d\u043d\u043e\u0439 \u0431\u0443\u043c\u0430\u0433\u0438 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0442\u0447\u0435\u0442\u0430 (current_cost_rub)<br \/>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u043c\u0443 \u043f\u0443\u043d\u043a\u0442\u0443, \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043a\u0443\u0440\u0441 \u0426\u0411 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u043b\u0438 \u0431\u0438\u0440\u0436\u0435\u0432\u043e\u0439 \u043a\u0443\u0440\u0441, \u043a\u043e\u043c\u0443 \u043a\u0430\u043a \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f.<\/li>\n<li>\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0446\u0435\u043d\u043d\u044b\u0445 \u0431\u0443\u043c\u0430\u0433 (saldo)<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043b\u043e\u0432\u0430\u0440\u044c  dict_deals<\/b><\/p>\n<div class=\"spoiler_text\">\u0421\u043b\u043e\u0432\u0430\u0440\u044c dict_deals \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u043c \u0441\u0434\u0435\u043b\u043a\u0430\u043c:<\/p>\n<ul>\n<li>\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0443\u043c\u0430\u0433\u0438 (stock_name);<\/li>\n<li>\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0430 (SPB, MOEX BROK, MOEX IIS) (account);<\/li>\n<li>\u0414\u0430\u0442\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0441\u0434\u0435\u043b\u043a\u0438, \u0442.\u0435. \u04220 (date_oper);<\/li>\n<li>\u0422\u0438\u043f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (type_oper);<\/li>\n<li>\u041e\u0431\u044a\u0435\u043c \u0431\u0443\u043c\u0430\u0433, \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u0441\u0434\u0435\u043b\u043a\u0435 (quantity);<\/li>\n<li>\u0426\u0435\u043d\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u044b\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0441\u0434\u0435\u043b\u043a\u0430 (price);<\/li>\n<li>\u0412\u0430\u043b\u044e\u0442\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u044b\u043b\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f (currency);<\/li>\n<li>\u0411\u0440\u043e\u043a\u0435\u0440\u0441\u043a\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f \u0437\u0430 \u0441\u0434\u0435\u043b\u043a\u0443 (brokerage);<\/li>\n<li>\u0424\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e \u0441\u0434\u0435\u043b\u043a\u0435 (result)<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043b\u043e\u0432\u0430\u0440\u044c dict_flows<\/b><\/p>\n<div class=\"spoiler_text\">\u0421\u043b\u043e\u0432\u0430\u0440\u044c dict_flows \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043f\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u043c\u0443 \u0441\u0447\u0435\u0442\u0443 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0443\u043c\u0430\u0433\u0438 (stock_name);<\/li>\n<li>\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0430 (SPB, MOEX BROK, MOEX IIS) (account);<\/li>\n<li>\u0414\u0430\u0442\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0441\u0434\u0435\u043b\u043a\u0438, \u0442.\u0435. \u04220 (date_oper);<\/li>\n<li>\u0422\u0438\u043f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (type_oper). \u041c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439: div, NKD, tax;<\/li>\n<li>\u0412\u0430\u043b\u044e\u0442\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u044b\u043b\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f (currency);<\/li>\n<li>\u0424\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (result)<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043b\u043e\u0432\u0430\u0440\u044c dict_avg_price<\/b><\/p>\n<div class=\"spoiler_text\">\u0421\u043b\u043e\u0432\u0430\u0440\u044c dict_avg_price \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u0443\u0447\u0435\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0446\u0435\u043d\u0435 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0443\u043c\u0430\u0433\u0435:<\/p>\n<ul>\n<li>\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0443\u043c\u0430\u0433\u0438 (stock_name);<\/li>\n<li>\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0430 (SPB, MOEX BROK, MOEX IIS) (account);<\/li>\n<li>\u0421\u0440\u0435\u0434\u043d\u044f\u044f \u0446\u0435\u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 (avg_open_price)<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<p>  \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 XML-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u044d\u0442\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438:<\/p>\n<pre><code class=\"python\"># \u0421\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 for XMLdata in my_xml_data:     # \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0411\u0438\u0440\u0436\u0435 \u0438 \u0441\u0447\u0435\u0442\u0435     exchange_name = 'SPB' if XMLdata.get('board_list') == '\u0424\u0411 \u0421\u041f\u0411' else 'MOEX'      client_code =  XMLdata.get('client_code')     account_name = get_account_name(exchange_name, client_code)          # \u041c\u0430\u043f\u043f\u0438\u043d\u0433 \u0442\u0435\u0433\u043e\u0432     current_position, deals, flows, stock_name, \\     saldo, ticketdate, price, brokerage, \\     operationdate, currency, \\     current_cost, current_cost_rub, \\     stock_name_deal, payment_currency, currency_flows = get_allias(exchange_name)          # \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f     get_briefcase(XMLdata)     df_stocks = pd.DataFrame(dict_stocks)     df_stocks.set_index(\"stock_name\", drop = False, inplace = True)             # \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u0434\u0435\u043b\u043a\u0430\u0445     get_deals(XMLdata)     df_deals = pd.DataFrame(dict_deals)     df_avg = pd.DataFrame(dict_avg_price)          # \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043d\u0435\u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u043f\u043e \u0441\u0447\u0435\u0442\u0443     get_nontrade_operation(XMLdata)     df_flows = pd.DataFrame(dict_flows)<\/code><\/pre>\n<p>  \u0412\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438\u0434\u0435\u0442 \u0432 \u0446\u0438\u043a\u043b\u0435 \u043f\u043e \u0432\u0441\u0435\u043c XML-\u0434\u0430\u043d\u043d\u044b\u043c \u0438\u0437 \u043e\u0442\u0447\u0435\u0442\u043e\u0432. \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0435, \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u043c \u043a\u043e\u0434\u0435 \u2013 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f \u0432\u043e \u0432\u0441\u0435\u0445 \u043e\u0442\u0447\u0435\u0442\u0430\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0435\u0435 \u0438\u0437 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0442\u0435\u0433\u043e\u0432 \u0431\u0435\u0437 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0430.<\/p>\n<p>  \u041d\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u0430 \u0434\u043b\u044f \u0442\u0435\u0433\u0430 \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043e\u0442\u0447\u0435\u0442\u0430 (SPB \u0438\u043b\u0438 MOEX), \u0442.\u043a. \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u043f\u043e \u0441\u0432\u043e\u0435\u0439 \u0441\u0443\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u044d\u0442\u0438\u0445 \u043e\u0442\u0447\u0435\u0442\u0430\u0445 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e \u0442\u0435\u0433\u0430\u043c<\/b><\/p>\n<div class=\"spoiler_text\">\n<ul>\n<li>\u041a\u043e\u043c\u0438\u0441\u0441\u0438\u044f \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u043f\u043e \u0441\u0434\u0435\u043b\u043a\u0435 \u0432 \u043e\u0442\u0447\u0435\u0442\u0435 SBP \u043b\u0435\u0436\u0438\u0442 \u0432 \u0442\u0435\u0433\u0435 <b>brokerage<\/b>, \u0430 \u0432 \u043e\u0442\u0447\u0435\u0442\u0435 MOEX \u2014 <b>broker_commission<\/b>;<\/li>\n<li>\u0414\u0430\u0442\u0430 \u043d\u0435\u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0447\u0435\u0442\u0443 \u0432 \u043e\u0442\u0447\u0435\u0442\u0435 SPB \u2013 \u044d\u0442\u043e <b>operationdate<\/b>, \u0430 \u0432 MOEX \u2014 <b>operation_date<\/b> \u0438 \u0442.\u0434.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0430 \u0442\u0435\u0433\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">tags_mapping = {     'SPB': {         'current_position': 'briefcase_position',         'deals': 'closed_deal',         'flows': 'nontrade_money_operation', ...         'stock_name_deal': 'issuername',         'paymentcurrency': 'paymentcurrency',         'currency_flows': 'currencycode'     },     'MOEX': {         'current_position': 'spot_assets',         'deals': 'spot_main_deals_conclusion',         'flows': 'spot_non_trade_money_operations', ...         'stock_name_deal': 'security_name',         'paymentcurrency': 'price_currency_code',         'currency_flows': 'currency_code'     } } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f get_allias \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0442\u0435\u0433\u0430 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044f \u043d\u0430 \u0432\u0445\u043e\u0434 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0438:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f get_allias<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def get_allias(exchange_name):     return(             tags_mapping[exchange_name]['current_position'],             tags_mapping[exchange_name]['deals'],             tags_mapping[exchange_name]['flows'], ...             tags_mapping[exchange_name]['stock_name_deal'],             tags_mapping[exchange_name]['paymentcurrency'],             tags_mapping[exchange_name]['currency_flows']           ) <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0417\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f get_briefcase:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f get_briefcase<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def get_briefcase(XMLdata):         # \u0412 \u043e\u0442\u0447\u0435\u0442\u0435 \u0424\u0411 \u0421\u041f\u0411 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u0434 \u0442\u0435\u0433\u043e\u043c briefcase_position     briefcase_position = XMLdata.find(current_position)     if not briefcase_position:         return      try:         for child in briefcase_position:             stock_name_reduce = child.get(stock_name).upper()             stock_name_reduce = re.sub('[,\\.]|(\\s?INC)|(\\s+$)|([-\\s]?\u0410\u041e)', '', stock_name_reduce)              dict_stocks['stock_name'].append(stock_name_reduce)             dict_stocks['account'].append(account_name)             dict_stocks['currency'].append(child.get(currency))             dict_stocks['current_cost'].append(float(child.get(current_cost)))             dict_stocks['current_cost_rub'].append(float(child.get(current_cost_rub)))             dict_stocks['saldo'].append(float(child.get(saldo)))      except Exception as e:         print('get_briefcase --&gt; Oops! It seems we have a BUG!', e) <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 get_deals \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0441\u0434\u0435\u043b\u043a\u0430\u0445:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f get_deals<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">ef get_deals(XMLdata):      stock_name_proc = ''              closed_deal = XMLdata.find(deals)     if not closed_deal:         return     # \u041e\u0442\u0447\u0435\u0442 \u043f\u043e SPB \u0438\u043c\u0435\u0435\u0442 \u0438\u043d\u0443\u044e \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0443 - \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u0434\u0430\u0442\u0435 \u0441\u0434\u0435\u043b\u043a\u0438,     # \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u043e\u0442\u0447\u0435\u0442\u044b MOEX: \u043f\u043e \u0431\u0443\u043c\u0430\u0433\u0435, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u043e \u0434\u0430\u0442\u0435 \u0441\u0434\u0435\u043b\u043a\u0438     # \u041e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u043a\u0438 \u043f\u043e \u0431\u0443\u043c\u0430\u0433\u0435:     if exchange_name == 'SPB':         sortchildrenby(closed_deal, stock_name_deal)         for child in closed_deal:             sortchildrenby(child, stock_name_deal)     try:                 for child in closed_deal:             stock_name_reduce = child.get(stock_name_deal).upper()             stock_name_reduce = re.sub('[,\\.]|(\\s?INC)|(\\s+$)|([-\\s]?\u0410\u041e)', '', stock_name_reduce)              dict_deals['stock_name'].append(stock_name_reduce)             dict_deals['account'].append(account_name)             dict_deals['date_oper'].append(to_dt(child.get(ticketdate)).strftime('%Y-%m-%d'))              current_cost = get_current_cost(stock_name_reduce)              # \u0412 \u043e\u0442\u0447\u0435\u0442\u0435 \u043f\u043e SPB \u043e\u0434\u0438\u043d \u0442\u0435\u0433 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e - quantity,             # \u0430 \u043d\u0430 MOEX \u0446\u0435\u043b\u044b\u0445 \u0434\u0432\u0430: buy_qnty \u0438 sell_qnty             if exchange_name == 'MOEX':                 if child.get('buy_qnty'):                     quantity = float(child.get('buy_qnty'))                 else:                     quantity = - float(child.get('sell_qnty'))             else:                     quantity = float(child.get('quantity'))              dict_deals['quantity'].append(quantity)                 dict_deals['price'].append(float(child.get('price')))             dict_deals['type_oper'].append('deal')             dict_deals['currency'].append(child.get(payment_currency))              brok_comm = child.get(brokerage)             if brok_comm is None:                  brok_comm = 0             else:                 brok_comm = float(brok_comm)             dict_deals['brokerage'].append(float(brok_comm))              # \u0414\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0434\u0435\u043b\u043a\u0435 \u0438 \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0446\u0435\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u0438             if stock_name_proc != stock_name_reduce:                  if stock_name_proc != '':                     put_avr_price_in_df(account_name, stock_name_proc, \\                                         pnl.m_net_position, pnl.m_avg_open_price)                      current_cost = get_current_cost(stock_name_proc)                     pnl.update_by_marketdata(current_cost)                     if len(dict_deals['result']) &gt; 0:                          if exchange_name != 'SPB':                             dict_deals['result'][-1] = pnl.m_unrealized_pnl * 0.87 -dict_deals['brokerage'][-2]                         else:                             dict_deals['result'][-1] = pnl.m_unrealized_pnl - dict_deals['brokerage'][-2]                  stock_name_proc = stock_name_reduce                 pnl = PnlSnapshot(stock_name_proc, float(child.get('price')), quantity)                 dict_deals['result'].append(-1 * brok_comm)             else:                 pnl.update_by_tradefeed(float(child.get('price')), quantity)                  # \u041f\u0440\u043e\u0434\u0430\u0436\u0430 \u0431\u0443\u043c\u0430\u0433, \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430                 if quantity &lt; 0:                     if pnl.m_realized_pnl &gt; 0 and exchange_name != 'SPB':                         pnl_sum = pnl.m_realized_pnl * 0.87 - brok_comm                     else:                         pnl_sum = pnl.m_realized_pnl - brok_comm                      dict_deals['result'].append(float(pnl_sum))                 else:                     pnl.update_by_marketdata(current_cost)                     dict_deals['result'].append(-1 * brok_comm)          put_avr_price_in_df(account_name, stock_name_proc, \\                             pnl.m_net_position, pnl.m_avg_open_price)          current_cost = get_current_cost(stock_name_proc)         pnl.update_by_marketdata(current_cost)         if len(dict_deals['result']) &gt; 0:              if exchange_name != 'SPB':                 dict_deals['result'][-1] = pnl.m_unrealized_pnl * 0.87 -dict_deals['brokerage'][-2]             else:                 dict_deals['result'][-1] = pnl.m_unrealized_pnl - dict_deals['brokerage'][-2]      except Exception as e:         print('get_deals --&gt; Oops! It seems we have a BUG!', e)  <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0441\u0434\u0435\u043b\u043a\u0438, \u0437\u0434\u0435\u0441\u044c \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0447\u0435\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0446\u0435\u043d\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e PNL \u043c\u0435\u0442\u043e\u0434\u043e\u043c FIFO. \u0417\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0441\u0447\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 PnlSnapshot, \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f\u043c\u0438 \u0431\u044b\u043b \u043f\u0440\u0438\u043d\u044f\u0442 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u043a\u043e\u0434 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0437\u0434\u0435\u0441\u044c: <a href=\"https:\/\/lichgo.github.io\/2015\/10\/29\/40-lines-pnl-calculation.html\">P&amp;L calculation<\/a><\/p>\n<p>  \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u0430\u043c\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043f\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043d\u0435\u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u2014 <b>get_nontrade_operation<\/b>. \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0435\u0435 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u043c \u0434\u043b\u044f \u043d\u0435\u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0431\u043b\u043e\u043a\u0435 \u043e\u0442\u0447\u0435\u0442\u0430, \u043d\u0435\u0442 \u0447\u0435\u0442\u043a\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0432\u0438\u0434\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0438 \u0446\u0435\u043d\u043d\u043e\u0439 \u0431\u0443\u043c\u0430\u0433\u0438, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u0430.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u043f\u043e \u043d\u0435\u0442\u043e\u0440\u0433\u043e\u0432\u044b\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c<\/b><\/p>\n<div class=\"spoiler_text\">\u0412\u044b\u043f\u043b\u0430\u0442\u0430 \u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u043e\u0432 \u0438\u043b\u0438 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u0443\u043f\u043e\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0445\u043e\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0442\u0430\u043a:<\/p>\n<ol>\n<li>\u0412\u044b\u043f\u043b\u0430\u0442\u0430 \u0434\u043e\u0445\u043e\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 &lt;777777&gt; <font color=\"#cc0000\">\u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u044b<\/font> &lt;<font color=\"#cc0000\">APPLE<\/font> INC-\u0430\u043e&gt; &#8212;&gt; \u0432\u044b\u043f\u043b\u0430\u0442\u0430 \u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u043e\u0432 \u0438\u0437 \u043e\u0442\u0447\u0435\u0442\u0430 SPB;<\/li>\n<li>\u0412\u044b\u043f\u043b\u0430\u0442\u0430 \u0434\u043e\u0445\u043e\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 &lt;777777&gt; <font color=\"#cc0000\">\u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u044b<\/font> &lt;<font color=\"#cc0000\">MICROSOFT<\/font> COM-\u0430\u043e&gt;<\/li>\n<li>\u0412\u044b\u043f\u043b\u0430\u0442\u0430 \u0434\u043e\u0445\u043e\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 777777i (<font color=\"#cc0000\">\u041d\u041a\u0414<\/font> 2 <font color=\"#cc0000\">\u041e\u0424\u0417 24019<\/font>) \u043d\u0430\u043b\u043e\u0433 \u043a \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e 0.00 \u0440\u0443\u0431\u043b\u0435\u0439 &#8212;&gt; \u0432\u044b\u043f\u043b\u0430\u0442\u0430 \u043a\u0443\u043f\u043e\u043d\u0430 \u0438\u0437 \u043e\u0442\u0447\u0435\u0442\u0430 MOEX;<\/li>\n<li>\u0412\u044b\u043f\u043b\u0430\u0442\u0430 \u0434\u043e\u0445\u043e\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442 777777 <font color=\"#cc0000\">\u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u044b \u0424\u0421\u041a \u0415\u042d\u0421<\/font>-\u0430\u043e \u043d\u0430\u043b\u043e\u0433 \u043a \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e XX.XX \u0440\u0443\u0431\u043b\u0435\u0439 &#8212;&gt; \u0432\u044b\u043f\u043b\u0430\u0442\u0430 \u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u043e\u0432 \u0438\u0437 \u043e\u0442\u0447\u0435\u0442\u0430 MOEX. \u0438 \u0442.\u0434.<\/li>\n<\/ol>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0431\u0435\u0437 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0443\u0434\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u043c \u0438\u0445 \u043f\u043e \u043f\u043e\u043b\u043d\u043e\u0439. \u0414\u0440\u0443\u0433\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u0435 \u0438\u043b\u0438 \u0432 \u0441\u0434\u0435\u043b\u043a\u0430\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u043c\u0438\u0442\u0435\u043d\u0442\u0430 \u0438\u0437 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u043c. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u0434\u0435\u043b\u043e\u043a, \u0442.\u043a. \u0442\u0430\u043c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439.<\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f <b>get_company_from_str<\/b> \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u043c\u0438\u0442\u0435\u043d\u0442\u0430 \u0438\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f get_company_from_str<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def get_company_from_str(comment):     company_name = ''          # \u0428\u0430\u0431\u043b\u043e\u043d\u044b \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u044b\/\u043a\u0443\u043f\u043e\u043d     flows_pattern = [         '^.+\u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u044b\\s&lt;(\\w+)?.+-\u0430\u043e&gt;$',         '^.+\u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u044b\\s(.+)-\u0430.+$',         '^.+\\(\u041d\u041a\u0414\\s\\d?\\s(.+)\\).+$',         '^.+\u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u0430\u043c\\s(.+)-.+$'     ]          for pattern in flows_pattern:         match = re.search(pattern, comment)         if match:             return match.group(1).upper()         return company_name<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f <b>get_company_from_briefcase<\/b> \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043a \u0441\u043b\u043e\u0432\u0430\u0440\u044e, \u0435\u0441\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0440\u0435\u0434\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u0438 \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0441\u0434\u0435\u043b\u043a\u0430\u0445:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f get_company_from_briefcase<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def get_company_from_briefcase(company_name):     company_name_full = None              value_from_dic = df_deals[df_deals['stock_name'].str.contains(company_name)]     company_arr  = value_from_dic['stock_name'].unique()          if len(company_arr) == 1:         company_name_full = company_arr[0]             return company_name_full<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0438\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043d\u0435\u0442\u043e\u0440\u0433\u043e\u0432\u044b\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c \u2014 <b>get_nontrade_operation<\/b>:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f get_nontrade_operation<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def get_nontrade_operation(XMLdata):     nontrade_money_operation = XMLdata.find(flows)      if not nontrade_money_operation:         return              try:         for child in nontrade_money_operation:              comment = child.get('comment')             type_oper_match = re.search('\u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u044b|\u041d\u041a\u0414|^.+\u043d\u0430\u043b\u043e\u0433.+\u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u0430\u043c.+$', comment)               if type_oper_match:                  company_name = get_company_from_str(comment)                 type_oper = get_type_oper(comment)                  dict_flows['stock_name'].append(company_name)                 dict_flows['account'].append(account_name)                 dict_flows['date_oper'].append(to_dt(child.get(operationdate)).strftime('%Y-%m-%d'))                 dict_flows['type_oper'].append(type_oper)                 dict_flows['result'].append(float(child.get('amount')))                 dict_flows['currency'].append(child.get(currency_flows))      except Exception as e:         print('get_nontrade_operation --&gt; Oops! It seems we have a BUG!', e) <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0442\u0440\u0438 DataFrame, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ol>\n<li>DataFrame \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043f\u043e \u0441\u0440\u0435\u0434\u043d\u0438\u043c \u0446\u0435\u043d\u0430\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u043e\u0437\u0438\u0446\u0438\u0439:<br \/> \n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/1o\/c-\/qs\/1oc-qs_akl5cvraaq7sg7pvfwfu.png\"><\/div>\n<\/li>\n<li>DataFrame \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0441\u0434\u0435\u043b\u043a\u0430\u0445:<br \/> \n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gq\/lp\/xb\/gqlpxby2utfl0ahr-fm8l_fqywc.png\"><\/div>\n<\/li>\n<li>DataFrame \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u043d\u0435\u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445:<br \/> \n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hx\/-7\/su\/hx-7suk1zgheyiyr6ov6o0z5yd0.png\"><\/div>\n<p>  <\/li>\n<\/ol>\n<p>  \u0418\u0442\u0430\u043a, \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2013 \u044d\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0435\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u0434\u0435\u043b\u043e\u043a \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u0435:<\/p>\n<pre><code class=\"python\">df_result = pd.merge(df_deals, df_stocks_avg, how='outer', on=['stock_name', 'account', 'currency']).fillna(0) df_result.sample(10)<\/code><\/pre>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jo\/wj\/nz\/jowjnzmldhgscs30ynz5lrdcueu.png\"><\/div>\n<p>  \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u044d\u0442\u043e \u0441\u043b\u0438\u044f\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 DataFrame \u0434\u043b\u044f \u043d\u0435\u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0441\u0434\u0435\u043b\u043e\u043a. <br \/>  \u0418\u0442\u043e\u0433 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u2013 \u043e\u0434\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u043b\u043e\u0441\u043a\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e \u0432\u0441\u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430:<\/p>\n<pre><code class=\"python\">df_result_full = df_result.append(df_flows, ignore_index=True).fillna(0) df_result_full.sample(10).head()<\/code><\/pre>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cc\/jc\/rh\/ccjcrh4dq5auyrg3jba6csb_s0g.png\"><\/div>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0447\u0435\u0442) \u0438\u0437 DataFrame \u043b\u0435\u0433\u043a\u043e \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0432 CSV \u0438 \u0434\u0430\u043b\u0435\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432 \u043b\u044e\u0431\u043e\u0439 BI-\u0441\u0438\u0441\u0442\u0435\u043c\u0435. <\/p>\n<pre><code class=\"python\">if not exists('OUTPUT'): makedirs('OUTPUT') report_name = 'OUTPUT\\my_trader_diary.csv'  df_result_full.to_csv(report_name, index = False, encoding='utf-8-sig')<\/code><\/pre>\n<h2>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 AWS<\/h2>\n<p>  \u041f\u0440\u043e\u0433\u0440\u0435\u0441\u0441 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 \u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u0432\u043e\u0435\u0432\u044b\u0432\u0430\u044e\u0442 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438 \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u0412\u043e \u043c\u043d\u043e\u0433\u043e\u043c \u044d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u043e\u0439 \u0438 \u0434\u0435\u0448\u0435\u0432\u0438\u0437\u043d\u043e\u0439 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0441\u0438\u0441\u0442\u0435\u043c \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u044c \u0434\u043e\u0440\u043e\u0433\u043e\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u0430 \u0412\u044b \u043b\u0438\u0448\u044c \u0430\u0440\u0435\u043d\u0434\u0443\u0435\u0442\u0435 \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u0435 \u0432\u0430\u043c \u0432\u0440\u0435\u043c\u044f \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u0438 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0437\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u043b\u0430\u0442\u0443.<\/p>\n<p>  \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u043e\u0432 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Amazon. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u0440\u0435\u0434\u044b Amazon Web Services (AWS) \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043d\u0430\u0448\u0435\u043c\u0443 \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044e.<\/p>\n<p>  \u0412 AWS \u043e\u0431\u0448\u0438\u0440\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438: <\/p>\n<ul>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/dev\/Welcome.html\">Amazon S3<\/a> \u2013 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043c\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438;<\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/glue\/latest\/dg\/what-is-glue.html\">AWS Glue<\/a> \u2013 \u043c\u043e\u0449\u043d\u0435\u0439\u0448\u0438\u0439 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 ETL-\u0441\u0435\u0440\u0432\u0438\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0441\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0442\u044c ETL-\u043a\u043e\u0434;<\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/athena\/latest\/ug\/what-is.html\">Amazon Athena<\/a> \u2013 serverless \u0441\u0435\u0440\u0432\u0438\u0441 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 SQL, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 S3 \u0431\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438. \u0415\u0449\u0435 \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 AWS Glue, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f ETL \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0434\u0430\u043d\u043d\u044b\u043c;<\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/quicksight\/latest\/user\/welcome.html\">Amazon QuickSight<\/a> \u2013 serverless BI-\u0441\u0435\u0440\u0432\u0438\u0441, \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u044b \u00ab\u043d\u0430 \u043b\u0435\u0442\u0443\u00bb \u0438 \u0442.\u0434..<\/li>\n<\/ul>\n<p>  \u0421 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0443 Amazon \u0432\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u043f\u043b\u043e\u0445\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/docs.aws.amazon.com\/athena\/latest\/ug\/glue-best-practices.html\">Best Practices When Using Athena with AWS Glue<\/a>, \u0433\u0434\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c AWS Glue. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0438 \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u0438\u0434\u0435\u044f\u043c\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0438\u0445 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. <\/p>\n<p>  \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043d\u0430\u0448\u0438\u043c \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u043c \u043e\u0442\u0447\u0435\u0442\u043e\u0432 CSV-\u0444\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0432 S3 bucket. \u041f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u043f\u0430\u043f\u043a\u0430 \u043d\u0430 S3 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0443\u0431\u0431\u043e\u0442\u0443 \u2013 \u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0434\u0430\u0442\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0442\u0447\u0435\u0442\u0430. <br \/>  \u041f\u043e\u043c\u0438\u043c\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0442\u0430\u043a\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c, \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0443\u043c\u0430\u0433\u0435 \u0438 \u0442.\u0434.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 Amazon S3<\/b><\/p>\n<div class=\"spoiler_text\">\n<ul>\n<li>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u0430\u043a\u0435\u0442 \u043d\u0430 S3, \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0433\u043e \u00abreport-parser\u00bb;<\/li>\n<li>\u0412 \u044d\u0442\u043e\u043c \u0431\u0430\u043a\u0435\u0442\u0435 \u00abreport-parser\u00bb \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u00abmy_trader_diary\u00bb;<\/li>\n<li>\u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u00abmy_trader_diary\u00bb \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u0434\u0430\u0442\u043e\u0439 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043e\u0442\u0447\u0435\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00abdate_report=2018-10-01\u00bb \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0432 \u043d\u0435\u0433\u043e CSV-\u0444\u0430\u0439\u043b;<\/li>\n<li>\u0422\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0438 \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0435\u0449\u0435 \u0434\u0432\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430: \u00abdate_report=2018-09-27\u00bb \u0438 \u00abdate_report=2018-10-08\u00bb. \u0412 \u043d\u0438\u0445 \u043f\u043e\u043b\u043e\u0436\u0438\u043c \u0442\u043e\u0442 \u0436\u0435 CSV-\u0444\u0430\u0439\u043b;<\/li>\n<li>\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 S3 \u0431\u0430\u043a\u0435\u0442 \u00abreport-parser\u00bb \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0432\u0438\u0434 \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043d\u0438\u0436\u0435:\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/n1\/4z\/c9\/n14zc9odchiv6l-_dpc_qbs3s_o.png\"><\/div>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 AWS Glue<\/b><\/p>\n<div class=\"spoiler_text\">\u041f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0435\u0442\u0443, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u043b\u0438\u0448\u044c Amazon Athena \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u043b\u0435\u0436\u0430\u0449\u0438\u0445 \u043d\u0430 S3, \u043d\u043e AWS Glue \u2013 \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u0439 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442.<\/p>\n<ul>\n<li>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 AWS Glue \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 Crawler, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437 \u0440\u0430\u0437\u0440\u043e\u0437\u043d\u0435\u043d\u043d\u044b\u0445 \u043f\u043e \u043e\u0442\u0447\u0435\u0442\u043d\u044b\u043c \u0434\u0430\u0442\u0430\u043c CSV-\u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<br \/> \n<ul>\n<li>\u0417\u0430\u0434\u0430\u0435\u043c \u0438\u043c\u044f \u043d\u043e\u0432\u043e\u0433\u043e Crawler;<\/li>\n<li>\u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 (s3:\/\/report-parser\/my_trader_diary\/) <\/li>\n<li>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u0443\u044e IAM \u0440\u043e\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0443 Crawler \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u0443 \u043d\u0430 S3;<\/li>\n<li>\u0414\u0430\u043b\u0435\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430. \u041f\u043e\u043a\u0430 \u0441\u0442\u0430\u0432\u0438\u043c \u043f\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044e, \u043d\u043e \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c, \u0434\u0443\u043c\u0430\u044e, \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0442\u0430\u043d\u0435\u0442 \u0435\u0436\u0435\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u043c;<\/li>\n<li>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438 \u0436\u0434\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 Crawler \u0441\u043e\u0437\u0434\u0430\u0441\u0442\u0441\u044f.<\/li>\n<\/ul>\n<\/li>\n<li>\u041a\u043e\u0433\u0434\u0430 Crawler \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u0442 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 Ready, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0433\u043e!\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ed\/xx\/z9\/edxxz9kurfrebky5-fuaqwzt-0e.png\"><\/div>\n<\/li>\n<li>\u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043d \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0432 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0435 AWS Glue: Database -&gt; Tables \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 my_trader_diary:\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/u6\/2n\/rt\/u62nrttephj6m-hxxguky4il6os.png\"><\/div>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e. <br \/>  \u0415\u0441\u043b\u0438 \u0449\u0451\u043b\u043a\u043d\u0443\u0442\u044c \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0442\u043e \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u043d\u0438\u0437\u0443 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0430 \u0441\u0445\u0435\u043c\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0441\u0430\u043c\u044b\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0438\u0434\u0435\u0442 \u0441\u0442\u043e\u043b\u0431\u0435\u0446, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c CSV-\u0444\u0430\u0439\u043b\u0435 \u2014 date_report. \u042d\u0442\u043e\u0442 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 AWS Glue \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u043a\u0446\u0438\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0432 \u0431\u0430\u043a\u0435\u0442\u0435 S3 \u043c\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043b\u0438 \u043f\u0430\u043f\u043a\u0438 \u2014 date_report=YYYY-MM-DD, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043a\u0430\u043a \u0441\u0435\u043a\u0446\u0438\u0438, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u0434\u0430\u0442\u0435).<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5o\/30\/2v\/5o302vb08y_zmylnfyaiign5us0.png\"><\/div>\n<p>  \u041d\u0430 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u043f\u0440\u0430\u0432\u043e\u043c \u0443\u0433\u043b\u0443 \u0435\u0441\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0430 View partitions, \u043d\u0430\u0436\u0430\u0432 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0438\u0437 \u043a\u0430\u043a\u0438\u0445 \u0441\u0435\u043a\u0446\u0438\u0439 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043d\u0430\u0448\u0430 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430:  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/82\/0l\/kk\/820lkk4mytj34kzh0tt__ieb6me.png\"><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h2>\u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<p>  \u0418\u043c\u0435\u044f \u0432 \u0441\u0432\u043e\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043c\u043e\u0436\u0435\u043c \u0441 \u043b\u0435\u0433\u043a\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0443. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Amazon Athena \u043a\u0430\u043a \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0441\u0435\u0440\u0432\u0438\u0441 Amazon Athena, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u0443\u044e \u043d\u0430\u043c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 (financial) \u0438 \u043f\u0438\u0448\u0435\u043c \u0442\u0430\u043a\u043e\u0439 SQL-\u043a\u043e\u0434:<\/p>\n<pre><code class=\"sql\">select  \td.date_report, d.account, \td.stock_name,  d.currency, \tsum(d.quantity) as quantity, \tround(sum(d.result), 2) as result  from my_trader_diary d group by  \td.date_report, d.account, \td.stock_name,  d.currency order by  \td.account, d.stock_name, \td.date_report;<\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u043d\u0430\u043c \u0447\u0438\u0441\u0442\u044b\u0439 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0443\u043c\u0430\u0433\u0435 \u0437\u0430 \u0432\u0441\u0435 \u043e\u0442\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u0442\u044b. \u0422.\u043a. \u043c\u044b \u0437\u0430\u043a\u0430\u0447\u0430\u043b\u0438 \u0442\u0440\u0438\u0436\u0434\u044b \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0442\u0447\u0435\u0442 \u0437\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 \u0434\u0430\u0442\u044b, \u0442\u043e \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u0447\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/9o\/fg\/dl\/9ofgdloafbrxbvctdyprolilvna.png\"><\/div>\n<p>  \u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0433\u0438\u0431\u043a\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u043b\u0438 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c? \u0422\u0443\u0442 \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0441\u0435\u0440\u0432\u0438\u0441 Amazon QuickSight, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0438\u0431\u043a\u0443\u044e \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u0430\u043a \u0436\u0435 \u0431\u044b\u0441\u0442\u0440\u043e, \u043a\u0430\u043a \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c SQL-\u0437\u0430\u043f\u0440\u043e\u0441. \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u0441\u0435\u0440\u0432\u0438\u0441 Amazon QuickSight (\u0435\u0441\u043b\u0438 \u0412\u044b \u0442\u0430\u043c \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f). <\/p>\n<p>  \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 New analyses -&gt; New dataset \u0438 \u0432 \u043f\u043e\u044f\u0432\u0438\u0432\u0448\u0435\u043c\u0441\u044f \u043e\u043a\u043d\u0435 \u0432\u044b\u0431\u043e\u0440\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0434\u043b\u044f \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430, \u0449\u0435\u043b\u043a\u0430\u0435\u043c \u043d\u0430 Athena:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yq\/kr\/bv\/yqkrbv144qas16af4jolsj3rnci.png\"><\/div>\n<p>  \u041f\u0440\u0438\u0434\u0443\u043c\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u043c\u0443 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u00abPNL_analysis\u00bb \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00abCreate data source\u00bb.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u043e\u043c \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043e\u043a\u043d\u043e Choose your table, \u0433\u0434\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0443-\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u044b\u0431\u0435\u0440\u0435\u043c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 financial, \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 \u043d\u0435\u0439: my_traider_diary. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u043d\u043e \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u00abUse custom SQL\u00bb \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0442\u043e\u043d\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u0412\u0430\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0438 \u043d\u0430\u0436\u043c\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 Edit\/Preview Data. <\/p>\n<p>  \u041e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043d\u0430\u0448 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0435 \u043f\u043e\u043b\u044f: \u043a\u0432\u0430\u0440\u0442\u0430\u043b \u0438 \u0433\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u043b\u0435\u0433\u0447\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u043f\u0435\u0440\u0435\u0434 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0424\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u0447\u0435\u0442\u0430 \u0432 CSV. \u0411\u0435\u0441\u0441\u043f\u043e\u0440\u043d\u043e, \u043d\u043e \u043c\u043e\u044f \u0446\u0435\u043b\u044c \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a BI-\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u00ab\u043d\u0430 \u043b\u0435\u0442\u0443\u00bb. \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0445 \u043f\u043e\u043b\u0435\u0439, \u043d\u0430\u0436\u0438\u043c\u0430\u044f \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00abNew field\u00bb.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ax\/1z\/ag\/ax1zagyy7nnryd62t5najdntcio.png\"><\/div>\n<\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0433\u043e\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b: <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pm\/yc\/bi\/pmycbiybxqtus62nkaa_5v2fu4s.png\"><\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0417\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u0443\u043b \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/uo\/e1\/u1\/uoe1u1uco3ygn7cljsr6qcnhwbk.png\"><\/div>\n<\/div>\n<\/div>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0435 \u043f\u043e\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0432\u044b\u0431\u043e\u0440\u043a\u0443, \u0434\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u043c\u0443 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00abmy_pnl_analyze\u00bb \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00abSave and visualize\u00bb.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0434\u043e\u0441\u043a\u0443 Amazon QuickSight \u0438 \u043f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2013 \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440 \u0434\u043b\u044f \u0434\u0430\u0442\u044b \u043e\u0442\u0447\u0435\u0442\u0430 (\u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0438\u0437 \u0442\u0440\u0435\u0445 \u0441\u0435\u043a\u0446\u0438\u0439). \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043e\u0442\u0447\u0435\u0442\u043d\u0443\u044e \u0434\u0430\u0442\u0443 2018-10-01 \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 Apply \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0443 Visualize.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/an\/jo\/et\/anjoet5xt_divhygnebb5v9ys8k.png\"><\/div>\n<\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044e \u0432 \u043b\u044e\u0431\u043e\u0439 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0446\u0435\u043d\u043d\u043e\u0439 \u0431\u0443\u043c\u0430\u0433\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0430, \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u043e \u0432\u0430\u043b\u044e\u0442\u0430\u043c (\u0442.\u043a. \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0430\u043b\u044e\u0442\u0430\u0445 \u043d\u0435 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c) \u0438 \u0442\u0438\u043f\u0430\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043c\u043e\u0449\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u043b\u044e\u0431\u043e\u0433\u043e BI \u2013 \u0441\u0432\u043e\u0434\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446. \u0414\u043b\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u043c\u0435\u0441\u0442\u0430 \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u044f \u0432\u044b\u043d\u0435\u0441 \u0432\u0430\u043b\u044e\u0442\u044b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b (\u0430\u043d\u0430\u043b\u043e\u0433 \u0441\u0440\u0435\u0437\u0430 \u0432 MS Excel)<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/90\/3e\/it\/903eitay8v9j1psyz05d8qaqh_k.png\"><\/div>\n<blockquote><p>\u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0448\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440 \u0440\u0435\u0448\u0438\u0442 \u043f\u0440\u043e\u0434\u0430\u0442\u044c \u0441\u0435\u0439\u0447\u0430\u0441 \u0432\u0441\u0435 \u0430\u043a\u0446\u0438\u0438 \u0424\u0421\u041a \u0415\u042d\u0421, \u0442\u043e \u043e\u043d \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0443\u0431\u044b\u0442\u043e\u043a, \u0442.\u043a. \u0432\u044b\u043f\u043b\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u044b \u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0435 1 509.91 \u0440. \u043d\u0435 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u0435\u0433\u043e \u0438\u0437\u0434\u0435\u0440\u0436\u043a\u0438 (1 763.36 \u0440. \u2013 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043a\u0443\u0440\u0441\u043e\u0432\u0430\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0438 174 \u0440. \u2013 \u041d\u0414\u0424\u041b \u043d\u0430 \u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u044b). \u0415\u0441\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u043f\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u0438\u0442\u044c \u0438 \u0434\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u043b\u0443\u0447\u0448\u0438\u0445 \u0432\u0440\u0435\u043c\u0435\u043d \u043d\u0430 \u0411\u0438\u0440\u0436\u0435.<\/p><\/blockquote>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u2013 \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u0430\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/up\/a7\/qj\/upa7qjdqjiqyo-j6tx0bnrth67m.png\"><\/div>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u043d\u0430\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0432\u043b\u043e\u0436\u0438\u043b\u0438 \u0432 \u043a\u0430\u0436\u0434\u0443\u044e \u0431\u0443\u043c\u0430\u0433\u0443, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u043e\u043d\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0443 \u043d\u0430\u0441 \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u0435 \u0438 \u043a\u0430\u043a\u043e\u0432\u0430 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u0437\u0430 \u0432\u0435\u0441\u044c \u043f\u0435\u0440\u0438\u043e\u0434 \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0445 \u043f\u043e\u043b\u044f: sum_investment \u0438 count_days.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u043b\u0435 sum_investment<\/b><\/p>\n<div class=\"spoiler_text\">\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u043e\u0435 \u043f\u043e\u043b\u0435 sum_investment (\u0441\u0443\u043c\u043c\u0430 \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u0439) \u0431\u0443\u0434\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p>  ifelse({stock_name} = &#8216;\u041e\u0424\u0417 24019&#8217;,{avg_open_price} * quantity * 10,{avg_open_price} * quantity)<\/p>\n<p>  \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0441\u0443\u043c\u043c\u044b \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u044f\u043c \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e \u043d\u0438\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0446\u0435\u043d\u0430 \u2013 \u043a\u0430\u043a \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u043e\u0442 \u043d\u043e\u043c\u0438\u043d\u0430\u043b\u0430 (\u043d\u043e\u043c\u0438\u043d\u0430\u043b \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2013 1000\u0440).  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u043b\u0435 count_days<\/b><\/p>\n<div class=\"spoiler_text\">\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u043e\u0435 \u043f\u043e\u043b\u0435 count_day (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043d\u0435\u0439 \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u044f \u0431\u0443\u043c\u0430\u0433\u043e\u0439) \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043a\u0430\u043a \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u0434\u0430\u0442\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0438 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0439 \u0434\u0430\u0442\u043e\u0439 \u0438 \u0432 \u0441\u0432\u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c:<\/p>\n<p>  dateDiff(parseDate({date_oper}),parseDate({date_report}))  <\/div>\n<\/div>\n<p>  \u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u043d\u0438\u0436\u0435:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ut\/ws\/dk\/utwsdkbzhksrjh3wunw_w6stqr0.png\"><\/div>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b \u0438 \u0438\u0442\u043e\u0433\u0438<\/h2>\n<p>  \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0441 \u0412\u0430\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u00ab\u043d\u0430 \u043b\u0435\u0442\u0443\u00bb \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 Amazon. \u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0438\u0437\u043d\u0435\u0441\u043e\u0432\u044b\u0435 \u0438 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f, \u0442.\u043a. \u044d\u0442\u0430 \u0442\u0435\u043c\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u043e\u0431\u044a\u044f\u0442\u043d\u0430\u044f \u0438 \u0443\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0435 \u0432 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e, \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0435 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u0438\u043b\u0438 \u0434\u0430\u0436\u0435, \u0446\u0438\u043a\u043b \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439.<\/p>\n<p>  \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u0431\u0440\u043e\u043a\u0435\u0440\u0430 \u0438 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u043d\u0435\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432, \u0442\u043e \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f (\u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439) \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0411\u0440\u043e\u043a\u0435\u0440\u043e\u0432. \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0412\u044b \u0441\u043e\u0431\u0435\u0440\u0435\u0442\u0435\u0441\u044c \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b, \u044f \u0433\u043e\u0442\u043e\u0432 \u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0432\u0435\u0442\u043e\u0432, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u2013 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043d\u0430 \u043d\u0438\u0445 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c.<\/p>\n<p>  \u0423\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430\u0439\u0434\u0435\u0442 \u0441\u0432\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0440\u0430\u0441\u0447\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0433\u043e PNL \u043f\u043e \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044e \u0443\u0447\u0435\u0442 \u0434\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u043d\u043e\u0439 \u0438 \u0438\u043d\u043e\u0439 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430 \u0432\u044b\u0432\u043e\u0434 \u0434\u0435\u043d\u0435\u0436\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432), \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u043e\u0433\u0430\u0448\u0435\u043d\u0438\u0435 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 \u0438 \u0442.\u0434\u2026 \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0435 \u043f\u043e\u043b\u044f \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 Quicksight \u0431\u044b\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0441 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0446\u0435\u043b\u044c\u044e, \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0430\u0440\u0441\u0435\u0440\u0430, \u0432\u0441\u0435 \u044d\u0442\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u044b \u0432 Python \u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043f\u0430\u0440\u0441\u0435\u0440\u0430.<\/p>\n<p>  \u041a\u0430\u043a \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440 \u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u044f \u0432\u0438\u0436\u0443 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0443\u044e \u043c\u043e\u0434\u0435\u0440\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043d\u0443 \u043d\u0435 \u0445\u043e\u0447\u0443 \u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u0438 XML-\u043e\u0442\u0447\u0435\u0442\u044b! \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u043a\u0430 \u0438\u043d\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u0442, \u043d\u043e API \u0411\u0440\u043e\u043a\u0435\u0440\u0430 \u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u0442\u043e\u043a\u0435\u043d\u0430 \u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043e\u0448\u043b\u043e \u0431\u044b \u0434\u043b\u044f \u0435\u0436\u0435\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u044b\u0440\u043e\u0439 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0441\u0442\u0438. \u041f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043f\u043e\u043b\u043d\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 Amazon: \u043e\u0442 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f ETL-job \u043d\u0430 AWS Glue \u0434\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 Amazon QuickSight \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441.<\/p>\n<p>  \u041f\u043e\u043b\u043d\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/igorgorbenko\/report_parser\">GitHub<\/a><\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <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\/post\/426027\/\"> https:\/\/habr.com\/post\/426027\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0444\u043e\u043d\u0434\u043e\u0432\u044b\u0445 \u0440\u044b\u043d\u043a\u0430\u0445 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0433\u0434\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0431\u0443\u043c\u0430\u0433\u0430 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u0440\u0430\u0437 \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u043d\u043e\u0432\u043e\u0441\u0442\u044f\u0445 \u043e \u0441\u0430\u043d\u043a\u0446\u0438\u044f\u0445 \u043f\u0440\u043e\u0442\u0438\u0432 \u0435\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0432\u0437\u043b\u0435\u0442\u0435\u0442\u044c \u0434\u043e \u043d\u0435\u0431\u0435\u0441 \u043d\u0430 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u043e\u043c \u043e\u0442\u0447\u0435\u0442\u0435 \u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f\u0445 \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u043e\u0432 \u043e \u0441\u0432\u0435\u0440\u0445\u043f\u0440\u0438\u0431\u044b\u043b\u044c\u043d\u044b\u0445 \u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u0430\u0445. <\/p>\n<p>  \u041a\u0430\u043a \u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u043e \u043b\u0438 \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0439 \u0446\u0435\u043d\u043d\u043e\u0439 \u0431\u0443\u043c\u0430\u0433\u043e\u0439 \u0434\u043e\u0445\u043e\u0434 \u0438\u043b\u0438 \u043e\u0434\u043d\u0438 \u043b\u0438\u0448\u044c \u0443\u0431\u044b\u0442\u043a\u0438 \u0438 \u0440\u0430\u0437\u043e\u0447\u0430\u0440\u043e\u0432\u0430\u043d\u0438\u0435?   <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/q3\/2q\/zs\/q32qzs8fmzzpilpnbmfcek6l57a.png\"><\/div>\n<p><a href=\"https:\/\/www.Vecteezy.com\">(\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a)<\/a><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0412\u0430\u043c \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e \u0446\u0435\u043d\u043d\u044b\u043c \u0431\u0443\u043c\u0430\u0433\u0430\u043c. <br \/>  \u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0441\u0442\u0438 \u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0411\u0440\u043e\u043a\u0435\u0440 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u0431\u0440\u043e\u043a\u0435\u0440\u0441\u043a\u0438\u0445 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u0434\u043b\u044f \u0444\u043e\u043d\u0434\u043e\u0432\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c \u0432 AWS Quicksight.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-290830","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290830","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=290830"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290830\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=290830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=290830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=290830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}