{"id":301700,"date":"2020-04-12T09:00:12","date_gmt":"2020-04-12T09:00:12","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=301700"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=301700","title":{"rendered":"\u041e\u0431\u0449\u0438\u0439 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043d\u0430 Python (\u0427\u0430\u0441\u0442\u044c 3)"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/496810\/\">\u041f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0432 <a href=\"https:\/\/habr.com\/ru\/post\/492364\/\">\u044d\u0442\u043e\u0439 <\/a>\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/494636\/\">\u044d\u0442\u043e\u0439 <\/a>\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f\u0445, \u043c\u043e\u0436\u043d\u043e \u0443\u0433\u043b\u0443\u0431\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 statsmodels, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0435\u0441\u0442\u044b. \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0431\u044b\u043b\u0438 \u0432\u0437\u044f\u0442\u044b \u044d\u0442\u0430 <a href=\"https:\/\/datatofish.com\/statsmodels-linear-regression\/\" rel=\"nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f <\/a>\u0438 \u044d\u0442\u0430 <a href=\"https:\/\/medium.com\/python-data\/capm-analysis-calculating-stock-beta-as-a-regression-in-python-c82d189db536\" rel=\"nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a>. \u0421\u0430\u043c\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 <a href=\"https:\/\/www.statsmodels.org\/devel\/generated\/statsmodels.regression.linear_model.OLS.html\" rel=\"nofollow\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438:<\/p>\n<p>  <b>\u041e \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438<\/b><\/p>\n<p>  \u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c) \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\/\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f).<\/p>\n<p>  \u0412 \u0441\u0430\u043c\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0443\u044e. \u0424\u043e\u0440\u043c\u0443\u043b\u0430 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<p>  <b>Y = C + M*X<\/b><\/p>\n<ul>\n<li> Y = \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f (\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \/ \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \/ \u043e\u0446\u0435\u043d\u043a\u0430)<\/li>\n<li> C = \u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 (Y-Intercept)<\/li>\n<li> M = \u041d\u0430\u043a\u043b\u043e\u043d \u043b\u0438\u043d\u0438\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 (\u0443\u0433\u043b\u043e\u0432\u043e\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0438\u043b\u0438 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442 \u043e\u0446\u0435\u043d\u0451\u043d\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438; \u043e\u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e Y \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c, \u0435\u0441\u043b\u0438 \u043c\u044b \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c X \u043d\u0430 \u043e\u0434\u043d\u0443 \u0435\u0434\u0438\u043d\u0438\u0446\u0443)<\/li>\n<li> X = \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f (\u043f\u0440\u0435\u0434\u0438\u043a\u0442\u043e\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0432 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0435 Y)<\/li>\n<\/ul>\n<p>  \u0412 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0442\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438. \u0414\u043b\u044f \u044d\u0442\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 (\u043f\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0441\u0442\u0438) \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0430:<\/p>\n<p>  <b>Y = C + M1X1 + M2X2 + \u2026<\/b><\/p>\n<p>  <b>\u0411\u0435\u0442\u0430 \u2014 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442<\/b><\/p>\n<p>  \u041f\u0440\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e, \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430 \u044d\u0442\u043e\u0439 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%91%D0%B5%D1%82%D0%B0-%D0%BA%D0%BE%D1%8D%D1%84%D1%84%D0%B8%D1%86%D0%B8%D0%B5%D0%BD%D1%82\" rel=\"nofollow\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/a><\/p>\n<p>  \u041a\u043e\u0440\u043e\u0442\u043a\u043e, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0432\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0435\u0433\u043e \u043e\u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  \u0410\u043a\u0446\u0438\u0438 c \u0431\u0435\u0442\u0430-\u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c:<\/p>\n<ul>\n<li>\u043d\u043e\u043b\u044c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u0430\u043a\u0446\u0438\u0435\u0439 \u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c<\/li>\n<li> \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0430\u043a\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0442\u0443 \u0436\u0435 \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0438 \u0438\u043d\u0434\u0435\u043a\u0441<\/li>\n<li> \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u2014 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c (\u0430 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u0440\u0438\u0441\u043a\u0438) \u0430\u043a\u0446\u0438\u0438, \u0447\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441<\/li>\n<li> \u043c\u0435\u043d\u0435\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u2014 \u043c\u0435\u043d\u0435\u0435 \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u0430\u044f \u0430\u043a\u0446\u0438\u044f, \u0447\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430<\/li>\n<\/ul>\n<p>  \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0435\u0441\u043b\u0438 \u0430\u043a\u0446\u0438\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u0441\u044f \u043d\u0430 14%, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0440\u044b\u043d\u043e\u043a \u0432\u044b\u0440\u043e\u0441 \u0432\u0441\u0435\u0433\u043e \u043d\u0430 10%, \u0442\u043e \u0431\u0435\u0442\u0430-\u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0430\u043a\u0446\u0438\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 1,4. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043d\u0430 \u0440\u044b\u043d\u043a\u0430\u0445 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0431\u0435\u0442\u0430-\u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043b\u0443\u0447\u0448\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043b\u044f \u0432\u043e\u0437\u043d\u0430\u0433\u0440\u0430\u0436\u0434\u0435\u043d\u0438\u044f (\u0430 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u0434\u043b\u044f \u0440\u0438\u0441\u043a\u0430).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-e\/yf\/ky\/-eyfkygh_enn9wusk29gg2gyot8.png\" alt=\"image\"><\/p>\n<p>  <b>\u041f\u0440\u0430\u043a\u0442\u0438\u043a\u0430<\/b><\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 Python \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043f\u0440\u0438\u043c\u0435\u0440 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438, \u0433\u0434\u0435 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0418\u043d\u0434\u0435\u043a\u0441\u0443 \u041c\u043e\u0441\u0411\u0438\u0440\u0436\u0438, \u0430 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u2014 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0430\u043a\u0446\u0438\u044f\u043c \u0410\u044d\u0440\u043e\u0444\u043b\u043e\u0442.<\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u043a\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a \u0444\u043e\u0440\u043c\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u2014 \u043a\u043e\u0434 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432. \u0412\u043e\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0432 Python \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c statsmodels:<\/p>\n<pre><code class=\"python\">#\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 import pandas as pd import yfinance as yf import numpy as np import matplotlib.pyplot as plt import statsmodels.api as sm  #\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u044e \u0434\u0430\u043d\u043d\u044b\u0435 ticker = ['AFLT.ME','IMOEX.ME'] stock = yf.download(ticker)  # \u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e\u0439 \u0446\u0435\u043d\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f all_adj_close = stock[['Adj Close']]  # \u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438  all_returns = np.log(all_adj_close \/ all_adj_close.shift(1))  # \u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0430\u043a\u0446\u0438\u044f\u043c   aflt_returns = all_returns['Adj Close'][['AFLT.ME']].fillna(0)  # \u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u041c\u043e\u0441\u0411\u0438\u0440\u0436\u0438  moex_returns = all_returns['Adj Close'][['IMOEX.ME']].fillna(0)   # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e DataFrame  return_data = pd.concat([aflt_returns, moex_returns], axis=1)[1:] return_data.columns = ['AFLT.ME', 'IMOEX.ME']   # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0435\u0434\u0438\u043d\u0438\u0446 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c X \u0438 y X = sm.add_constant(return_data['IMOEX.ME']) y = return_data['AFLT.ME']   # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 model_moex = sm.OLS(y,X).fit()  # \u0412\u044b\u0432\u043e\u0434 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 print(model_moex.summary()) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ed\/xr\/a9\/edxra9sgz7wsy6bcfko4hte2hni.jpeg\" alt=\"image\"><\/p>\n<p>  \u041d\u0430 \u0441\u0430\u0439\u0442\u0435 yahoo \u0438 \u041c\u043e\u0441\u0431\u0438\u0440\u0436\u0438 \u0431\u0435\u0442\u0430 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443. \u041d\u043e \u043d\u0430\u0434\u043e \u0447\u0435\u0441\u0442\u043d\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0440\u0430\u0441\u0447\u0435\u0442 \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0430\u043a\u0446\u0438\u0439 \u0441 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u043e\u0439 \u0431\u0438\u0440\u0436\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u0431\u043e\u043b\u0435\u0435 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u044f, \u043d\u043e \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/w8\/re\/zg\/w8rezgmmmshfkvnooj3bgbwpezg.png\" alt=\"image\"><\/p>\n<p>  \u0422\u043e\u0442 \u0436\u0435 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u043b\u044f \u0430\u043a\u0446\u0438\u0438 FB \u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 SP500. \u0417\u0434\u0435\u0441\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0435, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0441\u044f\u0447\u043d\u0443\u044e \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c.<\/p>\n<pre><code class=\"python\">sp_500 = yf.download('^GSPC') fb = yf.download('FB')  # \u041f\u0435\u0440\u0435\u0441\u0447\u0435\u0442 \u0432 \u043c\u0435\u0441\u044f\u0447\u043d\u0443\u044e \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c fb = fb.resample('BM').apply(lambda x: x[-1]) sp_500 = sp_500.resample('BM').apply(lambda x: x[-1])  monthly_prices = pd.concat([fb['Close'], sp_500['Close']], axis=1) monthly_prices.columns = ['FB', '^GSPC']  monthly_returns = monthly_prices.pct_change(1) clean_monthly_returns = monthly_returns.dropna(axis=0)    X = clean_monthly_returns['^GSPC'] y = clean_monthly_returns['FB']  X1 = sm.add_constant(X)  model_fb_sp_500 = sm.OLS(y, X1)  results_fb_sp_500 = model_fb_sp_500.fit() print(results_fb_sp_500.summary()) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pb\/67\/sa\/pb67saq7ogsncggyw-syzplqciu.jpeg\" alt=\"image\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/iq\/kn\/t5\/iqknt566j5ed_mz7gzmhwt0gyyk.png\" alt=\"image\"><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u0441\u043e\u0432\u043f\u0430\u043b\u043e \u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 statsmodels \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0431\u0435\u0442\u0430.<\/p>\n<p>  \u041d\u0443 \u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u043e\u043d\u0443\u0441\u0430 \u2014 \u0435\u0441\u043b\u0438 \u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0435\u0442\u0430 \u2014 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0435, \u0442\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043a\u043e\u0434 \u0434\u043b\u044f \u0435\u0433\u043e \u0440\u0430\u0441\u0447\u0435\u0442\u0430:<\/p>\n<pre><code class=\"python\">from scipy import stats slope, intercept, r_value, p_value, std_err = stats.linregress(X, y)  print(slope)  1.0568997978702754 <\/code><\/pre>\n<p>  \u041f\u0440\u0430\u0432\u0434\u0430 \u044d\u0442\u043e \u043d\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u044e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0434\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u043e \u0434\u043b\u044f \u0438\u0445 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0437\u043d\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0432\u044b\u0434\u0435\u0440\u0436\u043a\u0443 \u0438\u0437 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439:<\/p>\n<ul>\n<li> R-squared, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442 0 \u0434\u043e 1. \u0427\u0435\u043c \u0431\u043b\u0438\u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u043a 1, \u0442\u0435\u043c \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c;<\/li>\n<li> Adj. R-squared \u2014 \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 R-squared \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0447\u0438\u0441\u043b\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0438 \u0447\u0438\u0441\u043b\u0430 \u0441\u0442\u0435\u043f\u0435\u043d\u0435\u0439 \u0441\u0432\u043e\u0431\u043e\u0434\u044b;<\/li>\n<li> std err \u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043e\u0446\u0435\u043d\u043a\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430;<\/li>\n<li> P&gt;|t| \u2014 \u0440-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0412\u0435\u043b\u0438\u0447\u0438\u043d\u0430 \u043c\u0435\u043d\u0435\u0435 0,05 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0439;<\/li>\n<li> 0.025 \u0438 0.975 \u2014 \u043d\u0438\u0436\u043d\u0435\u0435 \u0438 \u0432\u0435\u0440\u0445\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0432\u0435\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430.<\/li>\n<li> \u0438 \u0442.\u0434.<\/li>\n<\/ul>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u0432\u0441\u0435. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430\u043c\u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u043d\u0443 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0443\u044e \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u0442. \u0412 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u0443\u044e \u0441\u0442\u0430\u0432\u043a\u0443 \u0438 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0431\u0435\u0437\u0440\u0430\u0431\u043e\u0442\u0438\u0446\u044b. \u041d\u043e \u0435\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u0439 \u0441\u0442\u0430\u0432\u043a\u0438 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0441 \u0441\u0430\u0439\u0442\u0430 \u0426\u0435\u043d\u0442\u0440\u043e\u0431\u0430\u043d\u043a\u0430, \u0442\u043e \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0438\u0441\u043a\u0430\u0442\u044c. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0420\u043e\u0441\u0441\u0442\u0430\u0442\u0430 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435. \u042d\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043e\u0431\u0449\u0435\u0433\u043e \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p><\/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\/post\/496810\/\"> https:\/\/habr.com\/ru\/post\/496810\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/496810\/\">\u041f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0432 <a href=\"https:\/\/habr.com\/ru\/post\/492364\/\">\u044d\u0442\u043e\u0439 <\/a>\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/494636\/\">\u044d\u0442\u043e\u0439 <\/a>\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f\u0445, \u043c\u043e\u0436\u043d\u043e \u0443\u0433\u043b\u0443\u0431\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 statsmodels, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0435\u0441\u0442\u044b. \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0431\u044b\u043b\u0438 \u0432\u0437\u044f\u0442\u044b \u044d\u0442\u0430 <a href=\"https:\/\/datatofish.com\/statsmodels-linear-regression\/\" rel=\"nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f <\/a>\u0438 \u044d\u0442\u0430 <a href=\"https:\/\/medium.com\/python-data\/capm-analysis-calculating-stock-beta-as-a-regression-in-python-c82d189db536\" rel=\"nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a>. \u0421\u0430\u043c\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 <a href=\"https:\/\/www.statsmodels.org\/devel\/generated\/statsmodels.regression.linear_model.OLS.html\" rel=\"nofollow\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-301700","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/301700","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=301700"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/301700\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=301700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=301700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=301700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}