{"id":494657,"date":"2026-09-15T06:59:00","date_gmt":"2026-09-15T06:59:00","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=494657"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=494657","title":{"rendered":"\u041c\u043e\u044f \u00ab\u043f\u0435\u0440\u0432\u0430\u044f\u00bb \u043c\u043e\u0434\u0435\u043b\u044c CVaR \u0438\u043b\u0438 \u00ab\u041a\u0430\u043a \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0443\u043c\u0435\u043d\u0438\u0435\u043c \u0432\u044b\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0448\u0442\u043e\u0440\u043c \u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u0420\u0424\u00bb"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043d\u0434\u0440\u0435\u0439, 27 \u043b\u0435\u0442, \u043d\u044b\u043d\u0435 \u0441\u0442\u0443\u0434\u0435\u043d\u0442 4 \u043a\u0443\u0440\u0441\u0430 \u043c\u0435\u0445\u043c\u0430\u0442\u0430. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2013 \u043d\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u043f\u0440\u043e \u00ab\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0442\u0440\u0435\u0439\u0434\u0438\u043d\u0433\u00bb, \u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0441\u0440\u0435\u0437 \u043c\u043e\u0435\u0439 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0434\u0438\u043f\u043b\u043e\u043c\u043d\u043e\u0439 \u043d\u0430\u0443\u0447\u043d\u043e-\u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b (\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0438 \u0432\u0430\u043c, \u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f). \u0418, \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c (\u0438\u043b\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c), \u043a\u0430\u043a \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u00ab\u0431\u0443\u043c\u0430\u0436\u043d\u044b\u0435\u00bb \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0441\u043a\u0438\u0435 \u0442\u0435\u043e\u0440\u0438\u0438 \u043e \u0433\u0440\u044f\u0437\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0438\u0440\u0436\u0435\u0432\u043e\u0439 \u043c\u0438\u043a\u0440\u043e\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p><strong>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438: \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e \u043d\u0435 \u0442\u0435\u0440\u044f\u0442\u044c \u0434\u0435\u043d\u044c\u0433\u0438 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0436\u0435\u0441\u0442\u043a\u0438\u0445 \u0440\u044b\u043d\u043e\u0447\u043d\u044b\u0445 \u0448\u043e\u043a\u043e\u0432 (\u043a\u043e\u0438\u0445 \u043d\u0430 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u043e\u043c \u0440\u044b\u043d\u043a\u0435 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u0441 \u0438\u0437\u0431\u044b\u0442\u043a\u043e\u043c).<\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0432\u0435\u0440\u0438\u0442\u044c \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f\u043c (\u0434\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u043c\u0441\u044f \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u044f\u043c \u0442\u0435\u043e\u0440\u0438\u0438 \u041c\u0430\u0440\u043a\u043e\u0432\u0438\u0446\u0430), \u043a\u0443\u0434\u0430 \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f? \u041e\u0442\u0432\u0435\u0442 \u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u0438 \u2013 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0438 <strong>CVaR<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u043e\u0447\u043d\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab<em>\u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u043f\u043e\u0439\u0434\u0435\u0442 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043b\u043e\u0445\u043e \u0438 \u043c\u044b \u043e\u043a\u0430\u0436\u0435\u043c\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 5% \u0445\u0443\u0434\u0448\u0438\u0445 \u0440\u044b\u043d\u043e\u0447\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432, \u043a\u0430\u043a\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0448 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0443\u0431\u044b\u0442\u043e\u043a?<\/em>\u00bb.<\/p>\n<p>\u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u0438 \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u0433\u043e \u043d\u0438\u0447\u0435\u0433\u043e: \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 Python \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0440\u044b\u043d\u043e\u0447\u043d\u044b\u0435 \u0440\u0435\u0436\u0438\u043c\u044b, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043f\u0430\u043d\u0438\u043a\u0438 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u044b\u0435 \u0440\u0438\u0441\u043a\u0438, \u043d\u0435 \u0443\u0434\u0443\u0448\u0430\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u044b\u043d\u043e\u0447\u043d\u0443\u044e \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c (CAGR) \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/p>\n<p>\u041d\u0430 \u0434\u0435\u043b\u0435 \u0432\u0441\u0435 \u043a\u0443\u0434\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u0435\u0435, \u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043d\u044b\u0442\u044c\u0435 \u0434\u043e \u0433\u043b\u0430\u0432\u044b 2. \u0410 \u043f\u043e\u043a\u0430:<\/p>\n<h2>\u0413\u043b\u0430\u0432\u0430 1. \u041a\u043e\u043d\u0442\u0443\u0440 \u0442\u043e\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0435\u0441\u0441-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u2013 \u044d\u0442\u043e \u043d\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u043f\u043e\u0434\u0433\u043e\u043d\u043a\u0430 \u043a\u0440\u0438\u0432\u043e\u0439 \u043f\u043e\u0434 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a, \u0441\u0442\u043e\u0438\u0442 \u0443\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a:<\/p>\n<ol>\n<li>\n<p><strong>\u0418\u0437 \u0431\u043e\u043b\u0435\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0433\u043e \u2013 \u0441\u043a\u0432\u043e\u0437\u043d\u043e\u0439 11-\u043b\u0435\u0442\u043d\u0438\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0440\u0435\u043a (2015\u20132026 \u0433\u0433.):<\/strong> \u0421\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f \u0432 \u0442\u0440\u0435\u0445 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u0430\u0445 \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u0430 \u2013 \u0440\u0430\u0437\u043e\u0432\u044b\u0439 \u0441\u0442\u0430\u0440\u0442 \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0430 <strong>(Lump-Sum)<\/strong>, \u0438\u043d\u0444\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e-\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u0435\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u043e\u0435 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u0435 <strong>(DCA)<\/strong> \u0438 \u0444\u0430\u0437\u0430 \u0440\u0435\u043d\u0442\u044b <strong>(FIRE)<\/strong> \u0441 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0438\u0437\u044a\u044f\u0442\u0438\u0435\u043c \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043d\u0430 \u0436\u0438\u0437\u043d\u044c.<\/p>\n<\/li>\n<li>\n<p><strong>\u0418\u0437 \u0442\u043e\u0433\u043e, \u043a \u0447\u0435\u043c\u0443 \u043f\u0440\u0438\u0448\u0435\u043b \u043f\u043e\u0437\u0436\u0435 \u2013 \u043a\u0440\u0430\u0448-\u0442\u0435\u0441\u0442 \u041c\u043e\u043d\u0442\u0435-\u041a\u0430\u0440\u043b\u043e:<\/strong> 250 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u043f\u0440\u043e\u0433\u043e\u043d\u043e\u0432 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430\u0445 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 ~70 \u0430\u043a\u0442\u0438\u0432\u043e\u0432 \u0440\u044b\u043d\u043a\u0430 \u0420\u0424 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (3, 4 \u0438 5 \u043b\u0435\u0442). \u041f\u0440\u0438\u0447\u0435\u043c \u0432 \u043f\u0443\u043b \u0430\u043a\u0442\u0438\u0432\u043e\u0432 \u0431\u044b\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u00ab\u0442\u0440\u0443\u043f\u044b\u00bb \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0435\u043b\u0438\u0441\u0442\u0438\u043d\u0433\u043e\u0432 \u0438 \u0431\u0430\u043d\u043a\u0440\u043e\u0442\u0441\u0442\u0432, \u0430 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0442\u0440\u0438 \u0442\u0438\u043f\u0430 \u0437\u0430\u0449\u0438\u0442\u043d\u044b\u0445 \u0433\u0430\u0432\u0430\u043d\u0435\u0439: \u0434\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a (LQDT\/\u0420\u0415\u041f\u041e), \u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0438 (\u041e\u0424\u0417) \u0438 \u0434\u0440\u0430\u0433\u043c\u0435\u0442\u0430\u043b\u043b\u044b (\u0437\u043e\u043b\u043e\u0442\u043e\/\u0441\u0435\u0440\u0435\u0431\u0440\u043e) \u0434\u043b\u044f \u0445\u044d\u0434\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0440\u0438\u0441\u043a\u043e\u0432.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e \u0440\u0430\u0441\u043a\u0440\u043e\u044e \u0432\u0441\u044e \u0438\u0437\u043d\u0430\u043d\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430: \u043e\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b ETL-\u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445 \u044d\u043a\u0432\u0438\u0442\u0438.<\/p>\n<h2>\u0413\u043b\u0430\u0432\u0430 2. \u0418\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u044b\u0439 \u0430\u0434 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0431\u043e\u0440\u044c\u0431\u0430 \u0437\u0430 \u0447\u0438\u0441\u0442\u044b\u0439 \u0431\u044d\u043a\u0442e\u0441\u0442<\/h2>\n<p>\u041d\u0435 \u0437\u043d\u0430\u044e, \u043a\u0430\u043a \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0434\u0435\u043b\u0430 \u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043b\u0438 \u0443 \u043d\u0438\u0445 \u043d\u0430 \u0440\u0443\u043a\u0430\u0445 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 (\u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0449\u0435 \u0438 \u043c\u0438\u043d\u0443\u0442\u043d\u044b\u0445 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u043e\u0432), \u043d\u043e \u0432 \u043c\u043e\u0435\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 70% \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443\u0448\u043b\u043e \u043d\u0435 \u043d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432\u044b\u043f\u0443\u043a\u043b\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0430 \u043d\u0430 \u0440\u0443\u0447\u043d\u0443\u044e, \u0442\u044f\u0436\u0435\u043b\u0443\u044e \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u00ab\u0442\u043e\u043a\u0441\u0438\u0447\u043d\u044b\u0445 \u043e\u0442\u0445\u043e\u0434\u043e\u0432\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0434\u0430\u044e\u0442 \u0431\u0438\u0440\u0436\u0435\u0432\u044b\u0435 API (\u043d\u0435 \u0431\u0435\u0437 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439).<\/p>\n<p>\u0420\u044b\u043d\u043e\u043a \u0420\u0424 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u043d, \u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u043f\u043e\u043b\u043e\u043d \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u043e\u043d\u044b \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0430 \u0438\u043c\u0435\u043b\u0438 \u0445\u043e\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043c\u044b\u0441\u043b, \u044f \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 <strong>(ETL)<\/strong>, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 MoexISSClient \u2192 LocalCSVStorage \u2192 DataCleaner. \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0431\u0435\u0436\u0434\u0430\u0442\u044c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043a\u043e\u0434\u0430:<\/p>\n<h4>1. \u0421\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0442\u0440\u043e\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0435\u0437 \u0414\u0435\u043d\u0435\u0436\u043d\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430 (LQDT + REPO)<\/h4>\n<p>\u0414\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0440\u0438\u0441\u043a\u0430 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0442\u0440\u0435\u043a \u0431\u0435\u0437\u0440\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0432\u043a\u0438. \u041d\u0430 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u043e\u043c \u0440\u044b\u043d\u043a\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u043e\u043a\u0441\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u043e\u043d\u0434 \u0434\u0435\u043d\u0435\u0436\u043d\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430 LQDT (\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u0420\u0415\u041f\u041e \u0441 \u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u043c \u041a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u043e\u043c). \u041d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <strong>\u0444\u043e\u043d\u0434 LQDT<\/strong> \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u044b\u043b \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432 2022 \u0433\u043e\u0434\u0443. \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0441\u043b\u0438 \u0437\u0430\u0449\u0438\u0442\u043d\u043e\u0433\u043e \u0430\u043a\u0442\u0438\u0432\u0430 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e? \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0440\u0435\u0442\u0440\u043e\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u044d\u043a\u0441\u0442\u0440\u0430\u043f\u043e\u043b\u044f\u0446\u0438\u0438: \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0446\u0435\u043d\u0443 \u043f\u0430\u044f \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u0435\u043d\u044c \u0442\u043e\u0440\u0433\u043e\u0432 \u0444\u043e\u043d\u0434\u0430 LQDT, \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 <strong>MOEXREPO<\/strong> (\u0441\u0442\u0430\u0432\u043a\u0438 \u0420\u0415\u041f\u041e \u0441 \u0426\u041a) \u043d\u0430\u0437\u0430\u0434 \u0434\u043e 2013 \u0433\u043e\u0434\u0430 (\u0447\u0442\u043e\u0431\u044b \u0441 \u0437\u0430\u043f\u0430\u0441\u043e\u043c \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442\u044c \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438 \u0432 2015 \u0433\u043e\u0434\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u0435\u0449\u0435 \u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435) \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u0443\u044e \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0446\u0435\u043d\u0443 \u043f\u0430\u044f LQDT:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"\\text{Price}_{t}=\\frac{\\text{Price}_{t+1}}{\\left(1+\\frac{\\text{REPO}_{t}}{100}\\right)^{\\frac{1}{252}}}\" alt=\"\\text{Price}_{t}=\\frac{\\text{Price}_{t+1}}{\\left(1+\\frac{\\text{REPO}_{t}}{100}\\right)^{\\frac{1}{252}}}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/0b\/0b7\/0b79305b868720b5e5aa0aca2acdc841.svg\" width=\"201\" height=\"63\" data-width=\"25.168\" data-height=\"7.82\" data-vertical-align=\"-3.345\" style=\"width: 25.168ex; height: 7.82ex; vertical-align: -3.345ex\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/0b\/0b7\/0b79305b868720b5e5aa0aca2acdc841.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/0b\/0b7\/0b79305b868720b5e5aa0aca2acdc841.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u044d\u0442\u043e \u0434\u0430\u043b\u043e \u043c\u043e\u0434\u0435\u043b\u044f\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u0439 \u0432 \u0431\u0435\u0437\u0440\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043d\u0430 \u0432\u0441\u0435\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0435.<\/p>\n<h4>2. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u0435\u0442\u0435\u043a\u0442\u043e\u0440 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043f\u043b\u0438\u0442\u043e\u0432 \u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0430\u0446\u0438\u0439<\/h4>\n<p>\u0421\u044b\u0440\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0446\u0435\u043d \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f (CLOSE, LOW, HIGH \u0438 \u043f\u0440.) \u043d\u0430 \u041c\u043e\u0441\u0431\u0438\u0440\u0436\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0446\u0435\u043d\u044b \u00ab\u043a\u0430\u043a \u0435\u0441\u0442\u044c\u00bb. \u041d\u043e \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u0447\u0442\u043e \u0441\u043f\u043b\u0438\u0442\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0435\u0441\u043b\u0438 \u0441\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0443, \u0442\u043e \u0432 \u0434\u0435\u043d\u044c \u0441\u043f\u043b\u0438\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u043b\u043e\u0436\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u0431\u0432\u0430\u043b \u0430\u043a\u0446\u0438\u0438 \u043d\u0430 99%, \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0443\u043b\u0435\u0442\u0438\u0442 \u0432 \u043a\u043e\u0441\u043c\u043e\u0441, \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0430\u0431\u0430\u043d\u0438\u0442 \u044d\u0442\u043e\u0442 \u0430\u043a\u0442\u0438\u0432 (\u0432 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044f\u043a\u043e\u0431\u044b \u043e\u0431\u043d\u0443\u043b\u0438\u0432 \u043a\u0430\u043f\u0438\u0442\u0430\u043b).<\/p>\n<p>\u0422\u0430\u043a \u043c\u043e\u0434\u0443\u043b\u044c DataCleaner \u0437\u0430\u0438\u043c\u0435\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432 \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 cross-day \u0441\u043a\u0430\u0447\u043a\u043e\u0432 \u0446\u0435\u043d\u044b (<img decoding=\"async\" class=\"formula inline\" source=\"\\frac{P_t}{P_{t-1}}\u22640.4\" alt=\"\\frac{P_t}{P_{t-1}}\u22640.4\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a7\/a70\/a700422ebe8e9f223206c695317b797c.svg\" width=\"89\" height=\"41\" data-width=\"11.166\" data-height=\"5.097\" data-vertical-align=\"-1.983\" style=\"width: 11.166ex; height: 5.097ex; vertical-align: -1.983ex\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a7\/a70\/a700422ebe8e9f223206c695317b797c.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a7\/a70\/a700422ebe8e9f223206c695317b797c.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u0438\u043b\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"\u22652.5\" alt=\"\u22652.5\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/54\/54e\/54ebd50c8d0765ab910b557188cda728.svg\" width=\"42\" height=\"15\" data-width=\"5.28\" data-height=\"1.819\" data-vertical-align=\"-0.312\" style=\"width: 5.28ex; height: 1.819ex; vertical-align: -0.312ex\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/54\/54e\/54ebd50c8d0765ab910b557188cda728.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/54\/54e\/54ebd50c8d0765ab910b557188cda728.svg 781w\" loading=\"lazy\" decode=\"async\"\/>). \u041f\u0440\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u0435\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0434\u0435\u043d\u043e\u043c\u0438\u043d\u0430\u0446\u0438\u0438 \u0431\u0438\u0440\u0436\u0438 \u0438 <strong>\u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043a\u0440\u0438\u0432\u0443\u044e \u0446\u0435\u043d \u00ab\u0432\u043b\u0435\u0432\u043e\u00bb \u043e\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0434\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u0438<\/strong>, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u044b\u0435 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u0446\u0435\u043d \u043f\u043e\u0434 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0438.<\/p>\n<h4>3. \u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u041f\u0430\u0440\u043a\u0438\u043d\u0441\u043e\u043d\u0430<\/h4>\n<p>\u041e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0438\u0448\u043b\u043e \u043e\u0441\u043e\u0437\u043d\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u0440\u0430 \u0440\u0438\u0441\u043a\u0430 \u0430\u043a\u0442\u0438\u0432\u0430, \u043d\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0435\u0439 \u0446\u0435\u043d \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b\u043e \u043d\u0435\u0441\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0434\u0430 \u0438 \u0437\u0430\u043f\u0430\u0437\u0434\u044b\u0432\u0430\u0435\u0442, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u0412\u043c\u0435\u0441\u0442\u043e \u0446\u0435\u043d \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0432 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0431\u044b\u043b \u0432\u043d\u0435\u0434\u0440\u0435\u043d \u043e\u0446\u0435\u043d\u0449\u0438\u043a \u041f\u0430\u0440\u043a\u0438\u043d\u0441\u043e\u043d\u0430, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c\u0430\u0445 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u0441\u0435\u0441\u0441\u0438\u0438 (HIGH \u0438 LOW), \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 \u043b\u043e\u0436\u043d\u044b\u0445 \u0433\u044d\u043f\u043e\u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u043c \u0440\u044b\u043d\u043a\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0431\u044b\u043b\u0430 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0446\u0435\u043d\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f (CLOSE) \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u0434\u043d\u044f:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"\\sigma ^{2}=\\frac{1}{4\\ln 2}\\cdot \\left(\\ln \\frac{\\max (\\text{HIGH},\\text{CLOSE})}{\\min (\\text{LOW},\\text{CLOSE})}\\right)^{2}\" alt=\"\\sigma ^{2}=\\frac{1}{4\\ln 2}\\cdot \\left(\\ln \\frac{\\max (\\text{HIGH},\\text{CLOSE})}{\\min (\\text{LOW},\\text{CLOSE})}\\right)^{2}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/dd\/dd2\/dd2738caeb81f3c4a0ebcc29e1fa3b44.svg\" width=\"328\" height=\"47\" data-width=\"40.977\" data-height=\"5.923\" data-vertical-align=\"-2.396\" style=\"width: 40.977ex; height: 5.923ex; vertical-align: -2.396ex\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/dd\/dd2\/dd2738caeb81f3c4a0ebcc29e1fa3b44.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/dd\/dd2\/dd2738caeb81f3c4a0ebcc29e1fa3b44.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0437\u0430\u043b\u043e\u0436\u0435\u043d\u0430 Point-in-Time \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u043e\u0432 (\u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u043b\u043e\u0433\u0430 13%, \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u0434\u0430\u0442\u044b \u043e\u0442\u0441\u0435\u0447\u043a\u0438 \u043d\u0430 \u0422+2 \u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0435\u0439 \u0432\u0430\u043b\u044e\u0442\u043d\u044b\u0445 \u0432\u044b\u043f\u043b\u0430\u0442 \u043f\u043e \u043a\u0443\u0440\u0441\u0443 \u0426\u0411 \u043d\u0430 \u0434\u0430\u0442\u0443 \u0440\u0435\u0435\u0441\u0442\u0440\u0430), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0430 \u0432 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445 \u0438 \u0434\u0435\u043b\u0438\u0441\u0442\u0438\u043d\u0433\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u044d\u043c\u0438\u0442\u0435\u043d\u0442\u0430\u0445 \u0432 -100%.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u044f\u0434\u0440\u0430 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 DataCleaner<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">class DataCleaner:    def __init__(self, storage: LocalCSVStorage):        self.storage = storage    def build_cleaned_market_data(self, assets_config: dict, target_start: str, delist_history: pd.DataFrame) -&gt; tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame]:        close_series_dict = {}        high_series_dict = {}        low_series_dict = {}        for asset_name, stages in assets_config.items():            df = self.storage.get_market_data(asset_name=asset_name, stages=stages, target_start=target_start)            if not df.empty:                close_series_dict[asset_name] = df[f\"{asset_name}_close\"]                high_series_dict[asset_name] = df[f\"{asset_name}_high\"]                low_series_dict[asset_name] = df[f\"{asset_name}_low\"]        price_matrix = pd.concat(close_series_dict.values(), axis=1,keys=close_series_dict.keys()).sort_index().replace(0.0, np.nan)        high_matrix = pd.concat(high_series_dict.values(), axis=1, keys=high_series_dict.keys()).sort_index().replace(0.0, np.nan)        low_matrix = pd.concat(low_series_dict.values(), axis=1, keys=low_series_dict.keys()).sort_index().replace(0.0,np.nan)        if '\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(REPO)' in price_matrix.columns and '\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)' in price_matrix.columns:            price_matrix['\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(REPO)'] = price_matrix['\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(REPO)'].ffill()            first_lqdt_date = price_matrix['\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)'].first_valid_index()            t_ipo = price_matrix.index.get_loc(first_lqdt_date)            base_lqdt_price = price_matrix.loc[first_lqdt_date, '\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)']            repo_rates = price_matrix['\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(REPO)'].to_numpy()            synthetic_prices = np.zeros(len(price_matrix))            synthetic_prices[t_ipo] = base_lqdt_price            for t in range(t_ipo - 1, -1, -1):                daily_repo_rate = (1.0 + (repo_rates[t] \/ 100.0)) ** (1.0 \/ 252.0)                synthetic_prices[t] = synthetic_prices[t + 1] \/ daily_repo_rate            df_synthetic = pd.Series(synthetic_prices[:t_ipo], index=price_matrix.index[:t_ipo])            price_matrix['\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)'] = price_matrix['\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)'].combine_first(df_synthetic)            high_matrix['\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)'] = high_matrix['\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)'].combine_first(df_synthetic)            low_matrix['\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)'] = low_matrix['\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)'].combine_first(df_synthetic)        for col in price_matrix.columns:            f_idx = price_matrix[col].first_valid_index()            if f_idx is not None:                price_matrix.loc[f_idx:, col] = price_matrix.loc[f_idx:, col].ffill()                high_matrix.loc[f_idx:, col] = high_matrix.loc[f_idx:, col].ffill()                low_matrix.loc[f_idx:, col] = low_matrix.loc[f_idx:, col].ffill()        for ticker in price_matrix.columns:            if ticker in ['\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(REPO)', '\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)']: continue            p = price_matrix[ticker].to_numpy()            for t in range(1, len(p)):                if pd.isna(p[t]) or pd.isna(p[t - 1]): continue                if p[t] \/ p[t - 1] &lt;= 0.4 or p[t] \/ p[t - 1] &gt;= 2.5:                    for ratio in [1000.0, 100.0, 20.0, 10.0, 8.0, 3.0, 0.1, 0.01, 0.001, 0.0002]:                        if p[t - 1] * 0.8 &lt;= p[t] * ratio &lt;= p[t - 1] * 1.2: break                    else: ratio = p[t - 1] \/ p[t]                    price_matrix.iloc[:t, price_matrix.columns.get_loc(ticker)] \/= ratio                    high_matrix.iloc[:t, high_matrix.columns.get_loc(ticker)] \/= ratio                    low_matrix.iloc[:t, low_matrix.columns.get_loc(ticker)] \/= ratio        returns_matrix = (price_matrix - price_matrix.shift(1)) \/ price_matrix.shift(1)        div_matrix = pd.DataFrame(0.0, index=price_matrix.index, columns=price_matrix.columns)        translate_cur = {'USD':'\u0414\u043e\u043b\u043b\u0430\u0440', 'EUR':'\u0415\u0432\u0440\u043e'}        for asset_name, stages in assets_config.items():            if stages[0]['market'] != 'shares' or stages[0]['secid'] == 'LQDT': continue            tickers = {st['secid'] for st in stages}            df_div = self.storage.get_dividends_data(asset_name=asset_name, tickers=list(tickers))            if df_div.empty: continue            for idx, row in df_div.iterrows():                if idx &lt; price_matrix.index.min() or idx &gt; price_matrix.index.max(): continue                payout_date = div_matrix.index[div_matrix.index &gt;= idx][0] if idx not in div_matrix.index else idx                div_value, currency = float(row['value']), str(row['currency']).upper().strip()                if currency in ['USD', 'EUR']:                    fx_date = price_matrix.index[price_matrix.index &lt;= idx][-1] if idx not in price_matrix.index else idx                    rub_value = div_value * price_matrix.loc[fx_date, translate_cur[currency]]                else:                    rub_value = div_value                price_date = price_matrix.index[price_matrix.index &lt; idx][-1]                rub_value *= 0.87                high_matrix.loc[payout_date, asset_name] += rub_value                low_matrix.loc[payout_date, asset_name] += rub_value                div_matrix.loc[payout_date, asset_name] += rub_value \/ price_matrix.loc[price_date, asset_name]        prev_close_matrix = price_matrix.shift(1)        robust_high = np.maximum(high_matrix.to_numpy(), prev_close_matrix.to_numpy())        robust_low = np.minimum(low_matrix.to_numpy(), prev_close_matrix.to_numpy())        robust_low = np.where(robust_low == 0, 1e-8, robust_low)        const_factor = 1.0 \/ (4.0 * np.log(2.0))        vol_numpy = np.sqrt(const_factor * (np.log(robust_high \/ robust_low) ** 2))        vol_matrix = pd.DataFrame(vol_numpy, index=price_matrix.index, columns=price_matrix.columns)        for col in price_matrix.columns:            first_valid_idx = price_matrix[col].first_valid_index()            if first_valid_idx is not None:                vol_matrix.loc[:first_valid_idx, col] = np.nan                post_ipo_slice = vol_matrix.loc[first_valid_idx:, col].to_numpy()                if col == '\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)':                    post_ipo_slice = np.where(np.isnan(post_ipo_slice) | (post_ipo_slice &lt; 0.0001), 0.0001,                                              post_ipo_slice)                else:                    post_ipo_slice = np.where(np.isnan(post_ipo_slice) | (post_ipo_slice == 0.0), 0.0005,                                              post_ipo_slice)                vol_matrix.loc[first_valid_idx:, col] = post_ipo_slice        for m in [returns_matrix, div_matrix, high_matrix, low_matrix, vol_matrix]:            m.drop(columns=['\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(REPO)'], inplace=True)        for delist_company in delist_history.index:            delist_date = delist_history.loc[delist_company, \"Date\"]            if delist_company in returns_matrix.columns:                returns_matrix.loc[delist_date:, delist_company] = np.nan                returns_matrix.loc[delist_date, delist_company] = -1.0                vol_matrix.loc[delist_date:, delist_company] = np.nan                if delist_history.loc[delist_company, \"Currency\"] in ['USD', 'EUR']:                    fx_date = price_matrix.index[price_matrix.index &lt;= delist_date][-1]                    delist_history.loc[delist_company, \"Amount\"] *= price_matrix.loc[fx_date, translate_cur[delist_history.loc[delist_company, \"Currency\"]]]                price_date = price_matrix.index[price_matrix.index &lt; delist_date][-1]                delist_history.loc[delist_company, \"Amount\"] \/= price_matrix.loc[price_date, delist_company]        delist_history.drop(columns=['Currency'], inplace=True)        delist_history.to_csv('data\/matrix\/global_delist_panel.csv')        return returns_matrix, div_matrix, vol_matrix<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<h2>\u0413\u043b\u0430\u0432\u0430 3. \u0410\u043d\u0430\u0442\u043e\u043c\u0438\u044f \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0441\u0438\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430, \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043b\u0438 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0434\u0436\u0443\u043d\u043e\u0432?<\/h2>\n<p>\u0421\u0430\u043c\u0430\u044f \u0447\u0430\u0441\u0442\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u044b\u043b \u043d\u0430\u0441\u043b\u044b\u0448\u0430\u043d \u2013 \u044d\u0442\u043e <strong>Look-Ahead Bias (\u0437\u0430\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u043d\u0438\u0435 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u0435)<\/strong>, \u0445\u043e\u0442\u044f \u043e\u043d\u0430 \u0436\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u0441\u0430\u043c\u0430\u044f \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430\u044f. \u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u043d\u044b\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u0435\u0441\u043e\u0432 \u043d\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u0442\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u043e, \u043d\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043f\u0435\u0442\u043b\u044f\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u043d \u0431\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0431\u0438\u0440\u0436\u0435\u0432\u043e\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u2013 \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430.<\/p>\n<p>\u041c\u043e\u0439 \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0443\u0440 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d \u043d\u0430 \u0434\u0432\u0430 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u044f: <strong>\u041e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0442\u043e\u0440<\/strong> (PortfolioOrchestrator), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0432\u0441\u0435\u043b\u0435\u043d\u043d\u0443\u044e, \u0438 <strong>\u0411\u044d\u043a\u0442\u0435\u0441\u0442\u0435\u0440<\/strong> (PortfolioBacktester), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0430. \u0412\u043e\u0442 \u0442\u0440\u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0431\u0430\u0440\u044c\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0432\u043d\u0435\u0434\u0440\u0438\u043b \u0432 \u043a\u043e\u0434, \u0447\u0442\u043e\u0431\u044b \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430 \u0441\u0443\u0440\u043e\u0432\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438:<\/p>\n<h4>1. \u0421\u0442\u0440\u043e\u0433\u0430\u044f Point-in-Time \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u044f \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0435\u0433\u043e \u043e\u043a\u043d\u0430<\/h4>\n<p>\u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0435 \u0440\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f current_date \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0440\u0435\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u0437 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e, \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0438\u043a\u043b\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0436\u0435\u0441\u0442\u043a\u0430\u044f \u043e\u0442\u0441\u0435\u0447\u043a\u0430:<\/p>\n<pre><code class=\"python\">historical_slice = self.board_panel[self.asset_tickers].loc[:current_date]historical_slice = historical_slice.iloc[:-1]<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041c\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0441\u0440\u0435\u0437 \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0434\u0435\u043d\u044c, \u043d\u043e \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0440\u0435\u0437\u0430\u0435\u043c \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 .iloc[:-1]. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0443\u0442\u0440\u043e\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0434\u043d\u044f, \u0432\u0438\u0434\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0441\u0442\u0440\u043e\u0433\u043e \u0434\u043e \u0432\u0447\u0435\u0440\u0430\u0448\u043d\u0435\u0433\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f. \u0415\u0441\u043b\u0438 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0431\u0443\u043c\u0430\u0433\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0432\u044b\u0448\u043b\u0430 \u043d\u0430 IPO \u043d\u0430 \u044d\u0442\u043e\u0442 \u0434\u0435\u043d\u044c \u0438\u043b\u0438 \u0443\u0436\u0435 \u043f\u0440\u043e\u0448\u043b\u0430 \u0434\u0435\u043b\u0438\u0441\u0442\u0438\u043d\u0433, \u043c\u0430\u0441\u043a\u0430 active_mask \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0437\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0435\u0451 \u0438\u0437 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<h4>2. \u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0435\u0440\u0435\u0441\u0447\u0435\u0442 \u0440\u044b\u043d\u043e\u0447\u043d\u043e\u0433\u043e \u0434\u0440\u0435\u0439\u0444\u0430 \u0432\u0435\u0441\u043e\u0432<\/h4>\n<p>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0438\u0437\u0434\u0435\u0440\u0436\u043a\u0438, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u043d\u043e\u0432\u044b\u0435 \u0432\u0435\u0441\u0430 \u0441 \u0442\u0435\u043c\u0438 \u0432\u0435\u0441\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0440\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0435 \u2013 \u0443\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u043e. \u041d\u043e \u0437\u0430 \u0432\u0440\u0435\u043c\u044f \u043c\u0435\u0436\u0434\u0443 \u0448\u0430\u0433\u0430\u043c\u0438 \u0446\u0435\u043d\u044b \u0430\u043a\u0442\u0438\u0432\u043e\u0432 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0438 \u0438\u0445 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u043e\u043b\u0438 \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u0435 \u00ab\u0443\u043f\u043b\u044b\u043b\u0438\u00bb. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u0447\u0435\u0442 \u0440\u044b\u043d\u043e\u0447\u043d\u043e\u0433\u043e \u0434\u0440\u0435\u0439\u0444\u0430 \u0434\u043e\u043b\u0435\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f \u043f\u0435\u0440\u0435\u0434 \u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0439 \u2013 \u043e\u0442\u043b\u0438\u0447\u043d\u043e:<\/p>\n<pre><code class=\"python\">drifted_weights = prev_target_weights * (1.0 + prev_day_returns)if (spv := np.sum(drifted_weights)) &gt; 0:     drifted_weights \/= spv<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041c\u044b \u0431\u0435\u0440\u0435\u043c \u0446\u0435\u043b\u0435\u0432\u044b\u0435 \u0432\u0435\u0441\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u0434\u043d\u044f, \u0443\u043c\u043d\u043e\u0436\u0430\u0435\u043c \u0438\u0445 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0447\u0435\u0440\u0430\u0448\u043d\u044e\u044e \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u043e\u0432 \u0438 \u0440\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432\u0435\u043a\u0442\u043e\u0440. \u0428\u0442\u0440\u0430\u0444 \u0437\u0430 \u043e\u0431\u043e\u0440\u043e\u0442 \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0430 (turnover_penalty) \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u043e\u0442 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0430 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0443\u0442\u0440\u043e, \u0447\u0442\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0442\u043e\u0447\u043d\u044b\u0439 \u0440\u0430\u0441\u0447\u0435\u0442 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0439 \u0431\u0440\u043e\u043a\u0435\u0440\u0430.<\/p>\n<h4>3. \u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0422+15 \u0434\u0438\u0432\u0433\u044d\u043f-\u043b\u0430\u0433\u0430(\u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438 \u0434\u0435\u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0435) \u0438 \u0435\u0436\u0435\u0433\u043e\u0434\u043d\u043e\u0433\u043e \u041d\u0414\u0424\u041b 13%<\/h4>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u043f\u0443\u0442\u0438 \u043a \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0431\u0438\u0440\u0436\u0435\u0432\u044b\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c, \u0432\u0435\u0434\u044c \u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u044b \u043d\u0435 \u043f\u0430\u0434\u0430\u044e\u0442 \u043d\u0430 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0439 \u0441\u0447\u0435\u0442 \u0432 \u0434\u0435\u043d\u044c \u043e\u0442\u0441\u0435\u0447\u043a\u0438 \u2013 \u0434\u0435\u043d\u044c\u0433\u0438 \u0438\u0434\u0443\u0442 \u0447\u0435\u0440\u0435\u0437 \u0434\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u043d\u0443\u044e \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u043e\u0442 10 \u0434\u043e 25 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0434\u043d\u0435\u0439. \u0411\u044d\u043a\u0442\u0435\u0441\u0442\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 <strong>\u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0432\u044b\u043f\u043b\u0430\u0442 (payout_queue)<\/strong> \u0441 \u0436\u0435\u0441\u0442\u043a\u0438\u043c \u043b\u0430\u0433\u043e\u043c \u0434\u043b\u044f \u0434\u0438\u0432\u043e\u0432 \u0432 15 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0434\u043d\u0435\u0439. \u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0435\u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u044b \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0434\u0438\u0432\u0433\u044d\u043f\u0435: \u0434\u0435\u043d\u044c\u0433\u0438 \u00ab\u0432\u0438\u0441\u044f\u0442 \u0432 \u0432\u043e\u0437\u0434\u0443\u0445\u0435\u00bb \u0442\u0440\u0438 \u043d\u0435\u0434\u0435\u043b\u0438, \u0430 \u043d\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043e\u043d\u0438 \u0447\u0435\u0441\u0442\u043d\u043e \u0434\u0438\u0441\u043a\u043e\u043d\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430\u0437\u0430\u0434 \u043a \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u0430\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 \u0431\u0435\u0437\u0440\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u0441\u0442\u0430\u0432\u043a\u0443 LQDT.<\/p>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0430 \u0438 \u043a \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u043c \u0434\u0435\u0444\u043e\u043b\u0442\u0430\u043c: \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u0434\u0435\u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043d\u0435 \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u2014 \u0435\u0451 \u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430\u044f \u043b\u0438\u043a\u0432\u0438\u0434\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0431\u0430\u043b\u0430\u043d\u0441 \u0441\u0442\u0440\u043e\u0433\u043e \u0441 \u0437\u0430\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u043b\u0430\u0433\u043e\u043c (Pay_lag), \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u0443\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0440\u043e\u043a\u0438 \u0432\u043d\u0435\u0431\u0438\u0440\u0436\u0435\u0432\u043e\u0433\u043e \u0432\u044b\u043a\u0443\u043f\u0430 \u0438\u043b\u0438 \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u043d\u043e\u0433\u043e \u0433\u043e\u0434\u0430 \u0431\u044d\u043a\u0442\u0435\u0441\u0442\u0435\u0440 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u043b\u043e\u0433\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443 \u0438 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 <strong>\u041d\u0414\u0424\u041b 13%<\/strong>, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044f \u0447\u0435\u0441\u0442\u043d\u0443\u044e \u0447\u0438\u0441\u0442\u0443\u044e \u043a\u0440\u0438\u0432\u0443\u044e \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0430, \u043e\u0447\u0438\u0449\u0435\u043d\u043d\u0443\u044e \u043e\u0442 \u0444\u0438\u0441\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u044f\u0434\u0440\u0430 \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438 BacktestEngine<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">class PortfolioOrchestrator:    def __init__(self, board_panel: pd.DataFrame, volatility_panel: pd.DataFrame, strategies: list, commission: float = 0.0005):        self.board_panel = board_panel.sort_index()        self.strategies = strategies        self.commission = commission        self.asset_tickers = [col for col in self.board_panel.columns if not col.endswith('_div')]        self.volatility_panel = volatility_panel.sort_index()    def generate_weights_history(self, start_date: str = \"2015-01-01\", end_date: str = \"2027-01-01\", assets: str = None) -&gt; dict[str, pd.DataFrame]:        self.asset_tickers = [col for idx, col in enumerate(self.asset_tickers) if assets[idx] == '1'] if assets else self.asset_tickers        test_returns = self.board_panel[self.asset_tickers].loc[start_date:end_date]        sim_dates = test_returns.index        weights_histories = {            strat.name: pd.DataFrame(0.0, index=sim_dates, columns=self.asset_tickers)            for strat in self.strategies        }        current_weights = {strat.name: np.zeros(len(self.asset_tickers)) for strat in self.strategies}        for t_idx, current_date in enumerate(sim_dates):            logging.info(f\"\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d \u0440\u0430\u0441\u0441\u0447\u0435\u0442 \u043d\u0430 \u0434\u0430\u0442\u0443 {current_date}\")            for strat in self.strategies:                name = strat.name                historical_slice = self.board_panel[self.asset_tickers].loc[:current_date]                last_two_days = historical_slice.tail(2)                historical_slice = historical_slice.iloc[:-1]                active_mask = ~last_two_days.isna().any().to_numpy()                live_cols = [col for idx, col in enumerate(self.asset_tickers) if active_mask[idx]]                cleaned_slice = historical_slice[live_cols]                vol_slice = self.volatility_panel[live_cols].loc[:current_date]                vol_slice = vol_slice.iloc[:-1]                div_cols = [f\"{col}_div\" for col in live_cols]                div_slice = self.board_panel[div_cols].loc[:current_date].iloc[:-1]                total_return_slice = cleaned_slice.to_numpy() + div_slice.to_numpy()                historical_returns_adjusted = pd.DataFrame(total_return_slice, index=cleaned_slice.index, columns=live_cols)                last_day_returns = np.nan_to_num(historical_slice.iloc[-1].to_numpy(), nan=0.0)                live_prev_weights = (current_weights[name] * (1.0 + last_day_returns))[active_mask].copy()                if np.sum(live_prev_weights) &gt; 0:                    live_prev_weights = live_prev_weights \/ np.sum(live_prev_weights)                else:                    live_prev_weights = np.zeros(len(live_cols))                try:                    live_new_weights = strat.optimize_weights(historical_returns_adjusted, live_prev_weights, vol_slice)                    live_new_weights = np.nan_to_num(live_new_weights, nan=0.0)                except Exception as e:                    logging.error(f\"\u041a\u0440\u0430\u0445 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 {name} \u043d\u0430 \u0434\u0430\u0442\u0443 {current_date}: {e}\")                    live_new_weights = live_prev_weights                new_global_weights = np.zeros(len(self.asset_tickers))                global_live_indices = [self.asset_tickers.index(c) for c in live_cols]                new_global_weights[global_live_indices] = live_new_weights                current_weights[name] = new_global_weights                weights_histories[name].iloc[t_idx] = current_weights[name]        return weights_historiesclass PortfolioBacktester:    def __init__(self, board_panel: pd.DataFrame, delist_history: pd.DataFrame, inflation_annual: float = 0.075, commission: float = 0.0005):        self.board_panel = board_panel.sort_index()        self.daily_inflation = (1.0 + inflation_annual) ** (1.0 \/ 252.0) - 1.0        self.commission = commission        self.delist_history = delist_history        self.lqdt = board_panel['\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)']    def _sim_core(self, weights_history: pd.DataFrame, initial_capital: float, extra_capital: float,                  scenario_type: str, wherewithal: float = 0.0, tax: float = 0.13) -&gt; tuple[np.ndarray, np.ndarray]:        sim_dates = weights_history.index        prices_subset = self.board_panel.loc[sim_dates]        lqdt_last = self.lqdt.index.get_loc(sim_dates[-1])        asset_tickers = [col for col in self.board_panel.columns if not col.endswith('_div')]        div_tickers = [f\"{ticker}_div\" for ticker in asset_tickers]        returns_matrix = prices_subset[asset_tickers]        ticker_to_idx = {ticker: idx for idx, ticker in enumerate(returns_matrix)}        returns_matrix = returns_matrix.to_numpy()        div_yield_matrix = prices_subset[div_tickers].to_numpy()        weights_matrix = weights_history[asset_tickers].to_numpy()        T = len(sim_dates)        portfolio_values = np.zeros(T)        benchmark_values = np.zeros(T)        portfolio_values[0] = initial_capital        benchmark_values[0] = initial_capital if scenario_type != \"DCA\" else extra_capital        prev_year_cap = initial_capital        payout_queue = []        key_deposit = True        for t in range(1, T):            prev_capital = portfolio_values[t - 1]            is_new_month = sim_dates[t].month != sim_dates[t - 1].month            current_weights = weights_matrix[t]            prev_target_weights = weights_matrix[t - 1]            prev_day_returns = np.nan_to_num(returns_matrix[t - 1], nan=0.0)            day_returns = returns_matrix[t]            clean_day_returns = np.nan_to_num(day_returns, nan=0.0)            drifted_weights = prev_target_weights * (1.0 + prev_day_returns)            if (spv := np.sum(drifted_weights)) &gt; 0: drifted_weights \/= spv            else: drifted_weights = np.zeros_like(current_weights)            day_div_yields = np.nan_to_num(div_yield_matrix[t], nan=0.0)            dividend_accrued = prev_capital * np.nansum(current_weights * day_div_yields)            if dividend_accrued &gt; 0:                if t + 15 &lt; T: payout_queue.append((t + 15, dividend_accrued))                elif (end_idx := lqdt_last + (t + 16 - T)) &lt;= len(self.lqdt): payout_queue.append((T - 1, dividend_accrued \/ np.prod(1 + self.lqdt.iloc[lqdt_last + 1 : end_idx])))                else: payout_queue.append((T - 1, dividend_accrued \/ (np.mean(1 + self.lqdt.iloc[lqdt_last - 4 : lqdt_last + 1])) ** (t + 16 - T)))            if sim_dates[t] in self.delist_history.index:                delist_row = self.delist_history.loc[sim_dates[t]]                if (comp := str(delist_row['Company'])) in self.board_panel.columns:                    if t + int(delist_row['Pay_lag']) &lt; T:                        payout_queue.append((t + int(delist_row['Pay_lag']), prev_capital * current_weights[ticker_to_idx[comp]] * float(delist_row['Amount'])))                    elif (end_idx := lqdt_last + (t + 1 + int(delist_row['Pay_lag']) - T)) &lt;= len(self.lqdt): payout_queue.append((T - 1, prev_capital * current_weights[ticker_to_idx[comp]] * float(delist_row['Amount']) \/ np.prod(1 + self.lqdt.iloc[lqdt_last + 1: end_idx])))                    else: payout_queue.append((T - 1, prev_capital * current_weights[ticker_to_idx[comp]] * float(delist_row['Amount']) \/ (np.mean(1 + self.lqdt.iloc[lqdt_last - 4: lqdt_last + 1])) ** (t + 1 + int(delist_row['Pay_lag']) - T)))            current_asset_values = prev_capital * drifted_weights            if sim_dates[t].year != sim_dates[t - 1].year:                tax_base = prev_capital - prev_year_cap                if tax_base &gt; 0:                    tax_amount = tax_base * tax                    prev_capital -= tax_amount                prev_year_cap = prev_capital            payout = 0.0            ready_2_pay = [item for item in payout_queue if item[0] &lt;= t]            payout_queue = [item for item in payout_queue if item[0] &gt; t]            for item in ready_2_pay:                payout += item[1]            prev_capital += payout            cash_flow = 0.0            if scenario_type == \"LUMPSUM\":                benchmark_values[t] = benchmark_values[t - 1] * (1.0 + self.lqdt[sim_dates[t]])            elif scenario_type == \"DCA\":                extra_capital *= (1.0 + self.daily_inflation)                month_replenishment = extra_capital if is_new_month else 0.0                cash_flow = month_replenishment                benchmark_values[t] = benchmark_values[t - 1] * (1.0 + self.lqdt[sim_dates[t]]) + month_replenishment            elif scenario_type == \"FIRE\":                wherewithal *= (1.0 + self.daily_inflation)                monthly_withdrawal = wherewithal if is_new_month else 0.0                cash_flow = -monthly_withdrawal                if key_deposit and (benchmark_values[t - 1] * (1.0 + self.daily_inflation) - monthly_withdrawal &gt; 0):                    benchmark_values[t] = benchmark_values[t - 1] * (1.0 + self.lqdt[sim_dates[t]]) - monthly_withdrawal                else:                    benchmark_values[t] = 0.0                    key_deposit = False            prev_capital += cash_flow            if prev_capital &lt;= 0:                portfolio_values[t] = 0.0                if scenario_type == \"FIRE\":                    break                continue            target_asset_values = prev_capital * current_weights            turnover_rub = np.sum(np.abs(target_asset_values - current_asset_values))            transaction_cost = turnover_rub * self.commission            prev_capital = max(0.0, prev_capital - transaction_cost)            capital_growth = np.sum(current_weights * clean_day_returns)            prev_capital *= (1.0 + capital_growth)            portfolio_values[t] = prev_capital        return portfolio_values, benchmark_values    def run_lumpsum_simulation(self, strategy_weights_history: pd.DataFrame, initial_capital: float = 1_000_000.0) -&gt; pd.DataFrame:        p_val, b_val = self._sim_core(strategy_weights_history, initial_capital, 0.0, \"LUMPSUM\", 0.0, 0.13)        p_val_taxless, _ = self._sim_core(strategy_weights_history, initial_capital, 0.0, \"LUMPSUM\", 0.0, 0.0)        res = pd.DataFrame(index=strategy_weights_history.index)        res['Nominal_Capital'] = p_val        res['Nominal_Capital_Taxless'] = p_val_taxless        res['Inflation_Benchmark'] = b_val        return res    def run_dca_simulation(self, strategy_weights_history: pd.DataFrame, extra_capital: float = 50_000.0) -&gt; pd.DataFrame:        p_val, b_val = self._sim_core(strategy_weights_history, extra_capital, extra_capital, \"DCA\")        res = pd.DataFrame(index=strategy_weights_history.index)        res['Nominal_Capital'] = p_val        res['Inflation_Benchmark'] = b_val        return res    def run_fire_simulation(self, strategy_weights_history: pd.DataFrame, initial_capital: float = 6_000_000.0, wherewithal: float = 60_000.0) -&gt; pd.DataFrame:        p_val, b_val = self._sim_core(strategy_weights_history, initial_capital, 0.0, \"FIRE\", wherewithal)        res = pd.DataFrame(index=strategy_weights_history.index)        res['Nominal_Capital'] = p_val        res['Inflation_Benchmark'] = b_val        return res[(res['Nominal_Capital'] &gt; 0) | (res['Inflation_Benchmark'] &gt; 0)]<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<h2>\u0413\u043b\u0430\u0432\u0430 4. \u0412\u0435\u043b\u0438\u043a\u043e\u0435 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u041c\u043e\u043d\u0442\u0435-\u041a\u0430\u0440\u043b\u043e<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0438 \u043f\u0435\u0442\u043b\u044f \u0431\u044d\u043a\u0442\u0435\u0441\u0442\u0435\u0440\u0430 \u0431\u044b\u043b\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u044b, \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0430\u0440\u0435\u043d\u0443. \u041a\u0430\u043a \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0430\u043d\u0430\u043b\u0438\u0437 \u0432 \u0434\u0432\u0443\u0445 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044f\u0445: \u0441\u043f\u0435\u0440\u0432\u0430 \u0441\u043a\u0432\u043e\u0437\u043d\u043e\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0440\u0435\u043a \u0437\u0430 11 \u043b\u0435\u0442, \u0430 \u043f\u043e\u0441\u043b\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u043e\u0435 \u0441\u0442\u0440\u0435\u0441\u0441-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u041c\u043e\u043d\u0442\u0435-\u041a\u0430\u0440\u043b\u043e \u043f\u043e\u043a\u0430 \u043d\u0430 250 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0432\u044b\u0431\u043e\u0440\u043a\u0430\u0445 \u0430\u043a\u0442\u0438\u0432\u043e\u0432 \u0438 \u0442\u0430\u0439\u043c\u043b\u0430\u0439\u043d\u043e\u0432.<\/p>\n<h3>\u0427\u0430\u0441\u0442\u044c 1: \u0421 \u0441\u043a\u0432\u043e\u0437\u043d\u043e\u0439 11-\u043b\u0435\u0442\u043d\u0438\u0439 \u0442\u0440\u0435\u043a (\u041f\u0430\u0440\u0430\u0434\u043e\u043a\u0441 \u043a\u0430\u043d\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439)<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u044e \u043d\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0435 \u0441 2015 \u043f\u043e 2026 \u0433\u043e\u0434, \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445 \u044d\u043a\u0432\u0438\u0442\u0438 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u044e\u0436\u0435\u0442. \u041c\u044b \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0432\u0438\u0434\u0438\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u044e\u0442 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435:<\/p>\n<ul>\n<li>\n<p><strong>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043d\u0435-\u0440\u043e\u0431\u0430\u0441\u0442\u043d\u044b\u0439 CVaR (Base CVaR):<\/strong> \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u043c\u0443\u0447\u0438\u0442\u044c\u0441\u044f, \u0432\u0435\u0434\u044c \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u043b\u0430 \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u0434\u0435\u0440\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u00ab\u044d\u0442\u0430\u043b\u043e\u043d\u043d\u044b\u0439\u00bb \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c (\u0447\u0442\u043e \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435 \u0432\u0435\u043b \u0441\u0435\u0431\u044f \u043a\u0430\u043a \u00ab\u0442\u0440\u0443\u0441\u043b\u0438\u0432\u044b\u0439 \u0431\u043e\u0442\u00bb \u0441\u0438\u0434\u044f \u0432 LQDT \u043d\u0430 99%) \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u043b\u0438\u043c\u0438\u0442\u044b, \u0445\u043e\u0442\u044f \u0438 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 \u0420\u043e\u043a\u0444\u0435\u043b\u043b\u0435\u0440\u0430 \u2014 \u0423\u0440\u044c\u044f\u0441\u0435\u0432\u0430, \u043d\u0430\u043f\u0443\u0433\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u0448\u043e\u043a\u0430\u043c\u0438 \u0440\u044b\u043d\u043a\u0430 \u0420\u0424, \u0437\u0430\u0431\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043b\u0438\u043c\u0438\u0442\u044b (40%) \u0432 \u0444\u043e\u043d\u0434 \u0434\u0435\u043d\u0435\u0436\u043d\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430 LQDT \u0438 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043b\u0443\u0445\u0443\u044e \u043e\u0431\u043e\u0440\u043e\u043d\u0443. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u0439 \u2013 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0445 \u043f\u0440\u043e\u0441\u0430\u0434\u043e\u043a, \u043d\u043e \u0432 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0432\u044b\u0441\u043e\u043a\u0438\u0445 \u0441\u0442\u0430\u0432\u043e\u043a \u0441\u043b\u0438\u0432\u0430\u0435\u0442 \u0434\u0430\u0436\u0435 \u0438\u043d\u0444\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u043c\u0443 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0443, \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u044f \u0441\u043a\u0440\u043e\u043c\u043d\u044b\u0439 CAGR.<\/p>\n<\/li>\n<li>\n<p><strong>\u041b\u0438\u043d\u0435\u0439\u043d\u043e-\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0439 Momentum-\u0440\u043e\u0442\u0430\u0442\u043e\u0440:<\/strong> \u041f\u043e\u043b\u043d\u0430\u044f \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u041d\u0430 \u0441\u0438\u043b\u044c\u043d\u044b\u0445, \u0437\u0430\u0442\u044f\u0436\u043d\u044b\u0445 \u0442\u0440\u0435\u043d\u0434\u0430\u0445 \u041c\u043e\u043c\u0435\u043d\u0442\u0443\u043c \u043b\u0435\u0442\u0438\u0442 \u0432\u0432\u0435\u0440\u0445 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u041c\u043e\u0441\u0431\u0438\u0440\u0436\u0438. \u041d\u043e \u0432 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u044b\u0445 \u0448\u043e\u043a\u043e\u0432 \u044d\u0442\u0430 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0435\u0440\u0442\u043e\u0439 \u0432 \u0441\u0430\u043c\u044b\u0445 \u043f\u0435\u0440\u0435\u0433\u0440\u0435\u0442\u044b\u0445 \u0431\u0443\u043c\u0430\u0433\u0430\u0445. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043b\u043e\u0432\u0438\u0442 \u00ab\u0447\u0435\u0440\u043d\u043e\u0433\u043e \u043b\u0435\u0431\u0435\u0434\u044f\u00bb \u0432\u0441\u0435\u043c \u043e\u0431\u044a\u0435\u043c\u043e\u043c \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0430 \u0438 \u043f\u0430\u0434\u0430\u0435\u0442 \u043a\u0430\u043c\u043d\u0435\u043c \u0432\u043d\u0438\u0437 \u043f\u043e\u0434 \u0438\u043d\u0444\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u043b\u0438\u043d\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u041c\u0430\u0440\u043a\u043e\u0432\u0438\u0446:<\/strong> \u0418\u0437-\u0437\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a \u0448\u0443\u043c\u0430\u043c \u0438 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u044f\u043c \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b, \u041c\u0430\u0440\u043a\u043e\u0432\u0438\u0446 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0441\u043c\u0435\u043d\u044b \u0440\u0435\u0436\u0438\u043c\u043e\u0432 \u0440\u044b\u043d\u043a\u0430 \u0442\u0435\u0440\u044f\u0435\u0442 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u044b \u0438 \u0443\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u0438\u043d\u0444\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0421\u043e\u0440\u0442\u0438\u043d\u043e.<\/p>\n<\/li>\n<\/ul>\n<h4>\u042d\u0432\u043e\u043b\u044e\u0446\u0438\u044f \u0440\u043e\u0431\u0430\u0441\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432: \u041f\u0443\u0442\u044c \u043a \u0444\u043b\u0430\u0433\u043c\u0430\u043d\u0443 0.1 (\u0430 \u0441 \u0432\u0430\u0448\u0435\u0439 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435)<\/h4>\n<p>\u041c\u043e\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u0442\u0440\u0435\u043a\u0435 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0447\u0435\u0442\u043a\u0443\u044e \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0446\u0435\u043f\u043e\u0447\u043a\u0443:<\/p>\n<ol>\n<li>\n<p><strong>\u041f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0441 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0440\u0438\u0441\u043a\u043e\u043c (High-risk prototype):<\/strong> \u0410\u0433\u0440\u0435\u0441\u0441\u0438\u0432\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0440\u044b\u043d\u043e\u0447\u043d\u0443\u044e \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0440\u0430\u0441\u0442\u0443\u0449\u0438\u0445 \u0444\u0430\u0437\u0430\u0445, \u043b\u043e\u0432\u0438\u0442 \u043c\u043e\u0449\u043d\u044b\u0435 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u044b, \u043d\u043e \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u043e\u0439 \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0440\u0438\u0441\u043a\u043e\u043c (Controlled-risk prototype):<\/strong> \u0412 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0448\u0442\u043e\u0440\u043c\u0430 2022 \u0433\u043e\u0434\u0430 \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u0430\u043d\u0438\u043a\u0438 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u0441\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0440\u0438\u0441\u043a\u043e\u0432\u044b\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438, \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 LQDT\/\u041e\u0424\u0417 (\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0447\u0435\u0435 \u0447\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u0432\u044b\u0433\u043e\u0434\u043d\u044b\u043c) \u0438 \u0442\u0435\u0440\u044f\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435, \u043f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u0449\u0438\u0449\u0430\u044f \u043a\u0430\u043f\u0438\u0442\u0430\u043b \u043e\u0442 \u0440\u044b\u043d\u043e\u0447\u043d\u043e\u0439 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u044b (\u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u043c\u0435\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u00ab\u043d\u0435\u0434\u043e\u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c\u00bb).<\/p>\n<\/li>\n<li>\n<p><strong>\u0424\u043b\u0430\u0433\u043c\u0430\u043d\u0441\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c (Robust CVaR 0.1):<\/strong> \u00ab\u0421\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0413\u0440\u0430\u0430\u043b\u044c\u00bb \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0447\u0442\u043e \u043d\u0430 \u0434\u0435\u043b\u0435 \u043f\u043e\u043a\u0430 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u0430\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432\u044b\u0448\u0435. \u0417\u0430\u043c\u0435\u0442\u043d\u044b \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0437\u0430\u0449\u0438\u0442\u0443 \u043a\u043e\u043d\u0441\u0435\u0440\u0432\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, \u043d\u043e (\u043d\u0435 \u0431\u0435\u0437 \u043f\u043e\u043c\u043e\u0449\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0440\u0438\u0441\u043e\u043a\u043e\u0432\u043e\u0439) \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0434\u0430\u044e\u0449\u0438\u0439\u0441\u044f CAGR \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 <strong>17.56%<\/strong> \u043f\u0440\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0435 \u0421\u043e\u0440\u0442\u0438\u043d\u043e <strong>0.92 (\u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0431\u0435\u0437 \u0442\u043e\u043a\u0441\u0438\u0447\u043d\u044b\u0445 \u0430\u043a\u0442\u0438\u0432\u043e\u0432 \u2013 \u043b\u0443\u0447\u0448\u0438\u0439, \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442).<\/strong> <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/c17\/cce\/224\/c17cce224e3bdbd7aba804306979e574.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/c17\/cce\/224\/c17cce224e3bdbd7aba804306979e574.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/c17\/cce\/224\/c17cce224e3bdbd7aba804306979e574.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<\/li>\n<\/ol>\n<h3>\u0427\u0430\u0441\u0442\u044c 2: 250 \u043f\u0440\u043e\u0433\u043e\u043d\u043e\u0432 \u041c\u043e\u043d\u0442\u0435-\u041a\u0430\u0440\u043b\u043e (\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0440\u0434\u0438\u043a\u0442)<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0440\u0435\u043a \u2013 \u044d\u0442\u043e \u043d\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435, \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u044f polytest \u043e\u0431\u0441\u0447\u0438\u0442\u0430\u043b\u0430 250 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 Out-of-Sample \u043e\u043a\u043e\u043d. \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 t-\u0431\u0430\u043b\u043b\u043e\u0432 relative-\u0421\u043e\u0440\u0442\u0438\u043d\u043e \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u0432\u0441\u0451 \u043f\u043e \u043c\u0435\u0441\u0442\u0430\u043c:<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u043e\u0442\u0438\u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f <strong>1\/N<\/strong> \u0438 <strong>Random Monkey<\/strong> \u043c\u043e\u0434\u0435\u043b\u044c <strong>Robust CVaR 0.1<\/strong> \u0432\u044b\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0432 <strong>43\u201345% \u0441\u043b\u0443\u0447\u0430\u0435\u0432<\/strong>, \u0443\u0445\u043e\u0434\u044f \u0432 \u043d\u0435\u0439\u0442\u0440\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u0438\u0447\u044c\u044e \u0432 41\u201344% \u0438 \u0443\u0441\u0442\u0443\u043f\u0430\u044f \u043b\u0438\u0448\u044c \u0432 <strong>~13%<\/strong> \u043f\u0440\u043e\u0433\u043e\u043d\u043e\u0432 (\u043f\u0440\u0438\u0447\u0435\u043c \u0432 \u0437\u043e\u043d\u0430\u0445 \u043f\u043e\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043e\u0442\u0441\u0442\u0430\u0432\u0430\u043d\u0438\u0435 \u043f\u043e CAGR \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043e\u043a\u043e\u043b\u043e 2%).<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0431\u0438\u0442\u0432\u0435 \u043f\u0440\u043e\u0442\u0438\u0432 \u041c\u0430\u0440\u043a\u043e\u0432\u0438\u0446\u0430 \u0438 Base CVaR \u0444\u043b\u0430\u0433\u043c\u0430\u043d \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0442\u043e\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0434\u043e\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u2013 <strong>50.0% \u0438 56.4% \u0447\u0438\u0441\u0442\u044b\u0445 \u043f\u043e\u0431\u0435\u0434<\/strong> \u0441\u043e \u0441\u0440\u0435\u0434\u043d\u0438\u043c t-\u0431\u0430\u043b\u043b\u043e\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0434\u043e <strong>+1.94<\/strong>. \u0413\u0440\u0430\u0444\u0438\u043a\u0438 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0440\u0438\u0441\u043a\u043e\u0432 (KDE) \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0442: \u0445\u043e\u043b\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0441\u0430\u0434\u043a\u0438 (Max Drawdown) \u0443 \u0440\u043e\u0431\u0430\u0441\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u044b\u043c \u0443\u0437\u043a\u0438\u043c \u0438 \u0432\u044b\u0441\u043e\u043a\u0438\u043c, \u0443 \u043d\u0435\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u00ab\u0442\u044f\u0436\u0435\u043b\u044b\u0435 \u043b\u0435\u0432\u044b\u0435 \u0445\u0432\u043e\u0441\u0442\u044b\u00bb \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0445 \u0443\u0431\u044b\u0442\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0437\u043c\u0430\u0437\u0430\u043d\u044b \u0443 \u041c\u0430\u0440\u043a\u043e\u0432\u0438\u0446\u0430 \u0438 \u041c\u043e\u043c\u0435\u043d\u0442\u0443\u043c\u0430 \u0434\u043e -40% \u0438 \u043d\u0438\u0436\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u0423\u043b\u044c\u0442\u0438\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u00ab1 vs ALL\u00bb (\u041e\u0434\u0438\u043d \u043f\u0440\u043e\u0442\u0438\u0432 \u0432\u0441\u0435\u0445):<\/strong> \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0442\u0435\u0441\u0442\u043e\u043c \u0441\u0442\u0430\u043b \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u0447\u0435\u0442, \u0433\u0434\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0447\u0438\u0442\u0430\u043b\u0430\u0441\u044c \u043f\u0440\u043e\u0438\u0433\u0440\u0430\u0432\u0448\u0435\u0439, \u0435\u0441\u043b\u0438 \u0443\u0441\u0442\u0443\u043f\u0430\u043b\u0430 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u0432 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u043c \u043e\u0442\u0440\u0435\u0437\u043a\u0435. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b\u0438 \u0442\u0440\u0438\u0443\u043c\u0444 \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439: \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0441\u0435\u0440\u0432\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f <code>New<\/code> \u0438\u0437-\u0437\u0430 \u043f\u0430\u0440\u0430\u043d\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0438\u0441\u043a-\u043e\u0444\u0444\u0430 \u0443\u0441\u0442\u0443\u043f\u0430\u043b \u0432 74.4% \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u0442\u043e \u0443 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0444\u043b\u0430\u0433\u043c\u0430\u043d\u0430 <code>0.1<\/code> \u0434\u043e\u043b\u044f \u043f\u043e\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u00ab\u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0442\u0438\u0432 \u0432\u0441\u0435\u0445\u00bb \u0443\u043f\u0430\u043b\u0430 \u0434\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0430. \u041c\u043e\u0434\u0435\u043b\u044c <code>0.1<\/code> \u0443\u0436\u0435 \u2018\u043d\u0430\u0443\u0447\u0438\u043b\u0430\u0441\u044c\u2019 \u0443\u043b\u044c\u0442\u0438\u043c\u0430\u0442\u0438\u0432\u043d\u043e \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u0434\u0438\u0443\u043c, \u0438\u0437\u0431\u0435\u0433\u0430\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u043d\u043d\u0438\u0435 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u044b \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0432\u0430\u043b\u0438\u0441\u044c (\u043a\u0430\u043a \u043d\u0430 \u0431\u044b\u0447\u044c\u0438\u0445, \u0442\u0430\u043a \u0438 \u043d\u0430 \u043c\u0435\u0434\u0432\u0435\u0436\u044c\u0438\u0445 \u0440\u044b\u043d\u043a\u0430\u0445). <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/github.com\/markelovandrey5454-ship-it\/multi-model-portfolio-backtester\/blob\/main\/images\/current_runs\/boxplots_cagr_comparison.png?raw=true\" alt=\"\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u043d\u043e\u0439 \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 CAGR \u043c\u043e\u0434\u0435\u043b\u0435\u0439\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/github.com\/markelovandrey5454-ship-it\/multi-model-portfolio-backtester\/blob\/main\/images\/current_runs\/boxplots_cagr_comparison.png?raw=true 780w,&#10;       https:\/\/github.com\/markelovandrey5454-ship-it\/multi-model-portfolio-backtester\/blob\/main\/images\/current_runs\/boxplots_cagr_comparison.png?raw=true 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u043d\u043e\u0439 \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 CAGR \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/053\/cfc\/870\/053cfc870e4790ad21ce30ef976e7319.png\" alt=\"\u041f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 KDE \u0434\u043b\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0430\u0434\u043e\u043a \u0438 \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u044b\u0445 \u0440\u0438\u0441\u043a\u043e\u0432\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/053\/cfc\/870\/053cfc870e4790ad21ce30ef976e7319.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/053\/cfc\/870\/053cfc870e4790ad21ce30ef976e7319.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 KDE \u0434\u043b\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0441\u0430\u0434\u043e\u043a \u0438 \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u044b\u0445 \u0440\u0438\u0441\u043a\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/b86\/c79\/f81\/b86c79f814e35c11314a978c8371ff79.png\" alt=\"\u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0435\u0439 \u0437\u043e\u043d \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/\/post_images\/b86\/c79\/f81\/b86c79f814e35c11314a978c8371ff79.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/\/post_images\/b86\/c79\/f81\/b86c79f814e35c11314a978c8371ff79.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0435\u0439 \u0437\u043e\u043d \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438<\/figcaption><\/div>\n<\/figure>\n<\/li>\n<\/ul>\n<h2>\u0413\u043b\u0430\u0432\u0430 5. \u0424\u0438\u043d\u0430\u043b? \u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0431\u044d\u043a\u043b\u043e\u0433 \u0438 \u0442\u043e\u0447\u043a\u0438 \u0440\u043e\u0441\u0442\u0430<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0434\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0434\u043e \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0442\u043e \u0432\u0430\u043c \u0438\u043b\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u043a\u0443\u0447\u043d\u043e \u0438\u043b\u0438 \u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u043f\u043e\u043d\u044f\u0442\u044c \u043d\u0435 \u0432\u043f\u0430\u043b \u043b\u0438 \u044f \u0432 \u0438\u043b\u043b\u044e\u0437\u0438\u044e, \u0447\u0442\u043e \u00ab\u0445\u0430\u043a\u043d\u0443\u043b \u0431\u0438\u0440\u0436\u0443\u00bb. \u0414\u0430\u043d\u043d\u0430\u044f \u0434\u0432\u0443\u0445\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u0430\u044f \u0440\u043e\u0431\u0430\u0441\u0442\u043d\u0430\u044f CVaR-\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430, \u043e\u0434\u043d\u0430\u043a\u043e \u0445\u043e\u0436\u0443 \u0432\u0441\u0435 \u0435\u0449\u0435 \u0441 \u043d\u0435\u0434\u043e\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u043b\u0438\u0446\u043e\u043c (\u0445\u043e\u0442\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u043e\u0440\u0433\u043e\u0432 \u2013 \u043f\u043e\u0437\u0430\u0431\u0430\u0432\u0438\u043b\u0438, \u0434\u0430 \u0438 \u043f\u043e\u0440\u0430\u0434\u043e\u0432\u0430\u043b\u0438). \u041e\u0434\u043d\u0430\u043a\u043e \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u043b\u0430 \u0433\u043e\u0442\u043e\u0432\u0430 \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0438\u043d\u0441\u0442\u0438\u0442\u0443\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0435, \u044f \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043f\u044f\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 <strong>\u0442\u043e\u0447\u0435\u043a \u0440\u043e\u0441\u0442\u0430<\/strong>, \u043d\u0430\u0434 \u043a\u043e\u0434\u043e\u043c \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0433\u043e\u0434\u0430:<\/p>\n<ol>\n<li>\n<p><strong>ADV-\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043b\u0438\u043a\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u044c:<\/strong> \u041d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0434\u043d\u0435\u0432\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043c\u044b \u0442\u043e\u0440\u0433\u043e\u0432 \u0430\u043a\u0442\u0438\u0432\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0432\u044b\u0431\u043e\u0440\u043e\u043a \u041c\u043e\u043d\u0442\u0435-\u041a\u0430\u0440\u043b\u043e. \u041b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0448\u0430\u0433 \u0434\u043b\u044f \u0430\u043f\u0433\u0440\u0435\u0439\u0434\u0430 \u2013 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0436\u0435\u0441\u0442\u043a\u043e\u0433\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043e\u043b\u0432\u0435\u0440 cvxpy: \u0432\u0435\u0441 \u043b\u044e\u0431\u043e\u0433\u043e \u0430\u043a\u0442\u0438\u0432\u0430 \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c X% \u043e\u0442 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u0442\u043e\u0440\u0433\u043e\u0432 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 20 \u0441\u0435\u0441\u0441\u0438\u0439 (\u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0431\u0440\u0430\u043b\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043b\u0438\u043c\u0438\u0442 \u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0430\u0446\u0438\u0438 \u0432 10%). \u042d\u0442\u043e \u0437\u0430\u0449\u0438\u0442\u0438\u0442 \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0442 Market Impact \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043d\u0435\u043b\u0438\u043a\u0432\u0438\u0434\u043d\u044b\u043c\u0438 \u0431\u0443\u043c\u0430\u0433\u0430\u043c\u0438 2-3 \u044d\u0448\u0435\u043b\u043e\u043d\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u042d\u043d\u0434\u043e\u0433\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0441\u0447\u0435\u0442 \u043f\u0440\u043e\u0441\u043a\u0430\u043b\u044c\u0437\u044b\u0432\u0430\u043d\u0438\u044f:<\/strong> \u0421\u0435\u0439\u0447\u0430\u0441 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0438\u0437\u0434\u0435\u0440\u0436\u043a\u0438 \u0437\u0430\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 \u043f\u043b\u043e\u0441\u043a\u043e\u0433\u043e L1-\u0448\u0442\u0440\u0430\u0444\u0430 \u0431\u0440\u043e\u043a\u0435\u0440\u0441\u043a\u043e\u0439 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438 (0.0005). \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0441\u0434\u0435\u043b\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0434\u0432\u0438\u0433\u0430\u044e\u0442 \u0441\u0442\u0430\u043a\u0430\u043d \u043f\u0440\u043e\u0442\u0438\u0432 \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u0430. \u042f \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c turnover_penalty \u0432 \u0432\u0438\u0434\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0439 L2-\u0440\u0435\u0433\u0443\u043b\u044f\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0437\u0430\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0441\u043f\u0440\u0435\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0442\u0438\u043a\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u043a\u0430\u043b\u044c\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043e\u0440\u0434\u0435\u0440\u043e\u0432 (\u0440\u0430\u0437 \u0443\u0436 \u043d\u0430 \u0440\u0443\u043a\u0430\u0445 \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u044a\u0435\u043c\u044b \u0442\u043e\u0440\u0433\u043e\u0432 \u2013 \u0447\u0435\u0433\u043e \u0431\u044b \u0438 \u043d\u0435\u0442).<\/p>\n<\/li>\n<li>\n<p><strong>\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 \u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c:<\/strong> \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u043e\u043b\u0438, \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0438\u0437\u0434\u0435\u0440\u0436\u0435\u043a \u0438 \u0441\u0430\u043c\u043e\u0439 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0438, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0445\/\u0448\u0443\u043c\u043e\u0432\u044b\u0445 \u0441\u0434\u0435\u043b\u043e\u043a (\u0438\u043b\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f, \u0437\u0430\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0440\u043e\u043a\u0435\u0440\u0443)? \u0422\u043e, \u0447\u0442\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0448\u0430\u0433\u0430 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c:<\/strong> \u0410 \u0442\u0430\u043a\u0436\u0435 \u0432 \u0446\u0435\u043b\u043e\u043c \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0438\u0437-\u0437\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 (\u043e\u0434\u043d\u0430\u043a\u043e \u044f \u044d\u0442\u043e \u043f\u0438\u0448\u0443, \u0432\u0435\u0434\u044c \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u044f\u0441\u044c \u0434\u0430\u0436\u0435 \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0431\u044d\u043a\u0442\u0435\u0441\u0442\u043e\u0432 \u2013 \u043a\u0442\u043e-\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043c\u043e\u0433 \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0438\u043b\u0438 \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f).<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0443 \u0438 \u0438\u0437 \u0441\u0430\u043c\u043e\u0433\u043e \u0432\u0435\u0441\u0435\u043b\u043e\u0433\u043e \u2013 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0441\u0442\u0440\u0435\u0441\u0441-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/strong> \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0448\u043e\u0440\u0442\u0430 (\u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u044d\u0434\u0436\u0430). \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b, \u0435\u0441\u043b\u0438 \u0431\u044b \u0430\u043a\u0442\u0438\u0432\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u0438, \u043f\u0430\u0434\u0430\u043b\u0438 \u0441\u0438\u043b\u044c\u043d\u0435\u0435, \u0430 \u0442\u0435, \u0447\u0442\u043e \u043e\u043d\u0430 \u043f\u043e\u043a\u0443\u043f\u0430\u043b\u0430 \u043c\u0435\u043d\u044c\u0448\u0435 \u2013 \u0440\u043e\u0441\u043b\u0438 \u0447\u0430\u0449\u0435? \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043b\u0438 \u0438\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u043b\u043d\u0443\u044e \u043f\u043e\u0431\u0435\u0434\u0443 \u0445\u043e\u0442\u044f \u0431\u044b \u0432 30% \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043f\u0440\u043e\u0442\u0438\u0432 \u0430\u0433\u0440\u0435\u0441\u0441\u0438\u0432\u043d\u043e\u0433\u043e ML-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430?<\/p>\n<\/li>\n<\/ol>\n<h3>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: \u041a\u0430\u043a \u043f\u0440\u043e\u0439\u0442\u0438 \u044d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e?<\/h3>\n<p>\u0412\u0435\u0441\u044c \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u2013 \u043e\u0442 ISS MOEX \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u0441 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u043e \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u043f\u0435\u0442\u043b\u0438 \u0431\u044d\u043a\u0442\u0435\u0441\u0442\u0435\u0440\u0430 \u0441 \u0434\u0438\u0432\u0433\u044d\u043f-\u043b\u0430\u0433\u0430\u043c\u0438 \u0438 \u043d\u0430\u043b\u043e\u0433\u0430\u043c\u0438 \u2013 \u044f \u0432\u044b\u043b\u043e\u0436\u0438\u043b \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0430 GitHub. \u0422\u0430\u043c \u0436\u0435 \u043b\u0435\u0436\u0430\u0442 preprocompiled CSV-\u043c\u0430\u0442\u0440\u0438\u0446\u044b 250 \u043f\u0440\u043e\u0433\u043e\u043d\u043e\u0432 \u041c\u043e\u043d\u0442\u0435-\u041a\u0430\u0440\u043b\u043e \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u0411\u0443\u0434\u0443 \u0438\u0441\u043a\u0440\u0435\u043d\u043d\u0435 \u0440\u0430\u0434 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043a\u0440\u0438\u0442\u0438\u043a\u0435, \u0438\u0434\u0435\u044f\u043c \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0440\u043e\u0431\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u043e\u0432\u0435\u0442\u0430\u043c \u043e\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443\u044e\u0449\u0438\u0445 \u043a\u0432\u0430\u043d\u0442\u043e\u0432 (\u0438 \u0434\u0430\u0436\u0435 \u0430\u043b\u0433\u043e\u0442\u0440\u0435\u0439\u0434\u0435\u0440\u043e\u0432, \u0442\u043a \u0438 \u0432 \u044d\u0442\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f).<\/p>\n<ul>\n<li>\n<p><strong>GitHub:<\/strong> <a href=\"https:\/\/github.com\/markelovandrey5454-ship-it\/multi-model-portfolio-backtester\" rel=\"noopener nofollow\">https:\/\/github.com\/markelovandrey5454-ship-it\/multi-model-portfolio-backtester<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1082296\/\">https:\/\/habr.com\/ru\/articles\/1082296\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043d\u0434\u0440\u0435\u0439, 27 \u043b\u0435\u0442, \u043d\u044b\u043d\u0435 \u0441\u0442\u0443\u0434\u0435\u043d\u0442 4 \u043a\u0443\u0440\u0441\u0430 \u043c\u0435\u0445\u043c\u0430\u0442\u0430. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2013 \u043d\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u043f\u0440\u043e \u00ab\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0442\u0440\u0435\u0439\u0434\u0438\u043d\u0433\u00bb, \u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0441\u0440\u0435\u0437 \u043c\u043e\u0435\u0439 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0434\u0438\u043f\u043b\u043e\u043c\u043d\u043e\u0439 \u043d\u0430\u0443\u0447\u043d\u043e-\u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b (\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0438 \u0432\u0430\u043c, \u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f). \u0418, \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c (\u0438\u043b\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c), \u043a\u0430\u043a \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u00ab\u0431\u0443\u043c\u0430\u0436\u043d\u044b\u0435\u00bb \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0441\u043a\u0438\u0435 \u0442\u0435\u043e\u0440\u0438\u0438 \u043e \u0433\u0440\u044f\u0437\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0431\u0438\u0440\u0436\u0435\u0432\u043e\u0439 \u043c\u0438\u043a\u0440\u043e\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438: \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e \u043d\u0435 \u0442\u0435\u0440\u044f\u0442\u044c \u0434\u0435\u043d\u044c\u0433\u0438 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0436\u0435\u0441\u0442\u043a\u0438\u0445 \u0440\u044b\u043d\u043e\u0447\u043d\u044b\u0445 \u0448\u043e\u043a\u043e\u0432 (\u043a\u043e\u0438\u0445 \u043d\u0430 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u043e\u043c \u0440\u044b\u043d\u043a\u0435 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u0441 \u0438\u0437\u0431\u044b\u0442\u043a\u043e\u043c).\u0415\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0432\u0435\u0440\u0438\u0442\u044c \u043a\u043e\u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f\u043c (\u0434\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u043c\u0441\u044f \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u044f\u043c \u0442\u0435\u043e\u0440\u0438\u0438 \u041c\u0430\u0440\u043a\u043e\u0432\u0438\u0446\u0430), \u043a\u0443\u0434\u0430 \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f? \u041e\u0442\u0432\u0435\u0442 \u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u0438 \u2013 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0438 CVaR, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u043e\u0447\u043d\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u043f\u043e\u0439\u0434\u0435\u0442 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043b\u043e\u0445\u043e \u0438 \u043c\u044b \u043e\u043a\u0430\u0436\u0435\u043c\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 5% \u0445\u0443\u0434\u0448\u0438\u0445 \u0440\u044b\u043d\u043e\u0447\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432, \u043a\u0430\u043a\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0448 \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0443\u0431\u044b\u0442\u043e\u043a?\u00bb.\u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0446\u0435\u043b\u0438 \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u0433\u043e \u043d\u0438\u0447\u0435\u0433\u043e: \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 Python \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0440\u044b\u043d\u043e\u0447\u043d\u044b\u0435 \u0440\u0435\u0436\u0438\u043c\u044b, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043f\u0430\u043d\u0438\u043a\u0438 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u044b\u0435 \u0440\u0438\u0441\u043a\u0438, \u043d\u0435 \u0443\u0434\u0443\u0448\u0430\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u044b\u043d\u043e\u0447\u043d\u0443\u044e \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c (CAGR) \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.\u041d\u0430 \u0434\u0435\u043b\u0435 \u0432\u0441\u0435 \u043a\u0443\u0434\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u0435\u0435, \u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043d\u044b\u0442\u044c\u0435 \u0434\u043e \u0433\u043b\u0430\u0432\u044b 2. \u0410 \u043f\u043e\u043a\u0430:\u0413\u043b\u0430\u0432\u0430 1. \u041a\u043e\u043d\u0442\u0443\u0440 \u0442\u043e\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0435\u0441\u0441-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\u0427\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u2013 \u044d\u0442\u043e \u043d\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f \u043f\u043e\u0434\u0433\u043e\u043d\u043a\u0430 \u043a\u0440\u0438\u0432\u043e\u0439 \u043f\u043e\u0434 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a, \u0441\u0442\u043e\u0438\u0442 \u0443\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a:\u0418\u0437 \u0431\u043e\u043b\u0435\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0433\u043e \u2013 \u0441\u043a\u0432\u043e\u0437\u043d\u043e\u0439 11-\u043b\u0435\u0442\u043d\u0438\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0440\u0435\u043a (2015\u20132026 \u0433\u0433.): \u0421\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f \u0432 \u0442\u0440\u0435\u0445 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u0430\u0445 \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u0430 \u2013 \u0440\u0430\u0437\u043e\u0432\u044b\u0439 \u0441\u0442\u0430\u0440\u0442 \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0430 (Lump-Sum), \u0438\u043d\u0444\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e-\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u0435\u0436\u0435\u043c\u0435\u0441\u044f\u0447\u043d\u043e\u0435 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u0435 (DCA) \u0438 \u0444\u0430\u0437\u0430 \u0440\u0435\u043d\u0442\u044b (FIRE) \u0441 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0438\u0437\u044a\u044f\u0442\u0438\u0435\u043c \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043d\u0430 \u0436\u0438\u0437\u043d\u044c.\u0418\u0437 \u0442\u043e\u0433\u043e, \u043a \u0447\u0435\u043c\u0443 \u043f\u0440\u0438\u0448\u0435\u043b \u043f\u043e\u0437\u0436\u0435 \u2013 \u043a\u0440\u0430\u0448-\u0442\u0435\u0441\u0442 \u041c\u043e\u043d\u0442\u0435-\u041a\u0430\u0440\u043b\u043e: 250 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u043f\u0440\u043e\u0433\u043e\u043d\u043e\u0432 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430\u0445 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 ~70 \u0430\u043a\u0442\u0438\u0432\u043e\u0432 \u0440\u044b\u043d\u043a\u0430 \u0420\u0424 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (3, 4 \u0438 5 \u043b\u0435\u0442). \u041f\u0440\u0438\u0447\u0435\u043c \u0432 \u043f\u0443\u043b \u0430\u043a\u0442\u0438\u0432\u043e\u0432 \u0431\u044b\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u00ab\u0442\u0440\u0443\u043f\u044b\u00bb \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0435\u043b\u0438\u0441\u0442\u0438\u043d\u0433\u043e\u0432 \u0438 \u0431\u0430\u043d\u043a\u0440\u043e\u0442\u0441\u0442\u0432, \u0430 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0442\u0440\u0438 \u0442\u0438\u043f\u0430 \u0437\u0430\u0449\u0438\u0442\u043d\u044b\u0445 \u0433\u0430\u0432\u0430\u043d\u0435\u0439: \u0434\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a (LQDT\/\u0420\u0415\u041f\u041e), \u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0438 (\u041e\u0424\u0417) \u0438 \u0434\u0440\u0430\u0433\u043c\u0435\u0442\u0430\u043b\u043b\u044b (\u0437\u043e\u043b\u043e\u0442\u043e\/\u0441\u0435\u0440\u0435\u0431\u0440\u043e) \u0434\u043b\u044f \u0445\u044d\u0434\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0440\u0438\u0441\u043a\u043e\u0432.\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e \u0440\u0430\u0441\u043a\u0440\u043e\u044e \u0432\u0441\u044e \u0438\u0437\u043d\u0430\u043d\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430: \u043e\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b ETL-\u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445 \u044d\u043a\u0432\u0438\u0442\u0438.\u0413\u043b\u0430\u0432\u0430 2. \u0418\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u044b\u0439 \u0430\u0434 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0431\u043e\u0440\u044c\u0431\u0430 \u0437\u0430 \u0447\u0438\u0441\u0442\u044b\u0439 \u0431\u044d\u043a\u0442e\u0441\u0442\u041d\u0435 \u0437\u043d\u0430\u044e, \u043a\u0430\u043a \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0434\u0435\u043b\u0430 \u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043b\u0438 \u0443 \u043d\u0438\u0445 \u043d\u0430 \u0440\u0443\u043a\u0430\u0445 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 (\u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0449\u0435 \u0438 \u043c\u0438\u043d\u0443\u0442\u043d\u044b\u0445 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u043e\u0432), \u043d\u043e \u0432 \u043c\u043e\u0435\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 70% \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443\u0448\u043b\u043e \u043d\u0435 \u043d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432\u044b\u043f\u0443\u043a\u043b\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0430 \u043d\u0430 \u0440\u0443\u0447\u043d\u0443\u044e, \u0442\u044f\u0436\u0435\u043b\u0443\u044e \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u00ab\u0442\u043e\u043a\u0441\u0438\u0447\u043d\u044b\u0445 \u043e\u0442\u0445\u043e\u0434\u043e\u0432\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0434\u0430\u044e\u0442 \u0431\u0438\u0440\u0436\u0435\u0432\u044b\u0435 API (\u043d\u0435 \u0431\u0435\u0437 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439).\u0420\u044b\u043d\u043e\u043a \u0420\u0424 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u043d, \u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u043f\u043e\u043b\u043e\u043d \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u043e\u043d\u044b \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0430 \u0438\u043c\u0435\u043b\u0438 \u0445\u043e\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043c\u044b\u0441\u043b, \u044f \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (ETL), \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 MoexISSClient \u2192 LocalCSVStorage \u2192 DataCleaner. \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0431\u0435\u0436\u0434\u0430\u0442\u044c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043a\u043e\u0434\u0430:1. \u0421\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0442\u0440\u043e\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0435\u0437 \u0414\u0435\u043d\u0435\u0436\u043d\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430 (LQDT + REPO)\u0414\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0440\u0438\u0441\u043a\u0430 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0442\u0440\u0435\u043a \u0431\u0435\u0437\u0440\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0432\u043a\u0438. \u041d\u0430 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u043e\u043c \u0440\u044b\u043d\u043a\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u043e\u043a\u0441\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u043e\u043d\u0434 \u0434\u0435\u043d\u0435\u0436\u043d\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430 LQDT (\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u0420\u0415\u041f\u041e \u0441 \u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u043c \u041a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u043e\u043c). \u041d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0444\u043e\u043d\u0434 LQDT \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u044b\u043b \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432 2022 \u0433\u043e\u0434\u0443. \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0441\u043b\u0438 \u0437\u0430\u0449\u0438\u0442\u043d\u043e\u0433\u043e \u0430\u043a\u0442\u0438\u0432\u0430 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e? \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0440\u0435\u0442\u0440\u043e\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u044d\u043a\u0441\u0442\u0440\u0430\u043f\u043e\u043b\u044f\u0446\u0438\u0438: \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0446\u0435\u043d\u0443 \u043f\u0430\u044f \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u0435\u043d\u044c \u0442\u043e\u0440\u0433\u043e\u0432 \u0444\u043e\u043d\u0434\u0430 LQDT, \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 MOEXREPO (\u0441\u0442\u0430\u0432\u043a\u0438 \u0420\u0415\u041f\u041e \u0441 \u0426\u041a) \u043d\u0430\u0437\u0430\u0434 \u0434\u043e 2013 \u0433\u043e\u0434\u0430 (\u0447\u0442\u043e\u0431\u044b \u0441 \u0437\u0430\u043f\u0430\u0441\u043e\u043c \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442\u044c \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438 \u0432 2015 \u0433\u043e\u0434\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u0435\u0449\u0435 \u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435) \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u0443\u044e \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0446\u0435\u043d\u0443 \u043f\u0430\u044f LQDT:\u0422\u0430\u043a\u0436\u0435 \u044d\u0442\u043e \u0434\u0430\u043b\u043e \u043c\u043e\u0434\u0435\u043b\u044f\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u0439 \u0432 \u0431\u0435\u0437\u0440\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043d\u0430 \u0432\u0441\u0435\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0435.2. \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u0435\u0442\u0435\u043a\u0442\u043e\u0440 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043f\u043b\u0438\u0442\u043e\u0432 \u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u0438\u0434\u0430\u0446\u0438\u0439\u0421\u044b\u0440\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0446\u0435\u043d \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f (CLOSE, LOW, HIGH \u0438 \u043f\u0440.) \u043d\u0430 \u041c\u043e\u0441\u0431\u0438\u0440\u0436\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0446\u0435\u043d\u044b \u00ab\u043a\u0430\u043a \u0435\u0441\u0442\u044c\u00bb. \u041d\u043e \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u0447\u0442\u043e \u0441\u043f\u043b\u0438\u0442\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0435\u0441\u043b\u0438 \u0441\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0443, \u0442\u043e \u0432 \u0434\u0435\u043d\u044c \u0441\u043f\u043b\u0438\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u043b\u043e\u0436\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u0431\u0432\u0430\u043b \u0430\u043a\u0446\u0438\u0438 \u043d\u0430 99%, \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0443\u043b\u0435\u0442\u0438\u0442 \u0432 \u043a\u043e\u0441\u043c\u043e\u0441, \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0430\u0431\u0430\u043d\u0438\u0442 \u044d\u0442\u043e\u0442 \u0430\u043a\u0442\u0438\u0432 (\u0432 \u0445\u0443\u0434\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044f\u043a\u043e\u0431\u044b \u043e\u0431\u043d\u0443\u043b\u0438\u0432 \u043a\u0430\u043f\u0438\u0442\u0430\u043b).\u0422\u0430\u043a \u043c\u043e\u0434\u0443\u043b\u044c DataCleaner \u0437\u0430\u0438\u043c\u0435\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432 \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 cross-day \u0441\u043a\u0430\u0447\u043a\u043e\u0432 \u0446\u0435\u043d\u044b ( \u0438\u043b\u0438 ). \u041f\u0440\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u0435\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0434\u0435\u043d\u043e\u043c\u0438\u043d\u0430\u0446\u0438\u0438 \u0431\u0438\u0440\u0436\u0438 \u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043a\u0440\u0438\u0432\u0443\u044e \u0446\u0435\u043d \u00ab\u0432\u043b\u0435\u0432\u043e\u00bb \u043e\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0434\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u0438, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u044b\u0435 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u0446\u0435\u043d \u043f\u043e\u0434 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0438.3. \u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u041f\u0430\u0440\u043a\u0438\u043d\u0441\u043e\u043d\u0430\u041e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0438\u0448\u043b\u043e \u043e\u0441\u043e\u0437\u043d\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u0440\u0430 \u0440\u0438\u0441\u043a\u0430 \u0430\u043a\u0442\u0438\u0432\u0430, \u043d\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0435\u0439 \u0446\u0435\u043d \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b\u043e \u043d\u0435\u0441\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0434\u0430 \u0438 \u0437\u0430\u043f\u0430\u0437\u0434\u044b\u0432\u0430\u0435\u0442, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u0412\u043c\u0435\u0441\u0442\u043e \u0446\u0435\u043d \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0432 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0431\u044b\u043b \u0432\u043d\u0435\u0434\u0440\u0435\u043d \u043e\u0446\u0435\u043d\u0449\u0438\u043a \u041f\u0430\u0440\u043a\u0438\u043d\u0441\u043e\u043d\u0430, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c\u0430\u0445 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u0441\u0435\u0441\u0441\u0438\u0438 (HIGH \u0438 LOW), \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 \u043b\u043e\u0436\u043d\u044b\u0445 \u0433\u044d\u043f\u043e\u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u043c \u0440\u044b\u043d\u043a\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0431\u044b\u043b\u0430 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0446\u0435\u043d\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f (CLOSE) \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u0434\u043d\u044f:\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0437\u0430\u043b\u043e\u0436\u0435\u043d\u0430 Point-in-Time \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u043e\u0432 (\u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u043b\u043e\u0433\u0430 13%, \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u0434\u0430\u0442\u044b \u043e\u0442\u0441\u0435\u0447\u043a\u0438 \u043d\u0430 \u0422+2 \u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0435\u0439 \u0432\u0430\u043b\u044e\u0442\u043d\u044b\u0445 \u0432\u044b\u043f\u043b\u0430\u0442 \u043f\u043e \u043a\u0443\u0440\u0441\u0443 \u0426\u0411 \u043d\u0430 \u0434\u0430\u0442\u0443 \u0440\u0435\u0435\u0441\u0442\u0440\u0430), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0430 \u0432 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445 \u0438 \u0434\u0435\u043b\u0438\u0441\u0442\u0438\u043d\u0433\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u044d\u043c\u0438\u0442\u0435\u043d\u0442\u0430\u0445 \u0432 -100%.\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u044f\u0434\u0440\u0430 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 DataCleanerclass DataCleaner:    def __init__(self, storage: LocalCSVStorage):        self.storage = storage    def build_cleaned_market_data(self, assets_config: dict, target_start: str, delist_history: pd.DataFrame) -&gt; tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame]:        close_series_dict = {}        high_series_dict = {}        low_series_dict = {}        for asset_name, stages in assets_config.items():            df = self.storage.get_market_data(asset_name=asset_name, stages=stages, target_start=target_start)            if not df.empty:                close_series_dict[asset_name] = df[f&#187;{asset_name}_close&#187;]                high_series_dict[asset_name] = df[f&#187;{asset_name}_high&#187;]                low_series_dict[asset_name] = df[f&#187;{asset_name}_low&#187;]        price_matrix = pd.concat(close_series_dict.values(), axis=1,keys=close_series_dict.keys()).sort_index().replace(0.0, np.nan)        high_matrix = pd.concat(high_series_dict.values(), axis=1, keys=high_series_dict.keys()).sort_index().replace(0.0, np.nan)        low_matrix = pd.concat(low_series_dict.values(), axis=1, keys=low_series_dict.keys()).sort_index().replace(0.0,np.nan)        if &#8216;\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(REPO)&#8217; in price_matrix.columns and &#8216;\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)&#8217; in price_matrix.columns:            price_matrix[&#8216;\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(REPO)&#8217;] = price_matrix[&#8216;\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(REPO)&#8217;].ffill()            first_lqdt_date = price_matrix[&#8216;\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)&#8217;].first_valid_index()            t_ipo = price_matrix.index.get_loc(first_lqdt_date)            base_lqdt_price = price_matrix.loc[first_lqdt_date, &#8216;\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)&#8217;]            repo_rates = price_matrix[&#8216;\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(REPO)&#8217;].to_numpy()            synthetic_prices = np.zeros(len(price_matrix))            synthetic_prices[t_ipo] = base_lqdt_price            for t in range(t_ipo &#8212; 1, -1, -1):                daily_repo_rate = (1.0 + (repo_rates[t] \/ 100.0)) ** (1.0 \/ 252.0)                synthetic_prices[t] = synthetic_prices[t + 1] \/ daily_repo_rate            df_synthetic = pd.Series(synthetic_prices[:t_ipo], index=price_matrix.index[:t_ipo])            price_matrix[&#8216;\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)&#8217;] = price_matrix[&#8216;\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)&#8217;].combine_first(df_synthetic)            high_matrix[&#8216;\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)&#8217;] = high_matrix[&#8216;\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)&#8217;].combine_first(df_synthetic)            low_matrix[&#8216;\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)&#8217;] = low_matrix[&#8216;\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)&#8217;].combine_first(df_synthetic)        for col in price_matrix.columns:            f_idx = price_matrix[col].first_valid_index()            if f_idx is not None:                price_matrix.loc[f_idx:, col] = price_matrix.loc[f_idx:, col].ffill()                high_matrix.loc[f_idx:, col] = high_matrix.loc[f_idx:, col].ffill()                low_matrix.loc[f_idx:, col] = low_matrix.loc[f_idx:, col].ffill()        for ticker in price_matrix.columns:            if ticker in [&#8216;\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(REPO)&#8217;, &#8216;\u0414\u0435\u043d\u0435\u0436\u043d\u044b\u0439 \u0440\u044b\u043d\u043e\u043a(LQDT)&#8217;]: continue            p = price_matrix[ticker].to_numpy()            for t in range(1, len(p)):                if pd.isna(p[t]) or pd.isna(p[t &#8212; 1]): continue                if p[t] \/ p[t &#8212; 1] &lt;= 0.4 or p[t] \/ p[t &#8212; 1] &gt;= 2.5:                    for ratio in [1000.0, 100.0, 20.0, 10.0, 8.0, 3.0, 0.1, 0.01, 0.001, 0.0002]:                        if p[t &#8212; 1] * 0.8 &lt;= p[t] * ratio &lt;= p[t &#8212; 1] * 1.2: break                    else: ratio = p[t &#8212; 1] \/ p[t]                    price_matrix.iloc[:t, price_matrix.columns.get_loc(ticker)] \/= ratio                    high_matrix.iloc[:t, high_matrix.columns.get_loc(ticker)] \/= ratio                    low_matrix.iloc[:t, low_matrix.columns.get_loc(ticker)] \/= ratio        returns_matrix = (price_matrix &#8212; price_matrix.shift(1)) \/ price_matrix.shift(1)        div_matrix = pd.DataFrame(0.0, index=price_matrix.index, columns=price_matrix.columns)        translate_cur = {&#8216;USD&#8217;:&#8217;\u0414\u043e\u043b\u043b\u0430\u0440&#8217;, &#8216;EUR&#8217;:&#8217;\u0415\u0432\u0440\u043e&#8217;}        for asset_name, stages in assets_config.items():            if stages[0][&#8216;market&#8217;] != &#8216;shares&#8217; or stages[0][&#8216;secid&#8217;] == &#8216;LQDT&#8217;: continue            tickers &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-494657","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/494657","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=494657"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/494657\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=494657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=494657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=494657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}