{"id":299870,"date":"2020-03-09T15:00:07","date_gmt":"2020-03-09T15:00:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=299870"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-03-09T15:00:07","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=299870","title":{"rendered":"\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u043a\u0440\u0438\u0437\u0438\u0441\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python"},"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\/491622\/\">\u041f\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u043d\u0430 9 \u043c\u0430\u0440\u0442\u0430 2020 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0440\u0435\u0437\u043a\u043e\u0435 \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u0440\u044b\u043d\u043a\u043e\u0432 \u0421\u0428\u0410 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430 \u0432 20-\u0447\u0438\u0441\u043b\u0430\u0445 \u0444\u0435\u0432\u0440\u0430\u043b\u044f 2020, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u043e\u043a\u043e\u043b\u043e -16%. \u041d\u043e\u0432\u043e\u0441\u0442\u0438 \u043f\u0435\u0441\u0442\u0440\u044f\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u043c\u0438 \u043f\u0440\u043e \u043d\u0430\u0434\u0432\u0438\u0433\u0430\u044e\u0449\u0443\u044e\u0441\u044f \u0440\u0435\u0446\u0435\u0441\u0441\u0438\u044e \u0438\u0437-\u0437\u0430 \u043a\u043e\u0440\u043e\u043d\u043e\u0432\u0438\u0440\u0443\u0441\u0430,<br \/>  \u0420\u043e\u0441\u0441\u0438\u044f \u0432\u044b\u0448\u043b\u0430 \u0438\u0437 \u0441\u0434\u0435\u043b\u043a\u0438 \u041e\u043f\u0435\u043a+, \u0447\u0442\u043e \u0443\u0434\u0430\u0440\u0438\u043b\u043e \u043f\u043e \u0446\u0435\u043d\u0430\u043c \u043d\u0430 \u043d\u0435\u0444\u0442\u044c (-20% \u0437\u0430 \u0434\u0435\u043d\u044c) \u0438 \u0437\u0430\u0432\u0442\u0440\u0430, (10 \u043c\u0430\u0440\u0442\u0430 2020) \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u0440\u044b\u043d\u043a\u0430 \u041c\u041c\u0412\u0411 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430 20%, \u0441\u0443\u0434\u044f \u043f\u043e \u043a\u043e\u0442\u0438\u0440\u043e\u0432\u043a\u0430\u043c \u043d\u0430\u0448\u0438\u0445 \u0430\u043a\u0446\u0438\u0439 \u043d\u0430 \u0437\u0430\u043f\u0430\u0434\u043d\u044b\u0445 \u0440\u044b\u043d\u043a\u0430\u0445.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bi\/7e\/fx\/bi7efxdyajb37dmvxce8kmq2zl8.png\"><\/p>\n<p>  \u0416\u0434\u0435\u0442 \u043b\u0438 \u043d\u0430\u0441 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0446\u0435\u0441\u0441\u0438\u044f? \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0435\u0446\u0435\u0441\u0441\u0438\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 Python.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u043b\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439, \u0430\u043a\u0446\u0438\u0439 \u0438 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430 \u0421\u0428\u0410, \u043a\u0430\u043a \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e \u043e\u0431\u044a\u0435\u043c\u0443 \u0444\u043e\u043d\u0434\u043e\u0432\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430 \u0432 \u043c\u0438\u0440\u0435. \u041f\u043e \u0441\u0443\u0442\u0438, \u0435\u0441\u043b\u0438 \u0432 \u0421\u0428\u0410 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0440\u0435\u0446\u0435\u0441\u0441\u0438\u044f, \u043e\u043d\u0430 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u043c \u043c\u0438\u0440\u0435 (\u043a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u0432 2008 \u0433\u043e\u0434\u0443). \u0422\u0430\u043a\u0436\u0435, \u0434\u043b\u044f \u043d\u0430\u0441 \u0443\u0434\u043e\u0431\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u044b\u043d\u043a\u0430 \u0421\u0428\u0410 \u0435\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430 \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u044f, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u043d\u0430 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0435.<\/p>\n<p>  \u0418\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0431\u0440\u0430\u0442\u044c \u0438\u0437 Yahoo Finance \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<i> yfinance <\/i>, \u0441 \u0441\u0430\u0439\u0442\u0430 \u0444\u0435\u0434. \u0440\u0435\u0437\u0435\u0440\u0432\u0430 \u0421\u0428\u0410 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <i> fredapi <\/i> \u0438 \u0441 \u0441\u0430\u0439\u0442\u0430 Quandl \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0439 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 <i>pandas_datareader<\/i>. \u041e\u0431\u0440\u0430\u0449\u0430\u044e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0434\u043b\u044f Fed \u0438 Quandl \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430 API (\u044d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e).<br \/>  \u0412\u0441\u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u043a\u0440\u0438\u0437\u0438\u0441\u044b \u0432 \u0421\u0428\u0410 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u043c\u0435\u0447\u0430\u0442\u044c \u0441\u0435\u0440\u044b\u043c\u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u043c\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">from fredapi import Fred import pandas as pd import os import pandas_datareader.data as web import pandas_datareader as pdr %matplotlib inline from matplotlib import pyplot as plt from datetime import date import yfinance import numpy as np  api = 'YOUR API HERE' os.environ[&quot;QUANDL_API_KEY&quot;] = 'YOUR API HERE' os.environ[&quot;TIINGO_API_KEY&quot;] = 'YOUR API HERE'  fred = Fred(api_key=api) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e S&amp;P500 \u0441 Yahoo, \u0441\u043f\u0440\u0435\u0434\u044b \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0435\u0439 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 \u0441 FRED \u0438 \u0438\u043d\u0434\u0435\u043a\u0441 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u043e\u0439 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u044f\u043c \u0441 FRED:<\/p>\n<pre><code class=\"python\">GSPC_h = yfinance.download(&quot;^GSPC&quot;, start=&quot;1962-01-01&quot;, end=&quot;2020-03-09&quot;) #SNP500 T10YFF = fred.get_series('T10YFF', observation_start='1962-01-01', observation_end='2020-03-09') #10YB-FFR T10Y2Y = fred.get_series('T10Y2Y', observation_start='1976-06-01', observation_end='2020-03-09') #10YB-2YB # ICE BofA US Corp 10-15yr Total Return Index Value BAMLCC7A01015YTRIV = fred.get_series('BAMLCC7A01015YTRIV', observation_start='1962-01-01', observation_end='2020-03-09') <\/code><\/pre>\n<p>  <b>\u041f\u0440\u0435\u043c\u0438\u044f \u0437\u0430 \u0440\u0438\u0441\u043a<\/b><\/p>\n<p>  \u041f\u0440\u0435\u043c\u0438\u044f \u0437\u0430 \u0440\u0438\u0441\u043a \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c, \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0449\u0438\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440, \u043f\u0440\u0438\u043d\u044f\u0432 \u043d\u0430 \u0441\u0435\u0431\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u043d\u044b\u0439 \u0440\u0438\u0441\u043a.<br \/>  \u0422\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u0440\u044b\u043d\u043a\u0438 \u2014 \u0447\u0435\u043c \u0432\u044b\u0448\u0435 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0442\u0435\u043c \u0432\u044b\u0448\u0435 \u0440\u0438\u0441\u043a.<br \/>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0440\u0435\u043c\u0438\u044e \u0437\u0430 \u0440\u0438\u0441\u043a \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0447\u0435\u0441\u0442\u044c \u0438\u0437 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0439 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438 \u0440\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0430\u043a\u0442\u0438\u0432\u0430, \u0431\u0435\u0437\u0434\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u0441\u0442\u0430\u0432\u043a\u0443 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438.<br \/>  \u0414\u043b\u044f \u0440\u044b\u043d\u043a\u0430 \u0421\u0428\u0410, \u0431\u0435\u0437\u0440\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0432\u043a\u043e\u0439 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0432\u043a\u0430 \u0444\u0435\u0434.\u0440\u0435\u0437\u0435\u0440\u0432\u0430 \u0421\u0428\u0410 (\u0430\u043d\u0430\u043b\u043e\u0433 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u0441\u0442\u0430\u0432\u043a\u0438 \u0443 \u043d\u0430\u0441) \u2014 FED.<\/p>\n<p>  \u041f\u0440\u0435\u043c\u0438\u044f \u0437\u0430 \u0440\u0438\u0441\u043a \u0434\u043b\u044f \u0430\u043a\u0446\u0438\u0439 \u0438 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0440\u0430\u0437\u043d\u043e\u043c\u0443.<br \/>  \u0414\u043b\u044f \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439: \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0438 (Yield) \u043c\u0438\u043d\u0443\u0441 FED.<br \/>  \u0414\u043b\u044f \u0430\u043a\u0446\u0438\u0439: \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u041f\u0440\u0438\u0431\u044b\u043b\u044c\/\u0426\u0435\u043d\u0430 (E\/P) \u043c\u0438\u043d\u0443\u0441 FED,<br \/>  \u0433\u0434\u0435 \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u2014 \u044d\u0442\u043e \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0437\u0430 \u0433\u043e\u0434, \u0446\u0435\u043d\u0430 \u2014 \u0446\u0435\u043d\u0430 \u0430\u043a\u0446\u0438\u0438 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438 \u0430\u043a\u0446\u0438\u0438 \u043c\u044b \u0431\u0435\u0440\u0435\u043c \u043d\u0435 \u0432\u044b\u043f\u043b\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438, \u0430 \u043f\u0440\u0438\u0431\u044b\u043b\u044c, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u0438\u0432\u0438\u0434\u0435\u043d\u0434\u044b \u044d\u0442\u043e \u043b\u0438\u0448\u044c \u0447\u0430\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0432\u044b\u043f\u043b\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0430\u043a\u0446\u0438\u043e\u043d\u0435\u0440\u0430\u043c. \u0421\u0442\u0430\u043d\u043e\u0432\u044f\u0441\u044c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043a\u0443\u043f\u043a\u0443 \u0435\u0435 \u0430\u043a\u0446\u0438\u0439, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u0434\u043e\u0445\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u0431\u044b\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0441\u0440\u0435\u0434\u0438 \u0430\u043a\u0446\u0438\u043e\u043d\u0435\u0440\u043e\u0432 \u0432 \u043f\u043e\u043b\u043d\u043e\u043c \u043e\u0431\u044a\u0435\u043c\u0435 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043b\u0438\u043a\u0432\u0438\u0434\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438. <\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c E\/P \u0434\u043b\u044f S&amp;P500 (SP500_EARNINGS_YIELD_MONTH), \u0431\u0435\u0437\u0440\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u0441\u0442\u0430\u0432\u043a\u0443 (FED Funds Rate) \u0438 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 \u0448\u0438\u0440\u043e\u043a\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430 (Baa Bonds Yield):<\/p>\n<pre><code class=\"python\"># E\/P symbol = 'MULTPL\/SP500_EARNINGS_YIELD_MONTH' SP500_EARNINGS_YIELD_MONTH = web.DataReader(symbol, 'quandl', '1962-01-01', '2020-03-09') # FED Funds Rate FEDFUNDS = fred.get_series('FEDFUNDS', observation_start='1962-01-01', observation_end='2020-03-09') # Baa Bonds Yield BAA = fred.get_series('BAA', observation_start='1962-01-01', observation_end='2020-03-09') <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043f\u0440\u0435\u043c\u0438\u044e \u0437\u0430 \u0440\u0438\u0441\u043a \u043a\u0430\u043a \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u043c\u0438\u043d\u0443\u0441 \u0431\u0435\u0437\u0440\u0438\u0441\u043a\u043e\u0432\u0430\u044f \u0441\u0442\u0430\u0432\u043a\u0430:<\/p>\n<pre><code class=\"python\"># \u043f\u0440\u0435\u043c\u0438\u044f \u0437\u0430 \u0440\u0438\u0441\u043a \u0434\u043b\u044f \u0430\u043a\u0446\u0438\u0439 risk_premium = pd.concat([SP500_EARNINGS_YIELD_MONTH, FEDFUNDS],axis=1).fillna(method='bfill') risk_premium['premium'] = risk_premium['Value'] - risk_premium[0]  # \u043f\u0435\u0440\u043c\u0438\u044f \u0437\u0430 \u0440\u0438\u0441\u043a \u0434\u043b\u044f \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 risk_premium_b = pd.concat([BAA, FEDFUNDS],axis=1).fillna(method='bfill') risk_premium_b.columns = ['BAA', 'FEDFUNDS'] risk_premium_b['premium_b'] = risk_premium_b['BAA'] - risk_premium_b['FEDFUNDS'] <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0434\u043b\u044f \u0430\u043a\u0446\u0438\u0439 \u0438 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/p>\n<p>  \u0414\u043b\u044f \u0430\u043a\u0446\u0438\u0439:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0433\u0440\u0430\u0444\u0438\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">fig, ax = plt.subplots(figsize=(17,6))  line1, = ax.plot(risk_premium['premium'],linewidth=1) line1.set_label('risk_premium_stocks')  line2, = ax.plot(SP500_EARNINGS_YIELD_MONTH,linewidth=1) line2.set_label('SP500_EARNINGS_YIELD_MONTH') ax.legend(loc='upper left')  par1 = ax.twinx() line3, = par1.plot(np.log(GSPC_h['Close']),linewidth=0.7, color='red') line3.set_label('S&amp;P500') par1.legend(loc='upper left', bbox_to_anchor=(0, 0, 1, 0.88))  plt.xlim(left=date(1962, 1, 1), right=date(2020, 3, 9)) ax.axhline(linewidth=2, color='black', alpha=0.7) ax.axvspan(date(2007, 12, 1), date(2009, 6, 1), alpha=0.3, color='grey') ax.axvspan(date(2001, 3, 1), date(2001, 11, 1), alpha=0.3, color='grey') ax.axvspan(date(1990, 8, 1), date(1991, 2, 1), alpha=0.3, color='grey') ax.axvspan(date(1981, 7, 1), date(1982, 11, 1), alpha=0.3, color='grey') ax.axvspan(date(1980, 1, 1), date(1980, 7, 1), alpha=0.3, color='grey') ax.axvspan(date(1973, 12, 1), date(1975, 2, 1), alpha=0.3, color='grey') ax.axvspan(date(1969, 12, 1), date(1970, 11, 1), alpha=0.3, color='grey')  ax.set_xlabel('\u0413\u043e\u0434') ax.set_ylabel('\u041f\u0440\u0435\u043c\u0438\u044f \u0437\u0430 \u0440\u0438\u0441\u043a, %') par1.set_ylabel('Log \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c S&amp;P500')  plt.show() <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/k2\/fr\/j_\/k2frj_8irme_zhcwanphjqr3vem.png\"><\/p>\n<p>  \u0414\u043b\u044f \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0433\u0440\u0430\u0444\u0438\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">fig, ax = plt.subplots(figsize=(17,6))  line1, = ax.plot(risk_premium_b['premium_b'][date(1987, 12, 1):],linewidth=1, color='k') line1.set_label('risk_premium_bonds') ax.legend(loc='upper left', bbox_to_anchor=(0, 0, 1, 0.95))  par1 = ax.twinx() line2, = par1.plot(np.log(BAMLCC7A01015YTRIV),linewidth=0.7, color='green') line2.set_label('Log ICE BofA US Corp 10-15yr Total Return Index Value') par1.legend(loc='upper left') plt.xlim(left=date(1987, 12, 1), right=date(2020, 3, 9))  ax.axhline(y=1.5, linewidth=2, color='red', ls='--', alpha=0.7)  ax.axvspan(date(2007, 12, 1), date(2009, 6, 1), alpha=0.3, color='grey') ax.axvspan(date(2001, 3, 1), date(2001, 11, 1), alpha=0.3, color='grey') ax.axvspan(date(1990, 8, 1), date(1991, 2, 1), alpha=0.3, color='grey') ax.axhline(linewidth=2, color='black', alpha=0.7)  ax.set_xlabel('\u0413\u043e\u0434') ax.set_ylabel('\u041f\u0440\u0435\u043c\u0438\u044f \u0437\u0430 \u0440\u0438\u0441\u043a, %') par1.set_ylabel('Log \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c BofA')  plt.show() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/o8\/et\/i1\/o8eti1vu7hyaglz63-uhfdjuljk.png\"><\/p>\n<p>  \u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u043f\u0440\u0435\u0434\u043a\u0440\u0438\u0437\u0438\u0441\u043d\u044b\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u044b \u044d\u0442\u043e \u0437\u043e\u043d\u044b \u0441 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u0435\u043c\u0438\u0435\u0439 \u0437\u0430 \u0440\u0438\u0441\u043a \u0434\u043b\u044f \u0430\u043a\u0446\u0438\u0439 \u0438 \u0441\u043d\u0438\u0436\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u0435\u043c\u0438\u0435\u0439 \u0437\u0430 \u0440\u0438\u0441\u043a \u0434\u043b\u044f \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439. <br \/>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043b\u044f \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043d\u0438\u0436\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u0435\u043c\u0438\u044f \u0437\u0430 \u0440\u0438\u0441\u043a \u044d\u0442\u043e \u0441\u0438\u0433\u043d\u0430\u043b \u043a \u043d\u0430\u0447\u0430\u043b\u0443 \u043a\u0440\u0438\u0437\u0438\u0441\u0430 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 (\u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 Bof\u0410 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 2008 \u0433\u043e\u0434\u0443), \u043d\u043e \u0432\u043e\u0442 \u0441\u043d\u0438\u0436\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u0435\u043c\u0438\u044f \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u0430\u043a\u0446\u0438\u0439 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 (\u043a\u0440\u043e\u043c\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043f\u043e\u0441\u043b\u0435 \u043a\u0440\u0438\u0437\u0438\u0441\u0430 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 1980-\u0445, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u0435\u0440\u0436\u0430\u043b\u0430\u0441\u044c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u0435\u043c\u0438\u044f) \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0430\u043a\u0446\u0438\u0439.<\/p>\n<p>  \u0427\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u0435\u043c\u0438\u044f \u0437\u0430 \u0440\u0438\u0441\u043a \u0434\u043b\u044f \u0430\u043a\u0446\u0438\u0439?<br \/>  \u041f\u043e\u043a\u0443\u043f\u0430\u044f \u0430\u043a\u0446\u0438\u044e, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u043d\u0438\u0436\u0435 \u0431\u0435\u0437\u0440\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0432\u043a\u0438 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044f \u043d\u0430 \u0441\u0435\u0431\u044f \u0432 \u043f\u043e\u043b\u043d\u043e\u0439 \u043c\u0435\u0440\u0435 \u0440\u0438\u0441\u043a\u0438 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u044f \u0446\u0435\u043d\u044b \u0430\u043a\u0446\u0438\u0438 \u0438 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0431\u044b\u0442\u043a\u043e\u0432. \u042d\u0442\u043e \u043d\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442, \u0447\u0442\u043e \u043f\u0440\u0435\u043c\u0438\u044f \u0437\u0430 \u0440\u0438\u0441\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439, \u0432 \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0447\u0435\u0433\u043e \u0440\u044b\u043d\u043a\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043a \u043e\u0441\u043e\u0437\u043d\u0430\u043d\u0438\u044e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u043a\u0446\u0438\u0439 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0432\u044b\u0441\u043e\u043a\u0430 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0434\u0430\u0436\u0438. \u041f\u0430\u0434\u0435\u043d\u0438\u0435 \u0443\u0441\u0438\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u044b \u0448\u0438\u0440\u043e\u043a\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u0430 (\u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u043b\u044e\u0434\u0438, \u043d\u0435 \u0438\u043d\u0441\u0442\u0438\u0442\u0443\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u044b) \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u043f\u043e\u0434\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0430\u043d\u0438\u043a\u0435, \u043f\u0440\u043e\u0434\u0430\u0432\u0430\u044f \u0441\u0432\u043e\u0438 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u0438 \u0438 \u0443\u0441\u0443\u0433\u0443\u0431\u043b\u044f\u044f \u043f\u0430\u0434\u0435\u043d\u0438\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0440\u0435\u0430\u043a\u0446\u0438\u044f \u0440\u044b\u043d\u043a\u043e\u0432 \u0431\u044b\u0441\u0442\u0440\u0430\u044f \u0438 \u0441\u0438\u043b\u044c\u043d\u0430\u044f. <br \/>  \u0421\u0442\u043e\u0438\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0440\u044b\u043d\u043a\u0430 \u043d\u0435 \u0438\u0434\u0435\u0442 \u0434\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043f\u0440\u0435\u043c\u0438\u0438 \u0437\u0430 \u0440\u0438\u0441\u043a, \u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u0435\u0435, \u0447\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0435\u043c\u0438\u044e \u0437\u0430 \u0440\u0438\u0441\u043a \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u0432\u043d\u043e\u0432\u044c \u0443\u0441\u0438\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0446\u0435\u043d\u043d\u044b\u0445 \u0431\u0443\u043c\u0430\u0433 \u0434\u043b\u044f \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u043e\u0432.<\/p>\n<p>  \u041f\u0440\u0438\u0447\u0435\u043c, \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043f\u0440\u0435\u043c\u0438\u0438 \u0437\u0430 \u0440\u0438\u0441\u043a \u0434\u043b\u044f \u0430\u043a\u0446\u0438\u0439 \u0438 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0435, \u0442\u043e \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u0435\u043c\u0438\u044f \u0437\u0430 \u0440\u0438\u0441\u043a \u0434\u043b\u044f \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e \u0431\u044b\u043b\u0430 \u0432\u044b\u0448\u0435, \u0447\u0435\u043c \u0434\u043b\u044f \u0430\u043a\u0446\u0438\u0439, \u043e\u0434\u043d\u0430\u043a\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 5 \u043b\u0435\u0442 \u043e\u043d\u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0438 \u043e\u0431\u0435 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u043a \u043d\u0443\u043b\u044e:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0433\u0440\u0430\u0444\u0438\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">fig, ax = plt.subplots(figsize=(17,6))  line1, = ax.plot(risk_premium['premium'],linewidth=1) line1.set_label('risk_premium_stocks')  par1 = ax.twinx() line3, = par1.plot(np.log(GSPC_h['Close']),linewidth=0.7, color='red') line3.set_label('S&amp;P500') par1.legend(loc='upper left', bbox_to_anchor=(0, 0, 1, 0.88))  line2, = ax.plot(risk_premium_b['premium_b'],linewidth=1, color='k') line2.set_label('risk_premium_bonds') ax.legend(loc='upper left') plt.xlim(left=date(1968, 1, 1), right=date(2020, 3, 9))  ax.axhline(linewidth=2, color='black', alpha=0.7) ax.axvspan(date(2007, 12, 1), date(2009, 6, 1), alpha=0.3, color='grey') ax.axvspan(date(2001, 3, 1), date(2001, 11, 1), alpha=0.3, color='grey') ax.axvspan(date(1990, 8, 1), date(1991, 2, 1), alpha=0.3, color='grey') ax.axvspan(date(1981, 7, 1), date(1982, 11, 1), alpha=0.3, color='grey') ax.axvspan(date(1980, 1, 1), date(1980, 7, 1), alpha=0.3, color='grey') ax.axvspan(date(1973, 12, 1), date(1975, 2, 1), alpha=0.3, color='grey') ax.axvspan(date(1969, 12, 1), date(1970, 11, 1), alpha=0.3, color='grey')  ax.set_xlabel('\u0413\u043e\u0434') ax.set_ylabel('\u041f\u0440\u0435\u043c\u0438\u044f \u0437\u0430 \u0440\u0438\u0441\u043a, %') par1.set_ylabel('Log \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c S&amp;P500')  plt.show() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/2i\/xb\/xe\/2ixbxehawqshzbeznt-cseobsom.png\"><\/p>\n<p>  \u041f\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u043d\u0430 9 \u043c\u0430\u0440\u0442\u0430 2020 \u0433\u043e\u0434\u0430, \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0440\u0435\u0437\u043a\u043e\u0435 \u0438 \u0441\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0444\u043e\u043d\u0434\u043e\u0432\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430 \u0421\u0428\u0410, \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438 \u0430\u043a\u0446\u0438\u0439 \u0432\u0441\u0435 \u0435\u0449\u0435 \u0434\u0430\u043b\u0435\u043a\u0438 \u043e\u0442 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u043e\u043d\u044b, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u043e\u0431\u043d\u0430\u0434\u0435\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0441\u0438\u0433\u043d\u0430\u043b.<\/p>\n<p>  <b>\u0421\u043f\u0440\u0435\u0434 \u043c\u0435\u0436\u0434\u0443 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043a\u0430\u0437\u043d\u0430\u0447\u0435\u0439\u0441\u043a\u0438\u0445 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439<\/b><\/p>\n<p>  \u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0435\u0434\u043a\u0440\u0438\u0437\u0438\u0441\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0445 \u0438 \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0445 \u043a\u0430\u0437\u043d\u0430\u0447\u0435\u0439\u0441\u043a\u0438\u0445 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439.<\/p>\n<p>  \u041d\u0430\u0438\u043c\u0435\u043d\u0435\u0435 \u0437\u0430\u0448\u0443\u043c\u043b\u0451\u043d\u043d\u044b\u043c \u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043f\u0440\u0435\u0434 \u043c\u0435\u0436\u0434\u0443 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438 10 \u043b\u0435\u0442\u043d\u0438\u0445 \u0438 2 \u043b\u0435\u0442\u043d\u0438\u0445 \u043a\u0430\u0437\u043d\u0430\u0447\u0435\u0439\u0441\u043a\u0438\u0445 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439: <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0433\u0440\u0430\u0444\u0438\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">fig, ax = plt.subplots(figsize=(17,6)) par1 = ax.twinx() line, = ax.plot(pd.DataFrame(T10Y2Y),linewidth=0.4) line.set_label('10YB-2YB') ax.legend(loc='best', bbox_to_anchor=(0.5, 0., 0.5, 0.1))  line1, = par1.plot(np.log(GSPC_h['Close']),linewidth=0.7, color='red') line1.set_label('S&amp;P500') par1.legend(loc='best', bbox_to_anchor=(0.5, 0., 0.5, 0.18)) plt.xlim(left=date(1976, 1, 1), right=date(2020, 3, 9)) plt.ylim(bottom=4) ax.axvspan(date(2007, 12, 1), date(2009, 6, 1), alpha=0.3, color='grey') ax.axvspan(date(2001, 3, 1), date(2001, 11, 1), alpha=0.3, color='grey') ax.axvspan(date(1990, 8, 1), date(1991, 2, 1), alpha=0.3, color='grey') ax.axvspan(date(1981, 7, 1), date(1982, 11, 1), alpha=0.3, color='grey') ax.axvspan(date(1980, 1, 1), date(1980, 7, 1), alpha=0.3, color='grey') ax.axvspan(date(1973, 12, 1), date(1975, 2, 1), alpha=0.3, color='grey') ax.axvspan(date(1969, 10, 1), date(1970, 11, 1), alpha=0.3, color='grey') ax.axhline(linewidth=2, color='black', alpha=0.7) plt.scatter(date(2019, 9, 1), 6., color='orange', s=500, marker='o', alpha=0.5) plt.scatter(date(2007, 1, 1), 6., color='orange', s=500, marker='o', alpha=0.5) plt.scatter(date(2000, 1, 1), 5.9, color='orange', s=500, marker='o', alpha=0.5) plt.scatter(date(1998, 8, 1), 5.9, color='orange', s=500, marker='o', alpha=0.5) plt.scatter(date(1989, 4, 1), 5.8, color='orange', s=500, marker='o', alpha=0.5) plt.scatter(date(1981, 1, 1), 5.9, color='orange', s=500, marker='o', alpha=0.5) plt.scatter(date(1978, 11, 1), 5.9, color='orange', s=500, marker='o', alpha=0.5)  ax.set_xlabel('\u0413\u043e\u0434') ax.set_ylabel('\u0421\u043f\u0440\u0435\u0434 \u043c\u0435\u0436\u0434\u0443 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438, %') par1.set_ylabel('Log \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c S&amp;P500')  plt.show() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/na\/vx\/ph\/navxphciegx_cu6-jy23x3djvnw.png\"><\/p>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u0432\u0434\u0438\u0432\u044b\u043c \u0441 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043b 7 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u043a\u0440\u0438\u0437\u0438\u0441\u043e\u0432.<\/p>\n<p>  \u0421\u043f\u0440\u0435\u0434 \u043c\u0435\u0436\u0434\u0443 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u043e\u0432 \u2014 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0441\u0447\u0438\u0442\u0430\u044e\u0442, \u0447\u0442\u043e \u0432 \u0441\u043a\u043e\u0440\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043a\u0438 \u0443\u0445\u0443\u0434\u0448\u0438\u0442\u0441\u044f, \u043e\u043d\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0434\u0435\u043d\u044c\u0433\u0438 \u0438\u0437 \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0445 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 (\u0441\u043e \u0441\u0440\u043e\u043a\u043e\u043c \u043f\u043e\u0433\u0430\u0448\u0435\u043d\u0438\u044f 2 \u0433\u043e\u0434\u0430) \u0432 \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b (\u0441\u043e \u0441\u0440\u043e\u043a\u043e\u043c \u043f\u043e\u0433\u0430\u0448\u0435\u043d\u0438\u044f 10 \u043b\u0435\u0442) \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0433\u043e \u044d\u043c\u0438\u0442\u0435\u043d\u0442\u0430 \u2014 \u043a\u0430\u0437\u043d\u0430\u0447\u0435\u0439\u0441\u0442\u0432\u043e \u0421\u0428\u0410. <\/p>\n<p>  \u0421\u043a\u0443\u043f\u043a\u0430 \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0445 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 \u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0438\u0445 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u043a\u0443\u043f\u043a\u0430 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 \u043d\u0430 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043c\u044b \u0434\u0435\u043d\u0435\u0436\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0443\u0434\u043e\u0440\u043e\u0436\u0430\u043d\u0438\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0438. \u041a\u043e\u0433\u0434\u0430 \u043a\u0443\u043f\u043e\u043d \u2014 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430, \u0443\u0434\u043e\u0440\u043e\u0436\u0430\u043d\u0438\u0435 \u0442\u0435\u043b\u0430 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0438 \u0432\u0435\u0434\u0435\u0442 \u043a \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044e \u0435\u0435 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438.<br \/>  \u0414\u043b\u044f \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0445 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0434\u0430\u044e\u0442, \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u2014 \u0442\u0435\u043b\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0434\u0435\u0448\u0435\u0432\u0435\u0442\u044c, \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u0443\u043f\u043e\u043d\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0440\u0430\u0441\u0442\u0438. <\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e FRED \u043d\u0435 \u0434\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0447\u0435\u043c 1976 \u043f\u043e \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0441\u043f\u0440\u0435\u0434\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043b\u044f \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439 \u0432\u0437\u044f\u0442\u044c \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c 10 \u043b\u0435\u0442\u043d\u0438\u0445 \u043a\u0430\u0437\u043d\u0430\u0447\u0435\u0439\u0441\u043a\u0438\u0445 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 \u043c\u0438\u043d\u0443\u0441 \u0441\u0442\u0430\u0432\u043a\u0430 FED (\u0432\u043c\u0435\u0441\u0442\u043e \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0445 2 \u043b\u0435\u0442\u043d\u0438\u0445 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439), \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 1962 \u0433\u043e\u0434\u0430 \u0438 \u043e\u0445\u0432\u0430\u0442\u0438\u0432 \u0435\u0449\u0435 2 \u043a\u0440\u0438\u0437\u0438\u0441\u0430:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0433\u0440\u0430\u0444\u0438\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">fig, ax = plt.subplots(figsize=(17,6)) par1 = ax.twinx() line, = ax.plot(pd.DataFrame(T10YFF),linewidth=0.4) line.set_label('10-Year Treasury Constant Maturity Minus Federal Funds Rate') ax.legend(loc='best', bbox_to_anchor=(0.5, 0., 0.5, 0.1))  line1, = par1.plot(np.log(GSPC_h['Close']),linewidth=0.7, color='red') line1.set_label('S&amp;P500') par1.legend(loc='best', bbox_to_anchor=(0.5, 0., 0.5, 0.18)) plt.xlim(left=date(1962, 1, 1), right=date(2020, 3, 9)) plt.ylim(bottom=4) ax.axvspan(date(2007, 12, 1), date(2009, 6, 1), alpha=0.3, color='grey') ax.axvspan(date(2001, 3, 1), date(2001, 11, 1), alpha=0.3, color='grey') ax.axvspan(date(1990, 8, 1), date(1991, 2, 1), alpha=0.3, color='grey') ax.axvspan(date(1981, 7, 1), date(1982, 11, 1), alpha=0.3, color='grey') ax.axvspan(date(1980, 1, 1), date(1980, 7, 1), alpha=0.3, color='grey') ax.axvspan(date(1973, 12, 1), date(1975, 2, 1), alpha=0.3, color='grey') ax.axvspan(date(1969, 12, 1), date(1970, 11, 1), alpha=0.3, color='grey') ax.axhline(linewidth=2, color='black', alpha=0.7) plt.scatter(date(2019, 9, 1), 6.7, color='orange', s=500, marker='o', alpha=0.5) plt.scatter(date(2007, 1, 1), 6.7, color='orange', s=500, marker='o', alpha=0.5) plt.scatter(date(2000, 11, 1), 6.7, color='orange', s=500, marker='o', alpha=0.5) plt.scatter(date(1998, 11, 1), 6.6, color='orange', s=500, marker='o', alpha=0.5) plt.scatter(date(1989, 6, 1), 6.4, color='orange', s=500, marker='o', alpha=0.5) plt.scatter(date(1973, 6, 1), 6.6, color='orange', s=500, marker='o', alpha=0.5) plt.scatter(date(1981, 3, 1), 6.3, color='orange', s=500, marker='o', alpha=0.5) plt.scatter(date(1979, 3, 1), 6.6, color='orange', s=500, marker='o', alpha=0.5) plt.scatter(date(1969, 3, 1), 6.6, color='orange', s=500, marker='o', alpha=0.5) plt.scatter(date(1967, 1, 1), 6.6, color='orange', s=500, marker='o', alpha=0.5)  ax.set_xlabel('\u0413\u043e\u0434') ax.set_ylabel('\u041f\u0440\u0435\u043c\u0438\u044f \u0437\u0430 \u0440\u0438\u0441\u043a, %') par1.set_ylabel('Log \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c S&amp;P500')  plt.show() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/an\/z3\/az\/anz3azvwzxftytsp9lu0eyp8lkk.png\"><\/p>\n<p>  \u041d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043e\u0431\u0449\u0443\u044e \u0437\u0430\u0448\u0443\u043c\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0440\u0435\u0434\u0430 (\u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435 \u0441\u043e \u0441\u043f\u0440\u0435\u0434\u043e\u043c 10 year \u2014 2 year), \u043a\u0440\u0438\u0437\u0438\u0441\u044b 73 \u0438 69 \u0433\u043e\u0434\u043e\u0432 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0442\u0432\u043e\u0440\u044f\u043b\u0438\u0441\u044c \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u0441\u043f\u0440\u0435\u0434\u0430 \u0432 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u043e\u043d\u0443.<\/p>\n<p>  \u0427\u0442\u043e \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442?<br \/>  \u0414\u0435\u043b\u0430 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u2014 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0443\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0437\u043e\u043d\u0443 \u0432 2019 \u0433\u043e\u0434\u0443.<br \/>  \u0418\u043d\u0441\u0442\u0438\u0442\u0443\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u044b \u043e\u0436\u0438\u0434\u0430\u044e\u0442, \u0447\u0442\u043e \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043d\u0430\u0441 \u043e\u0436\u0438\u0434\u0430\u044e\u0442 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0435 \u043f\u043e\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f \u0438 \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>  \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u043e \u043a\u0440\u0438\u0437\u0438\u0441\u0430?<br \/>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0441\u043f\u0440\u0435\u0434\u0430, \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u044f\u0435\u0442 \u043a\u0440\u0438\u0437\u0438\u0441\u044b \u043d\u0430 \u0433\u043e\u0434-\u0434\u0432\u0430.<br \/>  \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0442\u043e, \u0447\u0442\u043e \u0438\u043d\u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u0432 \u043a\u043e\u043d\u0446\u0435 2019 \u0433\u043e\u0434\u0430 \u0438 \u0440\u044b\u043d\u043a\u0438 \u0421\u0428\u0410 \u0443\u0436\u0435 \u043d\u0430\u0447\u0430\u043b\u0438 \u0441\u0432\u043e\u0435 \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0438\u0437-\u0437\u0430 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0449\u0435\u0439 \u0440\u0435\u0446\u0435\u0441\u0441\u0438\u0438 \u0438\u0437-\u0437\u0430 \u0432\u0438\u0440\u0443\u0441\u0430 COVID-19, \u043a\u0440\u0438\u0437\u0438\u0441 \u043f\u043e\u0434\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441.<\/p>\n<p>  \u041f\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u043d\u0430 9 \u043c\u0430\u0440\u0442\u0430 2020, \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c 10 \u043b\u0435\u0442\u043d\u0438\u0445 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439 \u043a\u0430\u0437\u043d\u0430\u0447\u0435\u0439\u0441\u0442\u0432\u0430 \u0421\u0428\u0410 \u0441\u043d\u0438\u0437\u0438\u043b\u0430\u0441\u044c \u0434\u043e 0.318% \u2014 \u0441\u0430\u043c\u043e\u0435 \u043d\u0438\u0437\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430 \u0432\u0441\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439! <br \/>  \u041a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0430\u0441 \u0436\u0434\u0435\u0442 \u0447\u0442\u043e \u0442\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0438 \u044d\u0442\u043e \u0443\u0436\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c.<\/p>\n<p>  \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 T10YFF: -0.17<br \/>  \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 T10Y2Y: 0.25<\/p>\n<p>  <b>\u041f\u0440\u043e\u0448\u043b\u044b\u0435 \u0446\u0435\u043d\u044b \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0434\u0430\u044e\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0440\u0438\u0437\u0438\u0441<\/b><\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u0435\u0441\u043f\u043e\u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0435 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 RSI.<br \/>  RSI \u2014 relative strength index \u0432 \u0442\u0435\u043e\u0440\u0438\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u00ab\u043f\u0435\u0440\u0435\u043a\u0443\u043f\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u00bb \u0438 \u00ab\u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0434\u0430\u043d\u043d\u043e\u0441\u0442\u044c\u00bb \u0440\u044b\u043d\u043a\u0430. <br \/>  \u041f\u0435\u0440\u0435\u043a\u0443\u043f\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0440\u044b\u043d\u043a\u0430 \u2014 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u0446\u0435\u043d\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0438\u0437, \u0442\u043e \u0435\u0441\u0442\u044c, \u043a\u0440\u0438\u0437\u0438\u0441 \u043d\u0430 \u0444\u043e\u043d\u0434\u043e\u0432\u043e\u043c \u0440\u044b\u043d\u043a\u0435.<\/p>\n<p>  <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%98%D0%BD%D0%B4%D0%B5%D0%BA%D1%81_%D0%BE%D1%82%D0%BD%D0%BE%D1%81%D0%B8%D1%82%D0%B5%D0%BB%D1%8C%D0%BD%D0%BE%D0%B9_%D1%81%D0%B8%D0%BB%D1%8B\" rel=\"nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0412\u0438\u043a\u0438 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430<\/a><\/p>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u041f\u0438\u0442\u043e\u043d\u0430, \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043f\u0435\u0440\u0438\u043e\u0434 \u2014 244 \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 (1 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u043d\u044b\u0439 \u0433\u043e\u0434):<\/p>\n<pre><code class=\"python\">SP500_returns = GSPC_h['Close'].pct_change() delta = GSPC_h['Close'].diff() window_length = 500  # Make the positive gains (up) and negative gains (down) Series up, down = delta.copy(), delta.copy() up[up &lt; 0] = 0 down[down &gt; 0] = 0  # Calculate the EWMA roll_up1 = up.ewm(span=window_length).mean() roll_down1 = down.abs().ewm(span=window_length).mean()  # Calculate the RSI based on EWMA RS1 = roll_up1 \/ roll_down1 RSI1 = 100.0 - (100.0 \/ (1.0 + RS1)) <\/code><\/pre>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0433\u0440\u0430\u0444\u0438\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\"># Compare graphically fig, ax = plt.subplots(figsize=(20,4)) plt.xlim(left=date(1968, 1, 1), right=date(2020, 3, 9)) line, = ax.plot(np.log(GSPC_h['Close']),linewidth=0.7, color='red')  line.set_label('SNP500') ax.legend(loc='upper left')  fig1, ax1 = plt.subplots(figsize=(20,4)) plt.xlim(left=date(1968, 1, 1), right=date(2020, 3, 9)) line1, = ax1.plot(RSI1[80:],linewidth=1)  line1.set_label('RSI (1Y)') ax1.legend(loc='upper left')  ax.axvspan(date(2007, 12, 1), date(2009, 6, 1), alpha=0.3, color='grey') ax.axvspan(date(2001, 3, 1), date(2001, 11, 1), alpha=0.3, color='grey') ax1.axhline(y=57, linewidth=2, color='black', alpha=0.7) ax1.axhline(y=45, linewidth=2, color='black', alpha=0.7)  ax.axvspan(date(1990, 8, 1), date(1991, 2, 1), alpha=0.3, color='grey') ax.axvspan(date(1981, 7, 1), date(1982, 11, 1), alpha=0.3, color='grey') ax.axvspan(date(1980, 1, 1), date(1980, 7, 1), alpha=0.3, color='grey') ax.axvspan(date(1973, 12, 1), date(1975, 2, 1), alpha=0.3, color='grey') ax.axvspan(date(1969, 12, 1), date(1970, 11, 1), alpha=0.3, color='grey')  ax1.axvspan(date(1990, 8, 1), date(1991, 2, 1), alpha=0.3, color='grey') ax1.axvspan(date(1981, 7, 1), date(1982, 11, 1), alpha=0.3, color='grey') ax1.axvspan(date(1980, 1, 1), date(1980, 7, 1), alpha=0.3, color='grey') ax1.axvspan(date(1973, 12, 1), date(1975, 2, 1), alpha=0.3, color='grey') ax1.axvspan(date(1969, 12, 1), date(1970, 11, 1), alpha=0.3, color='grey') ax1.axvspan(date(2007, 12, 1), date(2009, 6, 1), alpha=0.3, color='grey') ax1.axvspan(date(2001, 3, 1), date(2001, 11, 1), alpha=0.3, color='grey')  ax1.set_xlabel('\u0413\u043e\u0434') ax.set_xlabel('\u0413\u043e\u0434') ax1.set_ylabel('\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 RSI') ax.set_ylabel('Log \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c S&amp;P500')  plt.show() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/en\/zh\/v_\/enzhv_y7bwccnqp9qib3lb6gqls.png\"><\/p>\n<p>  \u0427\u0442\u043e \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 RSI?<br \/>  \u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0437\u043e\u043d \u00ab\u043f\u0435\u0440\u0435\u043a\u0443\u043f\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438\u00bb, \u0447\u0442\u043e \u043c\u043e\u0433\u043b\u043e \u0431\u044b \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0440\u043e\u0441\u0448\u0435\u043c \u0440\u044b\u043d\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0440\u0430 \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043d\u0438\u0437. \u041d\u043e \u043e\u043d \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u043b \u0438\u0434\u0442\u0438 \u0432\u0432\u0435\u0440\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0441 1995 \u0433\u043e\u0434\u0430 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u00ab\u043f\u0435\u0440\u0435\u043a\u0443\u043f\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u00bb, \u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u043a\u0440\u0438\u0437\u0438\u0441\u0430 2001 \u0433\u043e\u0434\u0430 \u043e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0432\u043e\u044e \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0437\u043e\u043d\u0443 \u0438 \u043d\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043e \u00ab\u043f\u0435\u0440\u0435\u043a\u0443\u043f\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438\u00bb, \u0447\u0442\u043e, \u043e\u0434\u043d\u0430\u043a\u043e, \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0440\u0438\u0437\u0438\u0441\u043e\u043c).<\/p>\n<p>  \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0441\u0446\u0438\u043b\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043a\u0440\u0438\u0437\u0438\u0441\u0430 \u2014 \u0432\u0435\u0441\u044c\u043c\u0430 \u0441\u043f\u043e\u0440\u043d\u043e\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u0435.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u043a\u0440\u0438\u0437\u0438\u0441\u0430\u043c\u0438 \u0440\u044b\u043d\u043e\u043a \u0440\u0430\u0441\u0442\u0435\u0442 \u043f\u043b\u0430\u0432\u043d\u043e, \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u00ab\u0432\u0432\u0435\u0440\u0445\u00bb, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u2014 \u043e\u043d\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0435\u0437\u043a\u0438\u0435 \u0438 \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435. \u042d\u0442\u043e \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043a\u0430\u043a \u0440\u0430\u0437 \u043e\u043a\u043e\u043b\u043e \u043d\u0438\u0436\u043d\u0435\u0439 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043e\u0441\u0446\u0438\u043b\u043b\u044f\u0442\u043e\u0440\u0430 \u2014 \u0435\u0435 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u043e\u0447\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e, \u043a\u043e\u0433\u0434\u0430 \u043a\u0440\u0438\u0437\u0438\u0441 \u043f\u0440\u0438\u0448\u0435\u043b \u0438 \u00ab\u0434\u043d\u043e\u00bb \u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0431\u043b\u0438\u0437\u043a\u043e. \u0421\u0438\u0433\u043d\u0430\u043b \u043d\u0430 \u043f\u043e\u043a\u0443\u043f\u043a\u0443?<\/p>\n<p>  <b>\u0412\u044b\u0432\u043e\u0434\u044b<\/b><\/p>\n<p>  \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0441\u0442\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u044e\u0449\u0435\u0435, \u0435\u0441\u0442\u044c \u043f\u0440\u044f\u043c\u044b\u0435 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u044b, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u043d\u0430\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0446\u0435\u0441\u0441\u0438\u0438. \u041f\u043e\u043c\u0438\u043c\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0435\u0449\u0435 \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0430 (\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0435\u0436\u0430\u044e\u0449\u0438\u043c \u0434\u043b\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 (\u043d\u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445!) \u043a\u0440\u0438\u0437\u0438\u0441\u043e\u0432). \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0442\u0430\u043a\u0436\u0435 \u0443\u0433\u043b\u0443\u0431\u0438\u0442\u044c\u0441\u044f \u0432 \u043c\u0430\u043a\u0440\u043e\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0433\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0430, \u0412\u0412\u041f \u0438 \u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435, \u043e\u0434\u043d\u0430\u043a\u043e, \u0437\u0430 \u043d\u0430\u0441 \u044d\u0442\u043e \u0432\u0441\u0435 \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0438\u043d\u0441\u0442\u0438\u0442\u0443\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u044b \u2014 \u0438\u0445 \u0440\u0435\u0430\u043a\u0446\u0438\u044f \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0430 \u0432 \u0441\u043f\u0440\u0435\u0434\u0435 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0445 \u0438 \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0440\u043e\u0447\u043d\u044b\u0445 \u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0439. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u0441\u043b\u0430\u0431\u0438\u0442\u044c\u0441\u044f \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0437\u0430 \u0448\u043e\u0443, \u0435\u0441\u043b\u0438 \u0443 \u0412\u0430\u0441 \u043d\u0435\u0442 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0410 \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u2014 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u043c \u0445\u0435\u0434\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0432\u043e\u0438\u0445 \u043f\u043e\u0437\u0438\u0446\u0438\u0439 \u0438\u043b\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u0432 \u043a\u044d\u0448 \u0434\u043e \u043b\u0443\u0447\u0448\u0438\u0445 \u0432\u0440\u0435\u043c\u0435\u043d.<\/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\/491622\/\"> https:\/\/habr.com\/ru\/post\/491622\/<\/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\/491622\/\">\u041f\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u043d\u0430 9 \u043c\u0430\u0440\u0442\u0430 2020 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0440\u0435\u0437\u043a\u043e\u0435 \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u0440\u044b\u043d\u043a\u043e\u0432 \u0421\u0428\u0410 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430 \u0432 20-\u0447\u0438\u0441\u043b\u0430\u0445 \u0444\u0435\u0432\u0440\u0430\u043b\u044f 2020, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u043e\u043a\u043e\u043b\u043e -16%. \u041d\u043e\u0432\u043e\u0441\u0442\u0438 \u043f\u0435\u0441\u0442\u0440\u044f\u0442 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u043c\u0438 \u043f\u0440\u043e \u043d\u0430\u0434\u0432\u0438\u0433\u0430\u044e\u0449\u0443\u044e\u0441\u044f \u0440\u0435\u0446\u0435\u0441\u0441\u0438\u044e \u0438\u0437-\u0437\u0430 \u043a\u043e\u0440\u043e\u043d\u043e\u0432\u0438\u0440\u0443\u0441\u0430,<br \/>  \u0420\u043e\u0441\u0441\u0438\u044f \u0432\u044b\u0448\u043b\u0430 \u0438\u0437 \u0441\u0434\u0435\u043b\u043a\u0438 \u041e\u043f\u0435\u043a+, \u0447\u0442\u043e \u0443\u0434\u0430\u0440\u0438\u043b\u043e \u043f\u043e \u0446\u0435\u043d\u0430\u043c \u043d\u0430 \u043d\u0435\u0444\u0442\u044c (-20% \u0437\u0430 \u0434\u0435\u043d\u044c) \u0438 \u0437\u0430\u0432\u0442\u0440\u0430, (10 \u043c\u0430\u0440\u0442\u0430 2020) \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u0440\u044b\u043d\u043a\u0430 \u041c\u041c\u0412\u0411 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430 20%, \u0441\u0443\u0434\u044f \u043f\u043e \u043a\u043e\u0442\u0438\u0440\u043e\u0432\u043a\u0430\u043c \u043d\u0430\u0448\u0438\u0445 \u0430\u043a\u0446\u0438\u0439 \u043d\u0430 \u0437\u0430\u043f\u0430\u0434\u043d\u044b\u0445 \u0440\u044b\u043d\u043a\u0430\u0445.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bi\/7e\/fx\/bi7efxdyajb37dmvxce8kmq2zl8.png\"><\/p>\n<p>  \u0416\u0434\u0435\u0442 \u043b\u0438 \u043d\u0430\u0441 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0446\u0435\u0441\u0441\u0438\u044f? \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0435\u0446\u0435\u0441\u0441\u0438\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 Python.  <\/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-299870","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299870","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=299870"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299870\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299870"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299870"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299870"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}