{"id":412497,"date":"2024-06-29T22:34:40","date_gmt":"2024-06-29T22:34:40","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=412497"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-29T22:34:40","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=412497","title":{"rendered":"<span>\u0410\u043d\u0430\u043b\u0438\u0437 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u0438\u043d\u0430\u043d\u0441\u0430\u0445 \u2014 \u0430\u043d\u0430\u043b\u0438\u0437 ETF \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Python<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421 \u043f\u0440\u043e\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u0444\u0435\u0440\u044b \u043d\u0430\u0448\u0435\u0439 \u0436\u0438\u0437\u043d\u0438 \u043e\u043d\u0430 \u043d\u0435 \u043c\u043e\u0433\u043b\u0430 \u043e\u0431\u043e\u0439\u0442\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439 \u0444\u0438\u043d\u0430\u043d\u0441\u044b. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 ETF \u0441 \u0446\u0435\u043b\u044c\u044e \u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0446\u0438\u0438.<\/p>\n<p><strong>1. \u041e\u00a0\u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 ETF c \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0432\u0430\u043b\u044e\u0442\u043e\u0439 USD: FXCN, FXRL, FXIT, FXUS \u0438 FXRU. \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0437\u0430 \u0442\u0440\u0438 \u0433\u043e\u0434\u0430 \u0441 2018 \u043f\u043e 2020 \u0433\u043e\u0434\u0430. \u0421\u0430\u043c\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u0432 Google Colaboratory.<\/p>\n<p>\u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<pre><code class=\"python\">import pandas as pd import numpy as np import matplotlib.pyplot as plt from google.colab import files import warnings warnings.filterwarnings(\"ignore\")<\/code><\/pre>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435. \u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432. \u041c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u2014 \u0432\u0437\u044f\u043b\u0438 \u0438\u0445 \u0441 Finam \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 csv. \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 concat \u0441\u0432\u0435\u043b \u0438\u0445 \u0432 \u043e\u0434\u0438\u043d \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c.<\/p>\n<pre><code class=\"python\">def changeDF(df):   df['date'] = pd.to_datetime(df['&lt;DATE>'].astype(str), dayfirst=True)   name =[x for x in globals() if globals()[x] is df][0]   df = df.drop(['&lt;DATE>','&lt;TIME>', '&lt;OPEN>', '&lt;HIGH>', '&lt;LOW>'], axis=1)   df = df.set_index(['date'])   df.columns = [name+'_cl', name + '_vol']   return df  fxgd_change = changeDF(fxgd) fxrl_change = changeDF(fxrl) fxit_change = changeDF(fxit) fxus_change = changeDF(fxus) fxru_change = changeDF(fxru) fxcn_change = changeDF(fxcn)  etf = pd.concat([fxgd_change, fxrl_change, fxit_change, fxus_change, fxru_change, fxcn_change], axis=1)  etf.head()<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6a4\/be3\/93b\/6a4be393ba8650efa2a30b7a1ab671fb.png\" width=\"1021\" height=\"237\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6a4\/be3\/93b\/6a4be393ba8650efa2a30b7a1ab671fb.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0430\u0448 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 NULL<\/p>\n<pre><code class=\"python\">print(etf.isnull().sum())<\/code><\/pre>\n<figure class=\"float\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a82\/cdd\/c8f\/a82cddc8f5a7cffaf197596c739a69c6.png\" width=\"145\" height=\"283\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a82\/cdd\/c8f\/a82cddc8f5a7cffaf197596c739a69c6.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u044b\u0431\u0440\u043e\u0441\u0438\u043c \u0438\u0445, \u0447\u0442\u043e\u0431 \u043d\u0435 \u043c\u0435\u0448\u0430\u043b\u0438 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0440\u0430\u0441\u0447\u0435\u0442\u0435:<\/p>\n<pre><code class=\"python\">etf.dropna(inplace=True, axis=0)<\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0438\u043f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439:<\/p>\n<pre><code class=\"python\">etf.dtypes<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f65\/308\/9a8\/f653089a87d371d78bcc37dd7df46881.png\" width=\"186\" height=\"277\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f65\/308\/9a8\/f653089a87d371d78bcc37dd7df46881.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0418 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430:<\/p>\n<pre><code class=\"python\">etf.shape<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u00a0(752, 12).<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0434\u0430\u043b\u044c\u0448\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u0432\u0435\u043b\u0438 \u0441\u0435\u0431\u044f ETF \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u043e\u043b\u0433\u043e\u0434\u0430. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 describe:<\/p>\n<pre><code class=\"python\">etf[-120:].describe()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3aa\/6ef\/573\/3aa6ef5735af1c4709728f8783d4a22d.png\" width=\"1420\" height=\"281\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3aa\/6ef\/573\/3aa6ef5735af1c4709728f8783d4a22d.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u0438\u0434\u043d\u043e \u0432 \u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u043e\u043b\u0433\u043e\u0434\u0430 ETF \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e 75%.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0446\u0435\u043d\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0438\u0435 \u0442\u0440\u0438 \u0433\u043e\u0434\u0430.<\/p>\n<pre><code class=\"python\">fig, axs = plt.subplots(3, 2, figsize=(15,15)) axs[0, 0].plot(etf.index, etf['fxgd_cl'], 'tab:blue' ) axs[0, 0].set_title('FXGD') axs[0, 1].plot(etf.index, etf['fxrl_cl'], 'tab:orange') axs[0, 1].set_title('FXRL') axs[1, 0].plot(etf.index, etf['fxit_cl'], 'tab:green') axs[1, 0].set_title('FXIT') axs[1, 1].plot(etf.index, etf['fxus_cl'], 'tab:red') axs[1, 1].set_title('FXUS') axs[2, 0].plot(etf.index, etf['fxru_cl'], 'tab:grey') axs[2, 0].set_title('FXRU') axs[2, 1].plot(etf.index, etf['fxcn_cl'], 'tab:purple') axs[2, 1].set_title('FXCN')   for ax in axs.flat:     ax.set(xlabel='Data', ylabel='Price')  for ax in axs.flat:     ax.label_outer()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dcd\/3f8\/495\/dcd3f8495dfa6be6131b80104e67f521.png\" width=\"798\" height=\"790\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dcd\/3f8\/495\/dcd3f8495dfa6be6131b80104e67f521.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0435 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0446\u0435\u043d\u044b etf \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0446\u0435\u043d\u0430\u043c\u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f 2 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u043d\u0435\u0439. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0446\u0435\u043d\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0432\u0447\u0435\u0440\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0430 500 \u0440\u0443\u0431\u043b\u0435\u0439, \u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043e\u043d\u0430 \u0437\u0430\u043a\u0440\u044b\u043b\u0430\u0441\u044c \u043f\u043e 550 \u0440\u0443\u0431\u043b\u0435\u0439. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 10%. \u0442. \u0435. ((550-500) \/ 500)*100. \u0417\u0434\u0435\u0441\u044c \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0442\u0430\u0439\u043d\u044b!<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043c\u044b \u0432\u0432\u0435\u0434\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0439 \u0434\u043d\u0435\u0432\u043d\u0443\u044e \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u0432 \u0446\u0435\u043d\u0435 etf. \u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 pct_change() \u0432 python. \u0422\u0430\u043a \u0436\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u043b\u044e \u043a\u043e\u043b\u043e\u043d\u043a\u0438, \u0447\u0442\u043e\u0431 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u043e\u0441\u044c.<\/p>\n<pre><code class=\"python\">etf_cl = etf[['fxgd_cl', 'fxrl_cl', 'fxit_cl', 'fxus_cl', 'fxru_cl', 'fxcn_cl']] etf_cl_pct = etf_cl.pct_change()*100 etf_cl_pct.columns = ['fxgd_cl_pct', 'fxrl_cl_pct', 'fxit_cl_pct', 'fxus_cl_pct', 'fxru_cl_pct', 'fxcn_cl_pct'] etf_vol = etf[['fxgd_vol', 'fxrl_vol', 'fxit_vol', 'fxus_vol', 'fxru_vol', 'fxcn_vol']] etf_new = pd.concat([etf_cl,  etf_vol, etf_cl_pct], axis = 1)  etf_new.head()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4be\/f7c\/73e\/4bef7c73e0725aae23d1aacb0394d66d.png\" width=\"1666\" height=\"215\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4be\/f7c\/73e\/4bef7c73e0725aae23d1aacb0394d66d.png\"\/><figcaption><\/figcaption><\/figure>\n<pre><code class=\"python\">etf_new = etf_new.dropna()<\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438:<\/p>\n<pre><code class=\"python\">fig, axs = plt.subplots(3, 2, figsize=(15,15)) axs[0, 0].plot(etf_new.index, etf_new['fxgd_cl_pct'], 'tab:blue') axs[0, 0].set_title('FXGD') axs[0, 1].plot(etf_new.index, etf_new['fxrl_cl_pct'], 'tab:orange') axs[0, 1].set_title('FXRL') axs[1, 0].plot(etf_new.index, etf_new['fxit_cl_pct'], 'tab:green') axs[1, 0].set_title('FXIT') axs[1, 1].plot(etf_new.index, etf_new['fxus_cl_pct'], 'tab:red') axs[1, 1].set_title('FXUS') axs[2, 0].plot(etf_new.index, etf_new['fxru_cl_pct'], 'tab:grey') axs[2, 0].set_title('FXRU') axs[2, 1].plot(etf_new.index, etf_new['fxcn_cl_pct'], 'tab:purple') axs[2, 1].set_title('FXCN')  for ax in axs.flat:     ax.set(xlabel='Data', ylabel='Price')  for ax in axs.flat:     ax.label_outer()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/386\/bf1\/7a0\/386bf17a03c981a50b116df616e3a228.png\" width=\"793\" height=\"795\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/386\/bf1\/7a0\/386bf17a03c981a50b116df616e3a228.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442 -2% \u0434\u043e 2% \u0441\u043e \u0441\u043a\u0430\u0447\u043a\u0430\u043c\u0438 \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u043c\u0435\u0442\u043a\u0438 \u0432 6% \u0441 \u043e\u0431\u0435\u0438\u0445 \u0441\u0442\u043e\u0440\u043e\u043d. \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0448\u0443\u043c\u043d\u043e\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 ETF FXCN.<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0437\u0430 \u0442\u0435 \u0434\u043d\u0438, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u043b\u0441\u044f \u0440\u0435\u0437\u043a\u0438\u0439 \u0440\u043e\u0441\u0442\/\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0446\u0435\u043d \u043d\u0430 etf \u0438 \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0435\u043c \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043e.<\/p>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0434\u043e\u0445\u043e\u0434\u043e\u0432:<\/p>\n<pre><code class=\"python\">import seaborn as sns   sns.set(style=\"darkgrid\")  fig, axs = plt.subplots(3, 2, figsize=(15,15))  sns.histplot(data=etf_new['fxgd_cl_pct'], kde=True, color=\"orange\", ax=axs[0, 0]) axs[0,0].set_xlim(-10,10) sns.histplot(data=etf_new['fxrl_cl_pct'], kde=True, color=\"olive\", ax=axs[0, 1]) axs[0,1].set_xlim(-10,10) sns.histplot(data=etf_new['fxit_cl_pct'], kde=True, color=\"gold\", ax=axs[1, 0]) axs[1,0].set_xlim(-10,10) sns.histplot(data=etf_new['fxus_cl_pct'], kde=True, color=\"grey\", ax=axs[1, 1]) axs[1,1].set_xlim(-10,10) sns.histplot(data=etf_new['fxru_cl_pct'], kde=True, color=\"teal\", ax=axs[2, 0]) axs[2,0].set_xlim(-10,10) sns.histplot(data=etf_new['fxcn_cl_pct'], kde=True, color=\"brown\", ax=axs[2, 1]) axs[2,1].set_xlim(-10,10)  plt.show()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/93b\/b9f\/7b5\/93bb9f7b53013ed26aef2d6f9f9b75f4.png\" width=\"808\" height=\"786\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/93b\/b9f\/7b5\/93bb9f7b53013ed26aef2d6f9f9b75f4.png\"\/><figcaption><\/figcaption><\/figure>\n<pre><code class=\"python\">etf_new[['fxgd_cl_pct', 'fxrl_cl_pct', 'fxit_cl_pct', 'fxus_cl_pct', 'fxru_cl_pct', 'fxcn_cl_pct']].describe()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a07\/b17\/6fa\/a07b176fa288173c1a5bc5956e98d6d2.png\" width=\"629\" height=\"252\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a07\/b17\/6fa\/a07b176fa288173c1a5bc5956e98d6d2.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0413\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0435\u0439 \u0446\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432\u043e\u043a\u0440\u0443\u0433 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 etf \u0431\u044b\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0443\u043b\u044f \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0442\u0440\u0435\u043d\u0434\u0435. \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 ETF \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043b\u0435\u0436\u0430\u043b\u0430 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043e\u0442 -2,5 \u0434\u043e 2,5%. \u041d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u2014 FXIT, \u0430 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0443\u044e \u2014 FXRU.<\/p>\n<p><strong>2.\u00a0\u0410\u043d\u0430\u043b\u0438\u0437 \u0442\u0440\u0435\u043d\u0434\u0430<\/strong><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u00ab\u0422\u0440\u0435\u043d\u0434\u00bb, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u0432\u044b\u0448\u0435.\u00a0\u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043a\u0430\u043a \u0432\u0435\u043b\u0438 \u0441\u0435\u0431\u044f \u0430\u043a\u0446\u0438\u0438 \u0430\u043a\u0446\u0438\u0438ETF \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 3 \u0433\u043e\u0434\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u0440\u0443\u0433\u043e\u0432\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0435\u043a\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0434\u043d\u0435\u0439, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0440\u0435\u043d\u0434. \u0414\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e groupby() \u0441\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u043c \u0442\u0440\u0435\u043d\u0434\u0430.<\/p>\n<pre><code class=\"python\">def trend(x):   if x > -0.5 and x &lt;= 0.5:     return '\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043b\u0438 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439'   elif x > 0.5 and x &lt;= 1.5:     return '\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u043e\u0437\u0438\u0442\u0438\u0432'   elif x > -1.5 and x &lt;= -0.5:     return '\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0435\u0433\u0430\u0442\u0438\u0432'   elif x > 1.5 and x &lt;= 2.5:     return '\u041f\u043e\u0437\u0438\u0442\u0438\u0432'   elif x > -2.5 and x &lt;= -1.5:     return '\u041d\u0435\u0433\u0430\u0442\u0438\u0432'   elif x > 2.5 and x &lt;= 5:     return '\u0417\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0437\u0438\u0442\u0438\u0432'   elif x > -5 and x &lt;= -2.5:     return '\u0417\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u0435\u0433\u0430\u0442\u0438\u0432'   elif x > 5:     return '\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0437\u0438\u0442\u0438\u0432'   elif x &lt;= -5:     return '\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0435\u0433\u0430\u0442\u0438\u0432'  for stock in etf_trend.columns[12:]:   etf_trend[\"Trend_\" + str(stock)] = np.zeros(etf_trend[stock].count())   etf_trend[\"Trend_\"+ str(stock)] = etf_trend[stock].apply(lambda x:trend(x))<\/code><\/pre>\n<pre><code class=\"python\">sns.set(style=\"darkgrid\")  fig, axs = plt.subplots(3, 2, figsize=(20,17))  axs[0, 0].pie(etf_trend['Trend_fxgd_cl_pct'].value_counts(), labels = etf_trend['Trend_fxgd_cl_pct'].value_counts().index, autopct=\"%.1f%%\") axs[0, 0].set_title('FXGD')  axs[0, 1].pie(etf_trend['Trend_fxrl_cl_pct'].value_counts(), labels = etf_trend['Trend_fxrl_cl_pct'].value_counts().index, autopct=\"%.1f%%\") axs[0, 1].set_title('FXRL')  axs[1, 0].pie(etf_trend['Trend_fxit_cl_pct'].value_counts(), labels = etf_trend['Trend_fxit_cl_pct'].value_counts().index, autopct=\"%.1f%%\") axs[1, 0].set_title('FXIT')  axs[1, 1].pie(etf_trend['Trend_fxus_cl_pct'].value_counts(), labels = etf_trend['Trend_fxus_cl_pct'].value_counts().index, autopct=\"%.1f%%\") axs[1, 1].set_title('FXUS')  axs[2, 0].pie(etf_trend['Trend_fxru_cl_pct'].value_counts(), labels = etf_trend['Trend_fxru_cl_pct'].value_counts().index, autopct=\"%.1f%%\") axs[2, 0].set_title('FXRU')  axs[2, 1].pie(etf_trend['Trend_fxcn_cl_pct'].value_counts(), labels = etf_trend['Trend_fxcn_cl_pct'].value_counts().index, autopct=\"%.1f%%\") axs[2, 1].set_title('FXCN')  plt.show()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/527\/08e\/6d4\/52708e6d438ecb9cac551d49a298d347.png\" width=\"1022\" height=\"833\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/527\/08e\/6d4\/52708e6d438ecb9cac551d49a298d347.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0430 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0441 2018 \u0433\u043e\u0434\u0430 \u043f\u043e 2020 \u0433\u043e\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 ETF \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c, \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445. \u0422\u0430\u043a \u0436\u0435 \u0432\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u043e\u043d\u0438 \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0431\u044b\u043b\u0438 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u043c\u0438. \u041f\u0440\u0438 \u0431\u043e\u043b\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u2014 \u044d\u0442\u043e \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u043e\u0441\u044c \u043a\u0440\u043e\u043c\u0435 FXRU.<\/p>\n<p><strong>3.\u00a0\u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u0430\u044f \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u0438 \u043e\u0431\u044a\u0435\u043c\u044b<\/strong><\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043e\u0431\u044a\u0435\u043c\u0430\u043c\u0438:<\/p>\n<pre><code class=\"python\">sns.set(style=\"darkgrid\")  fig, axs = plt.subplots(6, 1, figsize=(30,35))  axs[0].stem(etf_trend.index[-253:], etf_trend['fxgd_cl_pct'][-253:]) axs[0].plot((etf_trend['fxgd_vol']\/10000)[-253:], color = 'green', alpha = 0.5) axs[0].set_title('FXGD')  axs[1].stem(etf_trend.index[-253:], etf_trend['fxrl_cl_pct'][-253:]) axs[1].plot((etf_trend['fxrl_vol']\/10000)[-253:], color = 'green', alpha = 0.5) axs[1].set_title('FXRL')  axs[2].stem(etf_trend.index[-253:], etf_trend['fxit_cl_pct'][-253:]) axs[2].plot((etf_trend['fxit_vol']\/10000)[-253:], color = 'green', alpha = 0.5) axs[2].set_title('FXIT')  axs[3].stem(etf_trend.index[-253:], etf_trend['fxus_cl_pct'][-253:]) axs[3].plot((etf_trend['fxus_vol']\/10000)[-253:], color = 'green', alpha = 0.5) axs[3].set_title('FXUS')  axs[4].stem(etf_trend.index[-253:], etf_trend['fxru_cl_pct'][-253:]) axs[4].plot((etf_trend['fxru_vol']\/10000)[-253:], color = 'green', alpha = 0.5) axs[4].set_title('FXRU')  axs[5].stem(etf_trend.index[-253:], etf_trend['fxcn_cl_pct'][-253:]) axs[5].plot((etf_trend['fxcn_vol']\/10000)[-253:], color = 'green', alpha = 0.5) axs[5].set_title('FXCN')<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c8c\/87a\/f2d\/c8c87af2d7705f80c291f3f168cdbe8e.png\" width=\"1027\" height=\"581\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c8c\/87a\/f2d\/c8c87af2d7705f80c291f3f168cdbe8e.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e9b\/b1c\/3bf\/e9bb1c3bf32bc40493cc23a6b08e1f06.png\" width=\"1025\" height=\"582\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e9b\/b1c\/3bf\/e9bb1c3bf32bc40493cc23a6b08e1f06.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043c \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438(\u0437\u0435\u043b\u0435\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c) \u0441 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c\u044e(\u0441\u0438\u043d\u0438\u043c \u0446\u0432\u0435\u0442\u043e\u043c), \u0431\u044b\u043b\u043e \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0434\u043b\u044f ETF \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u043e, \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u043e\u0431\u044a\u0435\u043c \u0442\u043e\u0440\u0433\u043e\u0432 \u0432\u044b\u0441\u043e\u043a, \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u0440\u043e\u0441\u0442 \u0438\u043b\u0438 \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0446\u0435\u043d\u044b. \u041e\u0431\u044a\u0435\u043c \u0442\u043e\u0440\u0433\u043e\u0432 ETF \u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0438\u043b\u0438 \u043f\u0430\u0434\u0435\u043d\u0438\u0435\u043c\u044b \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c \u0434\u043e\u0432\u0435\u0440\u0438\u044f \u0442\u0440\u0435\u0439\u0434\u0435\u0440\u043e\u0432 \u0438 \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u043e\u0432 \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 ETF.<\/p>\n<p><strong>4.\u00a0\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 ETF<\/strong><\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u0438\u0432\u0435\u0440\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u2014 \u043d\u0435 \u043a\u043b\u0430\u0434\u0438 \u0432\u0441\u0435 \u044f\u0439\u0446\u0430 \u0432 \u043e\u0434\u043d\u0443 \u043a\u043e\u0440\u0437\u0438\u043d\u043a\u0443. \u041f\u043e \u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044c \u0438\u0437 ETF, \u0442\u043e \u043e\u043d\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c. \u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u044f\u0437\u044b\u043a\u043e\u043c \u2014 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u041f\u0438\u0440\u0441\u043e\u043d\u0430 \u043c\u0435\u0436\u0434\u0443 \u043b\u044e\u0431\u043e\u0439 \u043f\u0430\u0440\u043e\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0431\u043b\u0438\u0437\u043e\u043a \u043a 0. \u0421\u043c\u044b\u0441\u043b \u2014 \u043e\u043d\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0430\u0434\u0430\u0442\u044c \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e, \u0447\u0442\u043e\u0431 \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u0438 \u043d\u0435 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0438\u0441\u044c \u0432 0.<\/p>\n<p>\u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 ETF \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b Seaborn. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u0430 \u0434\u0435\u043d\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043d\u043e\u0432\u043e\u043c \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c\u0435.<\/p>\n<pre><code class=\"python\">pct_chg_etf = etf_new[etf_new.columns[12:]]  sns.set(style = 'ticks', font_scale = 1.25) sns.pairplot(pct_chg_etf) plt.show()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/826\/dfb\/eb8\/826dfbeb8820cc845fe6228f3c0ceea3.png\" width=\"806\" height=\"809\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/826\/dfb\/eb8\/826dfbeb8820cc845fe6228f3c0ceea3.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 ETF. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f(\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438) \u0446\u0435\u043d\u044b ETF, \u0430 \u043d\u0435 \u0434\u043b\u044f \u0438\u0445 \u0446\u0435\u043d\u044b.<\/p>\n<p>\u0418\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 \u044f\u0441\u043d\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 FXIT \u0438 FXUS \u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043a\u043b\u0430\u0441\u0442\u044c \u0432 \u043e\u0434\u043d\u0443 \u043a\u043e\u0440\u0437\u0438\u043d\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u0435\u0436\u0434\u0443 \u043d\u043c\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 \u0434\u0432\u0443\u0445 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f ETF \u043d\u0435 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438.<\/p>\n<p>\u041d\u043e \u0443 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0435\u0441\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u2014 \u043e\u043d \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0438, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 R \u041f\u0438\u0440\u0441\u043e\u043d\u0430 \u0438 p \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0447\u0435\u043c \u043f\u0440\u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c FXCN \u2014 \u0435\u0441\u0442\u044c \u043b\u0438 \u0443 \u0434\u0430\u043d\u043d\u043e\u0433\u043e ETF \u0441\u0438\u043b\u044c\u043d\u0430\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u044c \u0441 FXUS \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u2014 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432 seaborn.jointplot \u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e R \u041f\u0438\u0440\u0441\u043e\u043d\u0430 (\u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u041f\u0438\u0440\u0441\u043e\u043d\u0430) \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0430\u0440\u044b ETF. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 R \u041f\u0438\u0440\u0441\u043e\u043d\u0430 \u043a\u043e\u043b\u0435\u0431\u043b\u0435\u0442\u0441\u044f \u043e\u0442 -1 \u0434\u043e 1. \u041e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 R \u041f\u0438\u0440\u0441\u043e\u043d\u0430 \u0431\u043b\u0438\u0436\u0435 \u043a 1 (\u0438\u043b\u0438 -1) \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0441\u0438\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u043b\u0438\u0436\u0435 \u043a 0 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0441\u043b\u0430\u0431\u0443\u044e \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e.<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0447\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u2014 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e \u043a\u0440\u0430\u044f\u043c, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 p-value.<\/p>\n<p>\u041d\u043e \u0435\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u0430\u0440\u044b, \u0442\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432. \u041f\u043e \u044d\u0442\u043e\u043c\u0443 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0442\u0435\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"python\">from scipy.stats import stats a_1 = pct_chg_etf.fxit_cl_pct b_1 = pct_chg_etf.fxus_cl_pct b_2 = pct_chg_etf.fxcn_cl_pct   g_1 = sns.jointplot('fxit_cl_pct', 'fxcn_cl_pct', pct_chg_etf, kind = 'scatter') r_1, p_1 = stats.pearsonr(a_1, b_1) g_1.ax_joint.annotate(f'$\\\\rho = {r_1:.3f}, p = {p_1:.3f}$',                     xy=(0.1, 0.9), xycoords='axes fraction',                     ha='left', va='center',                     bbox={'boxstyle': 'round', 'fc': 'powderblue', 'ec': 'navy'})  g_1.ax_joint.scatter(a_1, b_1) g_1.set_axis_labels(xlabel='fxit', ylabel='fxus', size=15)  g_2 = sns.jointplot('fxus_cl_pct', 'fxit_cl_pct', pct_chg_etf, kind = 'scatter') r_2, p_2 = stats.pearsonr(a_1, b_2) g_2.ax_joint.annotate(f'$\\\\rho = {r_2:.3f}, p = {p_2:.3f}$',                     xy=(0.1, 0.9), xycoords='axes fraction',                     ha='left', va='center',                     bbox={'boxstyle': 'round', 'fc': 'powderblue', 'ec': 'navy'})  g_2.ax_joint.scatter(a_1, b_2) g_2.set_axis_labels(xlabel='fxit', ylabel='fxcn', size=15)  plt.tight_layout()  plt.show()<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/84c\/27c\/afe\/84c27cafe53dc05086f0b6d3010de2b3.png\" width=\"409\" height=\"415\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/84c\/27c\/afe\/84c27cafe53dc05086f0b6d3010de2b3.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cae\/fa4\/b73\/caefa4b7398cea504829f47ea82c0104.png\" width=\"414\" height=\"414\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cae\/fa4\/b73\/caefa4b7398cea504829f47ea82c0104.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0441\u0438\u043b\u044c\u043d\u043e\u0439 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 FXIT \u0438 FXUS, \u0447\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u043d\u0435\u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u0445 \u0431\u0440\u0430\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u043f\u043e\u0440\u0442\u0444\u0435\u043b\u044c. \u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 FXCN \u0438 FXIT \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043d\u0438\u0436\u0435 0,7, \u0447\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u0440\u0437\u0438\u043d\u0435.<\/p>\n<p><strong>5.\u00a0\u0410\u043d\u0430\u043b\u0438\u0437 \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/strong><\/p>\n<p>\u0412\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c-\u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u0440\u044b\u043d\u043a\u0430\u0445. \u0413\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u0446\u0435\u043d\u043d\u0430\u044f \u0431\u0443\u043c\u0430\u0433\u0430 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u0435\u0441\u043b\u0438 \u0435\u0435 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0440\u0435\u0437\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f \u0437\u0430 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u0430\u044f \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u043c\u0435\u0435\u0442 \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u044e \u0431\u044b\u0442\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u042d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0444\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u043f\u0440\u043e\u0441 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f, \u0436\u0430\u0434\u043d\u043e\u0441\u0442\u044c, \u0441\u0442\u0440\u0430\u0445 \u0438 \u0442.\u0434. \u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043c\u0435\u0440\u044b, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u00ab\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435\u043c\u00bb, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u0430 \u043e\u0442 \u0435\u0433\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043c \u0440\u0430\u0441\u0447\u0435\u0442 5-\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0435\u0439 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a. \u0412\u0441\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 Pandas rolling() \u0438 std().<\/p>\n<pre><code class=\"python\">sns.set(style=\"darkgrid\")  fig, axs = plt.subplots(6, 1, figsize=(30,35))  for i, etf in enumerate(pct_chg_etf.columns):   axs[i].plot(pct_chg_etf[etf].rolling(5).std()*np.sqrt(5))   axs[i].plot(pct_chg_etf[etf].rolling(7).mean())   axs[i].set_title(etf[:4], size=20)<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/28d\/6dd\/05e\/28d6dd05ea38531c305d56a2e08403a5.png\" width=\"711\" height=\"810\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/28d\/6dd\/05e\/28d6dd05ea38531c305d56a2e08403a5.png\"\/><figcaption><\/figcaption><\/figure>\n<pre><code class=\"python\">volatility = pct_chg_etf[['fxgd_cl_pct', 'fxrl_cl_pct', 'fxit_cl_pct', 'fxus_cl_pct','fxru_cl_pct', 'fxcn_cl_pct']].rolling(5).std()*np.sqrt(5)  volatility[:150].plot(linewidth=4, figsize = (35, 15)) plt.legend(loc=2, prop={'size': 16})<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fbf\/4fa\/e72\/fbf4fae72159c060a00bc4c3bd79816c.png\" width=\"1025\" height=\"411\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fbf\/4fa\/e72\/fbf4fae72159c060a00bc4c3bd79816c.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0441\u0438\u043b\u044c\u043d\u0430\u044f \u043d\u0438\u0437\u043a\u0430\u044f \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u0430 \u0434\u043b\u044f ETF \u043d\u0430 \u0440\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u0438\u0435 \u0435\u0432\u0440\u043e\u043e\u0431\u043b\u0438\u0433\u0430\u0446\u0438\u0438 \u2014 FXRU.<br \/>\u041c\u043d\u043e\u0433\u0438\u0435 \u0442\u0440\u0435\u0439\u0434\u0435\u0440\u044b \u0438 \u0438\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u044b \u0438\u0449\u0443\u0442 \u0438\u043d\u0432\u0435\u0441\u0442\u0438\u0446\u0438\u0438 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c. \u0415\u0441\u043b\u0438 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043d\u0435 \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f, \u043e\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043d\u0438\u0437\u043a\u043e\u0439 \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u043d\u043e \u0438 \u0438\u043c\u0435\u0435\u0442 \u043d\u0438\u0437\u043a\u0438\u0439 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b \u043f\u0440\u0438\u0431\u044b\u043b\u0438. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0446\u0435\u043d\u043d\u044b\u0435 \u0431\u0443\u043c\u0430\u0433\u0438 \u0441 \u043e\u0447\u0435\u043d\u044c \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u043d\u043e \u0440\u0438\u0441\u043a \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0441\u043e\u043a.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/583808\/\"> https:\/\/habr.com\/ru\/articles\/583808\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421 \u043f\u0440\u043e\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u0444\u0435\u0440\u044b \u043d\u0430\u0448\u0435\u0439 \u0436\u0438\u0437\u043d\u0438 \u043e\u043d\u0430 \u043d\u0435 \u043c\u043e\u0433\u043b\u0430 \u043e\u0431\u043e\u0439\u0442\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439 \u0444\u0438\u043d\u0430\u043d\u0441\u044b. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 ETF \u0441 \u0446\u0435\u043b\u044c\u044e \u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0446\u0438\u0438.<\/p>\n<p><strong>1. \u041e\u00a0\u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 ETF c \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0432\u0430\u043b\u044e\u0442\u043e\u0439 USD: FXCN, FXRL, FXIT, FXUS \u0438 FXRU. \u0412\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0437\u0430 \u0442\u0440\u0438 \u0433\u043e\u0434\u0430 \u0441 2018 \u043f\u043e 2020 \u0433\u043e\u0434\u0430. \u0421\u0430\u043c\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u0432 Google Colaboratory.<\/p>\n<p>\u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<pre><code class=\"python\">import pandas as pd import numpy as np import matplotlib.pyplot as plt from google.colab import files import warnings warnings.filterwarnings(\"ignore\")<\/code><\/pre>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435. \u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432. \u041c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u2014 \u0432\u0437\u044f\u043b\u0438 \u0438\u0445 \u0441 Finam \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 csv. \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 concat \u0441\u0432\u0435\u043b \u0438\u0445 \u0432 \u043e\u0434\u0438\u043d \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c.<\/p>\n<pre><code class=\"python\">def changeDF(df):   df['date'] = pd.to_datetime(df['&lt;DATE>'].astype(str), dayfirst=True)   name =[x for x in globals() if globals()[x] is df][0]   df = df.drop(['&lt;DATE>','&lt;TIME>', '&lt;OPEN>', '&lt;HIGH>', '&lt;LOW>'], axis=1)   df = df.set_index(['date'])   df.columns = [name+'_cl', name + '_vol']   return df  fxgd_change = changeDF(fxgd) fxrl_change = changeDF(fxrl) fxit_change = changeDF(fxit) fxus_change = changeDF(fxus) fxru_change = changeDF(fxru) fxcn_change = changeDF(fxcn)  etf = pd.concat([fxgd_change, fxrl_change, fxit_change, fxus_change, fxru_change, fxcn_change], axis=1)  etf.head()<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0430\u0448 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 NULL<\/p>\n<pre><code class=\"python\">print(etf.isnull().sum())<\/code><\/pre>\n<figure class=\"float\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u044b\u0431\u0440\u043e\u0441\u0438\u043c \u0438\u0445, \u0447\u0442\u043e\u0431 \u043d\u0435 \u043c\u0435\u0448\u0430\u043b\u0438 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0440\u0430\u0441\u0447\u0435\u0442\u0435:<\/p>\n<pre><code class=\"python\">etf.dropna(inplace=True, axis=0)<\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0438\u043f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439:<\/p>\n<pre><code class=\"python\">etf.dtypes<\/code><\/pre>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0418 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430:<\/p>\n<pre><code class=\"python\">etf.shape<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u00a0(752, 12).<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u0434\u0430\u043b\u044c\u0448\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u0432\u0435\u043b\u0438 \u0441\u0435\u0431\u044f ETF \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u043e\u043b\u0433\u043e\u0434\u0430. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 describe:<\/p>\n<pre><code class=\"python\">etf[-120:].describe()<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u0438\u0434\u043d\u043e \u0432 \u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043f\u043e\u043b\u0433\u043e\u0434\u0430 ETF \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e 75%.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0446\u0435\u043d\u044b \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430 \u043f\u0440\u043e\u0448\u0435\u0434\u0448\u0438\u0435 \u0442\u0440\u0438 \u0433\u043e\u0434\u0430.<\/p>\n<pre><code class=\"python\">fig, axs = plt.subplots(3, 2, figsize=(15,15)) axs[0, 0].plot(etf.index, etf['fxgd_cl'], 'tab:blue' ) axs[0, 0].set_title('FXGD') axs[0, 1].plot(etf.index, etf['fxrl_cl'], 'tab:orange') axs[0, 1].set_title('FXRL') axs[1, 0].plot(etf.index, etf['fxit_cl'], 'tab:green') axs[1, 0].set_title('FXIT') axs[1, 1].plot(etf.index, etf['fxus_cl'], 'tab:red') axs[1, 1].set_title('FXUS') axs[2, 0].plot(etf.index, etf['fxru_cl'], 'tab:grey') axs[2, 0].set_title('FXRU') axs[2, 1].plot(etf.index, etf['fxcn_cl'], 'tab:purple') axs[2, 1].set_title('FXCN')   for ax in axs.flat:     ax.set(xlabel='Data', ylabel='Price')  for ax in axs.flat:     ax.label_outer()<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0435 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0446\u0435\u043d\u044b etf \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0446\u0435\u043d\u0430\u043c\u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f 2 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u043d\u0435\u0439. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0446\u0435\u043d\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0432\u0447\u0435\u0440\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0430 500 \u0440\u0443\u0431\u043b\u0435\u0439, \u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043e\u043d\u0430 \u0437\u0430\u043a\u0440\u044b\u043b\u0430\u0441\u044c \u043f\u043e 550 \u0440\u0443\u0431\u043b\u0435\u0439. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 10%. \u0442. \u0435. ((550-500) \/ 500)*100. \u0417\u0434\u0435\u0441\u044c \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0442\u0430\u0439\u043d\u044b!<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043c\u044b \u0432\u0432\u0435\u0434\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0439 \u0434\u043d\u0435\u0432\u043d\u0443\u044e \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u0432 \u0446\u0435\u043d\u0435 etf. \u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 pct_change() \u0432 python. \u0422\u0430\u043a \u0436\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0432\u043b\u044e \u043a\u043e\u043b\u043e\u043d\u043a\u0438, \u0447\u0442\u043e\u0431 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u043e\u0441\u044c.<\/p>\n<pre><code class=\"python\">etf_cl = etf[['fxgd_cl', 'fxrl_cl', 'fxit_cl', 'fxus_cl', 'fxru_cl', 'fxcn_cl']] etf_cl_pct = etf_cl.pct_change()*100 etf_cl_pct.columns = ['fxgd_cl_pct', 'fxrl_cl_pct', 'fxit_cl_pct', 'fxus_cl_pct', 'fxru_cl_pct', 'fxcn_cl_pct'] etf_vol = etf[['fxgd_vol', 'fxrl_vol', 'fxit_vol', 'fxus_vol', 'fxru_vol', 'fxcn_vol']] etf_new = pd.concat([etf_cl,  etf_vol, etf_cl_pct], axis = 1)  etf_new.head()<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<pre><code class=\"python\">etf_new = etf_new.dropna()<\/code><\/pre>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438:<\/p>\n<pre><code class=\"python\">fig, axs = plt.subplots(3, 2, figsize=(15,15)) axs[0, 0].plot(etf_new.index, etf_new['fxgd_cl_pct'], 'tab:blue') axs[0, 0].set_title('FXGD') axs[0, 1].plot(etf_new.index, etf_new['fxrl_cl_pct'], 'tab:orange') axs[0, 1].set_title('FXRL') axs[1, 0].plot(etf_new.index, etf_new['fxit_cl_pct'], 'tab:green') axs[1, 0].set_title('FXIT') axs[1, 1].plot(etf_new.index, etf_new['fxus_cl_pct'], 'tab:red') axs[1, 1].set_title('FXUS') axs[2, 0].plot(etf_new.index, etf_new['fxru_cl_pct'], 'tab:grey') axs[2, 0].set_title('FXRU') axs[2, 1].plot(etf_new.index, etf_new['fxcn_cl_pct'], 'tab:purple') axs[2, 1].set_title('FXCN')  for ax in axs.flat:     ax.set(xlabel='Data', ylabel='Price')  for ax in axs.flat:     ax.label_outer()<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442 -2% \u0434\u043e 2% \u0441\u043e \u0441\u043a\u0430\u0447\u043a\u0430\u043c\u0438 \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u043c\u0435\u0442\u043a\u0438 \u0432 6% \u0441 \u043e\u0431\u0435\u0438\u0445 \u0441\u0442\u043e\u0440\u043e\u043d. \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0448\u0443\u043c\u043d\u043e\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 ETF FXCN.<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0441\u0442\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u0437\u0430 \u0442\u0435 \u0434\u043d\u0438, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u043b\u0441\u044f \u0440\u0435\u0437\u043a\u0438\u0439 \u0440\u043e\u0441\u0442\/\u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u0446\u0435\u043d \u043d\u0430 etf \u0438 \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0435\u043c \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043e.<\/p>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0434\u043e\u0445\u043e\u0434\u043e\u0432:<\/p>\n<pre><code class=\"python\">import seaborn as sns   sns.set(style=\"darkgrid\")  fig, axs = plt.subplots(3, 2, figsize=(15,15))  sns.histplot(data=etf_new['fxgd_cl_pct'], kde=True, color=\"orange\", ax=axs[0, 0]) axs[0,0].set_xlim(-10,10) sns.histplot(data=etf_new['fxrl_cl_pct'], kde=True, color=\"olive\", ax=axs[0, 1]) axs[0,1].set_xlim(-10,10) sns.histplot(data=etf_new['fxit_cl_pct'], kde=True, color=\"gold\", ax=axs[1, 0]) axs[1,0].set_xlim(-10,10) sns.histplot(data=etf_new['fxus_cl_pct'], kde=True, color=\"grey\", ax=axs[1, 1]) axs[1,1].set_xlim(-10,10) sns.histplot(data=etf_new['fxru_cl_pct'], kde=True, color=\"teal\", ax=axs[2, 0]) axs[2,0].set_xlim(-10,10) sns.histplot(data=etf_new['fxcn_cl_pct'], kde=True, color=\"brown\", ax=axs[2, 1]) axs[2,1].set_xlim(-10,10)  plt.show()<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<pre><code class=\"python\">etf_new[['fxgd_cl_pct', 'fxrl_cl_pct', 'fxit_cl_pct', 'fxus_cl_pct', 'fxru_cl_pct', 'fxcn_cl_pct']].describe()<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0413\u0438\u0441\u0442\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0435\u0439 \u0446\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432\u043e\u043a\u0440\u0443\u0433 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 etf \u0431\u044b\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0443\u043b\u044f \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0442\u0440\u0435\u043d\u0434\u0435. \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 ETF \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043b\u0435\u0436\u0430\u043b\u0430 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043e\u0442 -2,5 \u0434\u043e 2,5%. \u041d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u2014 FXIT, \u0430 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0443\u044e \u2014 FXRU.<\/p>\n<p><strong>2.\u00a0\u0410\u043d\u0430\u043b\u0438\u0437 \u0442\u0440\u0435\u043d\u0434\u0430<\/strong><\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u00ab\u0422\u0440\u0435\u043d\u0434\u00bb, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u0432\u044b\u0448\u0435.\u00a0\u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043a\u0430\u043a \u0432\u0435\u043b\u0438 \u0441\u0435\u0431\u044f \u0430\u043a\u0446\u0438\u0438 \u0430\u043a\u0446\u0438\u0438ETF \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 3 \u0433\u043e\u0434\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u0440\u0443\u0433\u043e\u0432\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0435\u043a\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0434\u043d\u0435\u0439, \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0440\u0435\u043d\u0434. \u0414\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e groupby() \u0441\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u043c \u0442\u0440\u0435\u043d\u0434\u0430.<\/p>\n<pre><code class=\"python\">def trend(x):   if x > -0.5 and x &lt;= 0.5:     return '\u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043b\u0438 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439'   elif x > 0.5 and x &lt;= 1.5:     return '\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u043e\u0437\u0438\u0442\u0438\u0432'   elif x > -1.5 and x &lt;= -0.5:     return '\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0435\u0433\u0430\u0442\u0438\u0432'   elif x > 1.5 and x &lt;= 2.5:     return '\u041f\u043e\u0437\u0438\u0442\u0438\u0432'   elif x > -2.5 and x &lt;= -1.5:     return '\u041d\u0435\u0433\u0430\u0442\u0438\u0432'   elif x > 2.5 and x &lt;= 5:     return '\u0417\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0437\u0438\u0442\u0438\u0432'   elif x > -5 and x &lt;= -2.5:     return '\u0417\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u0435\u0433\u0430\u0442\u0438\u0432'   elif x > 5:     return '\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0437\u0438\u0442\u0438\u0432'   elif x &lt;= -5:     return '\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0435\u0433\u0430\u0442\u0438\u0432'  for stock in etf_trend.columns[12:]:   etf_trend[\"Trend_\" + str(stock)] = np.zeros(etf_trend[stock].count())   etf_trend[\"Trend_\"+ str(stock)] = etf_trend[stock].apply(lambda x:trend(x))<\/code><\/pre>\n<pre><code class=\"python\">sns.set(style=\"darkgrid\")  fig, axs = plt.subplots(3, 2, figsize=(20,17))  axs[0, 0].pie(etf_trend['Trend_fxgd_cl_pct'].value_counts(), labels = etf_trend['Trend_fxgd_cl_pct'].value_counts().index, autopct=\"%.1f%%\") axs[0, 0].set_title('FXGD')  axs[0, 1].pie(etf_trend['Trend_fxrl_cl_pct'].value_counts(), labels = etf_trend['Trend_fxrl_cl_pct'].value_counts().index, autopct=\"%.1f%%\") axs[0, 1].set_title('FXRL')  axs[1, 0].pie(etf_trend['Trend_fxit_cl_pct'].value_counts(), labels = etf_trend['Trend_fxit_cl_pct'].value_counts().index, autopct=\"%.1f%%\") axs[1, 0].set_title('FXIT')  axs[1, 1].pie(etf_trend['Trend_fxus_cl_pct'].value_counts(), labels = etf_trend['Trend_fxus_cl_pct'].value_counts().index, autopct=\"%.1f%%\") axs[1, 1].set_title('FXUS')  axs[2, 0].pie(etf_trend['Trend_fxru_cl_pct'].value_counts(), labels = etf_trend['Trend_fxru_cl_pct'].value_counts().index, autopct=\"%.1f%%\") axs[2, 0].set_title('FXRU')  axs[2, 1].pie(etf_trend['Trend_fxcn_cl_pct'].value_counts(), labels = etf_trend['Trend_fxcn_cl_pct'].value_counts().index, autopct=\"%.1f%%\") axs[2, 1].set_title('FXCN')  plt.show()<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0430 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0441 2018 \u0433\u043e\u0434\u0430 \u043f\u043e 2020 \u0433\u043e\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 ETF \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c, \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445. \u0422\u0430\u043a \u0436\u0435 \u0432\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u043e\u043d\u0438 \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0431\u044b\u043b\u0438 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u043c\u0438. \u041f\u0440\u0438 \u0431\u043e\u043b\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u2014 \u044d\u0442\u043e \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u043e\u0441\u044c \u043a\u0440\u043e\u043c\u0435 FXRU.<\/p>\n<p><strong>3.\u00a0\u0415\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u0430\u044f \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c \u0438 \u043e\u0431\u044a\u0435\u043c\u044b<\/strong><\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043e\u0431\u044a\u0435\u043c\u0430\u043c\u0438:<\/p>\n<pre><code class=\"python\">sns.set(style=\"darkgrid\")  fig, axs = plt.subplots(6, 1, figsize=(30,35))  axs[0].stem(etf_trend.index[-253:], etf_trend['fxgd_cl_pct'][-253:]) axs[0].plot((etf_trend['fxgd_vol']\/10000)[-253:], color = 'green', alpha = 0.5) axs[0].set_title('FXGD')  axs[1].stem(etf_trend.index[-253:], etf_trend['fxrl_cl_pct'][-253:]) axs[1].plot((etf_trend['fxrl_vol']\/10000)[-253:], color = 'green', alpha = 0.5) axs[1].set_title('FXRL')  axs[2].stem(etf_trend.index[-253:], etf_trend['fxit_cl_pct'][-253:]) axs[2].plot((etf_trend['fxit_vol']\/10000)[-253:], color = 'green', alpha = 0.5) axs[2].set_title('FXIT')  axs[3].stem(etf_trend.index[-253:], etf_trend['fxus_cl_pct'][-253:]) axs[3].plot((etf_trend['fxus_vol']\/10000)[-253:], color = 'green', alpha = 0.5) axs[3].set_title('FXUS')  axs[4].stem(etf_trend.index[-253:], etf_trend['fxru_cl_pct'][-253:]) axs[4].plot((etf_trend['fxru_vol']\/10000)[-253:], color = 'green', alpha = 0.5) axs[4].set_title('FXRU')  axs[5].stem(etf_trend.index[-253:], etf_trend['fxcn_cl_pct'][-253:]) axs[5].plot((etf_trend['fxcn_vol']\/10000)[-253:], color = 'green', alpha = 0.5) axs[5].set_title('FXCN')<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043c \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438(\u0437\u0435\u043b\u0435\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c) \u0441 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c\u044e(\u0441\u0438\u043d\u0438\u043c \u0446\u0432\u0435\u0442\u043e\u043c), \u0431\u044b\u043b\u043e<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-412497","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/412497","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=412497"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/412497\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=412497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=412497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=412497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}