{"id":470014,"date":"2025-08-08T03:00:05","date_gmt":"2025-08-08T03:00:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=470014"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=470014","title":{"rendered":"<span>\u041a\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u044b\u0439 \u0431\u044d\u043a\u0442\u0435\u0441\u0442 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438: \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u0441\u0438\u0433\u043d\u0430\u043b\u044b, \u0441\u0434\u0435\u043b\u043a\u0438 \u0438 \u0432\u044b\u0432\u043e\u0434\u044b \u0432 \u0430\u043b\u0433\u043e\u0442\u0440\u0435\u0439\u0434\u0438\u043d\u0433\u0435<\/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<h3>\ud83d\udcdc \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<blockquote>\n<p>\u0412 \u043c\u0438\u0440\u0435 \u0430\u043b\u0433\u043e\u0442\u0440\u0435\u0439\u0434\u0438\u043d\u0433\u0430 \u043c\u043d\u043e\u0433\u0438\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u044b: \u00ab\u0435\u0441\u043b\u0438 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u2014 \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u043d\u0430 \u043f\u0440\u0438\u0431\u044b\u043b\u044c\u043d\u0430\u00bb. \u0423\u0432\u044b, \u044d\u0442\u043e \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u0435. \u0427\u0442\u043e\u0431\u044b \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u044b\u043b\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u0439, \u043d\u0443\u0436\u043d\u043e \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0431\u044d\u043a\u0442\u0435\u0441\u0442 \u2014 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0438\u043d\u0440\u0435\u0439\u0442\u00bb, \u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438: <strong>Profit Factor, Sharpe Ratio, Max Drawdown<\/strong>, \u0438 \u043b\u0438\u0448\u044c \u043f\u043e\u0442\u043e\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u044b.<\/p>\n<\/blockquote>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, <strong>\u043a\u0430\u043a \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u043f\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c<\/strong>, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b\u044b, \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0434\u0435\u043b\u043a\u0438, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u2014 \u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0442\u043e\u0440\u0433\u043e\u0432\u0430\u0442\u044c \u0435\u0439 \u043d\u0430 \u0431\u0438\u0440\u0436\u0435.<\/p>\n<p>\u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u2014 \u043d\u0430 Python. \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0431\u043e\u0442\u0430 \u0438 \u0431\u0435\u043a\u0442\u0435\u0441\u0442 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0434\u0430\u0451\u0442 \u0441\u0443\u0445\u0438\u0435 \u0441\u0434\u0435\u043b\u043a\u0438 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u0432 %. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u0443\u0431\u044b\u0442\u043e\u0447\u043d\u043e.<\/p>\n<h3>\ud83d\udce6 1. \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 \u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u044b<\/h3>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u0431\u043e\u0442\u0430, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u044b. \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u043b\u043e\u0433\u0438\u043a\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u0435\u043a\u0442\u0435\u0441\u0442\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0438\u043c\u043f\u043e\u0440\u0442\u0430, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442 \u0431\u0438\u0440\u0436\u0438:<\/p>\n<pre><code>from binance.client import Client import pandas as pd  client = Client()<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0432\u0435\u0447\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0430 \u043d\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u0438. \u0412 \u043d\u0430\u0448\u0435\u043c \u0431\u0435\u043a\u0442\u0435\u0441\u0442\u0435 \u0431\u0443\u0434\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c 100000 5\u043c \u0441\u0432\u0435\u0447\u0435\u0439. \u042d\u0442\u043e \u043e\u043a\u043e\u043b\u043e 350 \u0434\u043d\u0435\u0439, \u044d\u0442\u043e\u0433\u043e \u0445\u0432\u0430\u0442\u0438\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043a\u0430\u043b\u044c\u043f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0431\u0438\u043d\u0430\u043d\u0441 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u043e 1500 \u0441\u0432\u0435\u0447\u0435\u0439 \u0437\u0430 \u0440\u0430\u0437, \u0442\u043e \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0441\u0432\u0435\u0447\u0438 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e. <\/p>\n<pre><code>def fetch_klines_paged(symbol='BTCUSDT', interval='5m', total_bars=100000, client=None):     if client is None:         client = Client()      limit = 1000     data = []     end_time = None  # \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0431\u0430\u0440 (\u043d\u043e\u0432\u0435\u0439\u0448\u0430\u044f \u0442\u043e\u0447\u043a\u0430)      while len(data) &lt; total_bars:         bars_to_fetch = min(limit, total_bars - len(data))          try:             klines = client.futures_klines(                 symbol=symbol,                 interval=interval,                 limit=bars_to_fetch,                 endTime=end_time             )         except Exception as e:             print(\"\u041e\u0448\u0438\u0431\u043a\u0430 Binance API:\", e)             break          if not klines:             break          data = klines + data  # prepend! \u2014 \u0441\u0442\u0430\u0440\u044b\u0435 \u0441\u0432\u0435\u0447\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0430\u0447\u0430\u043b\u043e         end_time = klines[0][0] - 1  # \u0441\u0434\u0432\u0438\u0433 \u043d\u0430\u0437\u0430\u0434 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438         time.sleep(0.2)      df = pd.DataFrame(data, columns=[         'timestamp', 'open', 'high', 'low', 'close', 'volume',         'close_time', 'quote_asset_volume', 'number_of_trades',         'taker_buy_base', 'taker_buy_quote', 'ignore'     ])     df['timestamp'] = pd.to_datetime(df['timestamp'], unit='ms')     df[['open','high','low','close','volume']] = df[['open','high','low','close','volume']].astype(float)     df = df.drop_duplicates('timestamp')     df = df.sort_values('timestamp').reset_index(drop=True)     return df<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0435\u0440\u043d\u0435\u0442 \u043d\u0430\u043c dataframe \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u0441\u0432\u0435\u0447\u0430\u043c\u0438, \u0441 \u043d\u0438\u043c \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<h2>2. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430 \u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0431\u0435\u043a\u0442\u0435\u0441\u0442<\/h2>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430:<\/p>\n<pre><code>def check_long_condition(row):     return (         row['CSI'] &gt; 0 and         row['CSI'] &gt; row['CSI_prev'] and         isinstance(row['cluster_id'], str) and row['cluster_id'].startswith('bull') and         row['close'] &gt; row['ema_fast'] &gt; row['ema_slow']         )      def check_short_condition(row):     return (         row['CSI'] &lt; 0 and         row['CSI'] &lt; row['CSI_prev'] and         isinstance(row['cluster_id'], str) and row['cluster_id'].startswith('bear') and         row['close'] &lt; row['ema_fast'] &lt; row['ema_slow']         )<\/code><\/pre>\n<p>\u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u044b\u0435, \u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u0441\u0442\u0430\u0432\u0438\u043b \u0447\u0430\u0441\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0431\u043e\u0442\u0430.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0430\u0448 df (\u043c\u0430\u0441\u0441\u0438\u0432 100000 \u0441\u0432\u0435\u0447\u0435\u0439) \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u043d\u0430\u0448\u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u044b:<\/p>\n<pre><code>if __name__ == \"__main__\":     client = Client()     df = fetch_klines_paged('BTCUSDT', '5m', total_bars=100000, client=client)     print(f\"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043e \u0441\u0432\u0435\u0447\u0435\u0439: {len(df)}\")     df = compute_indicators(df) #\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0438\u0434\u0430  df['RS'] = 1+rs ;  return df<\/code><\/pre>\n<h2>3. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0448\u0443 \u043b\u043e\u0433\u0438\u043a\u0443 \u043a \u0441\u0432\u0435\u0447\u0430\u043c<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0441\u0435 \u0441\u0432\u0435\u0447\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u043d\u0430\u0448\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u044b. \u0420\u0430\u0437\u0434\u0435\u043b\u0438\u043c long \u0438 short \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0431\u044b\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443. \u0422\u0430\u043a\u0436\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0441\u0434\u0435\u043b\u043a\u0438 \u0432 .csv \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432.<\/p>\n<pre><code>    df['long_signal'] = df.apply(check_long_condition, axis=1)     df['short_signal'] = df.apply(check_short_condition, axis=1)      long_signals = df[df['long_signal']]     short_signals = df[df['short_signal']]      # \ud83d\udc47 \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0441\u0434\u0435\u043b\u043a\u0438 \u0432 CSV     long_signals.to_csv('long_signals.csv', sep=';', index=False)     short_signals.to_csv('short_signals.csv', sep=';', index=False)     df.to_csv('all_data.csv', sep=';', index=False)<\/code><\/pre>\n<h3>\ud83e\uddea 4. \u0421\u0438\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u043a\u0438 \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043f\u0440\u0438\u0431\u044b\u043b\u044c<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c: <strong>\u043a\u0430\u043a\u0443\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u0434\u0430\u043b\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u044b<\/strong>. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u043c\u044b \u0432\u0445\u043e\u0434\u0438\u043c \u043f\u043e \u0446\u0435\u043d\u0435 close \u043d\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0432\u0435\u0447\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0447\u0435\u0440\u0435\u0437 3 \u0441\u0432\u0435\u0447\u0438 (\u0442.\u0435. 15 \u043c\u0438\u043d\u0443\u0442 \u0441\u043f\u0443\u0441\u0442\u044f). \u0412\u044b\u0445\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 15\u043c\u0438\u043d\u0443\u0442 \u0431\u044b\u043b \u0432\u044b\u0432\u0435\u0434\u0435\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0447\u0435\u0440\u0435\u0437 5\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u043f\u0443\u0442\u0451\u043c \u0441\u043c\u0435\u043d\u044b \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u0447\u0435\u0440\u0435\u0437 \u0446\u0438\u043a\u043b\u044b.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441\u0447\u0451\u0442\u0430 \u043f\u0440\u043e\u0444\u0438\u0442\u0430:<\/p>\n<pre><code>def calculate_profits(df, signal_col='long_signal', direction='long', exit_after=3):     trades = []     for i in range(len(df) - exit_after):         if df.iloc[i][signal_col]:             entry_price = df.iloc[i]['close']             exit_price = df.iloc[i + exit_after]['close']             if direction == 'long':                 profit = exit_price - entry_price                 profit_pct = (exit_price \/ entry_price - 1) * 100             else:                 profit = entry_price - exit_price                 profit_pct = (entry_price \/ exit_price - 1) * 100             trades.append({                 'entry_time': df.iloc[i]['timestamp'],                 'exit_time': df.iloc[i + exit_after]['timestamp'],                 'entry_price': entry_price,                 'exit_price': exit_price,                 'profit': profit,                 'profit_%': profit_pct                 'close': entry_price  # \u2190 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u044e\u0434\u0430 \u0446\u0435\u043d\u0443 \u0432\u0445\u043e\u0434\u0430             })     return pd.DataFrame(trades) <\/code><\/pre>\n<p>\u0418 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u044d\u0442\u043e \u043a \u043d\u0430\u0448\u0438\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u0430\u043c \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0431\u043b\u043e\u043a\u0435:<\/p>\n<pre><code>long_trades = calculate_profits(df, signal_col='long_signal', direction='long', exit_after=3) short_trades = calculate_profits(df, signal_col='short_signal', direction='short', exit_after=3)  long_trades.to_csv('long_trades.csv', sep=';', index=False) short_trades.to_csv('short_trades.csv', sep=';', index=False)<\/code><\/pre>\n<\/p>\n<h2> \ud83d\udcca 5. \u0410\u043d\u0430\u043b\u0438\u0437 \u043c\u0435\u0442\u0440\u0438\u043a \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438  <\/h2>\n<p>\u0418 \u0432\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u2014 <strong>\u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435<\/strong>: \u043a\u0430\u043a\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u0447\u0442\u043e \u043e\u043d\u0438 \u0437\u043d\u0430\u0447\u0430\u0442?<\/p>\n<h4>\u2705 Win Rate<\/h4>\n<blockquote>\n<p>\u041f\u0440\u043e\u0446\u0435\u043d\u0442 \u043f\u0440\u0438\u0431\u044b\u043b\u044c\u043d\u044b\u0445 \u0441\u0434\u0435\u043b\u043e\u043a: \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0432\u043e\u043e\u0431\u0449\u0435 \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0435\u0442?<\/p>\n<\/blockquote>\n<pre><code>win_rate = len(df[df['profit'] &gt; 0]) \/ len(df) * 100<\/code><\/pre>\n<h4>\u2705 Profit Factor<\/h4>\n<blockquote>\n<p>\u0421\u0443\u043c\u043c\u0430 \u0432\u0441\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \/ \u0441\u0443\u043c\u043c\u0430 \u0432\u0441\u0435\u0445 \u0443\u0431\u044b\u0442\u043a\u043e\u0432. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0432\u044b\u0448\u0435 1.<\/p>\n<\/blockquote>\n<pre><code>profit_factor = df[df['profit'] &gt; 0]['profit'].sum() \/ abs(df[df['profit'] &lt; 0]['profit'].sum())<\/code><\/pre>\n<h4>\u2705 Sharpe Ratio<\/h4>\n<blockquote>\n<p>\u0421\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438: \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u0437\u0430\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c?<\/p>\n<\/blockquote>\n<pre><code>sharpe = df['profit'].mean() \/ df['profit'].std()<\/code><\/pre>\n<h4>\u2705 Max Drawdown<\/h4>\n<blockquote>\n<p>\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0430 \u2014 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0440\u0438\u0441\u043a\u0430.<\/p>\n<\/blockquote>\n<pre><code>equity = df['profit'].cumsum() rolling_max = equity.cummax() drawdown = equity - rolling_max max_dd = drawdown.min()<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0435\u043b\u044c\u0442\u044b \u0438 \u043f\u0440\u043e\u0444\u0438\u0442\u0430:<\/p>\n<pre><code>    total_profit = trades_df['profit'].sum()     avg_price = trades_df['close'].mean()     delta = total_profit \/ avg_price if avg_price != 0 else float('nan')<\/code><\/pre>\n<h4>\u2705 \u0412\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430:<\/p>\n<pre><code>def analyze_trades(trades_df):     if trades_df.empty:         print(\"\u041d\u0435\u0442 \u0441\u0434\u0435\u043b\u043e\u043a \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430.\")         return      win_trades = trades_df[trades_df['profit'] &gt; 0]     loss_trades = trades_df[trades_df['profit'] &lt;= 0]      win_rate = len(win_trades) \/ len(trades_df) * 100     profit_factor = win_trades['profit'].sum() \/ abs(loss_trades['profit'].sum()) if not loss_trades.empty else float('inf')      # Sharpe Ratio (annualized)     daily_returns = trades_df['profit']     mean_return = daily_returns.mean()     std_return = daily_returns.std()     sharpe_daily = mean_return \/ std_return if std_return != 0 else 0     sharpe_annual = sharpe_daily * np.sqrt(252)      # Equity \u0438 \u043f\u0440\u043e\u0441\u0430\u0434\u043a\u0430     equity_curve = trades_df['profit'].cumsum()     rolling_max = equity_curve.cummax()     drawdown = equity_curve - rolling_max     max_drawdown = drawdown.min()      # \u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u043e\u0444\u0438\u0442 \u0438 \u0434\u0435\u043b\u044c\u0442\u0430     total_profit = trades_df['profit'].sum()     avg_price = trades_df['close'].mean()     delta = total_profit \/ avg_price if avg_price != 0 else float('nan')      print(\"\\n\ud83d\udcca \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u0434\u0435\u043b\u043e\u043a:\")     print(f\"\u0412\u0441\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u043e\u043a: {len(trades_df)}\")     print(f\"Win Rate: {win_rate:.2f}%\")     print(f\"Profit Factor: {profit_factor:.2f}\")     print(f\"Sharpe Ratio (annualized): {sharpe_annual:.2f}\")     print(f\"Max Drawdown: {max_drawdown:.2f}\")     print(f\"\ud83d\udcc8 \u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u043e\u0444\u0438\u0442: {total_profit:.2f}\")     print(f\"\u2696\ufe0f \u0414\u0435\u043b\u044c\u0442\u0430 (profit \/ avg BTC): {delta:.4f}\")<\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code>print(\"LONG TRADES:\") analyze_trades(long_trades)  print(\"\\nSHORT TRADES:\") analyze_trades(short_trades)<\/code><\/pre>\n<p>\u0412\u0441\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0434\u0443\u043b\u044c, \u0430 \u0441\u0430\u043c\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u0441\u0434\u0435\u043b\u043a\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 Jupyter, Excel \u0438\u043b\u0438 Python-\u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0435.  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u043c\u043e\u0435\u0433\u043e \u0431\u043e\u0442\u0430:<\/p>\n<p>\ud83d\udcc8 \u0410\u043d\u0430\u043b\u0438\u0437 \u043b\u043e\u043d\u0433-\u0441\u0434\u0435\u043b\u043e\u043a:<\/p>\n<p>\ud83d\udcca \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u0434\u0435\u043b\u043e\u043a:<br \/> \u0412\u0441\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u043e\u043a: 417<br \/> Win Rate: 76.98%<br \/> Profit Factor: 6.89<br \/> Sharpe Ratio (annualized): 3.13<br \/> Max Drawdown: -1313.60<br \/> \ud83d\udcc8 \u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u043e\u0444\u0438\u0442: 98254.50<br \/> \u2696\ufe0f \u0414\u0435\u043b\u044c\u0442\u0430 (profit \/ avg BTC): 1.1034<\/p>\n<p>\ud83d\udcc9 \u0410\u043d\u0430\u043b\u0438\u0437 \u0448\u043e\u0440\u0442-\u0441\u0434\u0435\u043b\u043e\u043a:<\/p>\n<p>\ud83d\udcca \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u0434\u0435\u043b\u043e\u043a:<br \/> \u0412\u0441\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u043e\u043a: 336<br \/> Win Rate: 75.00%<br \/> Profit Factor: 8.02<br \/> Sharpe Ratio (annualized): 3.09<br \/> Max Drawdown: -1442.50<br \/> \ud83d\udcc8 \u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u043e\u0444\u0438\u0442: 86625.40<br \/> \u2696\ufe0f \u0414\u0435\u043b\u044c\u0442\u0430 (profit \/ avg BTC): 0.9710<\/p>\n<p> \u0412\u0441\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u043e\u043a: 753 (417 \u043b\u043e\u043d\u0433\u043e\u0432 + 336 \u0448\u043e\u0440\u0442\u043e\u0432)  <\/p>\n<h2> \u0420\u0430\u0437\u0431\u043e\u0440 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439  <\/h2>\n<h4>1. Win Rate: \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432<\/h4>\n<p>Win Rate \u043e\u043a\u043e\u043b\u043e 75% \u2014 \u043e\u0447\u0435\u043d\u044c \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c. \u042d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 \u0441\u0434\u0435\u043b\u043e\u043a \u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u0438. \u0412\u044b\u0445\u043e\u0434 \u043d\u0430 \u043e\u0434\u043d\u0443 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043c\u0435\u043d\u044c\u0448\u0435, \u043d\u043e \u0438 \u0432\u0438\u043d\u0440\u0435\u0439\u0442 \u043e\u0447\u0435\u043d\u044c \u0432\u044b\u0441\u043e\u043a. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0432\u0445\u043e\u0434\u043e\u0432 \u0437\u0434\u0435\u0441\u044c \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0436\u0451\u0441\u0442\u043a\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044e \u0440\u0438\u0441\u043a\u0430.<\/p>\n<h4>2. Profit Factor (PF): \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u043a \u0443\u0431\u044b\u0442\u043a\u0430\u043c<\/h4>\n<p>PF = 6.89 (\u043b\u043e\u043d\u0433) \u0438 8.02 (\u0448\u043e\u0440\u0442) \u2014 \u043e\u0447\u0435\u043d\u044c \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0412 \u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u0438 PF &gt; 2 \u0443\u0436\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u043c. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u043a\u043e\u043b\u043e 7\u20138 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u0442 \u043f\u043e\u0447\u0442\u0438 \u0432 7\u20138 \u0440\u0430\u0437 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0443\u0431\u044b\u0442\u043a\u0438.<\/p>\n<blockquote>\n<p><strong>\u0412\u044b\u0432\u043e\u0434:<\/strong> \u0412\u044b\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0438\u0441\u0446\u0438\u043f\u043b\u0438\u043d\u0430 \u043f\u043e \u0441\u0442\u043e\u043f-\u043b\u043e\u0441\u0441\u0430\u043c \u0438 \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0446\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u0442\u0435\u0439\u043a-\u043f\u0440\u043e\u0444\u0438\u0442\u043e\u0432. <\/p>\n<\/blockquote>\n<h4>3. Sharpe Ratio: \u0440\u0438\u0441\u043a \u0438 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c<\/h4>\n<p>Sharpe Ratio \u043e\u043a\u043e\u043b\u043e 3\u2014 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043e\u0431\u044b\u0447\u043d\u043e \u0444\u043e\u043d\u0434\u043e\u0432\u044b\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0438\u043c\u0435\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 1\u20132, \u0430 3\u20134 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u043c\u0438. \u0412\u044b\u0441\u043e\u043a\u0438\u0439 Sharpe \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u043d\u0438\u0437\u043a\u043e\u0439 \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u0445\u043e\u0434\u0430 \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<blockquote>\n<p><strong>\u0427\u0442\u043e \u0432\u0430\u0436\u043d\u043e:<\/strong> \u0414\u043b\u044f \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0433\u043e \u0440\u044b\u043d\u043a\u0430 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u044d\u0442\u043e \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b, \u0447\u0442\u043e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0438\u0441\u043a\u0430\u043c\u0438.<\/p>\n<\/blockquote>\n<h4>4. Max Drawdown: \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0435\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0430<\/h4>\n<p>\u0414\u0440\u043e\u0432\u0434\u0430\u0443\u043d \u0432 \u0440\u0430\u0439\u043e\u043d\u0435 1300\u20131400 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u0435\u0434\u0438\u043d\u0438\u0446. \u042d\u0442\u043e \u043c\u0435\u043d\u0435\u0435 2% \u0447\u0438\u0441\u0442\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e, \u0442\u043e\u0435\u0441\u0442\u044c 20% \u043d\u0430 \u0432\u0441\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0441 \u043f\u043b\u0435\u0447\u043e\u043c. (\u0422.\u043a. \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0446\u0435\u043d\u0430 \u0431\u0438\u0442\u043a\u043e\u0439\u043d\u0430 \u043e\u043a\u043e\u043b\u043e 80\u043a). \u042d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0442\u0441. <\/p>\n<h3>\u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u043e\u0444\u0438\u0442 \u0438 \u0434\u0435\u043b\u044c\u0442\u0430<\/h3>\n<ul>\n<li>\n<p>\u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u043e\u0444\u0438\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 98 000 \u0434\u043b\u044f \u043b\u043e\u043d\u0433\u0430 \u0438 86 000 \u0434\u043b\u044f \u0448\u043e\u0440\u0442\u0430 \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u043b\u044c\u0442\u0430 (profit \/ avg BTC) \u043e\u043a\u043e\u043b\u043e 1 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u2014 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u0435\u0434\u0438\u043d\u0438\u0446\u0443 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0430\u043a\u0442\u0438\u0432\u0430 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0443\u044e \u0436\u0435 \u0441\u0443\u043c\u043c\u0443 \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u0447\u0442\u043e \u0441\u0432\u0438\u0434\u0435\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443\u0435\u0442 \u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u0438. \u041d\u043e \u043d\u0435 \u043d\u0430\u0434\u043e \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u0438\u0434\u0451\u0442 \u043d\u0430 \u043f\u043e\u043b\u043d\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043b\u043e\u0436\u0438\u0432 100$ \u0432\u044b\u0445\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 1000$ (\u043d\u0430 \u0431\u0430\u0439\u0431\u0438\u0442 \u0444\u0438\u043a\u0441. \u043f\u043b\u0435\u0447\u043e 10\u0445). <\/p>\n<\/li>\n<\/ul>\n<h2>\u041a\u043e\u043c\u0438\u0441\u0441\u0438\u0438<\/h2>\n<p>\u0427\u0430\u0441\u0442\u044c \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043c\u0438\u0441\u0438\u0439 \u0438 \u043f\u0440\u043e\u0441\u043a\u0430\u043b\u044c\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438. \u041d\u043e \u0432 HTF \u0438 \u0441\u043a\u0430\u043b\u044c\u043f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u043d\u0438\u043a\u0443\u0434\u0430. \u041f\u043e\u043a\u0430\u0436\u0443 \u0430\u043d\u0430\u043b\u0438\u0437 \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438:<\/p>\n<p><strong>\ud83d\udccc \u0423\u0441\u043b\u043e\u0432\u0438\u044f:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0412\u0445\u043e\u0434\u043d\u043e\u0439 \u043a\u0430\u043f\u0438\u0442\u0430\u043b: <strong>$1,000<\/strong><\/p>\n<\/li>\n<li>\n<p>\u041f\u043b\u0435\u0447\u043e: <strong>10x<\/strong> \u2192 \u0437\u043d\u0430\u0447\u0438\u0442, \u0442\u044b \u0442\u043e\u0440\u0433\u0443\u0435\u0448\u044c \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u0431\u044b <strong>$10,000<\/strong><\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043c\u0438\u0441\u0441\u0438\u044f \u043d\u0430 \u0441\u0434\u0435\u043b\u043a\u0443 (\u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 + \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435): <strong>0.1% = 0.001<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0421\u0434\u0435\u043b\u043e\u043a \u0432\u0441\u0435\u0433\u043e: <strong>753<\/strong><\/p>\n<\/li>\n<\/ul>\n<h3>\ud83d\udd22 \u0420\u0430\u0441\u0447\u0451\u0442:<\/h3>\n<h4>1. \u041e\u0431\u044a\u0451\u043c \u043e\u0434\u043d\u043e\u0439 \u0441\u0434\u0435\u043b\u043a\u0438 (\u0441 \u043f\u043b\u0435\u0447\u043e\u043c):<\/h4>\n<p>1000*10 = 10000 USDT<\/p>\n<h4>2. \u041a\u043e\u043c\u0438\u0441\u0441\u0438\u044f \u0441 \u043e\u0434\u043d\u043e\u0439 \u0441\u0434\u0435\u043b\u043a\u0438:<\/h4>\n<p>10,000\u00d70.1% = 10$<\/p>\n<h4>3. \u041e\u0431\u0449\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f \u0437\u0430 753 \u0441\u0434\u0435\u043b\u043a\u0438:<\/h4>\n<p>10\u00d7753=7530\u00a0USDT<\/p>\n<p>\u0422\u0430\u043a \u0447\u0442\u043e \u0432\u0438\u0434\u0438\u043c \u0447\u0442\u043e \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u044c\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u0431\u044b\u043b\u0438. \u041e\u0442 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0443\u0439\u0442\u0438, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u043e \u0432\u0441\u0451 \u0436\u0435 \u0434\u0430\u0436\u0435 \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u043a\u043e\u043c\u043c\u0438\u0441\u0441\u0438\u0439 \u0432\u0438\u0434\u0438\u043c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 &#8212; 200% \u043f\u0440\u0438\u0431\u044b\u043b\u0438, \u0442.\u0435. 20000$-7530$=12470$ \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \u0437\u0430 \u0433\u043e\u0434 \u0441\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0432\u0441\u0435\u0433\u043e 1000$ \u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044e. (\u0442.\u0435. \u043d\u0430 \u0441\u0447\u0451\u0442\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0445\u043e\u0442\u044f \u0431\u044b \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 2\u043a$, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0440\u0435\u0434\u043a\u043e, \u043d\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0434\u0440\u044f\u0434)<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u043a\u0430\u043a \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. <\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u0442\u043e\u0440\u0433\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u2014 \u0432\u044b\u0441\u043e\u043a\u0438\u0435 Win Rate, Profit Factor \u0438 Sharpe Ratio, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 Max Drawdown. \u042d\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u0443\u0435\u0442 \u043c\u0435\u0436\u0434\u0443 \u0430\u0433\u0440\u0435\u0441\u0441\u0438\u0432\u043d\u043e\u0439 \u0434\u043e\u0445\u043e\u0434\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c \u0440\u0438\u0441\u043a\u0430.<\/p>\n<p>\u0411\u0435\u0437 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435 \u0431\u0435\u043a\u0442\u0435\u0441\u0442\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u0437\u0430\u043f\u0443\u0441\u043a \u0431\u043e\u0442\u043e\u0432 \u043f\u043e \u0442\u0440\u0435\u0439\u0434\u0438\u043d\u0433\u0443 &#8212; \u0447\u0438\u0441\u0442\u043e\u0435 \u043a\u0430\u0437\u0438\u043d\u043e. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0441 \u0443\u043c\u043e\u043c \u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0435 \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/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\/935196\/\"> https:\/\/habr.com\/ru\/articles\/935196\/<\/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<h3>\ud83d\udcdc \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<blockquote>\n<p>\u0412 \u043c\u0438\u0440\u0435 \u0430\u043b\u0433\u043e\u0442\u0440\u0435\u0439\u0434\u0438\u043d\u0433\u0430 \u043c\u043d\u043e\u0433\u0438\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u044b: \u00ab\u0435\u0441\u043b\u0438 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u2014 \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u043d\u0430 \u043f\u0440\u0438\u0431\u044b\u043b\u044c\u043d\u0430\u00bb. \u0423\u0432\u044b, \u044d\u0442\u043e \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u0435. \u0427\u0442\u043e\u0431\u044b \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u044b\u043b\u0430 \u0440\u0430\u0431\u043e\u0447\u0435\u0439, \u043d\u0443\u0436\u043d\u043e \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0431\u044d\u043a\u0442\u0435\u0441\u0442 \u2014 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0438\u043d\u0440\u0435\u0439\u0442\u00bb, \u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438: <strong>Profit Factor, Sharpe Ratio, Max Drawdown<\/strong>, \u0438 \u043b\u0438\u0448\u044c \u043f\u043e\u0442\u043e\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u044b.<\/p>\n<\/blockquote>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, <strong>\u043a\u0430\u043a \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u043f\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c<\/strong>, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b\u044b, \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0434\u0435\u043b\u043a\u0438, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u2014 \u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0442\u043e\u0440\u0433\u043e\u0432\u0430\u0442\u044c \u0435\u0439 \u043d\u0430 \u0431\u0438\u0440\u0436\u0435.<\/p>\n<p>\u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u2014 \u043d\u0430 Python. \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0431\u043e\u0442\u0430 \u0438 \u0431\u0435\u043a\u0442\u0435\u0441\u0442 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0434\u0430\u0451\u0442 \u0441\u0443\u0445\u0438\u0435 \u0441\u0434\u0435\u043b\u043a\u0438 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u0432 %. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u0443\u0431\u044b\u0442\u043e\u0447\u043d\u043e.<\/p>\n<h3>\ud83d\udce6 1. \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 \u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u044b<\/h3>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u0431\u043e\u0442\u0430, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u044b. \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u043b\u043e\u0433\u0438\u043a\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u0435\u043a\u0442\u0435\u0441\u0442\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0438\u043c\u043f\u043e\u0440\u0442\u0430, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442 \u0431\u0438\u0440\u0436\u0438:<\/p>\n<pre><code>from binance.client import Client import pandas as pd  client = Client()<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u0432\u0435\u0447\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0430 \u043d\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u0438. \u0412 \u043d\u0430\u0448\u0435\u043c \u0431\u0435\u043a\u0442\u0435\u0441\u0442\u0435 \u0431\u0443\u0434\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c 100000 5\u043c \u0441\u0432\u0435\u0447\u0435\u0439. \u042d\u0442\u043e \u043e\u043a\u043e\u043b\u043e 350 \u0434\u043d\u0435\u0439, \u044d\u0442\u043e\u0433\u043e \u0445\u0432\u0430\u0442\u0438\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043a\u0430\u043b\u044c\u043f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0431\u0438\u043d\u0430\u043d\u0441 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u043e 1500 \u0441\u0432\u0435\u0447\u0435\u0439 \u0437\u0430 \u0440\u0430\u0437, \u0442\u043e \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0441\u0432\u0435\u0447\u0438 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e. <\/p>\n<pre><code>def fetch_klines_paged(symbol='BTCUSDT', interval='5m', total_bars=100000, client=None):     if client is None:         client = Client()      limit = 1000     data = []     end_time = None  # \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0431\u0430\u0440 (\u043d\u043e\u0432\u0435\u0439\u0448\u0430\u044f \u0442\u043e\u0447\u043a\u0430)      while len(data) &lt; total_bars:         bars_to_fetch = min(limit, total_bars - len(data))          try:             klines = client.futures_klines(                 symbol=symbol,                 interval=interval,                 limit=bars_to_fetch,                 endTime=end_time             )         except Exception as e:             print(\"\u041e\u0448\u0438\u0431\u043a\u0430 Binance API:\", e)             break          if not klines:             break          data = klines + data  # prepend! \u2014 \u0441\u0442\u0430\u0440\u044b\u0435 \u0441\u0432\u0435\u0447\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0430\u0447\u0430\u043b\u043e         end_time = klines[0][0] - 1  # \u0441\u0434\u0432\u0438\u0433 \u043d\u0430\u0437\u0430\u0434 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438         time.sleep(0.2)      df = pd.DataFrame(data, columns=[         'timestamp', 'open', 'high', 'low', 'close', 'volume',         'close_time', 'quote_asset_volume', 'number_of_trades',         'taker_buy_base', 'taker_buy_quote', 'ignore'     ])     df['timestamp'] = pd.to_datetime(df['timestamp'], unit='ms')     df[['open','high','low','close','volume']] = df[['open','high','low','close','volume']].astype(float)     df = df.drop_duplicates('timestamp')     df = df.sort_values('timestamp').reset_index(drop=True)     return df<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0435\u0440\u043d\u0435\u0442 \u043d\u0430\u043c dataframe \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u0441\u0432\u0435\u0447\u0430\u043c\u0438, \u0441 \u043d\u0438\u043c \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<h2>2. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430 \u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0431\u0435\u043a\u0442\u0435\u0441\u0442<\/h2>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430:<\/p>\n<pre><code>def check_long_condition(row):     return (         row['CSI'] &gt; 0 and         row['CSI'] &gt; row['CSI_prev'] and         isinstance(row['cluster_id'], str) and row['cluster_id'].startswith('bull') and         row['close'] &gt; row['ema_fast'] &gt; row['ema_slow']         )      def check_short_condition(row):     return (         row['CSI'] &lt; 0 and         row['CSI'] &lt; row['CSI_prev'] and         isinstance(row['cluster_id'], str) and row['cluster_id'].startswith('bear') and         row['close'] &lt; row['ema_fast'] &lt; row['ema_slow']         )<\/code><\/pre>\n<p>\u041e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u044b\u0435, \u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u0441\u0442\u0430\u0432\u0438\u043b \u0447\u0430\u0441\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0431\u043e\u0442\u0430.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0430\u0448 df (\u043c\u0430\u0441\u0441\u0438\u0432 100000 \u0441\u0432\u0435\u0447\u0435\u0439) \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u043d\u0430\u0448\u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u044b:<\/p>\n<pre><code>if __name__ == \"__main__\":     client = Client()     df = fetch_klines_paged('BTCUSDT', '5m', total_bars=100000, client=client)     print(f\"\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043e \u0441\u0432\u0435\u0447\u0435\u0439: {len(df)}\")     df = compute_indicators(df) #\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0438\u0434\u0430  df['RS'] = 1+rs ;  return df<\/code><\/pre>\n<h2>3. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0448\u0443 \u043b\u043e\u0433\u0438\u043a\u0443 \u043a \u0441\u0432\u0435\u0447\u0430\u043c<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0441\u0435 \u0441\u0432\u0435\u0447\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u043d\u0430\u0448\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u044b. \u0420\u0430\u0437\u0434\u0435\u043b\u0438\u043c long \u0438 short \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0431\u044b\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443. \u0422\u0430\u043a\u0436\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0441\u0434\u0435\u043b\u043a\u0438 \u0432 .csv \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432.<\/p>\n<pre><code>    df['long_signal'] = df.apply(check_long_condition, axis=1)     df['short_signal'] = df.apply(check_short_condition, axis=1)      long_signals = df[df['long_signal']]     short_signals = df[df['short_signal']]      # \ud83d\udc47 \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0441\u0434\u0435\u043b\u043a\u0438 \u0432 CSV     long_signals.to_csv('long_signals.csv', sep=';', index=False)     short_signals.to_csv('short_signals.csv', sep=';', index=False)     df.to_csv('all_data.csv', sep=';', index=False)<\/code><\/pre>\n<h3>\ud83e\uddea 4. \u0421\u0438\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u043a\u0438 \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043f\u0440\u0438\u0431\u044b\u043b\u044c<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c: <strong>\u043a\u0430\u043a\u0443\u044e \u043f\u0440\u0438\u0431\u044b\u043b\u044c \u0434\u0430\u043b\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u044b<\/strong>. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u043c\u044b \u0432\u0445\u043e\u0434\u0438\u043c \u043f\u043e \u0446\u0435\u043d\u0435 close \u043d\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0432\u0435\u0447\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0447\u0435\u0440\u0435\u0437 3 \u0441\u0432\u0435\u0447\u0438 (\u0442.\u0435. 15 \u043c\u0438\u043d\u0443\u0442 \u0441\u043f\u0443\u0441\u0442\u044f). \u0412\u044b\u0445\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 15\u043c\u0438\u043d\u0443\u0442 \u0431\u044b\u043b \u0432\u044b\u0432\u0435\u0434\u0435\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0447\u0435\u0440\u0435\u0437 5\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u043f\u0443\u0442\u0451\u043c \u0441\u043c\u0435\u043d\u044b \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u0447\u0435\u0440\u0435\u0437 \u0446\u0438\u043a\u043b\u044b.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441\u0447\u0451\u0442\u0430 \u043f\u0440\u043e\u0444\u0438\u0442\u0430:<\/p>\n<pre><code>def calculate_profits(df, signal_col='long_signal', direction='long', exit_after=3):     trades = []     for i in range(len(df) - exit_after):         if df.iloc[i][signal_col]:             entry_price = df.iloc[i]['close']             exit_price = df.iloc[i + exit_after]['close']             if direction == 'long':                 profit = exit_price - entry_price                 profit_pct = (exit_price \/ entry_price - 1) * 100             else:                 profit = entry_price - exit_price                 profit_pct = (entry_price \/ exit_price - 1) * 100             trades.append({                 'entry_time': df.iloc[i]['timestamp'],                 'exit_time': df.iloc[i + exit_after]['timestamp'],                 'entry_price': entry_price,                 'exit_price': exit_price,                 'profit': profit,                 'profit_%': profit_pct                 'close': entry_price  # \u2190 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u044e\u0434\u0430 \u0446\u0435\u043d\u0443 \u0432\u0445\u043e\u0434\u0430             })     return pd.DataFrame(trades) <\/code><\/pre>\n<p>\u0418 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u044d\u0442\u043e \u043a \u043d\u0430\u0448\u0438\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u0430\u043c \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0431\u043b\u043e\u043a\u0435:<\/p>\n<pre><code>long_trades = calculate_profits(df, signal_col='long_signal', direction='long', exit_after=3) short_trades = calculate_profits(df, signal_col='short_signal', direction='short', exit_after=3)  long_trades.to_csv('long_trades.csv', sep=';', index=False) short_trades.to_csv('short_trades.csv', sep=';', index=False)<\/code><\/pre>\n<\/p>\n<h2> \ud83d\udcca 5. \u0410\u043d\u0430\u043b\u0438\u0437 \u043c\u0435\u0442\u0440\u0438\u043a \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438  <\/h2>\n<p>\u0418 \u0432\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u2014 <strong>\u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435<\/strong>: \u043a\u0430\u043a\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u0447\u0442\u043e \u043e\u043d\u0438 \u0437\u043d\u0430\u0447\u0430\u0442?<\/p>\n<h4>\u2705 Win Rate<\/h4>\n<blockquote>\n<p>\u041f\u0440\u043e\u0446\u0435\u043d\u0442 \u043f\u0440\u0438\u0431\u044b\u043b\u044c\u043d\u044b\u0445 \u0441\u0434\u0435\u043b\u043e\u043a: \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u0432\u043e\u043e\u0431\u0449\u0435 \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0435\u0442?<\/p>\n<\/blockquote>\n<pre><code>win_rate = len(df[df['profit'] &gt; 0]) \/ len(df) * 100<\/code><\/pre>\n<h4>\u2705 Profit Factor<\/h4>\n<blockquote>\n<p>\u0421\u0443\u043c\u043c\u0430 \u0432\u0441\u0435\u0439 \u043f\u0440\u0438\u0431\u044b\u043b\u0438 \/ \u0441\u0443\u043c\u043c\u0430 \u0432\u0441\u0435\u0445 \u0443\u0431\u044b\u0442\u043a\u043e\u0432. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0432\u044b\u0448\u0435 1.<\/p>\n<\/blockquote>\n<pre><code>profit_factor = df[df['profit'] &gt; 0]['profit'].sum() \/ abs(df[df['profit'] &lt; 0]['profit'].sum())<\/code><\/pre>\n<h4>\u2705 Sharpe Ratio<\/h4>\n<blockquote>\n<p>\u0421\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438: \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e \u0437\u0430\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c?<\/p>\n<\/blockquote>\n<pre><code>sharpe = df['profit'].mean() \/ df['profit'].std()<\/code><\/pre>\n<h4>\u2705 Max Drawdown<\/h4>\n<blockquote>\n<p>\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0430 \u2014 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u0440\u0438\u0441\u043a\u0430.<\/p>\n<\/blockquote>\n<pre><code>equity = df['profit'].cumsum() rolling_max = equity.cummax() drawdown = equity - rolling_max max_dd = drawdown.min()<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0435\u043b\u044c\u0442\u044b \u0438 \u043f\u0440\u043e\u0444\u0438\u0442\u0430:<\/p>\n<pre><code>    total_profit = trades_df['profit'].sum()     avg_price = trades_df['close'].mean()     delta = total_profit \/ avg_price if avg_price != 0 else float('nan')<\/code><\/pre>\n<h4>\u2705 \u0412\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430:<\/p>\n<pre><code>def analyze_trades(trades_df):     if trades_df.empty:         print(\"\u041d\u0435\u0442 \u0441\u0434\u0435\u043b\u043e\u043a \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430.\")         return      win_trades = trades_df[trades_df['profit'] &gt; 0]     loss_trades = trades_df[trades_df['profit'] &lt;= 0]      win_rate = len(win_trades) \/ len(trades_df) * 100     profit_factor = win_trades['profit'].sum() \/ abs(loss_trades['profit'].sum()) if not loss_trades.empty else float('inf')      # Sharpe Ratio (annualized)     daily_returns = trades_df['profit']     mean_return = daily_returns.mean()     std_return = daily_returns.std()     sharpe_daily = mean_return \/ std_return if std_return != 0 else 0     sharpe_annual = sharpe_daily * np.sqrt(252)      # Equity \u0438 \u043f\u0440\u043e\u0441\u0430\u0434\u043a\u0430     equity_curve = trades_df['profit'].cumsum()     rolling_max = equity_curve.cummax()     drawdown = equity_curve - rolling_max     max_drawdown = drawdown.min()      # \u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u043e\u0444\u0438\u0442 \u0438 \u0434\u0435\u043b\u044c\u0442\u0430     total_profit = trades_df['profit'].sum()     avg_price = trades_df['close'].mean()     delta = total_profit \/ avg_price if avg_price != 0 else float('nan')      print(\"\\n\ud83d\udcca \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u0434\u0435\u043b\u043e\u043a:\")     print(f\"\u0412\u0441\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u043e\u043a: {len(trades_df)}\")     print(f\"Win Rate: {win_rate:.2f}%\")     print(f\"Profit Factor: {profit_factor:.2f}\")     print(f\"Sharpe Ratio (annualized): {sharpe_annual:.2f}\")     print(f\"Max Drawdown: {max_drawdown:.2f}\")     print(f\"\ud83d\udcc8 \u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u043e\u0444\u0438\u0442: {total_profit:.2f}\")     print(f\"\u2696\ufe0f \u0414\u0435\u043b\u044c\u0442\u0430 (profit \/ avg BTC): {delta:.4f}\")<\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code>print(\"LONG TRADES:\") analyze_trades(long_trades)  print(\"\\nSHORT TRADES:\") analyze_trades(short_trades)<\/code><\/pre>\n<p>\u0412\u0441\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0434\u0443\u043b\u044c, \u0430 \u0441\u0430\u043c\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u0441\u0434\u0435\u043b\u043a\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 Jupyter, Excel \u0438\u043b\u0438 Python-\u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0435.  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u043c\u043e\u0435\u0433\u043e \u0431\u043e\u0442\u0430:<\/p>\n<p>\ud83d\udcc8 \u0410\u043d\u0430\u043b\u0438\u0437 \u043b\u043e\u043d\u0433-\u0441\u0434\u0435\u043b\u043e\u043a:<\/p>\n<p>\ud83d\udcca \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u0434\u0435\u043b\u043e\u043a:<br \/> \u0412\u0441\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u043e\u043a: 417<br \/> Win Rate: 76.98%<br \/> Profit Factor: 6.89<br \/> Sharpe Ratio (annualized): 3.13<br \/> Max Drawdown: -1313.60<br \/> \ud83d\udcc8 \u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u043e\u0444\u0438\u0442: 98254.50<br \/> \u2696\ufe0f \u0414\u0435\u043b\u044c\u0442\u0430 (profit \/ avg BTC): 1.1034<\/p>\n<p>\ud83d\udcc9 \u0410\u043d\u0430\u043b\u0438\u0437 \u0448\u043e\u0440\u0442-\u0441\u0434\u0435\u043b\u043e\u043a:<\/p>\n<p>\ud83d\udcca \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u0434\u0435\u043b\u043e\u043a:<br \/> \u0412\u0441\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u043e\u043a: 336<br \/> Win Rate: 75.00%<br \/> Profit Factor: 8.02<br \/> Sharpe Ratio (annualized): 3.09<br \/> Max Drawdown: -1442.50<br \/> \ud83d\udcc8 \u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u043e\u0444\u0438\u0442: 86625.40<br \/> \u2696\ufe0f \u0414\u0435\u043b\u044c\u0442\u0430 (profit \/ avg BTC): 0.9710<\/p>\n<p> \u0412\u0441\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u043e\u043a: 753 (417 \u043b\u043e\u043d\u0433\u043e\u0432 + 336 \u0448\u043e\u0440\u0442\u043e\u0432)  <\/p>\n<h2> \u0420\u0430\u0437\u0431\u043e\u0440 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439  <\/h2>\n<h4>1. Win Rate: \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432<\/h4>\n<p>Win Rate \u043e\u043a\u043e\u043b\u043e 75% \u2014 \u043e\u0447\u0435\u043d\u044c \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c. \u042d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 \u0441\u0434\u0435\u043b\u043e\u043a \u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u0438.<\/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-470014","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/470014","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=470014"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/470014\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=470014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=470014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=470014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}