<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>대바보의 끄적끄적</title>
    <link>https://bigstupid.tistory.com/</link>
    <description>개발자의 일상생활</description>
    <language>ko</language>
    <pubDate>Sun, 23 Aug 2026 14:35:19 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>우기!</managingEditor>
    <image>
      <title>대바보의 끄적끄적</title>
      <url>https://tistory1.daumcdn.net/tistory/2769897/attach/9c66241683d342baabf20b0716221260</url>
      <link>https://bigstupid.tistory.com</link>
    </image>
    <item>
      <title>ETF 자동 리밸런싱 5개월차 &amp;mdash; 30만 원 넣었는데 9만 원만 산 이유</title>
      <link>https://bigstupid.tistory.com/214</link>
      <description>&lt;body style=&quot;margin:0; padding:20px; background:#fff;&quot;&gt;
&lt;div style=&quot;max-width:760px; margin:0 auto; font-family:'Pretendard','Apple SD Gothic Neo',sans-serif; color:#222; line-height:1.8; font-size:16px;&quot;&gt;

&lt;!-- 시리즈 연결 --&gt;
&lt;blockquote style=&quot;background:#f0f4ff; border-left:4px solid #4a7cff; padding:12px 16px; margin:20px 0; border-radius:0 8px 8px 0;&quot;&gt;
  이 글은 &lt;strong&gt;ETF 자동 리밸런싱&lt;/strong&gt; 시리즈의 5번째 기록입니다.&lt;br&gt;
  &lt;a href=&quot;https://bigstupid.tistory.com/207&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;첫 글 보기&lt;/a&gt; | &lt;a href=&quot;https://bigstupid.tistory.com/212&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;이전 글 보기&lt;/a&gt;
&lt;/blockquote&gt;

&lt;!-- 도입 --&gt;
&lt;p&gt;4월 이후로 기록을 안 남겼습니다. 봇은 계속 돌고 있었고, 그동안 바뀐 것부터 정리합니다.&lt;/p&gt;

&lt;p&gt;이번 달은 원화 &lt;strong&gt;30만 원&lt;/strong&gt;을 넣었는데 산 건 SCHD 2주, 약 9.6만 원어치가 전부입니다. 나머지는 달러 현금으로 계좌에 그대로 있습니다.&lt;/p&gt;

&lt;p&gt;계좌에 돈이 없어서가 아닙니다. &lt;strong&gt;가장 부족한 종목에 배정된 몫이 1주 값에 못 미쳤습니다.&lt;/strong&gt; 2화에서 겪은 문제가 종목만 바뀌어 그대로 돌아왔습니다.&lt;/p&gt;

&lt;!-- 목차 --&gt;
&lt;div style=&quot;background:#f8f9fa; border-radius:12px; padding:20px 28px; margin:36px 0;&quot;&gt;
&lt;p style=&quot;font-weight:700; font-size:15px; margin:0 0 10px; color:#555;&quot;&gt;목차&lt;/p&gt;
&lt;ol style=&quot;margin:0; padding-left:20px; color:#333;&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#s1&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;4월 이후 — 봇은 계속 돌고 있었습니다&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s2&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;리밸런싱 조건을 바꿨습니다 — SIDEWAYS 제거&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s3&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;8월 입금 — 30만 원이 209.78달러&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s4&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;결과: SCHD 2주. 끝.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s5&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;QQQM은 왜 안 샀나&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s6&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;30만 원 넣고 평가액은 3.5만 원&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s7&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;5개월차 성적표&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s8&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;다음에 고칠 것&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s9&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;정리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 1 --&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;1. 4월 이후 — 봇은 계속 돌고 있었습니다&lt;/h2&gt;

&lt;p&gt;5월과 6월은 기록을 남기지 못했습니다. 조회 화면에 남아 있는 매수 이력은 7월 15일 SCHD 5주와 8월 6일 SCHD 2주 둘뿐입니다. &lt;strong&gt;두 달 연속 SCHD만 샀습니다.&lt;/strong&gt;&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:0 8px 0 0;&quot;&gt;값&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;시장 국면&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background:#d4edda; color:#155724; padding:2px 8px; border-radius:4px; font-size:13px;&quot;&gt;BULL&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;입금&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;300,012원 → 209.78달러&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;매수&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;SCHD 2주 @ 33.6399달러 &lt;span style=&quot;background:#d4edda; color:#155724; padding:2px 8px; border-radius:4px; font-size:13px;&quot;&gt;COMPLETED&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;QQQM · TQQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;주문 없음 &lt;span style=&quot;background:#f3f4f6; color:#6b7280; padding:2px 8px; border-radius:4px; font-size:13px;&quot;&gt;SKIPPED&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;평가액 (8/5 → 8/6)&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;4,085,923원 → 4,121,619원 (하루 +35,696원)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;누적 수익률&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px;&quot;&gt;8/5 +20.67% → 8/6 +18.66%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 2 --&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;2. 리밸런싱 조건을 바꿨습니다 — SIDEWAYS 제거&lt;/h2&gt;

&lt;p&gt;원래 국면은 BULL / SIDEWAYS / BEAR 세 개였습니다. 그런데 횡보 구간이 애매하게 잡히는 날이 많았습니다.&lt;/p&gt;

&lt;p&gt;첫 글 이력을 보면 &lt;strong&gt;8일 만에 BEAR → BULL → SIDEWAYS로 국면이 세 번 바뀌었고&lt;/strong&gt;, SIDEWAYS에서 트리거를 못 넘겨 매매가 스킵된 날이 2일 있었습니다. 국면 하나를 더 두는 값을 못 하고 있었습니다. 그래서 뺐습니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;변경 전 (3국면)&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;BULL&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;SIDEWAYS&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center; border-radius:0 8px 0 0;&quot;&gt;BEAR&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TQQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;25%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;20%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;10%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;QQQ(M)&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;35%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;38%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;40%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;SCHD&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;40%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;42%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;50%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;여기에 &lt;strong&gt;TQQQ 비중 기준 상하한 트리거&lt;/strong&gt;를 새로 넣었습니다. TQQQ가 범위 안에 있으면 손대지 않고 넘어갑니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;변경 후 (2국면)&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;TQQQ&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;QQQM&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;SCHD&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;상한 (매도)&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center; border-radius:0 8px 0 0;&quot;&gt;하한 (매수)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background:#d4edda; color:#155724; padding:2px 8px; border-radius:4px; font-size:13px;&quot;&gt;BULL&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;0.25&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;0.35&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;0.40&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;0.35&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;0.15&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px;&quot;&gt;&lt;span style=&quot;background:#f8d7da; color:#721c24; padding:2px 8px; border-radius:4px; font-size:13px;&quot;&gt;BEAR&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;0.10&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;0.40&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;0.50&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;0.20&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;없음&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bPgtL5/dJMcadJQik0/WY6IODkbQCtSkawiKfAwq0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bPgtL5/dJMcadJQik0/WY6IODkbQCtSkawiKfAwq0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bPgtL5/dJMcadJQik0/WY6IODkbQCtSkawiKfAwq0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbPgtL5%2FdJMcadJQik0%2FWY6IODkbQCtSkawiKfAwq0%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;br&gt;&lt;span style=&quot;font-size:13px; color:#6b7280;&quot;&gt;변경 후 조건. 변경 전 화면은 캡처를 못 남겨서 위 표로 대신합니다.&lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 3 --&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;3. 8월 입금 — 30만 원이 209.78달러&lt;/h2&gt;

&lt;p&gt;8월 5일 오전, 원화 &lt;strong&gt;300,012원&lt;/strong&gt;을 &lt;strong&gt;209.78달러&lt;/strong&gt;로 바꿨습니다. 적용환율은 1,430.14원, 우대 60%가 붙었습니다.&lt;/p&gt;

&lt;p&gt;4월에 1,485원이었으니 넉 달 사이 55원 정도 내렸습니다. 환전할 때는 반가운 숫자지만, 이미 달러로 들고 있던 자산의 원화 환산 가치는 그만큼 깎입니다.&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bC5Nd5/dJMcaf8IJL1/zYLM3GKzRvYXIe77qtdTAk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bC5Nd5/dJMcaf8IJL1/zYLM3GKzRvYXIe77qtdTAk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bC5Nd5/dJMcaf8IJL1/zYLM3GKzRvYXIe77qtdTAk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbC5Nd5%2FdJMcaf8IJL1%2FzYLM3GKzRvYXIe77qtdTAk%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;br&gt;&lt;span style=&quot;font-size:13px; color:#6b7280;&quot;&gt;30만 원 환전, 적용환율 1,430.14원&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;환전 직후 원화 출금가능액은 &lt;strong&gt;12원&lt;/strong&gt;, 달러는 기존에 남아 있던 145.45달러까지 합쳐 주문가능 &lt;strong&gt;353.27달러&lt;/strong&gt;가 됐습니다.&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/ctjv0I/dJMcaiEuDue/1h9j8bk5iVoDEkq3VGUtH1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/ctjv0I/dJMcaiEuDue/1h9j8bk5iVoDEkq3VGUtH1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/ctjv0I/dJMcaiEuDue/1h9j8bk5iVoDEkq3VGUtH1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fctjv0I%2FdJMcaiEuDue%2F1h9j8bk5iVoDEkq3VGUtH1%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;br&gt;&lt;span style=&quot;font-size:13px; color:#6b7280;&quot;&gt;주문가능 353.27달러. 이 숫자를 기억해두시죠.&lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 4 --&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;4. 결과: SCHD 2주. 끝.&lt;/h2&gt;

&lt;p&gt;다음 날 새벽 4시 30분 13초, 봇이 주문을 넣었습니다. 체결 내역은 한 줄입니다.&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/b1cLP6/dJMcabeaxF6/gB3nepExbv4KQv2qHqI8yK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/b1cLP6/dJMcabeaxF6/gB3nepExbv4KQv2qHqI8yK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/b1cLP6/dJMcabeaxF6/gB3nepExbv4KQv2qHqI8yK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fb1cLP6%2FdJMcabeaxF6%2FgB3nepExbv4KQv2qHqI8yK%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;br&gt;&lt;span style=&quot;font-size:13px; color:#6b7280;&quot;&gt;7월 SCHD 5주, 8월 SCHD 2주. 두 달 다 SCHD만.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;33.6399달러 × 2주 = &lt;strong&gt;67.28달러&lt;/strong&gt;, 약 96,200원입니다. 달러 흐름은 아래와 같습니다. 표의 숫자는 전부 &lt;strong&gt;환전가능 달러&lt;/strong&gt; 기준입니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;단계&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;환전가능 달러&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;기존 보유&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;145.45&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;8월 환전분&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;+209.78&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;환전 후 합계&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;355.22&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;SCHD 2주 매수&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626;&quot;&gt;-67.28&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;매수 후 잔여 (계산상)&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;287.94&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:700;&quot;&gt;매수 후 잔여 (실제 잔고)&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:700;&quot;&gt;287.78&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;계산상 287.94달러가 남아야 하는데 실제는 287.78달러입니다. 차이 0.16달러는 거래 수수료로 &lt;strong&gt;추정&lt;/strong&gt;합니다.&lt;/p&gt;

&lt;p&gt;하나 더 밝혀둘 게 있습니다. 이 표는 &lt;strong&gt;환전가능&lt;/strong&gt; 달러이고, 아래에서 쓰는 &lt;strong&gt;주문가능&lt;/strong&gt; 353.27달러·286.20달러는 다른 계열입니다. 같은 시점인데 환전가능 355.22 대 주문가능 353.27, 환전가능 287.78 대 주문가능 286.20으로 각각 1.95달러·1.58달러가 벌어집니다. 두 계열을 나란히 놓고 빼면 아무 데서도 안 맞으니, 어느 쪽 기준인지 보고 읽어주시죠. 벌어진 폭이 왜 다른지는 아직 &lt;strong&gt;확인이 필요합니다.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote style=&quot;background:#fff3cd; border-left:4px solid #856d0c; padding:12px 16px; margin:20px 0; border-radius:0 8px 8px 0; color:#856d0c;&quot;&gt;
환전한 209.78달러 중 실제로 쓴 건 67.28달러. &lt;strong&gt;32%만 주식이 됐고 142.5달러는 현금으로 남았습니다.&lt;/strong&gt;
&lt;/blockquote&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 5 --&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;5. QQQM은 왜 안 샀나&lt;/h2&gt;

&lt;p&gt;현금까지 넣어 비중을 다시 계산했습니다. 남은 287.78달러는 411,540원, 총액은 4,533,159원입니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;자산&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;현재 비중&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;목표 (BULL)&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center; border-radius:0 8px 0 0;&quot;&gt;편차&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;SCHD&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;40.18%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;40%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;+0.18%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;QQQM&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;27.85%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;35%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb; color:#dc2626; font-weight:700;&quot;&gt;-7.15%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TQQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;22.89%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;25%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;-2.11%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;현금&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;9.08%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;—&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;QQQM이 가장 많이 모자랍니다. 그런데 QQQM 1주는 420,815원, 약 &lt;strong&gt;294달러&lt;/strong&gt;입니다.&lt;/p&gt;

&lt;p&gt;처음엔 이렇게 생각했습니다. 매수 시점 주문가능 달러가 353.27달러였으니 &lt;strong&gt;살 돈은 있었는데 안 샀다&lt;/strong&gt;고요. 가장 부족한 종목을 살 수 있는 상태에서 건너뛴 셈이니 설계 결함이라고 봤습니다.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;그게 틀렸습니다.&lt;/strong&gt; 증권사 거래내역을 뽑아보고 나서야 알았습니다.&lt;/p&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;전체 잔액이 아니라 몫으로 삽니다&lt;/h3&gt;

&lt;p&gt;봇은 남은 달러를 한 종목에 몰아넣지 않습니다. &lt;strong&gt;이번 달 환전액을 목표 비중대로 먼저 쪼갠 뒤&lt;/strong&gt;, 그 몫으로 살 수 있는 정수 주수만 삽니다.&lt;/p&gt;

&lt;p&gt;8월 환전액 209.77달러를 BULL 목표 비중(25 / 35 / 40)으로 나눠봤습니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;종목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;배분액&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;1주 가격&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;살 수 있는 수량&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;실제&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TQQQ&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$52.44&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$72.03&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;0.73 → 0주&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;0주&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;QQQM&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$73.42&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$294.26&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;0.25 → 0주&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;0주&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;SCHD&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;$83.91&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;$33.6399&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;2.49 → 2주&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:700; color:#4a7cff;&quot;&gt;2주&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;세 종목 다 맞습니다. 우연이라기엔 너무 딱 떨어집니다.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;QQQM 몫은 73.42달러입니다. 1주가 294.26달러니까 네 배가 필요합니다.&lt;/strong&gt; 잔액이 353달러 있어도 소용없습니다. 그건 QQQM 몫이 아니니까요.&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/FDdjE/dJMcadbZdDN/KjydJ1mqKksWH9MdtVcUmk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/FDdjE/dJMcadbZdDN/KjydJ1mqKksWH9MdtVcUmk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/FDdjE/dJMcadbZdDN/KjydJ1mqKksWH9MdtVcUmk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FFDdjE%2FdJMcadbZdDN%2FKjydJ1mqKksWH9MdtVcUmk%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;br&gt;&lt;span style=&quot;font-size:13px; color:#6b7280;&quot;&gt;증권사 거래내역. 7월도 8월도 SCHD만 찍혀 있습니다.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;다만 &lt;strong&gt;봇 로그를 직접 본 건 아닙니다.&lt;/strong&gt; 7월치로 같은 계산을 해보면 SCHD 2주가 나오는데 실제로는 5주를 샀습니다. 그달 종목별 평가액이 안 남아 있어 왜 다른지 확인이 안 됩니다. 그래서 &quot;로직이 이렇다&quot;가 아니라 &lt;strong&gt;&quot;8월 결과와 정확히 맞아떨어지는 계산&quot;&lt;/strong&gt;까지만 적어둡니다.&lt;/p&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;2화와 같은 문제였습니다&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://bigstupid.tistory.com/209&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;2화에서 다뤘던 QQQ 문제&lt;/a&gt;와 다른 얘기인 줄 알았습니다. 그때는 QQQ 1주가 603달러인데 배정액이 557달러라 못 샀습니다.&lt;/p&gt;

&lt;p&gt;이번은 QQQM 1주 294달러에 배정액 73달러입니다. &lt;strong&gt;숫자만 작아졌지 구조가 똑같습니다.&lt;/strong&gt; 1주 값이 월 배정액보다 크면 영영 못 삽니다. QQQ를 QQQM으로 바꿔서 해결했다고 생각했는데, 입금액이 그대로면 같은 벽에 다시 부딪힙니다.&lt;/p&gt;

&lt;p&gt;고칠 방법은 셋 중 하나입니다. 입금액을 늘리거나, QQQM 몫이 1주를 넘길 때까지 현금으로 쌓아두거나, 더 싼 나스닥 ETF로 갈아타거나. 세 번째는 이미 한 번 했고 또 하면 끝이 없습니다.&lt;/p&gt;
&lt;p&gt;비중과 필요 수량을 손으로 다시 맞춰볼 때는 &lt;a href=&quot;https://cryptotoolbox.io/portfolio-rebalancing-calculator&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;포트폴리오 리밸런싱 계산기&lt;/a&gt;를 씁니다. 목표 비율과 현재 평가액을 넣으면 종목별 매매 수량이 나와서, 봇이 낸 답과 대조하기 편합니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 6 --&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;6. 30만 원 넣고 평가액은 3.5만 원&lt;/h2&gt;

&lt;p&gt;더 씁쓸한 건 이쪽입니다. 8월 5일 4,085,923원, 매수까지 끝낸 다음 날이 4,121,619원. &lt;strong&gt;차이는 35,696원입니다.&lt;/strong&gt; 수익률로 보면 +20.67%에서 +18.66%로 내려앉았습니다.&lt;/p&gt;

&lt;p&gt;주식으로 96,200원어치를 새로 넣었으니 산술적으로는 그만큼 늘었어야 합니다. 모자란 6만 원은 하루 사이 주가가 빠진 몫입니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;종목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;변화&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:0 8px 0 0;&quot;&gt;수익률&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TQQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626; font-weight:700;&quot;&gt;-30,755원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;+55.64% → +51.52%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;SCHD&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626;&quot;&gt;-15,255원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;2주 매수분 보정 후&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;QQQM&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626;&quot;&gt;-14,495원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;+15.70% → +14.66%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:700;&quot;&gt;합계&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:700;&quot;&gt;-60,505원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px;&quot;&gt;96,200 - 60,505 ≒ 35,696&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;눈에 띄는 건 TQQQ입니다. 평가금액이 셋 중 가장 작은데 하락분은 가장 큽니다. &lt;strong&gt;3배 레버리지는 내려갈 때도 3배입니다.&lt;/strong&gt;&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 7 --&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;7. 5개월차 성적표&lt;/h2&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/cUQom0/dJMcafVkVm9/qwPLvsOMSnZoji674ISctK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/cUQom0/dJMcafVkVm9/qwPLvsOMSnZoji674ISctK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/cUQom0/dJMcafVkVm9/qwPLvsOMSnZoji674ISctK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcUQom0%2FdJMcafVkVm9%2FqwPLvsOMSnZoji674ISctK%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;br&gt;&lt;span style=&quot;font-size:13px; color:#6b7280;&quot;&gt;8월 6일 기준 보유 현황&lt;/span&gt;&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;종목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;수량&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;평가금액&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;평가손익&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;수익률&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;SCHD&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;38주&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;1,821,350원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;+133,770원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;+7.93%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;QQQM&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;3주&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;1,262,444원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;+161,402원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;+14.66%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TQQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;10주&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;1,037,824원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;+352,874원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; font-weight:700;&quot;&gt;+51.52%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:700;&quot;&gt;합계&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;—&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:700;&quot;&gt;4,121,619원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:700;&quot;&gt;+648,047원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:700;&quot;&gt;+18.66%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;a href=&quot;https://bigstupid.tistory.com/212&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;4월 리뷰&lt;/a&gt;가 +7.33%였으니 넉 달 사이 숫자는 올라왔습니다. 다만 성과라고 부르기는 좀 그렇습니다. &lt;strong&gt;+648,047원 중 352,874원, 절반 이상이 TQQQ 한 종목에서 나왔습니다.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;비중 40%인 SCHD가 +7.93%인 게 이 계좌의 실제 체력에 더 가깝습니다. TQQQ가 반대로 돌면 이 성적표는 그날로 뒤집힙니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;회차&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;평가액&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;수익률&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;누적 입금&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:0 8px 0 0;&quot;&gt;비고&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;2026-04&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$2,467.87&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;+7.33%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;약 350만 원 (6회)&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;환율 1,485원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;2026-05 ~ 07&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;—&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;—&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;기록 없음&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;5·6월 기록 없음 / 7월 SCHD 5주&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;2026-08&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:600;&quot;&gt;4,121,619원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:600;&quot;&gt;+18.66%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:600;&quot;&gt;이번 회차 300,012원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px;&quot;&gt;환율 1,430.14원 / SCHD 2주&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 8 --&gt;
&lt;h2 id=&quot;s8&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;8. 다음에 고칠 것&lt;/h2&gt;

&lt;p&gt;배분 계산은 거래내역으로 맞춰봤지만 로그를 직접 본 건 아직입니다. 그것부터 확인하고, 그다음은 이렇게 손볼 생각입니다.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;못 산 몫을 버리지 말고 쌓아두기.&lt;/strong&gt; 지금은 QQQM 몫 73달러가 1주에 못 미치면 그냥 지나갑니다. 다음 달로 넘겨서 쌓으면 넉 달째에 1주가 됩니다. 이게 제일 급합니다.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;현금 9.08%를 방치하지 않기.&lt;/strong&gt; 지금 봇은 현금을 자산으로 안 보는 것 같습니다. 40만 원이 놀고 있어도 비중 계산에 안 잡힙니다. 위와 같은 얘기이기도 합니다.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;입금분 배분과 리밸런싱을 분리해서 기록 남기기.&lt;/strong&gt; 어느 쪽이 SCHD 2주를 결정했는지 알림만 봐서는 구분이 안 됐습니다. 이번엔 증권사 거래내역을 뽑아서야 알았습니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 9 --&gt;
&lt;h2 id=&quot;s9&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;9. 정리&lt;/h2&gt;

&lt;p&gt;조건을 손본 달에 조건 얘기가 아닌 문제가 나왔습니다. 국면을 줄인 건 이번 결과와 상관이 없었습니다.&lt;/p&gt;

&lt;blockquote style=&quot;background:#f0f4ff; border-left:4px solid #4a7cff; padding:12px 16px; margin:20px 0; border-radius:0 8px 8px 0;&quot;&gt;
정리하면: 30만 원 입금 → 209.78달러 환전 → SCHD 2주(67.28달러)만 매수 → 142.5달러 현금 잔류.&lt;br&gt;
QQQM 몫은 73.42달러였고 1주는 294.26달러였습니다. 2화와 같은 벽입니다.
&lt;/blockquote&gt;

&lt;p&gt;자동매매에서 제일 무서운 건 봇이 에러를 뱉는 상황이 아닙니다. 아무 문제 없이 조용히 돌면서 엉뚱한 답을 내는 쪽입니다. 이번 달이 딱 그랬고, 텔레그램에는 아무 경고도 안 왔습니다.&lt;/p&gt;

&lt;p&gt;더 무서운 건 제가 그 답을 잘못 읽었다는 겁니다. 잔액만 보고 &quot;살 수 있었는데 안 샀다&quot;고 결론냈다가, 거래내역을 뽑고 나서야 &lt;strong&gt;애초에 못 사는 구조&lt;/strong&gt;였다는 걸 알았습니다. 화면 하나만 보고 판단하면 이렇게 됩니다.&lt;/p&gt;

&lt;p&gt;다음 달에도 이 숫자와 비교하겠습니다.&lt;/p&gt;

&lt;!-- 면책고지 --&gt;
&lt;div style=&quot;background:#fff8e1; border:1px solid #ffe082; border-radius:8px; padding:14px 18px; margin:24px 0; font-size:14px; color:#856d0c;&quot;&gt;
⚠️ 본 글에서 소개하는 도구와 전략은 정보 제공 목적이며, 투자 권유가 아닙니다. 암호화폐/ETF 투자는 원금 손실 위험이 있으므로 투자 결정 전 충분한 검토를 권장합니다.
&lt;/div&gt;

&lt;!-- 태그 --&gt;
&lt;p style=&quot;font-size:14px; color:#6b7280; margin:24px 0 0;&quot;&gt;#ETF #TQQQ #QQQM #SCHD #자동리밸런싱 #자동매매 #한국투자증권 #KISAPI #DCA #해외주식 #적립식투자&lt;/p&gt;

&lt;/div&gt;
&lt;/body&gt;</description>
      <category>투자 일지/ETF 자동 리밸런싱</category>
      <author>우기!</author>
      <guid isPermaLink="true">https://bigstupid.tistory.com/214</guid>
      <comments>https://bigstupid.tistory.com/214#entry214comment</comments>
      <pubDate>Fri, 21 Aug 2026 11:28:36 +0900</pubDate>
    </item>
    <item>
      <title>코인 자동 리밸런싱 5개월 &amp;mdash; 현금이 비었고, 하루 뒤 다시 찼습니다</title>
      <link>https://bigstupid.tistory.com/213</link>
      <description>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;ko&quot;&gt;
&lt;head&gt;
&lt;meta charset=&quot;UTF-8&quot;&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
&lt;title&gt;코인 자동 리밸런싱 5개월 — 현금이 비었고, 하루 뒤 다시 찼습니다&lt;/title&gt;
&lt;/head&gt;
&lt;body style=&quot;margin:0; padding:20px; background:#fff;&quot;&gt;
&lt;div style=&quot;max-width:760px; margin:0 auto; font-family:'Pretendard','Apple SD Gothic Neo',sans-serif; color:#222; line-height:1.8; font-size:16px;&quot;&gt;

&lt;!-- 시리즈 연결 --&gt;
&lt;blockquote style=&quot;background:#f0f4ff; border-left:4px solid #4a7cff; padding:12px 16px; margin:20px 0; border-radius:0 8px 8px 0;&quot;&gt;
  이 글은 &lt;strong&gt;암호화폐 자동 리밸런싱&lt;/strong&gt; 시리즈의 2번째 기록입니다.&lt;br&gt;
  &lt;a href=&quot;https://bigstupid.tistory.com/206&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;첫 글 보기&lt;/a&gt;
&lt;/blockquote&gt;

&lt;!-- 도입 --&gt;
&lt;p&gt;3월에 12일치를 올려놓고 그대로 손을 놨습니다. 봇은 그동안에도 매달 돌았습니다.&lt;/p&gt;

&lt;p&gt;다섯 달 만에 업비트 계좌를 열었더니 수익률이 &lt;strong&gt;-13.73%&lt;/strong&gt;였습니다. 자랑할 게 없는 회차라 숫자부터 먼저 깔고 갑니다.&lt;/p&gt;

&lt;p&gt;30만 원을 넣었더니 BTC·ETH·XRP 세 종목에 전부 들어갔습니다. 같은 날 굴린 ETF 계좌는 같은 금액으로 한 종목만 샀으니, 집행만 놓고 보면 이쪽이 나은 건 맞습니다.&lt;/p&gt;

&lt;p&gt;그런데 잔고를 남김없이 밀어 넣는 바람에 &lt;strong&gt;현금 비중이 목표의 절반도 안 됩니다.&lt;/strong&gt; 세 종목은 맞췄고 현금 규칙은 어겼습니다.&lt;/p&gt;

&lt;p&gt;그런데 다음 날 계좌를 다시 열었더니 현금 칸이 채워져 있었습니다. 그 얘기는 맨 뒤에 있습니다.&lt;/p&gt;

&lt;!-- 목차 --&gt;
&lt;div style=&quot;background:#f8f9fa; border-radius:12px; padding:20px 28px; margin:36px 0;&quot;&gt;
&lt;p style=&quot;font-weight:700; font-size:15px; margin:0 0 10px; color:#555;&quot;&gt;목차&lt;/p&gt;
&lt;ol style=&quot;margin:0; padding-left:20px; color:#333;&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#s1&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;멈춘 건 기록뿐이었습니다&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s2&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;계좌를 열면 -13.73%가 먼저 보입니다&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s3&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;8월 입금 — 현금이 40만 원이 된 순간&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s4&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;주문은 세 종목 전부 들어갔습니다&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s5&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;잔돈이 안 남는 쪽은 소수점입니다&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s6&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;옆 계좌에서는 정반대가 일어났습니다&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s7&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;잘 나눴다고 돈을 번 건 아닙니다&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s8&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;캡처를 뜨다 걸린 546원&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s9&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;하루 뒤, 현금 칸이 다시 찼습니다&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s10&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;정리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 1 --&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;1. 멈춘 건 기록뿐이었습니다&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://bigstupid.tistory.com/206&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;첫 글&lt;/a&gt;이 3월 16일이었고 그 뒤로 회차를 안 올렸습니다. 입금과 매수는 그 사이에도 계속 있었습니다.&lt;/p&gt;

&lt;p&gt;중간 캡처를 안 떠뒀으니 4~7월을 월별로 쪼갤 방법이 없고, &lt;strong&gt;누적 입금액도 확인이 필요합니다.&lt;/strong&gt; 이번 글은 월간 후기가 아니라 현재 스냅샷입니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 2 --&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;2. 계좌를 열면 -13.73%가 먼저 보입니다&lt;/h2&gt;

&lt;p&gt;8월 6일 매수까지 끝난 시점의 계좌입니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;값&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;총 보유자산&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;2,159,005원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;총 매수&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;2,383,949원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;총 평가&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;2,056,523원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;평가손익&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626; font-weight:700;&quot;&gt;-327,425원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;보유 현금&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;102,482원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;수익률&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:700; color:#dc2626;&quot;&gt;-13.73%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;2,383,949원어치를 사서 지금 2,056,523원입니다. 벌어진 327,425원이 평가손익이고, 현금 102,482원을 더한 게 총 보유자산 2,159,005원입니다.&lt;/p&gt;

&lt;p&gt;이걸 뒤로 미뤄놓고 &quot;이번 달도 잘 굴러갔습니다&quot;로 시작하면 그 뒤에 쓰는 문장이 다 거짓말이 됩니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 3 --&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;3. 8월 입금 — 현금이 40만 원이 된 순간&lt;/h2&gt;

&lt;p&gt;8월 5일 오전 11시 4분, 입금 직전 화면입니다. 현금이 105,739원 있었습니다.&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bbCE9A/dJMcacxk09r/2ark1dmdtUQ42gOeOwxKmK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bbCE9A/dJMcacxk09r/2ark1dmdtUQ42gOeOwxKmK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bbCE9A/dJMcacxk09r/2ark1dmdtUQ42gOeOwxKmK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbbCE9A%2FdJMcacxk09r%2F2ark1dmdtUQ42gOeOwxKmK%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;br&gt;&lt;span style=&quot;font-size:13px; color:#6b7280;&quot;&gt;입금 전. 수익률 -15.46%&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;여기에 30만 원을 넣었습니다. 2분 뒤 현금 405,739원, 총 보유자산 2,164,409원. 수익률은 -15.48%로 사실상 그대로입니다. 현금만 늘고 산 게 없으니까요.&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/L49bq/dJMcajpzgTH/DEDcgkE3UiPSQHZBk6bjSk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/L49bq/dJMcajpzgTH/DEDcgkE3UiPSQHZBk6bjSk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/L49bq/dJMcajpzgTH/DEDcgkE3UiPSQHZBk6bjSk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FL49bq%2FdJMcajpzgTH%2FDEDcgkE3UiPSQHZBk6bjSk%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;br&gt;&lt;span style=&quot;font-size:13px; color:#6b7280;&quot;&gt;입금 후. 현금 비중이 5.7%에서 18.7%로 튀었습니다.&lt;/span&gt;&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;시점&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;보유 KRW&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;총 보유자산&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;평가손익&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;수익률&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;입금 전&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;105,739원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;1,864,915원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;-321,616원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;-15.46%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;입금 후&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;405,739원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;2,164,409원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;-322,122원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;-15.48%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;매수 후&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:600;&quot;&gt;102,482원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:600;&quot;&gt;2,159,005원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:600;&quot;&gt;-327,425원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:700; color:#dc2626;&quot;&gt;-13.73%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;수익률이 -13.73%로 좁혀진 건 시세가 올라서가 아닙니다. 싸게 더 담아 매수평균가가 내려간 몫입니다. 손실 금액 자체는 오히려 늘었습니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 4 --&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;4. 주문은 세 종목 전부 들어갔습니다&lt;/h2&gt;

&lt;p&gt;매수 전후 보유수량 차이로 뽑은 매수 내역입니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;종목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;늘어난 수량&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;매수금액&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;BTC&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;+0.00102450&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;93,961원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;ETH&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;+0.05006618&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;135,429원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;XRP&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;+48.91667877&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;73,766원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:700;&quot;&gt;합계&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;—&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:700;&quot;&gt;303,156원&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;원화도 맞춰봤습니다. 현금은 &lt;strong&gt;303,257원&lt;/strong&gt; 줄었는데 매수금액 증가분은 303,156원. 남는 101원은 수수료로 &lt;strong&gt;추정&lt;/strong&gt;합니다.&lt;/p&gt;

&lt;p&gt;입금액은 30만 원인데 3,257원이 더 나갔습니다. 있던 현금까지 끌어다 배분한 겁니다. 매수 후 현금 비중은 4.7%, 입금 전 5.7%보다도 낮습니다. 이게 뒤에서 문제가 됩니다.&lt;/p&gt;

&lt;p&gt;돌아간 시각은 첫 글에 적어둔 그대로입니다. &lt;strong&gt;매일 오전 9시 자동 체크&lt;/strong&gt;. 입금은 8월 5일 오전 11시 5분이었고, 주문은 다음 날인 &lt;strong&gt;8월 6일 오전 9시&lt;/strong&gt;에 나갔습니다. 넣자마자 사는 게 아니라 다음 체크 때 반영되는 구조입니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 5 --&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;5. 잔돈이 안 남는 쪽은 소수점입니다&lt;/h2&gt;

&lt;p&gt;목표 비율부터 확실히 하고 가겠습니다. 봇 설정 화면 값은 아래와 같습니다.&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/X5EKX/dJMcabd1qv1/9fglgF7KBRL586Je3OzGmk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/X5EKX/dJMcabd1qv1/9fglgF7KBRL586Je3OzGmk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/X5EKX/dJMcabd1qv1/9fglgF7KBRL586Je3OzGmk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FX5EKX%2FdJMcabd1qv1%2F9fglgF7KBRL586Je3OzGmk%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;br&gt;&lt;span style=&quot;font-size:13px; color:#6b7280;&quot;&gt;KRW 10 / BTC 40 / ETH 30 / XRP 20, 합계 100%. &lt;a href=&quot;https://bigstupid.tistory.com/206&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;첫 글 5절&lt;/a&gt;에 적어둔 값과 같습니다.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;코인 셋만 있는 게 아닙니다. &lt;strong&gt;KRW가 10%짜리 칸으로 따로 잡혀 있습니다.&lt;/strong&gt; 여기에 맞춰 현금까지 넣고 계산했습니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;자산&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;입금 전&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;매수 후&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;목표 (설정값)&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center; border-radius:0 8px 0 0;&quot;&gt;차이&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;BTC&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;44.0%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;42.2%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb; color:#6b7280;&quot;&gt;40%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;+2.2%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;ETH&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;30.8%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;33.2%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb; color:#6b7280;&quot;&gt;30%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;+3.2%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;XRP&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;19.6%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;19.9%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb; color:#6b7280;&quot;&gt;20%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;-0.1%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:700;&quot;&gt;KRW (현금)&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;5.7%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; font-weight:700;&quot;&gt;4.7%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; color:#6b7280;&quot;&gt;10%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; color:#dc2626; font-weight:700;&quot;&gt;-5.3%p&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/rBsdR/dJMcadQs1q5/RdsCgJ6KezKWnKrsKQMPrk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/rBsdR/dJMcadQs1q5/RdsCgJ6KezKWnKrsKQMPrk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/rBsdR/dJMcadQs1q5/RdsCgJ6KezKWnKrsKQMPrk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FrBsdR%2FdJMcadQs1q5%2FRdsCgJ6KezKWnKrsKQMPrk%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;br&gt;&lt;span style=&quot;font-size:13px; color:#6b7280;&quot;&gt;점선이 목표 위치. 현금 칸만 주황색으로 한참 못 미칩니다.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;코인 세 종목은 목표에서 3%포인트 안쪽입니다. 소수점 매수 덕입니다. &lt;strong&gt;0.00102450개 단위로도 살 수 있으니&lt;/strong&gt; 배분액이 93,961원이면 그 금액만큼 그대로 체결됩니다. &quot;1개를 살까 말까&quot;를 고민할 일이 없습니다.&lt;/p&gt;

&lt;p&gt;문제는 맨 아랫줄입니다. 현금 목표는 10%인데 지금 4.7%, &lt;strong&gt;-5.3%p&lt;/strong&gt;로 절반도 못 채웠습니다.&lt;/p&gt;

&lt;p&gt;첫 글에 적어둔 규칙이 하나 더 있습니다. 편차가 &lt;strong&gt;5%p 이상이면 자동 매매, 그 아래면 스킵&lt;/strong&gt;. 코인 셋은 전부 그 안쪽인데 현금만 임계값을 넘겼습니다. 비중을 맞추느라 잔고를 밀어 넣다가 현금 칸을 놓친 모양새입니다.&lt;/p&gt;

&lt;blockquote style=&quot;background:#fff3cd; border-left:4px solid #856d0c; padding:12px 16px; margin:20px 0; border-radius:0 8px 8px 0; color:#856d0c;&quot;&gt;
목표 비율은 &lt;strong&gt;결과에서 거꾸로 짚지 않았습니다.&lt;/strong&gt; 설정 화면과 다섯 달 전 첫 글, 두 군데가 같은 값을 보여줍니다. 매수 결과를 보고 목표를 역산하면 무슨 숫자가 나와도 &quot;잘 맞았다&quot;는 결론이 나오니까요.
&lt;/blockquote&gt;

&lt;p&gt;목표 비율과 현재 평가액을 넣고 종목별로 얼마씩 사야 하는지 손으로 맞춰볼 때는 &lt;a href=&quot;https://cryptotoolbox.io/portfolio-rebalancing-calculator&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;포트폴리오 리밸런싱 계산기&lt;/a&gt;를 씁니다. 봇이 낸 금액과 대조해보면 어긋난 곳이 바로 보입니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 6 --&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;6. 옆 계좌에서는 정반대가 일어났습니다&lt;/h2&gt;

&lt;p&gt;같은 달, 같은 사람이, 거의 같은 금액으로 미국 ETF 계좌도 돌렸습니다. 결과는 이렇게 갈렸습니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left;&quot;&gt;ETF (한국투자증권)&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:0 8px 0 0;&quot;&gt;코인 (업비트)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;입금&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;300,012원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;300,000원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;실제 집행&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;SCHD 2주 (약 9.6만 원)&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;BTC·ETH·XRP 3종 전부&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;남은 현금&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;약 40만 원 (비중 9.08%)&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;102,482원 (비중 4.7%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;매수 단위&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px;&quot;&gt;1주 (QQQM 1주 $294)&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px;&quot;&gt;소수점&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;ETF 쪽은 가장 부족한 QQQM을 살 돈이 있었는데도 안 샀습니다. 코인 쪽은 셋에 나눠 담고 잔돈까지 털었습니다. 사람도 입금액도 같은데 결과가 이렇게 갈립니다.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://bigstupid.tistory.com/209&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;ETF 2화에서 다뤘던 문제&lt;/a&gt;가 이 지점입니다. 한 주 가격이 월 입금액에 가까워지면 배분 계산이 아무리 정확해도 주문이 안 나갑니다. 0.7주는 존재하지 않으니까요.&lt;/p&gt;

&lt;p&gt;다만 8월 ETF 회차에서 QQQM을 안 산 원인은 &lt;strong&gt;아직 추정&lt;/strong&gt;입니다. 1주가 294달러까지 내려와 살 돈은 있었는데도 주문이 안 나갔거든요.&lt;/p&gt;

&lt;p&gt;어느 쪽이든 코인 계좌에는 매수 단위라는 벽이 없습니다. 30만 원이든 3만 원이든 비율대로 쪼개집니다.&lt;/p&gt;

&lt;p&gt;그렇다고 코인 쪽이 더 낫다는 얘기는 아닙니다. 자산 성질이 다를 뿐이고, 코인은 대신 현금 규칙을 어겼습니다. 성적표도 코인이 한참 나쁩니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 7 --&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;7. 잘 나눴다고 돈을 번 건 아닙니다&lt;/h2&gt;

&lt;p&gt;비중은 목표 근처로 붙었습니다. 그런데 계좌는 -13.73%입니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;종목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;보유수량&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;평가금액&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;매수평균가&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;수익률&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;BTC&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;0.00998204&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;911,100원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;103,210,300원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;-11.57%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;ETH&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;0.26582877&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;716,142원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;2,998,030원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;-10.14%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;XRP&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;287.93517285&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;428,735원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;1,933.1원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; font-weight:700; color:#dc2626;&quot;&gt;-22.97%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;


&lt;p&gt;가장 아픈 건 XRP입니다. 혼자 &lt;strong&gt;-22.97%&lt;/strong&gt;인데, 10%대에 머무는 나머지 둘과 벌어진 폭이 큽니다. 매수평균가는 2,020.1원에서 1,933.1원으로 내려왔지만 그래도 한참 물려 있습니다.&lt;/p&gt;

&lt;p&gt;매수 직전엔 -25.00%였습니다. 더 담아 2%포인트쯤 올라온 건데, 회복이 아니라 평단을 낮춘 결과입니다. 가격이 그대로여도 사는 만큼 숫자는 좋아지니까요. 그래서 수익률보다 평가손익을 먼저 봅니다. 그쪽은 -321,616원에서 -327,425원으로 나빠졌습니다.&lt;/p&gt;

&lt;p&gt;비중이 잘 맞는 것과 돈을 버는 건 다른 얘기입니다. 리밸런싱은 배분을 관리하는 도구지 손실을 막는 도구가 아닙니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 8 --&gt;
&lt;h2 id=&quot;s8&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;8. 캡처를 뜨다 걸린 546원&lt;/h2&gt;

&lt;p&gt;화면을 맞춰보다가 합계가 안 맞는 걸 발견했습니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;시점&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;종목 합계&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;화면 표시값&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;차이&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;매수 전&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;1,758,315원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;1,759,176원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;861원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px;&quot;&gt;매수 후&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;2,055,977원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;2,056,523원&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;546원&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;요약 화면과 상세 화면을 몇십 초 간격으로 찍었으니 그 사이 시세가 움직인 것으로 &lt;strong&gt;추정&lt;/strong&gt;합니다. 계좌 규모 대비 0.03% 수준이라 결론이 뒤집힐 크기는 아닙니다. 다만 확인 전인 건 확인 전이라고 적어둡니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 9 --&gt;
&lt;h2 id=&quot;s9&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;9. 하루 뒤, 현금 칸이 다시 찼습니다&lt;/h2&gt;

&lt;p&gt;여기까지가 8월 6일 기록입니다. 다음 날 대시보드를 열어봤더니 숫자가 달라져 있었습니다. &lt;strong&gt;마지막 리밸런싱 날짜가 2026. 8. 7.로 찍혀 있습니다.&lt;/strong&gt;&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;자산&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;8/6 매수 후&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;8/7&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;목표&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center; border-radius:0 8px 0 0;&quot;&gt;8/7 편차&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:700;&quot;&gt;KRW (현금)&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;4.7%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb; font-weight:700;&quot;&gt;13.7%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb; color:#6b7280;&quot;&gt;10%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;+3.7%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;BTC&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;42.2%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;40.0%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb; color:#6b7280;&quot;&gt;40%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;-0.0%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;ETH&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;33.2%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb; font-weight:700;&quot;&gt;26.6%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb; color:#6b7280;&quot;&gt;30%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb; color:#dc2626;&quot;&gt;-3.4%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;XRP&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;19.9%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;19.6%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; color:#6b7280;&quot;&gt;20%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;-0.4%p&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/lpvwO/dJMcaiRRW0q/0Z6m59PwPzT5QX44siMJyK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/lpvwO/dJMcaiRRW0q/0Z6m59PwPzT5QX44siMJyK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/lpvwO/dJMcaiRRW0q/0Z6m59PwPzT5QX44siMJyK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FlpvwO%2FdJMcaiRRW0q%2F0Z6m59PwPzT5QX44siMJyK%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;br&gt;&lt;span style=&quot;font-size:13px; color:#6b7280;&quot;&gt;8월 7일 대시보드. Kill Switch OFF, DRY-RUN OFF — 실거래 모드입니다.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;총 자산은 2,159,005원에서 2,152,869원. 금액 변화는 KRW &lt;strong&gt;+193,267원&lt;/strong&gt;, BTC -50,181원, ETH -142,918원, XRP -5,758원입니다.&lt;/p&gt;

&lt;p&gt;앞 절에서 적었듯 규칙은 편차 5%p 이상이면 자동 매매입니다. 8월 6일 현금 편차가 -5.3%p로 그 선을 넘었고, 다음 날 매매가 실제로 일어났습니다. 제가 손댈 필요가 없었습니다.&lt;/p&gt;

&lt;p&gt;봇이 남기는 이력은 지금 제대로 안 쌓이고 있습니다. 그런데 거래소에는 다 남아 있었습니다. 업비트 거래내역을 열어보니 그날 아침 주문이 그대로 찍혀 있습니다.&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/lP2Ed/dJMcaaffECP/CokIxl13Uny22owxEMJhwk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/lP2Ed/dJMcaaffECP/CokIxl13Uny22owxEMJhwk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/lP2Ed/dJMcaaffECP/CokIxl13Uny22owxEMJhwk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FlP2Ed%2FdJMcaaffECP%2FCokIxl13Uny22owxEMJhwk%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;br&gt;&lt;span style=&quot;font-size:13px; color:#6b7280;&quot;&gt;업비트 거래내역. 위쪽 다섯 줄이 8월 7일 매도, 아래 다섯 줄이 8월 6일 매수입니다.&lt;/span&gt;&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:20px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left;&quot;&gt;8월 7일 매도&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;수량&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;단가&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;정산금액&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;ETH&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;0.02664372&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;2,703,000&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;71,981원&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;ETH&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;0.02664372&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;2,703,000&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;71,981원&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;BTC&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;0.00041670&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;91,299,000&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;38,025원&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;BTC&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;0.00006879&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;91,299,000&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;6,277원&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;BTC&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;0.00005479&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;91,299,000&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;4,999원&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa; font-weight:700;&quot;&gt;&lt;td style=&quot;padding:10px 14px;&quot;&gt;합계&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;—&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;—&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;193,263원&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;ETH를 0.05328744개, BTC를 0.00054028개 팔았습니다.&lt;/strong&gt; 정산금액 193,263원. 앞의 KRW 증가분 193,267원과 4원 차이입니다. XRP는 안 팔았습니다. 편차가 -0.4%p라 5%p 선 근처에도 안 갔으니까요.&lt;/p&gt;

&lt;p&gt;총 자산이 6천 원 줄어든 것도 갈렸습니다. 매도 자체는 자산 총액을 안 바꿉니다. 코인이 현금으로 바뀔 뿐입니다. 수수료가 97원이고, &lt;strong&gt;나머지 6,039원은 시세가 빠진 몫&lt;/strong&gt;입니다. 하루 사이 BTC 단가가 91,714,000원에서 91,299,000원으로 0.45% 내려갔습니다.&lt;/p&gt;

&lt;p&gt;판 게 손해가 아니라, &lt;strong&gt;파는 사이 값이 조금 빠진 것&lt;/strong&gt;입니다.&lt;/p&gt;

&lt;p&gt;아직 안 풀린 건 하나 남았습니다. 현금을 왜 10%가 아니라 &lt;strong&gt;13.7%까지 넘겨서&lt;/strong&gt; 올렸는지. 매도 수량을 어떻게 정하는지 봐야 알 것 같습니다. 누적 입금액도 거래내역을 더 올려보면 나올 텐데 이번엔 거기까지 못 갔습니다.&lt;/p&gt;

&lt;p&gt;이번 회차는 비교할 지난 기록이 없어서 -13.73%가 나아진 건지 나빠진 건지 말할 수 없습니다. 다음 달에는 이 숫자들을 나란히 놓고 비교하겠습니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 10 --&gt;
&lt;h2 id=&quot;s10&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;10. 정리&lt;/h2&gt;

&lt;blockquote style=&quot;background:#f0f4ff; border-left:4px solid #4a7cff; padding:12px 16px; margin:20px 0; border-radius:0 8px 8px 0;&quot;&gt;
8/5 — 30만 원 입금.&lt;br&gt;
8/6 — 오전 9시 자동 매수. 303,156원 배분 → 코인 셋은 목표 3%포인트 안쪽, 현금은 10%에 5.3%포인트 미달.&lt;br&gt;
8/7 — 오전 9시 자동 매도. ETH 0.0533개와 BTC 0.0005개를 팔아 현금 13.7%로 회복.&lt;br&gt;
계좌는 -13.73%. 같은 달 ETF 계좌는 30만 원 넣고 SCHD 2주.
&lt;/blockquote&gt;

&lt;p&gt;건진 건 이렇습니다. 소수점 자산은 소액에서도 종목 배분이 맞아떨어진다는 것. 그 정확함이 현금 칸 앞에서 한 번 멈췄다는 것. 하루 뒤 그 칸이 저절로 채워졌다는 것. 그리고 배분이 어떻든 손실은 손실이라는 것.&lt;/p&gt;

&lt;p&gt;기록을 다시 시작하는 회차라 잘된 얘기를 앞에 두고 싶었는데, 계좌가 그걸 허락하지 않았습니다. 대신 규칙이 제 손 없이 굴러가는 건 하루 만에 봤습니다.&lt;/p&gt;

&lt;!-- 면책고지 --&gt;
&lt;div style=&quot;background:#fff8e1; border:1px solid #ffe082; border-radius:8px; padding:14px 18px; margin:24px 0; font-size:14px; color:#856d0c;&quot;&gt;
⚠️ 본 글에서 소개하는 도구와 전략은 정보 제공 목적이며, 투자 권유가 아닙니다. 암호화폐/ETF 투자는 원금 손실 위험이 있으므로 투자 결정 전 충분한 검토를 권장합니다.
&lt;/div&gt;

&lt;!-- 태그 --&gt;
&lt;p style=&quot;font-size:14px; color:#6b7280; margin:24px 0 0;&quot;&gt;#비트코인 #이더리움 #리플 #자동리밸런싱 #업비트 #코인투자 #적립식투자 #DCA #포트폴리오 #분산투자&lt;/p&gt;

&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</description>
      <category>투자 일지/코인 자동 리밸런싱</category>
      <author>우기!</author>
      <guid isPermaLink="true">https://bigstupid.tistory.com/213</guid>
      <comments>https://bigstupid.tistory.com/213#entry213comment</comments>
      <pubDate>Fri, 7 Aug 2026 15:14:37 +0900</pubDate>
    </item>
    <item>
      <title>ETF 자동 리밸런싱 1개월 반 실운용 리뷰 &amp;mdash; 수익률&amp;middot;안정성&amp;middot;남은 리스크</title>
      <link>https://bigstupid.tistory.com/212</link>
      <description>&lt;div style=&quot;max-width:760px; margin:0 auto; font-family:'Pretendard','Apple SD Gothic Neo',sans-serif; color:#222; line-height:1.8; font-size:16px;&quot;&gt;

&lt;!-- 시리즈 연결 --&gt;
&lt;blockquote style=&quot;background:#f0f4ff; border-left:4px solid #4a7cff; padding:12px 16px; margin:20px 0; border-radius:0 8px 8px 0;&quot;&gt;
  이 글은 &lt;strong&gt;ETF 자동 리밸런싱&lt;/strong&gt; 시리즈의 1개월 반 리뷰입니다.&lt;br&gt;
  &lt;a href=&quot;https://bigstupid.tistory.com/211&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;첫 글 보기&lt;/a&gt;
&lt;/blockquote&gt;

&lt;!-- 도입 --&gt;
&lt;p&gt;ETF 자동 리밸런싱 봇을 실계좌에 올린 지 45일이 지났습니다.&lt;/p&gt;

&lt;p&gt;그 사이에 매도가 매수로 들어가는 버그를 고쳤고, QQQ를 못 사서 종목을 바꿨고, 알림이 폭탄처럼 쏟아지는 것도 고쳤습니다. 봇보다 제가 더 바빴습니다.&lt;/p&gt;

&lt;p&gt;350만 원 넣고 45일 돌린 결과, 지금 어떻게 됐는지 기록해둡니다.&lt;/p&gt;

&lt;!-- 목차 --&gt;
&lt;div style=&quot;background:#f8f9fa; border-radius:12px; padding:20px 28px; margin:36px 0;&quot;&gt;
&lt;p style=&quot;font-weight:700; font-size:15px; margin:0 0 10px; color:#555;&quot;&gt;목차&lt;/p&gt;
&lt;ol style=&quot;margin:0; padding-left:20px; color:#333;&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#s1&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;45일 운용 요약&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s2&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;입금 타임라인&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s3&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;현재 포트폴리오&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s4&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;수익률 분석&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s5&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;45일간 터진 것들&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s6&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;QQQM 비중 부족 문제&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s7&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;남은 리스크&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s8&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;리밸런싱, 장점이 있긴 한 건가&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s9&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;마무리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 1. 45일 운용 요약 --&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;1. 45일 운용 요약&lt;/h2&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;내용&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;운용 기간&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;2026.03.08 ~ 04.23 (45일)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;시장 국면&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background:#d4edda; color:#155724; padding:2px 10px; border-radius:4px; font-size:13px; font-weight:600;&quot;&gt;BULL&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;총 입금&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;~350만 원 → $2,342&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;현재 총 자산&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#4a7cff; font-weight:700;&quot;&gt;$2,467.87&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;평가손익 (원화)&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626; font-weight:700;&quot;&gt;+239,579원 (+7.33%)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;환율 변화&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;1,523원 → 1,485원 (유리)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 2. 입금 타임라인 --&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;2. 입금 타임라인&lt;/h2&gt;

&lt;p&gt;한 번에 몰빵한 게 아니라, 6번에 걸쳐 나눠 넣었습니다. 환전할 때마다 환율이 달라서 받는 달러도 달랐습니다.&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/veizd/dJMcahYtdp0/dlkS3oiJZQ3UAzp2hovOB0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/veizd/dJMcahYtdp0/dlkS3oiJZQ3UAzp2hovOB0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/veizd/dJMcahYtdp0/dlkS3oiJZQ3UAzp2hovOB0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fveizd%2FdJMcahYtdp0%2FdlkS3oiJZQ3UAzp2hovOB0%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;날짜&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;원화&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;USD&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;환율&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;3/8&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;99,992원&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$67.18&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;~1,488&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;3/9&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;199,999원&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$134.04&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;~1,492&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;3/11&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;799,995원&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$542.62&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;~1,474&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;3/17&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;1,199,985원&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$800.46&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;~1,499&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;3/30&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;600,015원&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$393.91&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;~1,523&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;4/17&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;600,002원&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;$403.89&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;~1,485&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;총 &lt;strong&gt;약 350만 원&lt;/strong&gt;을 6회에 걸쳐 환전. 환율이 가장 안 좋았던 건 3/30(1,523원), 가장 좋았던 건 3/11(1,474원)이었습니다. 나눠서 넣은 덕에 환율 리스크가 알아서 분산됐습니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 3. 현재 포트폴리오 --&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;3. 현재 포트폴리오&lt;/h2&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/dVXdeu/dJMcacizqDg/Jy5f16luvXx2vIVdHgggv1/img.jpg&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/dVXdeu/dJMcacizqDg/Jy5f16luvXx2vIVdHgggv1/img.jpg&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/dVXdeu/dJMcacizqDg/Jy5f16luvXx2vIVdHgggv1/img.jpg&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdVXdeu%2FdJMcacizqDg%2FJy5f16luvXx2vIVdHgggv1%2Fimg.jpg&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;종목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;수량&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;평가금액&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;매입금액&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;수익률&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;비중&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TQQQ&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;10주&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$598.10&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$480.74&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626; font-weight:600;&quot;&gt;+24.41%&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;24.3%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;QQQM&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;3주&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$807.30&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$772.77&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626; font-weight:600;&quot;&gt;+4.46%&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;32.7%&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;SCHD&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;31주&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$966.25&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$956.00&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626; font-weight:600;&quot;&gt;+1.07%&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;39.0%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;현금&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;-&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;$98.78&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;-&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;-&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;4.0%&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;BULL 국면 목표 비중(TQQQ 25%, QQQM 35%, SCHD 40%) 대비 전부 &lt;strong&gt;편차 3%p 이내&lt;/strong&gt;입니다. 리밸런싱 봇이 &quot;비중 정상 범위&quot;로 판단하고 매매를 안 하고 있는 상태입니다.&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bVrFFr/dJMcabxaHvX/8ucKkcNNovTXwFMChEf0bK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bVrFFr/dJMcabxaHvX/8ucKkcNNovTXwFMChEf0bK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bVrFFr/dJMcabxaHvX/8ucKkcNNovTXwFMChEf0bK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbVrFFr%2FdJMcabxaHvX%2F8ucKkcNNovTXwFMChEf0bK%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 4. 수익률 분석 --&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;4. 수익률 분석&lt;/h2&gt;

&lt;p&gt;원화 기준 평가손익은 &lt;strong&gt;+239,579원(+7.33%)&lt;/strong&gt;입니다. 다만 이 숫자를 그대로 믿으면 안 됩니다.&lt;/p&gt;

&lt;p&gt;수익의 구성을 뜯어보면:&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;기여&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TQQQ 주가 상승&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;+$117.36 (매입 대비 +24.41%)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;QQQM 주가 상승&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;+$34.53 (매입 대비 +4.46%)&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;SCHD 주가 상승&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;+$10.25 (매입 대비 +1.07%)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;환율 변화&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;1,523 → 1,485원 (달러 가치 하락)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;달러 기준 ETF 평가익은 &lt;strong&gt;+$162.14&lt;/strong&gt;입니다. 환율이 떨어졌으니 원화로 바꾸면 달러 가치가 줄었지만, ETF가 오른 게 그걸 덮었습니다.&lt;/p&gt;

&lt;p&gt;솔직히 말하면 TQQQ가 &lt;strong&gt;+24.41%&lt;/strong&gt;를 해준 덕이 큽니다. 3배 레버리지의 위력입니다. 반대로 떨어질 때도 3배라는 게 함정이지만, 지금까지는 BULL 국면이 유지돼서 운이 좋았습니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 5. 45일간 터진 것들 --&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;5. 45일간 터진 것들&lt;/h2&gt;

&lt;p&gt;수익률보다 중요한 건, 이 봇이 45일 동안 얼마나 말썽을 부렸는지입니다. 솔직히 꽤 부렸습니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;시기&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left;&quot;&gt;문제&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:0 8px 0 0;&quot;&gt;해결&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; white-space:nowrap;&quot;&gt;1주차&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;&lt;strong&gt;매도가 매수로 들어감&lt;/strong&gt;&lt;br&gt;API 헤더(TR_ID) 하나 잘못 넣어서&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;매수/매도 TR_ID 분리&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; white-space:nowrap;&quot;&gt;1주차&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;&lt;strong&gt;120초 대기 후 &quot;됐겠지&quot;&lt;/strong&gt;&lt;br&gt;체결 확인 없이 매수 진행&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;미체결 조회 API 폴링&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; white-space:nowrap;&quot;&gt;2주차&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;&lt;strong&gt;QQQ를 영원히 못 삼&lt;/strong&gt;&lt;br&gt;1주 $603인데 배정 금액 $557&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;QQQ → QQQM($250) 교체&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; white-space:nowrap;&quot;&gt;2주차&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;&lt;strong&gt;텔레그램 알림 6개 폭탄&lt;/strong&gt;&lt;br&gt;같은 정보가 3중 반복&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;2건으로 통합&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; white-space:nowrap;&quot;&gt;3주차&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;&lt;strong&gt;QQQM 0%인데 리밸런싱 안 됨&lt;/strong&gt;&lt;br&gt;TQQQ만 체크하는 트리거&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;전체 ETF 편차 트리거 추가&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; white-space:nowrap;&quot;&gt;3주차&lt;/td&gt;&lt;td style=&quot;padding:10px 14px;&quot;&gt;&lt;strong&gt;대시보드 500 에러&lt;/strong&gt;&lt;br&gt;Docker에서 패키지 버전 불일치&lt;/td&gt;&lt;td style=&quot;padding:10px 14px;&quot;&gt;requirements.txt 버전 고정&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;테스트는 56건에서 &lt;strong&gt;75건&lt;/strong&gt;으로 늘었습니다. 터질 때마다 테스트를 추가한 결과입니다.&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/dH1llQ/dJMcad2M5c7/kwekhbkOsUsI86QFxalLI0/img.jpg&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/dH1llQ/dJMcad2M5c7/kwekhbkOsUsI86QFxalLI0/img.jpg&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/dH1llQ/dJMcad2M5c7/kwekhbkOsUsI86QFxalLI0/img.jpg&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdH1llQ%2FdJMcad2M5c7%2FkwekhbkOsUsI86QFxalLI0%2Fimg.jpg&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p style=&quot;text-align:center; font-size:13px; color:#888; margin:-10px 0 0;&quot;&gt;4/10 시점. QQQM이 0%인데 &quot;리밸런싱 불필요&quot;로 나왔던 화면.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 6. QQQM 비중 부족 문제 --&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;6. QQQM 비중 부족 문제&lt;/h2&gt;

&lt;p&gt;현재 QQQM 비중은 &lt;strong&gt;32.7%&lt;/strong&gt;입니다. 목표는 35%.&lt;/p&gt;

&lt;p&gt;2.3%p 부족한데, 이걸 채우려면 QQQM을 1주 더 사야 합니다. QQQM 1주가 $269입니다. 현금이 $98밖에 없으니 매수가 안 됩니다.&lt;/p&gt;

&lt;p&gt;결국 &lt;strong&gt;추가 입금을 하거나, TQQQ/SCHD 중 하나를 팔아야&lt;/strong&gt; 비중을 맞출 수 있습니다. 봇은 편차가 트리거 기준(6%p) 이내라서 &quot;정상 범위&quot;로 보고 가만히 있습니다. 틀린 판단은 아닌데, 찜찜합니다.&lt;/p&gt;

&lt;p&gt;소액일 때 피할 수 없는 문제입니다. ETF는 1주 단위로 사야 하니, 돈이 적으면 &lt;strong&gt;비중을 정확히 맞추는 게 애초에 안 됩니다&lt;/strong&gt;.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 7. 남은 리스크 --&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;7. 남은 리스크&lt;/h2&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;TQQQ 레버리지 리스크&lt;/h3&gt;

&lt;p&gt;지금 TQQQ가 +24.41%를 찍고 있지만, 이건 3배 레버리지라서 가능한 수치입니다. 나스닥이 8% 올랐으니 TQQQ는 24% 오른 겁니다.&lt;/p&gt;

&lt;p&gt;반대로 나스닥이 8% 떨어지면 TQQQ는 &lt;strong&gt;-24%&lt;/strong&gt;입니다. 거기에 횡보장이 길어지면 변동성 끌림(volatility decay)까지 겹쳐서, 지수는 제자리인데 TQQQ만 녹는 상황이 생깁니다.&lt;/p&gt;

&lt;p&gt;지금은 BULL 국면이라 비중 25%를 유지하고 있지만, BEAR로 전환되면 10%까지 줄이도록 설정해뒀습니다. 이게 실제로 방어가 되는지는 아직 겪어보지 않았습니다.&lt;/p&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;환율 리스크&lt;/h3&gt;

&lt;p&gt;환전 내역을 보면 환율이 1,474원~1,523원 사이에서 왔다 갔다 했습니다. 지금은 1,485원으로 입금 평균보다 유리한 쪽이지만, 환율이 더 떨어지면 달러 자산의 원화 가치가 줄어듭니다.&lt;/p&gt;

&lt;p&gt;ETF 수익률이 좋아도 환율이 역행하면 원화 기준 수익이 깎입니다. 해외 투자하는 이상 어쩔 수 없는 부분입니다.&lt;/p&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;봇 안정성&lt;/h3&gt;

&lt;p&gt;45일 동안 버그 6건을 고쳤습니다. 아직 더 있을 수 있습니다. 특히 국면 전환(BULL → BEAR)에서 매도와 매수가 한꺼번에 몰리는 상황은 아직 안 겪어봤습니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 8. 리밸런싱, 장점이 있긴 한 건가 --&gt;
&lt;h2 id=&quot;s8&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;8. 리밸런싱, 장점이 있긴 한 건가&lt;/h2&gt;

&lt;p&gt;솔직한 판단을 적어봅니다.&lt;/p&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;45일간 확인된 장점&lt;/h3&gt;

&lt;ul style=&quot;padding-left:20px;&quot;&gt;
&lt;li&gt;&lt;strong&gt;감정이 끼어들 틈이 없습니다.&lt;/strong&gt; 4월 초에 시장이 출렁일 때 &quot;지금 팔아야 하나?&quot; 고민할 필요가 없었습니다. 봇이 VIX와 MA200을 보고 알아서 판단합니다.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;입금만 하면 됩니다.&lt;/strong&gt; 달러를 넣으면 다음 리밸런싱 때 자동으로 목표 비중에 맞게 분배됩니다. 뭘 얼마나 살지 계산할 필요가 없습니다.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;비중 쏠림을 자동 보정합니다.&lt;/strong&gt; TQQQ가 +24% 올랐지만 비중은 24.3%로 목표(25%)에 가깝게 유지되고 있습니다. 리밸런싱 없이 방치했으면 비중이 30%를 넘었을 겁니다.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;아직 모르는 것&lt;/h3&gt;

&lt;ul style=&quot;padding-left:20px;&quot;&gt;
&lt;li&gt;&lt;strong&gt;하락장 방어력.&lt;/strong&gt; 45일 동안 BULL이 유지됐습니다. 진짜 시험은 BEAR 국면에서 TQQQ 비중을 10%로 줄이는 순간인데, 아직 그 상황이 안 왔습니다.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;단순 보유 대비 성과.&lt;/strong&gt; 같은 돈으로 QQQ만 샀으면 어땠을지, SPY만 샀으면 어땠을지 비교가 아직 없습니다. 리밸런싱이 추가 수익을 만들었는지, 아니면 매매 비용만 발생시킨 건지 알려면 더 긴 기간이 필요합니다.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;유지할 가치가 있는가&lt;/h3&gt;

&lt;p&gt;결론부터 말하면, &lt;strong&gt;유지합니다.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;리밸런싱으로 돈을 더 버는 건 아닙니다. 이건 &lt;strong&gt;리스크 관리 도구&lt;/strong&gt;입니다. TQQQ를 포트폴리오에 넣는 순간, 비중 관리를 안 하면 상승장에서 비중이 계속 불어나다가 하락장에서 한 방에 날아갑니다.&lt;/p&gt;

&lt;p&gt;&quot;TQQQ가 아무리 올라도 25%까지만.&quot; 이 규칙 하나를 봇이 강제해주는 겁니다. 상승장에서는 수익을 깎는 것처럼 보여도, 하락장이 오면 이게 포트폴리오를 지켜줍니다.&lt;/p&gt;

&lt;p&gt;물론 TQQQ를 안 넣으면 이런 고민 자체가 필요 없습니다. 그건 전략의 문제이지, 리밸런싱의 문제는 아닙니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 9. 마무리 --&gt;
&lt;h2 id=&quot;s9&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;9. 마무리&lt;/h2&gt;

&lt;p&gt;45일 돌려본 결과:&lt;/p&gt;

&lt;ul style=&quot;padding-left:20px;&quot;&gt;
&lt;li&gt;350만 원 투입, 현재 $2,467 (+7.33%)&lt;/li&gt;
&lt;li&gt;버그 6건 수정, 테스트 75건 확보&lt;/li&gt;
&lt;li&gt;3종 ETF 모두 목표 비중 3%p 이내 유지 중&lt;/li&gt;
&lt;li&gt;아직 BEAR 국면 방어는 미검증&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;봇은 안정기에 접어들었고, 이제는 버그를 고치는 시간보다 시장을 관찰하는 시간이 더 길어졌습니다. 다음 의미 있는 기록은 &lt;strong&gt;국면 전환이 발생하거나, 자산이 $5,000을 넘는 시점&lt;/strong&gt;이 될 것 같습니다.&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/czBfxh/dJMcaf7ppwm/SnQFybsj0xW70P8yTUbWy1/img.jpg&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/czBfxh/dJMcaf7ppwm/SnQFybsj0xW70P8yTUbWy1/img.jpg&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/czBfxh/dJMcaf7ppwm/SnQFybsj0xW70P8yTUbWy1/img.jpg&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FczBfxh%2FdJMcaf7ppwm%2FSnQFybsj0xW70P8yTUbWy1%2Fimg.jpg&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;

&lt;p&gt;그때까지는 환전만 꾸준히 하면 됩니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;div style=&quot;background:#f8f9fa; border-radius:8px; padding:14px 20px; margin:0 0 24px; font-size:12px; color:#999; line-height:1.7;&quot;&gt;
&lt;strong&gt;면책 고지:&lt;/strong&gt; 이 글은 개인적인 투자 기록이며 특정 종목의 매수·매도를 권유하지 않습니다. 모든 투자의 책임은 본인에게 있으며, 레버리지 ETF(TQQQ)는 높은 변동성으로 원금 손실 위험이 큽니다. 투자 결정 전 충분한 검토를 권장합니다.
&lt;/div&gt;


&lt;/div&gt;</description>
      <category>투자 일지/ETF 자동 리밸런싱</category>
      <category>ETF</category>
      <category>qqqm</category>
      <category>SCHD</category>
      <category>TQQQ</category>
      <category>시장국면</category>
      <category>자동리밸런싱</category>
      <category>자동매매</category>
      <category>포트폴리오관리</category>
      <category>한국투자증권</category>
      <category>해외주식</category>
      <author>우기!</author>
      <guid isPermaLink="true">https://bigstupid.tistory.com/212</guid>
      <comments>https://bigstupid.tistory.com/212#entry212comment</comments>
      <pubDate>Thu, 23 Apr 2026 22:38:54 +0900</pubDate>
    </item>
    <item>
      <title>자동매매 봇 실전 사고 &amp;mdash; 매도 주문이 매수로 들어간 이유</title>
      <link>https://bigstupid.tistory.com/211</link>
      <description>&lt;div style=&quot;max-width:760px; margin:0 auto; font-family:'Pretendard','Apple SD Gothic Neo',sans-serif; color:#222; line-height:1.8; font-size:16px;&quot;&gt;

&lt;!-- 시리즈 연결 --&gt;
&lt;blockquote style=&quot;background:#f0f4ff; border-left:4px solid #4a7cff; padding:12px 16px; margin:20px 0; border-radius:0 8px 8px 0;&quot;&gt;
  이 글은 &lt;strong&gt;ETF 자동 리밸런싱&lt;/strong&gt; 시리즈의 버그 회고 기록입니다.&lt;br&gt;
  &lt;a href=&quot;https://bigstupid.tistory.com/207&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;첫 글 보기&lt;/a&gt;
&lt;/blockquote&gt;

&lt;!-- 도입 --&gt;
&lt;p&gt;자동매매 봇을 만들고 실계좌로 돌렸더니, 매도 주문이 매수로 들어갔습니다.&lt;/p&gt;

&lt;p&gt;텔레그램에는 &quot;SELL 주문 완료&quot;라고 왔는데, 증권사 앱을 열어보니 매수 주문이 걸려 있었습니다. &lt;strong&gt;봇이 거짓말을 한 겁니다.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;원인 찾고, 고치고, 재발 방지까지 적용한 과정을 기록해둡니다.&lt;/p&gt;

&lt;!-- 목차 --&gt;
&lt;div style=&quot;background:#f8f9fa; border-radius:12px; padding:20px 28px; margin:36px 0;&quot;&gt;
&lt;p style=&quot;font-weight:700; font-size:15px; margin:0 0 10px; color:#555;&quot;&gt;목차&lt;/p&gt;
&lt;ol style=&quot;margin:0; padding-left:20px; color:#333;&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#s1&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;증상 발견&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s2&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;원인 분석 — TR_ID가 뭔데?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s3&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;수정 — 한 줄이 바꾼 매수/매도의 차이&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s4&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;추가 발견 — 120초 고정 대기의 함정&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s5&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;개선 — 미체결 조회 API로 체결 확인&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s6&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;텔레그램 알림 전면 개편&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s7&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;테스트 19건 추가&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s8&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;교훈 정리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 1. 증상 발견 --&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;1. 증상 발견&lt;/h2&gt;

&lt;p&gt;텔레그램에 이런 메시지가 왔습니다.&lt;/p&gt;

&lt;div style=&quot;background:#f8f9fa; border-radius:8px; padding:16px 20px; margin:16px 0; font-size:14px; font-family:monospace; white-space:pre-line; line-height:1.6;&quot;&gt;  SELL 주문: TQQQ 11주 @ $43.83

  일일 리포트
국면: BEAR
현재 비중:
  TQQQ: 37.0%  /  QQQ: 0.0%  /  SCHD: 35.4%
매도 주문: TQQQ 11주
매수 주문: QQQ 1주, SCHD 9주&lt;/div&gt;

&lt;p&gt;&lt;span style=&quot;background:#f8d7da; color:#721c24; padding:2px 10px; border-radius:4px; font-size:13px; font-weight:600;&quot;&gt;BEAR&lt;/span&gt; 국면이라 TQQQ 비중(37%)이 너무 높으니 11주를 팔고, 그 돈으로 QQQ와 SCHD를 사는 리밸런싱이었습니다. 메시지만 보면 정상입니다.&lt;/p&gt;

&lt;p&gt;그런데 한국투자증권 앱을 열어보니:&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bYclbD/dJMcadIkAbw/IANT31JvP7DW3u4rgdRXyK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bYclbD/dJMcadIkAbw/IANT31JvP7DW3u4rgdRXyK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bYclbD/dJMcadIkAbw/IANT31JvP7DW3u4rgdRXyK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbYclbD%2FdJMcadIkAbw%2FIANT31JvP7DW3u4rgdRXyK%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;종목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;구분&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;주문량&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;체결량&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center; border-radius:0 8px 0 0;&quot;&gt;미체결량&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TQQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb; color:#dc2626; font-weight:700;&quot;&gt;매수&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;11&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;0&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;11&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;매도가 아니라 매수 주문이 들어가 있었습니다.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;QQQ 1주, SCHD 9주 매수도 실행되지 않았습니다. 매도가 안 됐으니 현금이 없어서 매수할 수 없었던 겁니다. 봇은 &quot;매도 완료&quot;라고 보냈지만, 실제로는 &lt;strong&gt;TQQQ를 11주 더 사려고 시도&lt;/strong&gt;한 셈입니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 2. 원인 분석 --&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;2. 원인 분석 — TR_ID가 뭔데?&lt;/h2&gt;

&lt;p&gt;한국투자증권(KIS) 해외주식 REST API는 매수와 매도를 &lt;strong&gt;서로 다른 TR_ID(거래ID)&lt;/strong&gt;로 구분합니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;구분&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left;&quot;&gt;TR_ID&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:0 8px 0 0;&quot;&gt;설명&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;매수&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-family:monospace;&quot;&gt;TTTT1002U&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;해외주식 매수 주문&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;매도&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; font-family:monospace;&quot;&gt;TTTT1006U&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px;&quot;&gt;해외주식 매도 주문&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;HTTP 엔드포인트가 같고, URL도 같고, 요청 바디 구조도 같습니다. &lt;strong&gt;차이는 HTTP 헤더에 실어 보내는 &lt;code style=&quot;background:#f3f4f6; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;tr_id&lt;/code&gt; 값 하나뿐&lt;/strong&gt;입니다.&lt;/p&gt;

&lt;p&gt;문제의 코드는 이랬습니다.&lt;/p&gt;

&lt;div style=&quot;background:#1e1e1e; border-radius:8px; padding:16px 20px; margin:16px 0; color:#d4d4d4; font-size:13px; font-family:monospace; overflow-x:auto; line-height:1.6;&quot;&gt;
&lt;span style=&quot;color:#6a9955;&quot;&gt;# config.py — 버그 있던 코드&lt;/span&gt;&lt;br&gt;
TR_ID_ORDER = &lt;span style=&quot;color:#ce9178;&quot;&gt;'TTTT1002U'&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#6a9955;&quot;&gt;# 매수 전용인데 모르고 공용으로 씀&lt;/span&gt;
&lt;/div&gt;

&lt;div style=&quot;background:#1e1e1e; border-radius:8px; padding:16px 20px; margin:16px 0; color:#d4d4d4; font-size:13px; font-family:monospace; overflow-x:auto; line-height:1.6;&quot;&gt;
&lt;span style=&quot;color:#6a9955;&quot;&gt;# execution_engine.py — 버그 있던 코드&lt;/span&gt;&lt;br&gt;
&lt;span style=&quot;color:#569cd6;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color:#dcdcaa;&quot;&gt;_place_order&lt;/span&gt;(symbol, qty, limit_price, side):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#c586c0;&quot;&gt;if&lt;/span&gt; side == &lt;span style=&quot;color:#ce9178;&quot;&gt;'BUY'&lt;/span&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;body[&lt;span style=&quot;color:#ce9178;&quot;&gt;'SLL_BUY_DVSN_CD'&lt;/span&gt;] = &lt;span style=&quot;color:#ce9178;&quot;&gt;'02'&lt;/span&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#c586c0;&quot;&gt;else&lt;/span&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;body[&lt;span style=&quot;color:#ce9178;&quot;&gt;'SLL_BUY_DVSN_CD'&lt;/span&gt;] = &lt;span style=&quot;color:#ce9178;&quot;&gt;'01'&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data = kis_api_call(&lt;span style=&quot;color:#ce9178;&quot;&gt;'POST'&lt;/span&gt;, &lt;span style=&quot;color:#ce9178;&quot;&gt;'/uapi/.../order'&lt;/span&gt;, &lt;span style=&quot;color:#9cdcfe;&quot;&gt;TR_ID_ORDER&lt;/span&gt;, body=body)
&lt;/div&gt;

&lt;p&gt;&lt;code style=&quot;background:#f3f4f6; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;SLL_BUY_DVSN_CD&lt;/code&gt;라는 필드로 매수/매도를 구분하려 했는데, &lt;strong&gt;이 필드는 해외주식 주문 API에서 사용하지 않는 필드&lt;/strong&gt;였습니다. API는 이 값을 무시하고, 헤더의 &lt;code style=&quot;background:#f3f4f6; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;tr_id&lt;/code&gt;만 보고 매수/매도를 결정합니다.&lt;/p&gt;

&lt;p&gt;그러니까 side가 &lt;code style=&quot;background:#f3f4f6; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;SELL&lt;/code&gt;이든 &lt;code style=&quot;background:#f3f4f6; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;BUY&lt;/code&gt;이든, 항상 &lt;code style=&quot;background:#f3f4f6; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;TTTT1002U&lt;/code&gt;(매수)로 요청이 나간 겁니다.&lt;/p&gt;

&lt;blockquote style=&quot;background:#fff3cd; border-left:4px solid #856d0c; padding:12px 16px; margin:20px 0; border-radius:0 8px 8px 0; color:#856d0c;&quot;&gt;
원인: 국내주식 API 예제를 참고해서 해외주식 코드를 작성하면서, 매수/매도 구분 방식의 차이를 놓친 것. 국내주식은 &lt;code&gt;SLL_BUY_DVSN_CD&lt;/code&gt;로, 해외주식은 &lt;code&gt;TR_ID&lt;/code&gt;로 구분합니다.
&lt;/blockquote&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 3. 수정 --&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;3. 수정 — 한 줄이 바꾼 매수/매도의 차이&lt;/h2&gt;

&lt;p&gt;수정은 간단했습니다.&lt;/p&gt;

&lt;div style=&quot;background:#1e1e1e; border-radius:8px; padding:16px 20px; margin:16px 0; color:#d4d4d4; font-size:13px; font-family:monospace; overflow-x:auto; line-height:1.6;&quot;&gt;
&lt;span style=&quot;color:#6a9955;&quot;&gt;# config.py — 수정 후&lt;/span&gt;&lt;br&gt;
TR_ID_ORDER_BUY &amp;nbsp;= &lt;span style=&quot;color:#ce9178;&quot;&gt;'TTTT1002U'&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#6a9955;&quot;&gt;# 해외주식 매수&lt;/span&gt;&lt;br&gt;
TR_ID_ORDER_SELL = &lt;span style=&quot;color:#ce9178;&quot;&gt;'TTTT1006U'&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color:#6a9955;&quot;&gt;# 해외주식 매도&lt;/span&gt;
&lt;/div&gt;

&lt;div style=&quot;background:#1e1e1e; border-radius:8px; padding:16px 20px; margin:16px 0; color:#d4d4d4; font-size:13px; font-family:monospace; overflow-x:auto; line-height:1.6;&quot;&gt;
&lt;span style=&quot;color:#6a9955;&quot;&gt;# execution_engine.py — 수정 후&lt;/span&gt;&lt;br&gt;
tr_id = TR_ID_ORDER_BUY &lt;span style=&quot;color:#c586c0;&quot;&gt;if&lt;/span&gt; side == &lt;span style=&quot;color:#ce9178;&quot;&gt;'BUY'&lt;/span&gt; &lt;span style=&quot;color:#c586c0;&quot;&gt;else&lt;/span&gt; TR_ID_ORDER_SELL&lt;br&gt;
data = kis_api_call(&lt;span style=&quot;color:#ce9178;&quot;&gt;'POST'&lt;/span&gt;, &lt;span style=&quot;color:#ce9178;&quot;&gt;'/uapi/.../order'&lt;/span&gt;, tr_id, body=body)
&lt;/div&gt;

&lt;p&gt;TR_ID를 매수/매도로 분리하고, side에 따라 올바른 TR_ID를 선택하도록 했습니다. 불필요한 &lt;code style=&quot;background:#f3f4f6; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;SLL_BUY_DVSN_CD&lt;/code&gt; 필드도 제거했습니다. &lt;strong&gt;변경은 이게 전부입니다.&lt;/strong&gt;&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 4. 추가 발견 --&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;4. 추가 발견 — 120초 고정 대기의 함정&lt;/h2&gt;

&lt;p&gt;TR_ID 버그를 고치면서 주문 실행 흐름을 다시 살펴보니, 또 다른 문제가 있었습니다.&lt;/p&gt;

&lt;p&gt;매도 주문을 넣고 &lt;strong&gt;무조건 120초만 기다린 뒤&lt;/strong&gt; 매수를 진행하고 있었습니다.&lt;/p&gt;

&lt;div style=&quot;background:#f8f9fa; border-radius:8px; padding:16px 20px; margin:16px 0; font-size:14px; font-family:monospace; line-height:1.8;&quot;&gt;
1. 매도 주문 제출&lt;br&gt;
2. &lt;span style=&quot;color:#dc2626; font-weight:600;&quot;&gt;time.sleep(120)&lt;/span&gt; &amp;larr; 120초 고정 대기&lt;br&gt;
3. USD 잔고 재조회&lt;br&gt;
4. 매수 수량 재계산&lt;br&gt;
5. 매수 주문 제출
&lt;/div&gt;

&lt;p&gt;120초 안에 매도가 체결되지 않으면 어떻게 될까요?&lt;/p&gt;

&lt;ul style=&quot;padding-left:20px;&quot;&gt;
&lt;li&gt;현금이 없는 상태에서 매수 시도&lt;/li&gt;
&lt;li&gt;지정가 주문이라 체결이 보장되지 않음&lt;/li&gt;
&lt;li&gt;장 마감 30분 전이라 유동성도 줄어드는 시간대&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;솔직히 말하면 &lt;strong&gt;&quot;2분이면 되겠지&quot;라는 희망 회로&lt;/strong&gt;였습니다. 이번에도 매도(실제로는 매수)가 미체결인데 바로 매수를 시도해서 QQQ/SCHD 주문이 전부 실패했고요.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 5. 개선 --&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;5. 개선 — 미체결 조회 API로 체결 확인&lt;/h2&gt;

&lt;p&gt;120초 고정 대기를 &lt;strong&gt;KIS 미체결 조회 API 폴링&lt;/strong&gt;으로 교체했습니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt; &lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left;&quot;&gt;기존&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:0 8px 0 0;&quot;&gt;개선 후&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;매도 후 대기&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;&lt;code&gt;sleep(120)&lt;/code&gt; 고정&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;미체결 API 폴링 (30초 간격)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;체결 확인&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;없음 (희망 회로)&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;주문번호로 미체결 잔량 확인&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;타임아웃&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;없음&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;최대 10분, 초과 시 경고 알림&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;매수 진행 조건&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px;&quot;&gt;시간만 지나면 진행&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px;&quot;&gt;체결 확인 후 진행, 현금 부족 시 스킵&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;새로 추가한 TR_ID는 &lt;code style=&quot;background:#f3f4f6; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;TTTS3018R&lt;/code&gt;(해외주식 미체결 조회)입니다. 30초 간격으로 미체결 목록을 조회하고, 해당 주문번호가 목록에서 사라지면 체결 완료로 판단합니다.&lt;/p&gt;

&lt;blockquote style=&quot;background:#d4edda; border-left:4px solid #155724; padding:12px 16px; margin:20px 0; border-radius:0 8px 8px 0; color:#155724;&quot;&gt;
핵심 차이: &quot;120초 지나면 됐겠지&quot; &amp;rarr; &quot;API로 확인하고, 진짜 됐을 때만 진행&quot;
&lt;/blockquote&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 6. 텔레그램 알림 --&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;6. 텔레그램 알림 전면 개편&lt;/h2&gt;

&lt;p&gt;이번 사고에서 텔레그램 메시지만으로는 문제를 알아챌 수 없었습니다. &lt;code style=&quot;background:#f3f4f6; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;  SELL 주문: TQQQ 11주&lt;/code&gt;라고 보내놓고 실제로는 매수가 들어갔으니까요.&lt;/p&gt;

&lt;p&gt;그래서 메시지만 봐도 뭔가 잘못됐는지 바로 알 수 있도록 뜯어고쳤습니다.&lt;/p&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;주문 제출 알림&lt;/h3&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;기존&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:0 8px 0 0;&quot;&gt;개선 후&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; vertical-align:top; font-family:monospace; font-size:13px; white-space:pre-line;&quot;&gt;  SELL 주문: TQQQ 11주 @ $43.83&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; vertical-align:top; font-family:monospace; font-size:13px; white-space:pre-line;&quot;&gt;  SELL 주문 제출
  종목: TQQQ
  수량: 11주
  지정가: $43.83
  예상 금액: $482.13
  주문번호: 0012345678&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;주문번호&lt;/strong&gt;가 포함돼서, 증권사 앱에서 바로 대조할 수 있습니다.&lt;/p&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;새로 추가된 알림&lt;/h3&gt;

&lt;ul style=&quot;padding-left:20px;&quot;&gt;
&lt;li&gt;&lt;strong&gt;매도 체결 확인&lt;/strong&gt; — 미체결 API로 확인 후 전송&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;주문 실행 완료 요약&lt;/strong&gt; — 매도/매수 건수, 체결 상태, 잔여 현금까지 한눈에&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;일일 리포트 강화&lt;/strong&gt; — 국면 판단 근거(QQQ/MA200/VIX), 총 자산, 비중 차이( /  시각 표시) 포함&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;메시지 수는 3개에서 6~7개로 늘었지만, 이제 앱을 안 열어봐도 됩니다.&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/BWeDM/dJMcabcG7Lz/LbtaczWHZuRoXxjKcWqwt1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/BWeDM/dJMcabcG7Lz/LbtaczWHZuRoXxjKcWqwt1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/BWeDM/dJMcabcG7Lz/LbtaczWHZuRoXxjKcWqwt1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FBWeDM%2FdJMcabcG7Lz%2FLbtaczWHZuRoXxjKcWqwt1%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 7. 테스트 --&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;7. 테스트 19건 추가&lt;/h2&gt;

&lt;p&gt;솔직히 테스트가 있었으면 배포 전에 잡았을 버그입니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;테스트 그룹&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;건수&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:0 8px 0 0;&quot;&gt;핵심 검증&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TestPlaceOrder&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;3&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;매수는 TTTT1002U, 매도는 TTTT1006U 사용 검증&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TestIsOrderFilled&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;4&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;미체결 목록 유무에 따른 체결 판단&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TestWaitForSellsFill&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;4&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;즉시 체결, 타임아웃, 부분 체결 처리&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TestExecuteOrders&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;2&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;매도→체결확인→매수 순서, 미체결 시 스킵&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;기타&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;6&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;미체결 조회 API, 매수 수량 재계산&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:700;&quot;&gt;합계&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; font-weight:700;&quot;&gt;19&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px;&quot;&gt;전체 56건 &amp;rarr; 75건 (전체 통과)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;TestPlaceOrder&lt;/strong&gt;가 핵심입니다. &quot;매도 주문 시 TTTT1006U TR_ID를 사용하는가?&quot; — 이거 하나만 있었어도 됐습니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 8. 교훈 --&gt;
&lt;h2 id=&quot;s8&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;8. 교훈 정리&lt;/h2&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;테스트에서 안 잡히면 실계좌에서 잡힌다&lt;/h3&gt;

&lt;p&gt;KIS API의 매수/매도 구분은 URL도 같고, 요청 바디도 같습니다. 차이는 헤더의 TR_ID 하나뿐. 이걸 코드 리뷰에서 눈으로 잡기는 어렵습니다. 금융 API는 &lt;strong&gt;&quot;코드가 의도대로 동작하는가&quot;보다 &quot;API가 의도대로 호출되는가&quot;&lt;/strong&gt;를 테스트해야 한다는 걸 뼈저리게 느꼈습니다.&lt;/p&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;알림이 부실하면 디버깅도 늦는다&lt;/h3&gt;

&lt;p&gt;기존 알림은 &quot;내가 SELL이라고 보냈다&quot;는 것만 알려줬습니다. 실제로 API에 뭐가 갔는지, 주문번호가 뭔지, 체결은 됐는지 전혀 몰랐습니다. 이번에 증권사 앱을 직접 열어보지 않았으면 한참 뒤에야 알았을 겁니다.&lt;/p&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;체결은 가정이 아니라 확인이다&lt;/h3&gt;

&lt;p&gt;&lt;code style=&quot;background:#f3f4f6; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;time.sleep(120)&lt;/code&gt; 후 &quot;됐겠지&quot; 하고 넘어가면, 매도 미체결 &amp;rarr; 현금 부족 &amp;rarr; 매수 실패 &amp;rarr; 포트폴리오 불균형. 이번에 정확히 이 순서로 터졌습니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 변경 파일 요약 --&gt;
&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;변경 파일 요약&lt;/h3&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;파일&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:0 8px 0 0;&quot;&gt;변경 내용&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600; font-family:monospace; font-size:13px;&quot;&gt;config.py&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;TR_ID 매수/매도 분리, 미체결 조회 TR_ID 추가&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600; font-family:monospace; font-size:13px;&quot;&gt;execution_engine.py&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;TR_ID 분기, 미체결 조회 폴링, 실행 완료 요약&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600; font-family:monospace; font-size:13px;&quot;&gt;telegram_notifier.py&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;6개 함수 신규/개편 (상세 알림)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600; font-family:monospace; font-size:13px;&quot;&gt;main.py&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;새 알림 함수 적용&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600; font-family:monospace; font-size:13px;&quot;&gt;test_execution.py&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px;&quot;&gt;19건 테스트 추가&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 면책고지 --&gt;
&lt;div style=&quot;background:#fff8e1; border:1px solid #ffe082; border-radius:8px; padding:14px 18px; margin:24px 0; font-size:14px; color:#856d0c;&quot;&gt;
⚠️ 본 글에서 소개하는 도구와 전략은 정보 제공 목적이며, 투자 권유가 아닙니다. 암호화폐/ETF 투자는 원금 손실 위험이 있으므로 투자 결정 전 충분한 검토를 권장합니다.
&lt;/div&gt;

&lt;/div&gt;</description>
      <category>투자 일지/ETF 자동 리밸런싱</category>
      <category>ETF</category>
      <category>etf 리밸런싱</category>
      <category>KIS API</category>
      <category>자동매매봇</category>
      <category>파이썬자동매매</category>
      <category>한국투자증권 API</category>
      <category>해외주식</category>
      <category>해외주식 자동매매</category>
      <author>우기!</author>
      <guid isPermaLink="true">https://bigstupid.tistory.com/211</guid>
      <comments>https://bigstupid.tistory.com/211#entry211comment</comments>
      <pubDate>Thu, 9 Apr 2026 22:15:57 +0900</pubDate>
    </item>
    <item>
      <title>Vercel 비용 부담될 때 &amp;mdash; Next.js를 월 $10에 배포하는 법 (Lightsail + Cloudflare)</title>
      <link>https://bigstupid.tistory.com/210</link>
      <description>&lt;div style=&quot;max-width:760px; margin:0 auto; font-family:'Pretendard','Apple SD Gothic Neo',sans-serif; color:#222; line-height:1.8; font-size:16px;&quot;&gt;

&lt;!-- 시리즈 연결 블록 --&gt;
&lt;blockquote style=&quot;background:#f0f4ff; border-left:4px solid #4a7cff; padding:12px 16px; margin:0 0 28px; border-radius:0 8px 8px 0;&quot;&gt;
  이 글은 &lt;strong&gt;CryptoToolbox 개발기&lt;/strong&gt; 시리즈 2편입니다.&lt;br&gt;
  &lt;a href=&quot;{1편_URL}&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;1편: Claude Code로 만든 후기&lt;/a&gt; | &lt;a href=&quot;{3편_URL}&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;3편: AdSense 심사 통과기&lt;/a&gt;
&lt;!-- ⚠️ {1편_URL}, {3편_URL}을 티스토리 발행 후 실제 URL로 교체 --&gt;
&lt;/blockquote&gt;

&lt;p&gt;사이드 프로젝트를 만들었으면 이제 배포를 해야 합니다.&lt;/p&gt;

&lt;p&gt;Vercel? 편하죠.&lt;br&gt;
근데 트래픽 늘면 비용이 같이 늘어납니다.&lt;br&gt;
&lt;strong&gt;수익화 목적 사이트는 고정비가 중요합니다.&lt;/strong&gt;&lt;br&gt;
그래서 AWS Lightsail + Cloudflare 조합을 골랐고, 결과적으로 &lt;strong&gt;월 $10&lt;/strong&gt;에 운영하고 있습니다.&lt;/p&gt;

&lt;p&gt;배포 과정에서 삽질한 것들 포함해서 정리해봤습니다.&lt;/p&gt;

&lt;!-- 목차 --&gt;
&lt;div style=&quot;background:#f8f9fa; border-radius:12px; padding:20px 28px; margin-bottom:36px;&quot;&gt;
&lt;p style=&quot;font-weight:700; font-size:15px; margin:0 0 10px; color:#555;&quot;&gt;목차&lt;/p&gt;
&lt;ol style=&quot;margin:0; padding-left:20px; color:#333;&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#s1&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;왜 Vercel이 아니라 Lightsail인가&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s2&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;Lightsail 인스턴스 생성&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s3&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;서버 초기 설정&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s4&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;프로젝트 배포&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s5&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;Nginx 리버스 프록시 설정&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s6&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;Cloudflare 연동&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s7&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;SSL 인증서 (Let's Encrypt)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s8&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;배포 업데이트 프로세스&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s9&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;비용 비교 &amp; 마무리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 1 --&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;1. 왜 Vercel이 아니라 Lightsail인가&lt;/h2&gt;

&lt;p&gt;Next.js 배포하면 보통 Vercel을 떠올립니다.&lt;br&gt;
만든 회사니까요.&lt;br&gt;
&lt;code style=&quot;background:#f0f4ff; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;git push&lt;/code&gt; 한 번이면 배포 끝. 편합니다.&lt;/p&gt;

&lt;p&gt;근데 한 가지 문제가 있습니다.&lt;/p&gt;

&lt;p&gt;Vercel Pro는 월 $20부터 시작하는데, &lt;strong&gt;트래픽이 늘면 비용도 같이 늘어납니다.&lt;/strong&gt;&lt;br&gt;
서버리스 함수 실행 횟수, 대역폭, 빌드 시간... 전부 과금 요소입니다.&lt;br&gt;
AdSense로 수익화하려는 사이트에서 인프라 비용이 예측 불가능하면 곤란합니다.&lt;/p&gt;

&lt;blockquote style=&quot;border-left:4px solid #4a7cff; background:#f0f4ff; padding:14px 20px; margin:16px 0; border-radius:0 8px 8px 0;&quot;&gt;
&lt;strong&gt;Lightsail $10/월 = 2GB RAM, 60GB SSD, 3TB 전송.&lt;/strong&gt;&lt;br&gt;
트래픽이 아무리 늘어도 월 $10 고정입니다.&lt;br&gt;
수익화 목적이면 이쪽이 합리적입니다.
&lt;/blockquote&gt;

&lt;p&gt;물론 Vercel보다 손이 더 갑니다. 그 과정을 지금부터 정리하겠습니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 2 --&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;2. Lightsail 인스턴스 생성&lt;/h2&gt;

&lt;p&gt;AWS Lightsail 콘솔에서 인스턴스를 생성합니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:0 8px 0 0;&quot;&gt;설정&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;리전&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;ap-northeast-2 (서울)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;OS&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Ubuntu 22.04 LTS&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;플랜&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;$10/월 (2GB RAM, 60GB SSD)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;고정 IP&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Static IP 할당 (무료)&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px;&quot;&gt;방화벽&lt;/td&gt;&lt;td style=&quot;padding:10px 14px;&quot;&gt;22(SSH), 80(HTTP), 443(HTTPS) 오픈&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;!--   사진 1: Lightsail 인스턴스 화면
     ─ AWS Lightsail 콘솔 &gt; 인스턴스 탭 캡처
     ─ 인스턴스 이름, 리전(서울), 상태(Running), IP 주소가 보이도록
     ─ 상단 네비게이션 + 인스턴스 카드가 함께 나오면 베스트 --&gt;
&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/z0md5/dJMcaa5KIJi/G0UirNKZ4jZnAp3v6tt6Kk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/z0md5/dJMcaa5KIJi/G0UirNKZ4jZnAp3v6tt6Kk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/z0md5/dJMcaa5KIJi/G0UirNKZ4jZnAp3v6tt6Kk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fz0md5%2FdJMcaa5KIJi%2FG0UirNKZ4jZnAp3v6tt6Kk%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;/p&gt;
&lt;p style=&quot;text-align:center; color:#999; font-size:13px; margin-top:-10px;&quot;&gt;AWS Lightsail 인스턴스 — Ubuntu 22.04, 서울 리전&lt;/p&gt;

&lt;p&gt;포인트는 &lt;strong&gt;Static IP&lt;/strong&gt;입니다.&lt;br&gt;
인스턴스를 재부팅해도 IP가 바뀌지 않아야 Cloudflare DNS 설정이 안 깨집니다.&lt;br&gt;
Lightsail에서 Static IP는 무료입니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 3 --&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;3. 서버 초기 설정&lt;/h2&gt;

&lt;p&gt;인스턴스에 SSH로 접속한 뒤 필요한 것들을 설치합니다.&lt;/p&gt;

&lt;div style=&quot;background:#f5f5f5; border:1px solid #e5e7eb; border-radius:8px; padding:16px 20px; margin:16px 0; overflow-x:auto;&quot;&gt;
&lt;pre style=&quot;margin:0; color:#333; font-family:'Fira Code','Consolas',monospace; font-size:13px; line-height:1.6;&quot;&gt;&lt;span style=&quot;color:#6b7280;&quot;&gt;# Node.js 20 설치 (nvm 사용)&lt;/span&gt;
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
nvm install 20

&lt;span style=&quot;color:#6b7280;&quot;&gt;# PM2 설치 (프로세스 매니저 — 서버 재부팅해도 앱 자동 실행)&lt;/span&gt;
npm install -g pm2

&lt;span style=&quot;color:#6b7280;&quot;&gt;# Nginx 설치 (리버스 프록시)&lt;/span&gt;
sudo apt update
sudo apt install nginx -y

&lt;span style=&quot;color:#6b7280;&quot;&gt;# Redis 설치 (캐시 서버)&lt;/span&gt;
sudo apt install redis-server -y&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;각각의 역할을 정리하면:&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;도구&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:0 8px 0 0;&quot;&gt;역할&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Node.js 20&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Next.js 실행 런타임&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;PM2&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;앱 프로세스 관리 + 자동 재시작&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Nginx&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;80/443 포트 → localhost:3000 프록시&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px;&quot;&gt;Redis&lt;/td&gt;&lt;td style=&quot;padding:10px 14px;&quot;&gt;API 응답 캐싱 + Rate Limiting&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 4 --&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;4. 프로젝트 배포&lt;/h2&gt;

&lt;p&gt;서버 준비가 끝났으면 프로젝트를 올립니다.&lt;/p&gt;

&lt;div style=&quot;background:#f5f5f5; border:1px solid #e5e7eb; border-radius:8px; padding:16px 20px; margin:16px 0; overflow-x:auto;&quot;&gt;
&lt;pre style=&quot;margin:0; color:#333; font-family:'Fira Code','Consolas',monospace; font-size:13px; line-height:1.6;&quot;&gt;&lt;span style=&quot;color:#6b7280;&quot;&gt;# 프로젝트 클론&lt;/span&gt;
git clone https://github.com/{your-repo}/cryptotoolbox.git
cd cryptotoolbox

&lt;span style=&quot;color:#6b7280;&quot;&gt;# 의존성 설치 (⚠️ --legacy-peer-deps 필수!)&lt;/span&gt;
npm install --legacy-peer-deps

&lt;span style=&quot;color:#6b7280;&quot;&gt;# 환경 변수 설정&lt;/span&gt;
cp .env.example .env.local
nano .env.local  &lt;span style=&quot;color:#6b7280;&quot;&gt;# DB URL, API 키 등 입력&lt;/span&gt;

&lt;span style=&quot;color:#6b7280;&quot;&gt;# Prisma + 빌드&lt;/span&gt;
npx prisma generate
npm run build

&lt;span style=&quot;color:#6b7280;&quot;&gt;# PM2로 실행&lt;/span&gt;
pm2 start npm --name &quot;cryptotoolbox&quot; -- start
pm2 save
pm2 startup  &lt;span style=&quot;color:#6b7280;&quot;&gt;# 서버 재부팅 시 자동 실행 설정&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;여기서 첫 번째 삽질이 나옵니다.&lt;/p&gt;

&lt;blockquote style=&quot;border-left:4px solid #f59e0b; background:#fffbeb; padding:14px 20px; margin:16px 0; border-radius:0 8px 8px 0; font-size:14px;&quot;&gt;
&lt;strong&gt;삽질 1:&lt;/strong&gt; &lt;code style=&quot;background:#fff; padding:2px 6px; border-radius:4px;&quot;&gt;npm install&lt;/code&gt; 하면 eslint 관련 peer dependency 충돌이 발생합니다.&lt;br&gt;
&lt;code style=&quot;background:#fff; padding:2px 6px; border-radius:4px;&quot;&gt;--legacy-peer-deps&lt;/code&gt; 플래그를 붙여야 설치가 됩니다.&lt;br&gt;
Next.js 14 + 최신 eslint 조합에서 자주 발생하는 문제입니다.
&lt;/blockquote&gt;

&lt;blockquote style=&quot;border-left:4px solid #f59e0b; background:#fffbeb; padding:14px 20px; margin:16px 0; border-radius:0 8px 8px 0; font-size:14px;&quot;&gt;
&lt;strong&gt;삽질 2:&lt;/strong&gt; &lt;code style=&quot;background:#fff; padding:2px 6px; border-radius:4px;&quot;&gt;.env.local&lt;/code&gt;을 안 만들고 빌드하면 DB 연결, API 호출이 전부 실패합니다.&lt;br&gt;
빌드는 성공하는데 &lt;strong&gt;런타임에서 500 에러&lt;/strong&gt;가 쏟아집니다.&lt;br&gt;
환경 변수 먼저 세팅하세요.
&lt;/blockquote&gt;

&lt;!--   사진 2: PM2 상태 화면
     ─ 터미널에서 `pm2 status` 명령 실행 결과 캡처
     ─ cryptotoolbox 프로세스가 online 상태로 보이도록
     ─ CPU, 메모리 사용량 컬럼이 함께 나오면 좋음
     ─ 터미널 배경이 어두운 테마면 가독성 좋음 --&gt;
&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/t3r7T/dJMcaiJq7BJ/SQu61cibOSkWg1aJEigaF0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/t3r7T/dJMcaiJq7BJ/SQu61cibOSkWg1aJEigaF0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/t3r7T/dJMcaiJq7BJ/SQu61cibOSkWg1aJEigaF0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Ft3r7T%2FdJMcaiJq7BJ%2FSQu61cibOSkWg1aJEigaF0%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;/p&gt;
&lt;p style=&quot;text-align:center; color:#999; font-size:13px; margin-top:-10px;&quot;&gt;PM2 상태 — cryptotoolbox가 online으로 돌아가는 모습&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 5 --&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;5. Nginx 리버스 프록시 설정&lt;/h2&gt;

&lt;p&gt;Next.js는 기본적으로 &lt;strong&gt;3000번 포트&lt;/strong&gt;에서 돌아갑니다.&lt;br&gt;
하지만 사용자는 80(HTTP)이나 443(HTTPS)으로 접속하죠.&lt;br&gt;
Nginx가 이 중간 다리 역할을 합니다.&lt;/p&gt;

&lt;div style=&quot;background:#f5f5f5; border:1px solid #e5e7eb; border-radius:8px; padding:16px 20px; margin:16px 0; overflow-x:auto;&quot;&gt;
&lt;pre style=&quot;margin:0; color:#333; font-family:'Fira Code','Consolas',monospace; font-size:13px; line-height:1.6;&quot;&gt;&lt;span style=&quot;color:#6b7280;&quot;&gt;# /etc/nginx/sites-available/cryptotoolbox&lt;/span&gt;
server {
    listen 80;
    server_name cryptotoolbox.io www.cryptotoolbox.io;

    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_cache_bypass $http_upgrade;
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;div style=&quot;background:#f5f5f5; border:1px solid #e5e7eb; border-radius:8px; padding:16px 20px; margin:16px 0; overflow-x:auto;&quot;&gt;
&lt;pre style=&quot;margin:0; color:#333; font-family:'Fira Code','Consolas',monospace; font-size:13px; line-height:1.6;&quot;&gt;&lt;span style=&quot;color:#6b7280;&quot;&gt;# 심볼릭 링크 생성 + Nginx 재시작&lt;/span&gt;
sudo ln -s /etc/nginx/sites-available/cryptotoolbox /etc/nginx/sites-enabled/
sudo nginx -t           &lt;span style=&quot;color:#6b7280;&quot;&gt;# 설정 문법 검사&lt;/span&gt;
sudo systemctl restart nginx&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;code style=&quot;background:#f0f4ff; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;X-Real-IP&lt;/code&gt;와 &lt;code style=&quot;background:#f0f4ff; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;X-Forwarded-For&lt;/code&gt; 헤더는 &lt;strong&gt;Rate Limiting에 필수&lt;/strong&gt;입니다.&lt;br&gt;
이걸 안 넣으면 모든 요청이 127.0.0.1에서 온 것으로 찍혀서 IP별 제한이 작동하지 않습니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 6 --&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;6. Cloudflare 연동&lt;/h2&gt;

&lt;p&gt;Cloudflare는 CDN + DDoS 방어 + SSL을 &lt;strong&gt;무료로&lt;/strong&gt; 제공합니다. 안 쓸 이유가 없습니다.&lt;/p&gt;

&lt;p&gt;설정 순서:&lt;/p&gt;

&lt;ol style=&quot;padding-left:20px;&quot;&gt;
&lt;li&gt;도메인 등록 업체에서 &lt;strong&gt;네임서버를 Cloudflare로 변경&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Cloudflare DNS에 &lt;strong&gt;A 레코드 추가&lt;/strong&gt; (cryptotoolbox.io → Lightsail Static IP)&lt;/li&gt;
&lt;li&gt;SSL/TLS 모드를 &lt;strong&gt;Full (Strict)&lt;/strong&gt;로 설정&lt;/li&gt;
&lt;li&gt;캐싱: Standard&lt;/li&gt;
&lt;/ol&gt;

&lt;!--   사진 3: Cloudflare DNS 설정
     ─ Cloudflare 대시보드 &gt; DNS &gt; Records 탭 캡처
     ─ A 레코드가 cryptotoolbox.io → IP 주소로 매핑된 모습
     ─ www 서브도메인 레코드도 보이면 좋음
     ─ 프록시 상태(주황색 구름 아이콘)가 켜져 있는 상태
     ─ ⚠️ IP 주소는 모자이크 처리 권장 --&gt;
&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/SVhmF/dJMcaiJq7CB/2RTlEd1Hg3GOk285KXN2Yk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/SVhmF/dJMcaiJq7CB/2RTlEd1Hg3GOk285KXN2Yk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/SVhmF/dJMcaiJq7CB/2RTlEd1Hg3GOk285KXN2Yk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FSVhmF%2FdJMcaiJq7CB%2F2RTlEd1Hg3GOk285KXN2Yk%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;/p&gt;
&lt;p style=&quot;text-align:center; color:#999; font-size:13px; margin-top:-10px;&quot;&gt;Cloudflare DNS — A 레코드로 Lightsail IP 연결&lt;/p&gt;

&lt;!--   사진 4: Cloudflare SSL/TLS 설정
     ─ Cloudflare 대시보드 &gt; SSL/TLS &gt; Overview 탭 캡처
     ─ &quot;Full (strict)&quot; 모드가 선택된 상태가 보이도록
     ─ 상단의 SSL/TLS encryption mode 섹션만 캡처해도 OK --&gt;
&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/b96J6a/dJMcafFZHNi/O9JJ03DkKXOyFFdU4whjQK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/b96J6a/dJMcafFZHNi/O9JJ03DkKXOyFFdU4whjQK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/b96J6a/dJMcafFZHNi/O9JJ03DkKXOyFFdU4whjQK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fb96J6a%2FdJMcafFZHNi%2FO9JJ03DkKXOyFFdU4whjQK%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;/p&gt;
&lt;p style=&quot;text-align:center; color:#999; font-size:13px; margin-top:-10px;&quot;&gt;SSL/TLS 모드 — Full (Strict) 선택&lt;/p&gt;

&lt;blockquote style=&quot;border-left:4px solid #f59e0b; background:#fffbeb; padding:14px 20px; margin:16px 0; border-radius:0 8px 8px 0; font-size:14px;&quot;&gt;
&lt;strong&gt;삽질 3:&lt;/strong&gt; SSL 모드를 &lt;strong&gt;&quot;Flexible&quot;&lt;/strong&gt;로 설정하면 무한 리다이렉트가 발생합니다.&lt;br&gt;
Cloudflare → 서버 구간이 HTTP가 되면서 서버가 &quot;HTTPS로 가세요&quot; → Cloudflare가 다시 HTTP로 보내기 → 무한 루프.&lt;br&gt;
&lt;strong&gt;반드시 &quot;Full (Strict)&quot;&lt;/strong&gt;로 설정하세요.
&lt;/blockquote&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 7 --&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;7. SSL 인증서 (Let's Encrypt)&lt;/h2&gt;

&lt;p&gt;Cloudflare가 사용자 ↔ Cloudflare 구간은 자동으로 SSL을 적용해줍니다.&lt;br&gt;
하지만 &lt;strong&gt;Full (Strict) 모드에서는 Cloudflare ↔ 서버 구간에도 유효한 인증서&lt;/strong&gt;가 필요합니다.&lt;/p&gt;

&lt;p&gt;Let's Encrypt로 무료 인증서를 발급받습니다.&lt;/p&gt;

&lt;div style=&quot;background:#f5f5f5; border:1px solid #e5e7eb; border-radius:8px; padding:16px 20px; margin:16px 0; overflow-x:auto;&quot;&gt;
&lt;pre style=&quot;margin:0; color:#333; font-family:'Fira Code','Consolas',monospace; font-size:13px; line-height:1.6;&quot;&gt;&lt;span style=&quot;color:#6b7280;&quot;&gt;# certbot 설치&lt;/span&gt;
sudo apt install certbot python3-certbot-nginx -y

&lt;span style=&quot;color:#6b7280;&quot;&gt;# 인증서 발급 (Nginx 자동 설정)&lt;/span&gt;
sudo certbot --nginx -d cryptotoolbox.io -d www.cryptotoolbox.io

&lt;span style=&quot;color:#6b7280;&quot;&gt;# 자동 갱신 테스트&lt;/span&gt;
sudo certbot renew --dry-run&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;certbot이 Nginx 설정까지 자동으로 수정해줍니다.&lt;br&gt;
443 포트 리스닝, 인증서 경로 설정이 전부 자동입니다.&lt;/p&gt;

&lt;!--   사진 5: 브라우저 SSL 확인
     ─ Chrome 또는 Safari에서 cryptotoolbox.io 접속 후 주소창 캡처
     ─ 자물쇠 아이콘이 선명하게 보이도록
     ─ &quot;연결이 안전합니다&quot; 또는 인증서 정보 팝업이 보이면 베스트
     ─ URL 바 전체가 나오도록 (https://cryptotoolbox.io) --&gt;
&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/cOlQEg/dJMcagSrjq4/IKHnKLhD83vC3BKdjmNIV1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/cOlQEg/dJMcagSrjq4/IKHnKLhD83vC3BKdjmNIV1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/cOlQEg/dJMcagSrjq4/IKHnKLhD83vC3BKdjmNIV1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcOlQEg%2FdJMcagSrjq4%2FIKHnKLhD83vC3BKdjmNIV1%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;/p&gt;
&lt;p style=&quot;text-align:center; color:#999; font-size:13px; margin-top:-10px;&quot;&gt;브라우저에서 자물쇠 확인 — SSL 정상 적용&lt;/p&gt;

&lt;p&gt;인증서는 90일마다 갱신이 필요한데, &lt;code style=&quot;background:#f0f4ff; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;certbot renew&lt;/code&gt;가 cron으로 자동 실행되므로 신경 쓸 필요 없습니다.&lt;/p&gt;


&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 8 --&gt;
&lt;h2 id=&quot;s8&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;8. 배포 업데이트 프로세스&lt;/h2&gt;

&lt;p&gt;코드를 수정하고 다시 배포할 때 매번 위 과정을 반복할 필요 없습니다.&lt;br&gt;
&lt;strong&gt;이 4줄이면 끝입니다.&lt;/strong&gt;&lt;/p&gt;

&lt;div style=&quot;background:#f5f5f5; border:1px solid #e5e7eb; border-radius:8px; padding:16px 20px; margin:16px 0; overflow-x:auto;&quot;&gt;
&lt;pre style=&quot;margin:0; color:#333; font-family:'Fira Code','Consolas',monospace; font-size:13px; line-height:1.6;&quot;&gt;git pull origin main
npm install --legacy-peer-deps
npm run build
pm2 restart cryptotoolbox&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Vercel처럼 push하면 자동 배포는 안 되지만, &lt;strong&gt;SSH 접속해서 4줄 치는 데 30초&lt;/strong&gt;면 됩니다.&lt;br&gt;
솔직히 이 정도는 감수할 수 있습니다.&lt;/p&gt;

&lt;blockquote style=&quot;border-left:4px solid #f59e0b; background:#fffbeb; padding:14px 20px; margin:16px 0; border-radius:0 8px 8px 0; font-size:14px;&quot;&gt;
&lt;strong&gt;삽질 4:&lt;/strong&gt; &lt;code style=&quot;background:#fff; padding:2px 6px; border-radius:4px;&quot;&gt;next dev&lt;/code&gt;가 실행 중인 상태에서 &lt;code style=&quot;background:#fff; padding:2px 6px; border-radius:4px;&quot;&gt;npm run build&lt;/code&gt;를 하면 &lt;strong&gt;포트 충돌이나 lock 파일 문제&lt;/strong&gt;가 발생할 수 있습니다.&lt;br&gt;
빌드 전에 기존 프로세스를 먼저 멈추세요.&lt;br&gt;
&lt;code style=&quot;background:#fff; padding:2px 6px; border-radius:4px;&quot;&gt;pm2 stop cryptotoolbox&lt;/code&gt; → 빌드 → &lt;code style=&quot;background:#fff; padding:2px 6px; border-radius:4px;&quot;&gt;pm2 restart cryptotoolbox&lt;/code&gt;.
&lt;/blockquote&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 9 --&gt;
&lt;h2 id=&quot;s9&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;9. 비용 비교 &amp; 마무리&lt;/h2&gt;

&lt;p&gt;결국 가장 중요한 건 비용입니다. Vercel과 비교해봤습니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;Vercel (Pro)&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center; border-radius:0 8px 0 0;&quot;&gt;Lightsail + Cloudflare&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;월 비용&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;$20~ (트래픽 비례)&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb; font-weight:700; color:#4a7cff;&quot;&gt;$10 (고정)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;SSL&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;자동&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;Let's Encrypt (자동 갱신)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;CDN&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;Vercel Edge&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;Cloudflare (무료)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;서버 커스텀&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;제한적&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;자유 (Redis, cron 등)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px;&quot;&gt;배포 난이도&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;쉬움 (git push)&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;중간 (초기 설정 필요)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Vercel이 편한 건 사실입니다.&lt;br&gt;
하지만 &lt;strong&gt;서버에 Redis를 직접 올리고, cron job도 돌리고, Rate Limiting도 서버단에서 처리&lt;/strong&gt;해야 하는 프로젝트라면 Lightsail이 더 적합합니다.&lt;/p&gt;

&lt;!--   사진 6: 배포 후 사이트 화면
     ─ 브라우저에서 cryptotoolbox.io 접속한 전체 화면 캡처
     ─ 메인 페이지 상단 (로고 + 히어로 섹션 + 계산기 카드 일부)
     ─ 주소창에 https://cryptotoolbox.io가 보이도록
     ─ 가능하면 Lighthouse 점수 또는 로딩 속도가 함께 보이면 베스트 --&gt;
&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bd1hSQ/dJMcaaxVe8R/8TwOeqZ9xKflO4VLt0vmP0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bd1hSQ/dJMcaaxVe8R/8TwOeqZ9xKflO4VLt0vmP0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bd1hSQ/dJMcaaxVe8R/8TwOeqZ9xKflO4VLt0vmP0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbd1hSQ%2FdJMcaaxVe8R%2F8TwOeqZ9xKflO4VLt0vmP0%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;/p&gt;
&lt;p style=&quot;text-align:center; color:#999; font-size:13px; margin-top:-10px;&quot;&gt;배포 완료 — cryptotoolbox.io 정상 접속 확인&lt;/p&gt;

&lt;blockquote style=&quot;border-left:4px solid #4a7cff; background:#f0f4ff; padding:14px 20px; margin:16px 0; border-radius:0 8px 8px 0;&quot;&gt;
정리하면: &lt;strong&gt;AWS Lightsail($10) + Cloudflare(무료) + Let's Encrypt(무료)&lt;/strong&gt;.&lt;br&gt;
초기 설정에 1~2시간 투자하면, 이후엔 4줄 명령어로 배포 끝.&lt;br&gt;
수익화 목적의 사이드 프로젝트에는 이 조합을 추천합니다.
&lt;/blockquote&gt;

&lt;p&gt;다음 글에서는 이 사이트로 &lt;strong&gt;AdSense 심사를 통과한 과정&lt;/strong&gt;을 다뤄보겠습니다.&lt;br&gt;
크립토 사이트는 Thin Content 거절을 피하기가 만만치 않거든요.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 면책고지 --&gt;
&lt;div style=&quot;background:#f8f9fa; border-radius:8px; padding:14px 20px; margin:0 0 24px; font-size:12px; color:#999; line-height:1.7;&quot;&gt;
&lt;strong&gt;면책 고지:&lt;/strong&gt; 이 글에서 소개하는 도구와 사이트는 정보 제공 목적이며, 투자 권유가 아닙니다.&lt;br&gt;
암호화폐 투자는 원금 손실 위험이 있으므로 투자 결정 전 충분한 검토를 권장합니다.
&lt;/div&gt;

&lt;/div&gt;</description>
      <category>사이드 프로젝트/CryptoToolbox 개발기</category>
      <category>AWSLightsail</category>
      <category>cloudflare</category>
      <category>CryptoToolbox</category>
      <category>letsencrypt</category>
      <category>NextJS배포</category>
      <category>nginx</category>
      <category>PM2</category>
      <category>SSL</category>
      <category>인프라</category>
      <category>저비용배포</category>
      <author>우기!</author>
      <guid isPermaLink="true">https://bigstupid.tistory.com/210</guid>
      <comments>https://bigstupid.tistory.com/210#entry210comment</comments>
      <pubDate>Wed, 25 Mar 2026 09:45:27 +0900</pubDate>
    </item>
    <item>
      <title>ETF 자동 리밸런싱의 사각지대 &amp;mdash; 소액으로 QQQ를 못 사는 이유</title>
      <link>https://bigstupid.tistory.com/209</link>
      <description>&lt;div style=&quot;max-width:760px; margin:0 auto; font-family:'Pretendard','Apple SD Gothic Neo',sans-serif; color:#222; line-height:1.8; font-size:16px;&quot;&gt;

&lt;!-- 시리즈 안내 --&gt;
&lt;blockquote style=&quot;border-left:4px solid #4a7cff; background:#f0f4ff; padding:14px 20px; margin:0 0 36px; border-radius:0 8px 8px 0; font-size:14px;&quot;&gt;
이 글은 &lt;a href=&quot;https://bigstupid.tistory.com/207&quot; style=&quot;color:#4a7cff;&quot;&gt;첫 번째 글: ETF 자동 리밸런싱 시스템 후기&lt;/a&gt;의 후속 시리즈입니다.&lt;br&gt;
TQQQ·QQQ·SCHD 3종 ETF를 시장 국면에 따라 자동 리밸런싱하는 전략을 운영 중입니다.
&lt;/blockquote&gt;

&lt;!-- 목차 --&gt;
&lt;div style=&quot;background:#f8f9fa; border-radius:12px; padding:20px 28px; margin-bottom:36px;&quot;&gt;
&lt;p style=&quot;font-weight:700; font-size:15px; margin:0 0 10px; color:#555;&quot;&gt;목차&lt;/p&gt;
&lt;ol style=&quot;margin:0; padding-left:20px; color:#333;&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#s1&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;QQQ 0주 문제&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s2&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;120만원 추가 환전&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s3&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;리밸런싱 결과&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s4&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;왜 QQQ를 안 샀는지&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s5&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;숫자로 뜯어보기&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s6&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;소액 + 고가 ETF의 한계&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s7&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;현재 포트폴리오&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s8&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;앞으로의 계획&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s9&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;마무리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 1 --&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;1. QQQ 0주 문제&lt;/h2&gt;

&lt;p&gt;ETF 자동 리밸런싱 봇을 운영한 지 열흘이 넘었습니다.&lt;br&gt;TQQQ도 사고, SCHD도 사고, 국면 전환도 잘 됐습니다.&lt;br&gt;그런데 &lt;strong&gt;QQQ만 여전히 0주&lt;/strong&gt;입니다.&lt;/p&gt;

&lt;p&gt;목표 비중은 35%인데 현재 비중은 0%.&lt;br&gt;포트폴리오의 핵심 포지션이 비어있는 겁니다.&lt;/p&gt;

&lt;p&gt;이유는 단순합니다.&lt;br&gt;&lt;strong&gt;QQQ 1주가 약 $470&lt;/strong&gt;이기 때문입니다.&lt;br&gt;총 자산이 $739인 상태에서 1주만 사면 전체의 63%가 QQQ가 됩니다.&lt;br&gt;목표 35%의 거의 두 배죠. 봇 입장에서는 살 수가 없는 겁니다.&lt;/p&gt;

&lt;p&gt;그래서 생각한 게, &quot;돈을 더 넣으면 되겠지&quot; 였습니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 2 --&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;2. 120만원 추가 환전&lt;/h2&gt;

&lt;p&gt;한국투자증권 앱에서 &lt;strong&gt;120만원을 달러로 환전&lt;/strong&gt;했습니다.&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/UiLWe/dJMcaiCCpQ0/pFWBmo0Tk9Ep89rE7A10NK/img.jpg&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/UiLWe/dJMcaiCCpQ0/pFWBmo0Tk9Ep89rE7A10NK/img.jpg&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/UiLWe/dJMcaiCCpQ0/pFWBmo0Tk9Ep89rE7A10NK/img.jpg&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FUiLWe%2FdJMcaiCCpQ0%2FpFWBmo0Tk9Ep89rE7A10NK%2Fimg.jpg&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600; width:40%;&quot;&gt;환전 금액&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;₩1,200,000&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;환율&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; text-align:right;&quot;&gt;1,499.12원/USD&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;환전 결과&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; color:#4a7cff; font-weight:700;&quot;&gt;$800.46&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/ct1VFS/dJMcacPXD7o/EH7KnRLn4AQWgseH0BTy80/img.jpg&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/ct1VFS/dJMcacPXD7o/EH7KnRLn4AQWgseH0BTy80/img.jpg&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/ct1VFS/dJMcacPXD7o/EH7KnRLn4AQWgseH0BTy80/img.jpg&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fct1VFS%2FdJMcacPXD7o%2FEH7KnRLn4AQWgseH0BTy80%2Fimg.jpg&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;/p&gt;

&lt;p&gt;환율 1,499원. 120만원이 $800 정도가 됐습니다.&lt;br&gt;기존 자산 $739에 더하면 &lt;strong&gt;총 약 $1,540&lt;/strong&gt;.&lt;br&gt;QQQ 1주($470)를 사도 전체의 30%니까, 목표 35%에 꽤 가까워질 거라고 계산했습니다.&lt;/p&gt;

&lt;p&gt;이제 다음 리밸런싱 시간을 기다려 보았습니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 3 --&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;3. 리밸런싱 결과&lt;/h2&gt;

&lt;p&gt;3월 18일 새벽 4:30, 봇이 리밸런싱을 실행.&lt;br&gt;텔레그램 알림이 왔습니다.&lt;/p&gt;

&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bm1qCZ/dJMcaaq45V2/qTbnLaCbEnoUQyj98bvbT1/img.jpg&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bm1qCZ/dJMcaaq45V2/qTbnLaCbEnoUQyj98bvbT1/img.jpg&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bm1qCZ/dJMcaaq45V2/qTbnLaCbEnoUQyj98bvbT1/img.jpg&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbm1qCZ%2FdJMcaaq45V2%2FqTbnLaCbEnoUQyj98bvbT1%2Fimg.jpg&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;ETF&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;매수 수량&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;매수 가격&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;매수 금액&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TQQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;4주&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$48.33&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$193.32&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;SCHD&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;9주&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$31.09&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$279.81&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#fff3cd;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;QQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; color:#dc2626; font-weight:700;&quot;&gt;0주&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;-&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;$0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;TQQQ 4주, SCHD 9주. 그리고 &lt;strong&gt;QQQ는 또 0주&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;120만원을 넣은 이유가 QQQ를 사기 위해서였는데,&lt;br&gt;의도한 결과와 달리 봇은 QQQ를 건너뛰고 TQQQ와 SCHD만 샀습니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 4 --&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;4. 왜 QQQ를 안 샀는지&lt;/h2&gt;

&lt;p&gt;로그를 확인해봤습니다.&lt;br&gt;원인은 봇의 &lt;strong&gt;비례 배분 로직&lt;/strong&gt;이었습니다.&lt;/p&gt;

&lt;p&gt;리밸런싱할 때 봇이 하는 일을 정리하면 아래와 같습니다:&lt;/p&gt;

&lt;ol style=&quot;padding-left:20px;&quot;&gt;
&lt;li&gt;각 ETF가 목표 비중 대비 얼마나 부족한지 계산&lt;/li&gt;
&lt;li&gt;부족한 만큼의 매수 수량을 구함&lt;/li&gt;
&lt;li&gt;보유 현금이 부족하면 전체 매수 수량을 &lt;strong&gt;같은 비율로 축소&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;축소 결과가 소수점이면 내림 처리&lt;/li&gt;
&lt;li&gt;내림해서 0주가 되면 스킵&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;현재 국면은 &lt;span style=&quot;background:#dcfce7; color:#16a34a; padding:2px 10px; border-radius:4px; font-size:13px; font-weight:600;&quot;&gt;BULL&lt;/span&gt;이고, 목표 비중은 TQQQ 25%, QQQ 35%, SCHD 40%입니다.&lt;br&gt;세 종목 다 부족하니까 세 종목 다 사야 하는데, 현금이 모자랐던 겁니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 5 --&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;5. 숫자로 뜯어보기&lt;/h2&gt;

&lt;p&gt;구체적으로 계산해봤습니다.&lt;br&gt;총 자산 약 $1,540 기준입니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;ETF&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;목표 금액&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;현재 보유&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;부족 금액&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;필요 수량&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TQQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$385&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;~$145&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;~$240&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;약 5주&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;QQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$539&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$0&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$539&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626; font-weight:700;&quot;&gt;1주&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;SCHD&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;$616&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;~$310&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;~$306&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;약 10주&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;세 종목을 다 채우려면 약 &lt;strong&gt;$1,085&lt;/strong&gt;가 필요한데, 가용 현금은 약 &lt;strong&gt;$800&lt;/strong&gt;입니다.&lt;br&gt;현금이 부족하니까 봇은 모든 종목의 수량을 같은 비율로 줄입니다.&lt;/p&gt;

&lt;blockquote style=&quot;border-left:4px solid #f59e0b; background:#fffbeb; padding:14px 20px; margin:16px 0; border-radius:0 8px 8px 0; font-size:14px;&quot;&gt;
&lt;strong&gt;축소 비율:&lt;/strong&gt; $800 ÷ $1,085 ≈ &lt;strong&gt;0.74&lt;/strong&gt;&lt;br&gt;
세 종목 전부 매수 수량에 0.74를 곱합니다.
&lt;/blockquote&gt;

&lt;p&gt;여기서 문제가 생겼습니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;ETF&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;원래 수량&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;× 0.74&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;결과&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TQQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;5주&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;3.7주&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background:#dcfce7; color:#16a34a; padding:2px 8px; border-radius:4px; font-size:12px;&quot;&gt;4주 매수&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;QQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;1주&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626; font-weight:700;&quot;&gt;0.74주 → 0주&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background:#f3f4f6; color:#6b7280; padding:2px 8px; border-radius:4px; font-size:12px;&quot;&gt;SKIPPED&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;SCHD&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;10주&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;7.4주&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;&lt;span style=&quot;background:#dcfce7; color:#16a34a; padding:2px 8px; border-radius:4px; font-size:12px;&quot;&gt;9주 매수&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;TQQQ는 5주에서 4주로 줄어도 매수가 됩니다. SCHD도 10주에서 9주.&lt;br&gt;문제는 QQQ입니다.&lt;br&gt;&lt;strong&gt;원래 1주만 필요한데, 0.74를 곱하면 0.74주&lt;/strong&gt;가 됩니다.&lt;br&gt;소수점은 버리니까 0주. 그냥 스킵되는 겁니다.&lt;/p&gt;

&lt;p&gt;수량이 많은 종목은 좀 깎여도 살아남는데,&lt;br&gt;&lt;strong&gt;딱 1주만 필요한 고가 ETF&lt;/strong&gt;는 비례 축소에서 0이 되어버립니다.&lt;br&gt;이게 핵심이었습니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 6 --&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;6. 소액 + 고가 ETF의 한계&lt;/h2&gt;

&lt;p&gt;봇이 잘못한 건 아닙니다.&lt;br&gt;현금이 부족할 때 한 종목에 몰아넣지 않고 전체를 균등하게 줄이는 건, 분산 투자 관점에서 합리적인 판단입니다.&lt;/p&gt;

&lt;p&gt;문제는 &lt;strong&gt;소액 + 고가 ETF 조합&lt;/strong&gt; 자체에 있습니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;ETF&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;1주 가격&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;목표 비중 충족에 필요한 최소 자산&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TQQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;~$48&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;$192&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;QQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626; font-weight:700;&quot;&gt;~$470&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626; font-weight:700;&quot;&gt;$1,343&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;SCHD&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;~$31&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;$78&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;TQQQ는 $48이니까 소액으로도 비중 조절이 됩니다. SCHD도 $31이라 마찬가지입니다.&lt;br&gt;그런데 &lt;strong&gt;QQQ는 1주가 $470&lt;/strong&gt;이라 최소 $1,343은 있어야 비중을 맞출 수 있습니다.&lt;/p&gt;

&lt;p&gt;총 자산 $1,540이면 숫자상으로는 가능한데, 문제는 TQQQ와 SCHD도 동시에 채워야 한다는 겁니다.&lt;br&gt;세 종목을 한 번에 목표까지 채울 현금이 안 되면, QQQ가 잘려나가는 구조입니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 7 --&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;7. 현재 포트폴리오&lt;/h2&gt;

&lt;p&gt;리밸런싱 후 현재 상태는 아래와 같습니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;ETF&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;수량&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;현재 비중&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right;&quot;&gt;목표 (BULL)&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;편차&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;TQQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;7주&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;~22%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;25%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;-3%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;QQQ&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626; font-weight:700;&quot;&gt;0주&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626; font-weight:700;&quot;&gt;0%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;35%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb; color:#dc2626; font-weight:700;&quot;&gt;-35%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;
&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb; font-weight:600;&quot;&gt;SCHD&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;19주&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;~38%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;40%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;-2%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding:10px 14px; font-weight:600;&quot;&gt;USD 현금&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;-&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;~40%&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;-&lt;/td&gt;
&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;TQQQ와 SCHD는 목표에 거의 근접했습니다.&lt;br&gt;하지만 QQQ 자리에 현금이 40%나 남아있습니다.&lt;br&gt;120만원을 넣었는데 현금이 제일 큰 비중이라는 게 좀 아이러니합니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 8 --&gt;
&lt;h2 id=&quot;s8&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;8. 앞으로의 계획&lt;/h2&gt;

&lt;p&gt;해결 방법은 크게 두 가지가 있습니다.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;방법 1: 추가 입금&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;세 종목을 한 번에 다 채울 만큼 넉넉하게 넣으면 비례 축소 자체가 발생하지 않습니다.&lt;br&gt;다만 그만큼 추가 자금이 필요합니다.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;방법 2: 봇 로직 수정&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&quot;비례 축소 결과가 0주인데, 원래 1주 이상 필요한 종목이면 1주는 반드시 매수&quot;하는 예외 처리를 넣는 방법입니다.&lt;br&gt;다만 이러면 다른 종목의 비중이 밀리니까, 단순하게 고치기는 어렵습니다.&lt;/p&gt;

&lt;p&gt;당장은 추가 환전으로 자산을 키울 생각입니다.&lt;br&gt;봇 로직 수정은 이번 경험을 바탕으로 좀 더 고민해보려 합니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 9 --&gt;
&lt;h2 id=&quot;s9&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;9. 마무리&lt;/h2&gt;

&lt;p&gt;QQQ를 사려고 120만원을 넣었더니, TQQQ 4주와 SCHD 9주가 돌아왔습니다.&lt;br&gt;봇은 자기 로직대로 성실하게 한 것뿐인데, 의도한 결과는 아니었습니다.&lt;/p&gt;

&lt;p&gt;소액으로 고가 ETF를 자동 매수하면 이런 사각지대가 있다는 걸, 직접 돈을 넣어보고 나서야 알게 됐습니다.&lt;br&gt;자동매매가 편한 건 맞지만, &lt;strong&gt;만능은 아닙니다&lt;/strong&gt;.&lt;br&gt;이런 엣지 케이스는 직접 운영해봐야 보이는 것 같습니다.&lt;/p&gt;

&lt;p&gt;다음 글에서는 QQQ를 실제로 매수한 후기를 가져오겠습니다.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 이전 글 링크 --&gt;
&lt;p&gt;&lt;strong&gt;관련 글:&lt;/strong&gt; &lt;a href=&quot;https://bigstupid.tistory.com/207&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;ETF 자동 리밸런싱 8일 후기 — 첫 글&lt;/a&gt;&lt;/p&gt;

&lt;div style=&quot;background:#f8f9fa; border-radius:8px; padding:14px 20px; margin:0 0 24px; font-size:12px; color:#999; line-height:1.7;&quot;&gt;
&lt;strong&gt;면책 고지:&lt;/strong&gt; 이 글은 개인적인 투자 기록이며 특정 종목의 매수·매도를 권유하지 않습니다. 모든 투자의 책임은 본인에게 있으며, 레버리지 ETF(TQQQ)는 높은 변동성으로 원금 손실 위험이 큽니다. 투자 결정 전 충분한 검토를 권장합니다.
&lt;/div&gt;

&lt;/div&gt;</description>
      <category>투자 일지/ETF 자동 리밸런싱</category>
      <category>ETF</category>
      <category>qqq</category>
      <category>SCHD</category>
      <category>TQQQ</category>
      <category>리밸런싱봇</category>
      <category>자동리밸런싱</category>
      <category>자동매매</category>
      <category>한국투자증권</category>
      <category>해외주식</category>
      <author>우기!</author>
      <guid isPermaLink="true">https://bigstupid.tistory.com/209</guid>
      <comments>https://bigstupid.tistory.com/209#entry209comment</comments>
      <pubDate>Thu, 19 Mar 2026 22:03:48 +0900</pubDate>
    </item>
    <item>
      <title>AI가 코드 다 짜줬다? Claude Code로 크립토 도구 사이트 만든 솔직 후기</title>
      <link>https://bigstupid.tistory.com/208</link>
      <description>&lt;div style=&quot;max-width:760px; margin:0 auto; font-family:'Pretendard','Apple SD Gothic Neo',sans-serif; color:#222; line-height:1.8; font-size:16px;&quot;&gt;

&lt;!-- 목차 --&gt;
&lt;div style=&quot;background:#f8f9fa; border-radius:12px; padding:20px 28px; margin-bottom:36px;&quot;&gt;
&lt;p style=&quot;font-weight:700; font-size:15px; margin:0 0 10px; color:#555;&quot;&gt;목차&lt;/p&gt;
&lt;ol style=&quot;margin:0; padding-left:20px; color:#333;&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#s1&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;왜 만들었나&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s2&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;바이브 코딩이 뭔데?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s3&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;기술 스택 선택&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s4&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;계산기 9개 한번에&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s5&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;포트폴리오 분석 툴 3종&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s6&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;과거 가격 데이터 수집 삽질&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s7&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;결국 사람이 개입해야 했던 순간들&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s8&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;Claude Code 사용 후기 (솔직)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s9&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;현재 사이트 모습&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s10&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;비용 정리&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#s11&quot; style=&quot;color:#4a7cff; text-decoration:none;&quot;&gt;마무리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 1 --&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;1. 왜 만들었나&lt;/h2&gt;

&lt;p&gt;크립토 계산기 사이트를 하나 만들어보고 싶었습니다.&lt;/p&gt;

&lt;p&gt;검색해보면 대부분 영어 사이트이고, 광고가 떡칠이고, 정작 필요한 기능은 유료입니다. &quot;이거 직접 만들면 AdSense로 수익화도 되지 않을까?&quot; 하는 생각이 출발점이었습니다.&lt;/p&gt;

&lt;p&gt;목표는 단순했습니다:&lt;/p&gt;

&lt;blockquote style=&quot;border-left:4px solid #4a7cff; background:#f0f4ff; padding:14px 20px; margin:16px 0; border-radius:0 8px 8px 0;&quot;&gt;
&lt;strong&gt;도구형 사이트는 SEO에 강하다.&lt;/strong&gt; 계산기 + 가이드 콘텐츠를 결합하면 검색 유입이 꾸준히 들어올 것이다. 이걸 직접 검증해보자.
&lt;/blockquote&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 2 --&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;2. 바이브 코딩이 뭔데?&lt;/h2&gt;

&lt;p&gt;이번 프로젝트는 &lt;strong&gt;Claude Code&lt;/strong&gt;(CLI)로 만들었습니다. 요즘 말하는 &quot;바이브 코딩&quot;이죠.&lt;/p&gt;

&lt;p&gt;작동 방식은 간단합니다:&lt;/p&gt;

&lt;ol style=&quot;padding-left:20px;&quot;&gt;
&lt;li&gt;프롬프트로 &quot;이런 기능 만들어줘&quot; 요청&lt;/li&gt;
&lt;li&gt;AI가 코드 생성&lt;/li&gt;
&lt;li&gt;결과 확인 → 수정 요청 → 반복&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;솔직히 말하면 &lt;strong&gt;제가 직접 타이핑한 코드는 거의 없습니다.&lt;/strong&gt; 대신 &quot;이건 아닌데?&quot;, &quot;이렇게 바꿔줘&quot;라고 지시하는 시간이 대부분이었습니다.&lt;/p&gt;

&lt;p&gt;체감 생산성은? 혼자 2주 만에 완성했는데, 직접 코딩했으면 1~2달은 걸렸을 겁니다.&lt;/p&gt;

&lt;!--   사진 1: Claude Code 터미널 --&gt;
&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bFOzbc/dJMcacbj3tZ/gpxxrrjKkKMkRp7mmALC5K/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bFOzbc/dJMcacbj3tZ/gpxxrrjKkKMkRp7mmALC5K/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bFOzbc/dJMcacbj3tZ/gpxxrrjKkKMkRp7mmALC5K/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbFOzbc%2FdJMcacbj3tZ%2FgpxxrrjKkKMkRp7mmALC5K%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;/p&gt;
&lt;p style=&quot;text-align:center; color:#999; font-size:13px; margin-top:-10px;&quot;&gt;Claude Code CLI에서 프롬프트로 코드를 생성하는 모습&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 3 --&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;3. 기술 스택 선택&lt;/h2&gt;

&lt;p&gt;기술 스택은 이렇게 정했습니다:&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:0 8px 0 0;&quot;&gt;선택&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;프레임워크&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Next.js 14 (App Router)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;스타일링&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Tailwind CSS + shadcn/ui&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;DB&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;PostgreSQL + Prisma ORM&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;캐시&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Redis (개발 서버에 직접 설치)&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;데이터&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;CoinGecko API + CryptoCompare&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px;&quot;&gt;배포&lt;/td&gt;&lt;td style=&quot;padding:10px 14px;&quot;&gt;AWS Lightsail + Cloudflare&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;왜 이 조합인가? &lt;strong&gt;SSG(정적 생성) + Redis 캐싱&lt;/strong&gt;이면 페이지 로딩이 빠르고, SEO 점수가 높게 나옵니다. AdSense 수익화에는 이 두 가지가 핵심이거든요.&lt;/p&gt;

&lt;p&gt;Redis는 Upstash 같은 클라우드 서비스 대신 &lt;strong&gt;개발 서버에 직접 설치해서 사용&lt;/strong&gt;하고 있습니다. 어차피 Lightsail 서버를 쓰고 있으니 같은 서버에 Redis를 올리면 추가 비용이 없거든요.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 4 --&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;4. 계산기 9개 한번에&lt;/h2&gt;

&lt;p&gt;처음부터 계산기를 여러 개 만들 계획이었습니다. 도구형 사이트는 &lt;strong&gt;도구가 많을수록 검색 유입 경로가 넓어지니까요.&lt;/strong&gt;&lt;/p&gt;

&lt;!--   사진 2: 메인 페이지 --&gt;
&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bdICqb/dJMcaaq3bu3/LW3Vi4gOFthmm2EHnxKM9K/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bdICqb/dJMcaaq3bu3/LW3Vi4gOFthmm2EHnxKM9K/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bdICqb/dJMcaaq3bu3/LW3Vi4gOFthmm2EHnxKM9K/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbdICqb%2FdJMcaaq3bu3%2FLW3Vi4gOFthmm2EHnxKM9K%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;/p&gt;
&lt;p style=&quot;text-align:center; color:#999; font-size:13px; margin-top:-10px;&quot;&gt;cryptotoolbox.io 메인 페이지 — 계산기 9개 + 분석 툴 카드&lt;/p&gt;

&lt;p&gt;만든 계산기 목록:&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;#&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left;&quot;&gt;계산기&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:0 8px 0 0;&quot;&gt;기능&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;1&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Bitcoin Investment&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;과거 특정일에 투자했다면?&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;2&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Crypto Profit&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;매수/매도 수익 계산&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;3&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;DCA Calculator&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;적립식 투자 시뮬레이션&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;4&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Staking Calculator&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;스테이킹 보상 예측&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;5&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Crypto Tax&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;국가별 세금 추정&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;6&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Crypto Converter&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;실시간 환산&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;7&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Mining Calculator&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;채굴 수익성 계산&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;8&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Portfolio Rebalancer&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;리밸런싱 매매 계산&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px;&quot;&gt;9&lt;/td&gt;&lt;td style=&quot;padding:10px 14px;&quot;&gt;Portfolio Risk Score&lt;/td&gt;&lt;td style=&quot;padding:10px 14px;&quot;&gt;5요인 리스크 분석&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;모든 계산 로직은 &lt;code style=&quot;background:#f0f4ff; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;/utils&lt;/code&gt; 폴더에 순수 함수로 분리했습니다. UI와 로직을 섞지 않는 게 규칙이었거든요.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 5 --&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;5. 포트폴리오 분석 툴 3종&lt;/h2&gt;

&lt;p&gt;단순 계산기를 넘어서 &lt;strong&gt;실제 투자 전략을 검증할 수 있는 툴&lt;/strong&gt;을 3개 더 만들었습니다.&lt;/p&gt;

&lt;div style=&quot;display:flex; gap:16px; flex-wrap:wrap; margin:16px 0;&quot;&gt;
&lt;div style=&quot;flex:1; min-width:220px; background:#f0f4ff; border-radius:12px; padding:20px;&quot;&gt;
&lt;p style=&quot;font-weight:700; font-size:16px; margin:0 0 8px; color:#4a7cff;&quot;&gt;Rebalancing Backtester&lt;/p&gt;
&lt;p style=&quot;margin:0; font-size:14px; color:#555;&quot;&gt;&quot;이 전략이 과거에 통했을까?&quot;&lt;br&gt;과거 데이터로 리밸런싱 전략을 시뮬레이션합니다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;flex:1; min-width:220px; background:#f0fdf4; border-radius:12px; padding:20px;&quot;&gt;
&lt;p style=&quot;font-weight:700; font-size:16px; margin:0 0 8px; color:#16a34a;&quot;&gt;Strategy Builder&lt;/p&gt;
&lt;p style=&quot;margin:0; font-size:14px; color:#555;&quot;&gt;&quot;DCA 하면서 리밸런싱도 같이 하면?&quot;&lt;br&gt;적립식 + 리밸런싱 통합 전략 설계.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;flex:1; min-width:220px; background:#fef2f2; border-radius:12px; padding:20px;&quot;&gt;
&lt;p style=&quot;font-weight:700; font-size:16px; margin:0 0 8px; color:#dc2626;&quot;&gt;Portfolio Risk Score&lt;/p&gt;
&lt;p style=&quot;margin:0; font-size:14px; color:#555;&quot;&gt;&quot;내 포트폴리오 리스크가 얼마나 되지?&quot;&lt;br&gt;변동성·집중도·상관관계 5요인 분석.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;!--   사진 3: 백테스터 결과 --&gt;
&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/pBwX3/dJMcadgZX9j/0RR89O96kT67PjYQhmu0kk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/pBwX3/dJMcadgZX9j/0RR89O96kT67PjYQhmu0kk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/pBwX3/dJMcadgZX9j/0RR89O96kT67PjYQhmu0kk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FpBwX3%2FdJMcadgZX9j%2F0RR89O96kT67PjYQhmu0kk%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;/p&gt;
&lt;p style=&quot;text-align:center; color:#999; font-size:13px; margin-top:-10px;&quot;&gt;백테스터 — 리밸런싱 전략 vs BTC 단독 보유 비교 차트&lt;/p&gt;

&lt;!--   사진 4: Risk Score --&gt;
&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/EBgoX/dJMcacPVLad/XmW8iYAKONYu9hLj673erK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/EBgoX/dJMcacPVLad/XmW8iYAKONYu9hLj673erK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/EBgoX/dJMcacPVLad/XmW8iYAKONYu9hLj673erK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FEBgoX%2FdJMcacPVLad%2FXmW8iYAKONYu9hLj673erK%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;/p&gt;
&lt;p style=&quot;text-align:center; color:#999; font-size:13px; margin-top:-10px;&quot;&gt;Risk Score — 게이지 + 요인별 분석 + 상관관계 매트릭스&lt;/p&gt;

&lt;p&gt;이 3개 툴이 다른 계산기 사이트와의 &lt;strong&gt;차별점&lt;/strong&gt;입니다. 단순히 숫자 계산만 하는 게 아니라 전략을 검증하고, 리스크를 분석해주거든요.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 6 --&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;6. 과거 가격 데이터 수집 삽질&lt;/h2&gt;

&lt;p&gt;백테스터와 전략 빌더를 돌리려면 &lt;strong&gt;과거 가격 데이터&lt;/strong&gt;가 필요합니다. 2020년부터 지금까지, 코인별로요.&lt;/p&gt;

&lt;p&gt;처음에는 CoinGecko API로 수집하려 했는데, 무료 플랜은 &lt;strong&gt;최근 365일만&lt;/strong&gt; 제공합니다. 유료 플랜은 월 $130부터.&lt;/p&gt;

&lt;p&gt;데이터 수집 스크립트를 돌리다가 컴퓨터가 멈춰서 재부팅된 적도 있습니다. 알고 보니 API 문제가 아니라 &lt;strong&gt;macOS 커널 패닉&lt;/strong&gt;이었지만, 처음엔 &quot;내가 뭘 잘못한 건가&quot; 싶어서 한참 헤맸습니다.&lt;/p&gt;

&lt;blockquote style=&quot;border-left:4px solid #f59e0b; background:#fffbeb; padding:14px 20px; margin:16px 0; border-radius:0 8px 8px 0; font-size:14px;&quot;&gt;
해결: &lt;strong&gt;CryptoCompare API&lt;/strong&gt;는 무료로 전체 과거 데이터를 제공합니다. 한 번에 2,000일치까지 조회 가능.
&lt;/blockquote&gt;

&lt;p&gt;결과적으로 11개 코인 &amp;times; 약 6년 = &lt;strong&gt;24,051건&lt;/strong&gt;을 무료로 수집했습니다.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;API&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;과거 데이터&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:center;&quot;&gt;비용&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:0 8px 0 0;&quot;&gt;용도&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;CoinGecko&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;365일 제한&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:center; border-bottom:1px solid #e5e7eb;&quot;&gt;무료&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;현재가, APR (일상 운영)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px;&quot;&gt;CryptoCompare&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;제한 없음&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:center;&quot;&gt;무료&lt;/td&gt;&lt;td style=&quot;padding:10px 14px;&quot;&gt;과거 데이터 백필&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;교훈: &lt;strong&gt;무료 API를 여러 개 조합하면 유료 못지않은 데이터를 확보할 수 있습니다.&lt;/strong&gt;&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 7 — 새 섹션: 인간 개입 --&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;7. 결국 사람이 개입해야 했던 순간들&lt;/h2&gt;

&lt;p&gt;&quot;AI가 다 해주는 거 아니야?&quot; 하고 생각할 수 있는데, &lt;strong&gt;절대 아닙니다.&lt;/strong&gt; 중간중간 제가 직접 판단하고 수정해야 했던 순간들이 꽤 있었습니다.&lt;/p&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;무한 재귀 버그&lt;/h3&gt;
&lt;p&gt;Portfolio Risk Score를 만들 때, AI가 &quot;개선 제안&quot;을 계산하는 로직에서 &lt;strong&gt;점수 계산 함수가 자기 자신을 무한히 호출&lt;/strong&gt;하는 버그를 만들었습니다. 스택 오버플로우로 서버가 죽었고, 원인을 찾아서 점수 전용 함수를 분리하는 건 제가 직접 지시해야 했습니다.&lt;/p&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;AdSense 스크립트 삽입 실수&lt;/h3&gt;
&lt;p&gt;Next.js의 &lt;code style=&quot;background:#f0f4ff; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;&amp;lt;Script&amp;gt;&lt;/code&gt; 컴포넌트로 AdSense 코드를 넣었더니, &lt;strong&gt;preload로 변환&lt;/strong&gt;되어서 Google 크롤러가 인증 코드를 인식하지 못했습니다. 소문자 &lt;code style=&quot;background:#f0f4ff; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;&amp;lt;script&amp;gt;&lt;/code&gt;로 직접 넣어야 한다는 걸 파악하고 수정한 건 저였습니다.&lt;/p&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;CoinGecko 유료 한도 모르고 삽질&lt;/h3&gt;
&lt;p&gt;AI가 &quot;CoinGecko 무료 API로 과거 데이터 전부 수집 가능&quot;이라고 했는데, 실제로 돌려보니 &lt;strong&gt;365일 제한에 걸려서 401 에러&lt;/strong&gt;가 쏟아졌습니다. 대안 API를 조사하고 CryptoCompare로 전환하는 판단은 제가 한 겁니다.&lt;/p&gt;

&lt;h3 style=&quot;font-size:18px; font-weight:600; margin:24px 0 12px;&quot;&gt;npm install 버전 충돌&lt;/h3&gt;
&lt;p&gt;서버에서 &lt;code style=&quot;background:#f0f4ff; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;npm install&lt;/code&gt;을 실행했더니 eslint 버전 충돌로 설치가 안 됐습니다. &lt;code style=&quot;background:#f0f4ff; padding:2px 6px; border-radius:4px; font-size:14px;&quot;&gt;--legacy-peer-deps&lt;/code&gt; 플래그를 붙여야 한다는 걸 찾는 것도 직접 해야 했습니다.&lt;/p&gt;

&lt;blockquote style=&quot;border-left:4px solid #f59e0b; background:#fffbeb; padding:14px 20px; margin:16px 0; border-radius:0 8px 8px 0;&quot;&gt;
&lt;strong&gt;핵심:&lt;/strong&gt; AI는 코드를 빠르게 생성해주지만, &quot;이게 맞는지&quot; 판단하고 &quot;틀렸을 때 왜 틀렸는지&quot; 찾는 건 여전히 사람의 일입니다. 바이브 코딩은 &lt;strong&gt;개발을 없애는 게 아니라 개발의 종류를 바꾸는 것&lt;/strong&gt;입니다.
&lt;/blockquote&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 8 --&gt;
&lt;h2 id=&quot;s8&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;8. Claude Code 사용 후기 (솔직)&lt;/h2&gt;

&lt;div style=&quot;display:flex; gap:16px; flex-wrap:wrap; margin:16px 0;&quot;&gt;
&lt;div style=&quot;flex:1; min-width:280px; background:#f0fdf4; border-radius:12px; padding:20px;&quot;&gt;
&lt;p style=&quot;font-weight:700; font-size:16px; margin:0 0 12px; color:#16a34a;&quot;&gt;좋았던 점&lt;/p&gt;
&lt;ul style=&quot;padding-left:18px; margin:0; color:#333;&quot;&gt;
&lt;li&gt;&lt;strong&gt;반복 코드&lt;/strong&gt;가 많은 작업에서 압도적으로 빠름&lt;/li&gt;
&lt;li&gt;9개 계산기 페이지를 &lt;strong&gt;일관된 패턴&lt;/strong&gt;으로 생성&lt;/li&gt;
&lt;li&gt;API route + Redis 캐싱 보일러플레이트 자동 생성&lt;/li&gt;
&lt;li&gt;SEO 메타태그, FAQ, Schema.org 일괄 적용&lt;/li&gt;
&lt;li&gt;병렬 에이전트로 여러 파일 동시 수정&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div style=&quot;flex:1; min-width:280px; background:#fef2f2; border-radius:12px; padding:20px;&quot;&gt;
&lt;p style=&quot;font-weight:700; font-size:16px; margin:0 0 12px; color:#dc2626;&quot;&gt;아쉬웠던 점&lt;/p&gt;
&lt;ul style=&quot;padding-left:18px; margin:0; color:#333;&quot;&gt;
&lt;li&gt;재귀 호출, preload 변환 등 &lt;strong&gt;미묘한 버그&lt;/strong&gt; 생성&lt;/li&gt;
&lt;li&gt;가끔 요청 안 한 부분까지 수정해버림&lt;/li&gt;
&lt;li&gt;긴 파일 수정 시 &lt;strong&gt;컨텍스트를 놓치는&lt;/strong&gt; 경우&lt;/li&gt;
&lt;li&gt;외부 API 제약 같은 &lt;strong&gt;현실 조건을 모름&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;결국 코드 리뷰와 아키텍처 결정은 사람 몫&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;!--   사진 5: 어드민 대시보드 --&gt;
&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/OEHjE/dJMcagktxEm/h2xNA8CgAghiKhJUd13AM0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/OEHjE/dJMcagktxEm/h2xNA8CgAghiKhJUd13AM0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/OEHjE/dJMcagktxEm/h2xNA8CgAghiKhJUd13AM0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FOEHjE%2FdJMcagktxEm%2Fh2xNA8CgAghiKhJUd13AM0%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;/p&gt;
&lt;p style=&quot;text-align:center; color:#999; font-size:13px; margin-top:-10px;&quot;&gt;어드민 대시보드 — 코인 관리, 크론잡, Rate Limit 모니터링&lt;/p&gt;

&lt;blockquote style=&quot;border-left:4px solid #4a7cff; background:#f0f4ff; padding:14px 20px; margin:16px 0; border-radius:0 8px 8px 0;&quot;&gt;
결론: 바이브 코딩은 &lt;strong&gt;&quot;0 &amp;rarr; 1&quot;을 빠르게 만드는 도구&lt;/strong&gt;이지, &quot;코딩을 몰라도 되는 마법&quot;은 아닙니다. 코드를 읽고 검증할 수 있어야 의미가 있습니다.
&lt;/blockquote&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 9 --&gt;
&lt;h2 id=&quot;s9&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;9. 현재 사이트 모습&lt;/h2&gt;

&lt;!--   사진 6: 계산기 결과 --&gt;
&lt;p style=&quot;text-align:center; margin:20px 0;&quot;&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; width=&quot;100%&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bMczp7/dJMcaio5ntj/glAubx7gEmI5cfsWRI3YG0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bMczp7/dJMcaio5ntj/glAubx7gEmI5cfsWRI3YG0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bMczp7/dJMcaio5ntj/glAubx7gEmI5cfsWRI3YG0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbMczp7%2FdJMcaio5ntj%2FglAubx7gEmI5cfsWRI3YG0%2Fimg.png&quot; width=&quot;100%&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;/p&gt;
&lt;p style=&quot;text-align:center; color:#999; font-size:13px; margin-top:-10px;&quot;&gt;Bitcoin Investment Calculator — 과거 투자 수익 시뮬레이션&lt;/p&gt;

&lt;p&gt;사이트 주소: &lt;a href=&quot;https://cryptotoolbox.io&quot; style=&quot;color:#4a7cff; text-decoration:none; font-weight:600;&quot;&gt;cryptotoolbox.io&lt;/a&gt;&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;기능&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;개수&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;계산기&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;9개&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;포트폴리오 분석 툴&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;3개&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;스테이킹 가이드&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;9개&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px;&quot;&gt;지원 코인&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right;&quot;&gt;50+&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 10 --&gt;
&lt;h2 id=&quot;s10&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;10. 비용 정리&lt;/h2&gt;

&lt;p&gt;사이드 프로젝트에서 비용은 중요합니다. 수익이 나기 전에 비용이 크면 의미가 없으니까요.&lt;/p&gt;

&lt;table style=&quot;width:100%; border-collapse:collapse; margin:16px 0; font-size:14px;&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background:#4a7cff; color:#fff;&quot;&gt;
&lt;th style=&quot;padding:10px 14px; text-align:left; border-radius:8px 0 0 0;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;padding:10px 14px; text-align:right; border-radius:0 8px 0 0;&quot;&gt;비용&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;도메인 (cryptotoolbox.io)&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;연 $12&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;AWS Lightsail (2GB)&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;월 $10&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Redis&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;무료 (서버 내 설치)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;CoinGecko / CryptoCompare API&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;무료&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f8f9fa;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-bottom:1px solid #e5e7eb;&quot;&gt;Cloudflare (CDN + SSL)&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-bottom:1px solid #e5e7eb;&quot;&gt;무료&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;background:#f0f4ff; font-weight:700;&quot;&gt;&lt;td style=&quot;padding:10px 14px; border-radius:0 0 0 8px;&quot;&gt;월 총 비용&lt;/td&gt;&lt;td style=&quot;padding:10px 14px; text-align:right; border-radius:0 0 8px 0; color:#4a7cff;&quot;&gt;~$11&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p style=&quot;text-align:center; margin:16px 0;&quot;&gt;
&lt;span style=&quot;display:inline-block; background:#f0f4ff; color:#4a7cff; font-weight:700; padding:10px 24px; border-radius:8px; font-size:15px;&quot;&gt;월 약 15,000원으로 사이트 운영 가능&lt;/span&gt;
&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;!-- 11 --&gt;
&lt;h2 id=&quot;s11&quot; style=&quot;font-size:22px; font-weight:700; margin:36px 0 16px; padding-bottom:8px; border-bottom:2px solid #4a7cff;&quot;&gt;11. 마무리&lt;/h2&gt;

&lt;p&gt;정리하면 이렇습니다:&lt;/p&gt;

&lt;blockquote style=&quot;border-left:4px solid #4a7cff; background:#f0f4ff; padding:14px 20px; margin:16px 0; border-radius:0 8px 8px 0;&quot;&gt;
Claude Code(바이브 코딩)로 2주 만에 크립토 도구 사이트 완성.&lt;br&gt;
계산기 9개 + 분석 툴 3개 + 가이드 9개.&lt;br&gt;
월 비용 약 $11. 전부 무료 API와 오픈소스로 구성.&lt;br&gt;
&lt;strong&gt;단, AI가 만든 코드를 검증하고 버그를 잡는 건 사람의 일.&lt;/strong&gt;
&lt;/blockquote&gt;

&lt;p&gt;&quot;AI가 코드를 다 짜줬다&quot;는 반은 맞고 반은 틀립니다. 코드 생성 속도는 압도적이지만, &lt;strong&gt;재귀 버그를 찾고, API 제약을 파악하고, 아키텍처를 결정하는 건&lt;/strong&gt; 여전히 개발자의 역할입니다.&lt;/p&gt;

&lt;p&gt;바이브 코딩의 진짜 가치는 &quot;코딩을 안 해도 되는 것&quot;이 아니라, &lt;strong&gt;&quot;만들어볼까?&quot; 하는 아이디어를 2주 만에 실제 서비스로 만들 수 있다는 것&lt;/strong&gt;입니다. 예전에는 불가능했던 일이죠.&lt;/p&gt;

&lt;p&gt;다음 글에서는 이 사이트를 &lt;strong&gt;AWS Lightsail + Cloudflare로 배포한 과정&lt;/strong&gt;을 다뤄보겠습니다. 삽질 포인트도 같이요.&lt;/p&gt;

&lt;div style=&quot;height:1px; background:#e5e7eb; margin:36px 0;&quot;&gt;&lt;/div&gt;

&lt;div style=&quot;background:#f8f9fa; border-radius:8px; padding:14px 20px; margin:0 0 24px; font-size:12px; color:#999; line-height:1.7;&quot;&gt;
&lt;strong&gt;면책 고지:&lt;/strong&gt; 이 글에서 소개하는 도구와 사이트는 정보 제공 목적이며, 투자 권유가 아닙니다. 암호화폐 투자는 원금 손실 위험이 있으므로 투자 결정 전 충분한 검토를 권장합니다.
&lt;/div&gt;

&lt;p style=&quot;color:#888; font-size:13px;&quot;&gt;태그: #바이브코딩 #ClaudeCode #크립토계산기 #NextJS #사이드프로젝트 #AI코딩 #수익화 #AdSense #CryptoToolbox #포트폴리오분석 #리밸런싱백테스터 #암호화폐&lt;/p&gt;

&lt;/div&gt;</description>
      <category>사이드 프로젝트/CryptoToolbox 개발기</category>
      <category>adsens</category>
      <category>AI코딩</category>
      <category>claudecode</category>
      <category>CryptoToolbox</category>
      <category>NextJS</category>
      <category>바이브코딩</category>
      <category>비트코인</category>
      <category>사이드프로젝트</category>
      <category>수익화</category>
      <category>크립토계산기</category>
      <author>우기!</author>
      <guid isPermaLink="true">https://bigstupid.tistory.com/208</guid>
      <comments>https://bigstupid.tistory.com/208#entry208comment</comments>
      <pubDate>Wed, 18 Mar 2026 10:13:10 +0900</pubDate>
    </item>
    <item>
      <title>ETF_자동_리밸런싱_8일_후기</title>
      <link>https://bigstupid.tistory.com/207</link>
      <description>&lt;div style=&quot;max-width: 760px; margin: 0 auto; font-family: 'Pretendard','Apple SD Gothic Neo',sans-serif; color: #222; line-height: 1.8; font-size: 16px;&quot;&gt;&lt;!-- 목차 --&gt;
&lt;div style=&quot;background: #f8f9fa; border-radius: 12px; padding: 20px 28px; margin-bottom: 36px;&quot;&gt;
&lt;div class=&quot;revenue_unit_wrap&quot;&gt;
  &lt;div class=&quot;revenue_unit_item adsense responsive&quot;&gt;
    &lt;div class=&quot;revenue_unit_info&quot;&gt;반응형&lt;/div&gt;
    &lt;script src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot; async=&quot;async&quot;&gt;&lt;/script&gt;
    &lt;ins class=&quot;adsbygoogle&quot; style=&quot;display: block;&quot; data-ad-host=&quot;ca-host-pub-9691043933427338&quot; data-ad-client=&quot;ca-pub-8497090211222793&quot; data-ad-format=&quot;auto&quot;&gt;&lt;/ins&gt;
    &lt;script&gt;(adsbygoogle = window.adsbygoogle || []).push({});&lt;/script&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p style=&quot;font-weight: bold; font-size: 15px; margin: 0 0 10px; color: #555;&quot; data-ke-size=&quot;size16&quot;&gt;목차&lt;/p&gt;
&lt;ol style=&quot;margin: 0; padding-left: 20px; color: #333;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s1&quot;&gt;ETF 리밸런싱이란?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s2&quot;&gt;왜 TQQQ / QQQ / SCHD인가&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s3&quot;&gt;시장 국면별 전략&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s4&quot;&gt;왜 직접 만들었나&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s5&quot;&gt;시스템 구성&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s6&quot;&gt;8일간 운영 결과&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s7&quot;&gt;실제 리밸런싱 이력&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s8&quot;&gt;장단점 정리&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s9&quot;&gt;마무리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 1px; background: #e5e7eb; margin: 36px 0;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;!-- 1. ETF 리밸런싱이란? --&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;1. ETF 리밸런싱이란?&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;해외 ETF 투자를 하다 보면 특정 종목만 올라서 포트폴리오 비중이 한쪽으로 쏠리는 경험, 다들 있을 겁니다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;예를 들어 TQQQ 25%, QQQ 35%, SCHD 40%로 시작했는데, TQQQ만 급등해서 TQQQ가 50%가 되어버리면 레버리지 리스크가 한쪽에 집중됩니다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;리밸런싱&lt;/b&gt;은 이렇게 쏠린 비율을 원래 목표대로 되돌리는 것입니다. 많이 오른 건 일부 팔고, 적은 건 사서 비율을 맞추는 거죠.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;특히 TQQQ 같은 3배 레버리지 ETF는 변동성이 크기 때문에, 리밸런싱 없이 방치하면 포트폴리오 전체가 레버리지 리스크에 노출됩니다. 문제는 이걸 매번 수동으로 하기가 귀찮다는 겁니다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;그래서 &lt;b&gt;시장 국면에 따라 비중을 자동으로 조절하는 리밸런싱 봇&lt;/b&gt;을 직접 만들어봤습니다.&lt;/p&gt;
&lt;div style=&quot;height: 1px; background: #e5e7eb; margin: 36px 0;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;!-- 2. 왜 TQQQ / QQQ / SCHD인가 --&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;2. 왜 TQQQ / QQQ / SCHD인가&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이 3종 조합은 &lt;b&gt;공격 + 안정 + 배당&lt;/b&gt;을 동시에 잡는 구성입니다.&lt;/p&gt;
&lt;table style=&quot;width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background: #4a7cff; color: #fff;&quot;&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left; border-radius: 8px 0 0 0;&quot;&gt;ETF&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left;&quot;&gt;성격&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left; border-radius: 0 8px 0 0;&quot;&gt;역할&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb; font-weight: 600;&quot;&gt;TQQQ&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;나스닥100 3배 레버리지&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;상승장에서 수익 극대화&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb; font-weight: 600;&quot;&gt;QQQ&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;나스닥100 추종&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;안정적 성장 + 핵심 포지션&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; font-weight: 600;&quot;&gt;SCHD&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px;&quot;&gt;미국 고배당 ETF&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px;&quot;&gt;하락장 방어 + 배당 수익&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;핵심은 &lt;b&gt;시장이 좋을 때는 TQQQ 비중을 높이고, 나쁠 때는 SCHD로 방어&lt;/b&gt;하는 것입니다. 이걸 사람이 매번 판단하기 어려우니, 시장 국면 판단까지 자동화했습니다.&lt;/p&gt;
&lt;div style=&quot;height: 1px; background: #e5e7eb; margin: 36px 0;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;!-- 3. 시장 국면별 전략 --&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;3. 시장 국면별 전략&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;봇은 매일 &lt;b&gt;QQQ 가격, MA200(200일 이동평균), VIX(공포지수)&lt;/b&gt;를 확인해서 시장 국면을 자동 판단합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 18px; font-weight: 600; margin: 24px 0 12px;&quot; data-ke-size=&quot;size23&quot;&gt;국면 판단 기준&lt;/h3&gt;
&lt;table style=&quot;width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background: #4a7cff; color: #fff;&quot;&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left; border-radius: 8px 0 0 0;&quot;&gt;국면&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left; border-radius: 0 8px 0 0;&quot;&gt;조건&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background: #dcfce7; color: #16a34a; padding: 2px 10px; border-radius: 4px; font-size: 13px; font-weight: 600;&quot;&gt;BULL&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;QQQ &amp;gt; MA200 AND VIX &amp;lt; 25 AND 낙폭 &amp;gt; -20%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background: #fef3c7; color: #d97706; padding: 2px 10px; border-radius: 4px; font-size: 13px; font-weight: 600;&quot;&gt;SIDEWAYS&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;QQQ &amp;gt; MA200 AND 25 &amp;le; VIX &amp;le; 30&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px;&quot;&gt;&lt;span style=&quot;background: #fee2e2; color: #dc2626; padding: 2px 10px; border-radius: 4px; font-size: 13px; font-weight: 600;&quot;&gt;BEAR&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px;&quot;&gt;QQQ &amp;lt; MA200 OR VIX &amp;gt; 30 OR 낙폭 &amp;le; -20%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 style=&quot;font-size: 18px; font-weight: 600; margin: 24px 0 12px;&quot; data-ke-size=&quot;size23&quot;&gt;국면별 목표 비중&lt;/h3&gt;
&lt;table style=&quot;width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background: #4a7cff; color: #fff;&quot;&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left; border-radius: 8px 0 0 0;&quot;&gt;ETF&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: center;&quot;&gt;BULL&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: center;&quot;&gt;SIDEWAYS&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: center; border-radius: 0 8px 0 0;&quot;&gt;BEAR&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb; font-weight: 600;&quot;&gt;TQQQ&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;25%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;20%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;10%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb; font-weight: 600;&quot;&gt;QQQ&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;35%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;38%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;40%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; font-weight: 600;&quot;&gt;SCHD&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center;&quot;&gt;40%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center;&quot;&gt;42%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center;&quot;&gt;50%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;상승장(BULL)에서는 TQQQ 비중을 25%까지 높여 수익을 극대화하고, 하락장(BEAR)에서는 10%로 줄이고 SCHD를 50%까지 올려 방어합니다. 국면이 바뀌면 자동으로 비중을 재조정합니다.&lt;/p&gt;
&lt;div style=&quot;height: 1px; background: #e5e7eb; margin: 36px 0;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;!-- 4. 왜 직접 만들었나 --&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;4. 왜 직접 만들었나&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;기존에도 ETF 자동매매 서비스가 있지만:&lt;/p&gt;
&lt;ul style=&quot;padding-left: 20px;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;b&gt;API 키를 남의 서비스에 맡기는 게 불안&lt;/b&gt;했음&lt;/li&gt;
&lt;li&gt;시장 국면별로 비중을 달리하는 &lt;b&gt;세밀한 전략&lt;/b&gt;을 적용하고 싶었음&lt;/li&gt;
&lt;li&gt;TQQQ 같은 레버리지 ETF의 &lt;b&gt;리밸런싱 트리거&lt;/b&gt;를 직접 설정하고 싶었음&lt;/li&gt;
&lt;li&gt;개발자니까 &lt;b&gt;직접 만들어보고 싶었음&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;그래서 &lt;b&gt;한국투자증권(KIS) REST API + Python&lt;/b&gt;으로 자동 리밸런싱 봇을 만들었고, 실제로 8일간 실전 운영해본 결과를 공유합니다.&lt;/p&gt;
&lt;div style=&quot;height: 1px; background: #e5e7eb; margin: 36px 0;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;!-- 5. 시스템 구성 --&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;5. 시스템 구성&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;직접 만든 웹 대시보드에서 모든 걸 관리합니다.&lt;/p&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;794&quot; data-origin-height=&quot;448&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bMvF61/dJMcaflzt5t/BVxmkO1aizRdQ6UarIEaKk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bMvF61/dJMcaflzt5t/BVxmkO1aizRdQ6UarIEaKk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bMvF61/dJMcaflzt5t/BVxmkO1aizRdQ6UarIEaKk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbMvF61%2FdJMcaflzt5t%2FBVxmkO1aizRdQ6UarIEaKk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;794&quot; height=&quot;448&quot; data-origin-width=&quot;794&quot; data-origin-height=&quot;448&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주요 기능:&lt;/b&gt;&lt;/p&gt;
&lt;ul style=&quot;padding-left: 20px;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;포트폴리오 현재 비중 vs 목표 비중을 한눈에 확인&lt;/li&gt;
&lt;li&gt;시장 국면(BULL/SIDEWAYS/BEAR) 실시간 표시&lt;/li&gt;
&lt;li&gt;QQQ 현재가, MA200, VIX, 낙폭 지표&lt;/li&gt;
&lt;li&gt;Kill Switch (긴급 정지)&lt;/li&gt;
&lt;li&gt;텔레그램 알림 (주문 전/후, 오류 발생 시)&lt;/li&gt;
&lt;/ul&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;793&quot; data-origin-height=&quot;563&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/el58Gw/dJMcagkszZ4/cym8cZgaLuqXDW7FV8OZfk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/el58Gw/dJMcagkszZ4/cym8cZgaLuqXDW7FV8OZfk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/el58Gw/dJMcagkszZ4/cym8cZgaLuqXDW7FV8OZfk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fel58Gw%2FdJMcagkszZ4%2Fcym8cZgaLuqXDW7FV8OZfk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;793&quot; height=&quot;563&quot; data-origin-width=&quot;793&quot; data-origin-height=&quot;563&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;자동 실행:&lt;/b&gt; 미국 장 마감 30분 전에 자동 실행됩니다. 겨울에는 오전 5:30, 썸머타임에는 오전 4:30에 리밸런싱을 체크하고, TQQQ 비중이 트리거 기준을 넘으면 자동 매매가 실행됩니다.&lt;/p&gt;
&lt;div style=&quot;background: #f0f4ff; border-radius: 8px; padding: 16px 20px; margin: 16px 0; font-size: 14px;&quot;&gt;
&lt;p style=&quot;margin: 0 0 8px; font-weight: 600; color: #4a7cff;&quot; data-ke-size=&quot;size16&quot;&gt;기술 스택&lt;/p&gt;
&lt;ul style=&quot;margin: 0; padding-left: 18px;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;b&gt;백엔드:&lt;/b&gt; Python + FastAPI&lt;/li&gt;
&lt;li&gt;&lt;b&gt;증권 API:&lt;/b&gt; 한국투자증권 KIS REST API (직접 호출)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;시세 데이터:&lt;/b&gt; yfinance (QQQ, VIX, 환율)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;알림:&lt;/b&gt; Telegram Bot API&lt;/li&gt;
&lt;li&gt;&lt;b&gt;배포:&lt;/b&gt; Docker + Mac 서버 24시간 운용&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div style=&quot;height: 1px; background: #e5e7eb; margin: 36px 0;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;!-- 6. 8일간 운영 결과 --&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;6. 8일간 운영 결과&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 18px; font-weight: 600; margin: 24px 0 12px;&quot; data-ke-size=&quot;size23&quot;&gt;운영 기간&lt;/h3&gt;
&lt;ul style=&quot;padding-left: 20px;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;b&gt;시작일:&lt;/b&gt; 2026년 3월 9일&lt;/li&gt;
&lt;li&gt;&lt;b&gt;현재:&lt;/b&gt; 2026년 3월 16일 (8일차)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;font-size: 18px; font-weight: 600; margin: 24px 0 12px;&quot; data-ke-size=&quot;size23&quot;&gt;자산 변화&lt;/h3&gt;
&lt;table style=&quot;width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background: #4a7cff; color: #fff;&quot;&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left; border-radius: 8px 0 0 0;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;시작 (3/9)&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;현재 (3/16)&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right; border-radius: 0 8px 0 0;&quot;&gt;변화&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb; font-weight: 600;&quot;&gt;총 자산&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;$67.22&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb; color: #4a7cff; font-weight: bold;&quot;&gt;$739.75&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;+$672.53&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb; font-weight: 600;&quot;&gt;TQQQ&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;$0&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;$143.34 (3주)&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb; font-weight: 600;&quot;&gt;QQQ&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;$0&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;$0 (0주)&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb; font-weight: 600;&quot;&gt;SCHD&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;$0&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;$309.87 (10주)&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; font-weight: 600;&quot;&gt;USD 현금&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;$67.22&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;$286.64&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote style=&quot;border-left: 4px solid #f59e0b; background: #fffbeb; padding: 14px 20px; margin: 16px 0; border-radius: 0 8px 8px 0; font-size: 14px;&quot; data-ke-style=&quot;style1&quot;&gt;참고: 자산 증가분 대부분은 &lt;b&gt;추가 환전(원화 &amp;rarr; 달러)&lt;/b&gt;에 의한 것입니다. 시스템이 자동으로 달러 잔고를 목표 비중에 맞게 분배해줍니다.&lt;/blockquote&gt;
&lt;h3 style=&quot;font-size: 18px; font-weight: 600; margin: 24px 0 12px;&quot; data-ke-size=&quot;size23&quot;&gt;현재 비중 vs 목표 (BULL 기준)&lt;/h3&gt;
&lt;table style=&quot;width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background: #4a7cff; color: #fff;&quot;&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left; border-radius: 8px 0 0 0;&quot;&gt;ETF&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;목표&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;현재&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right; border-radius: 0 8px 0 0;&quot;&gt;편차&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb; font-weight: 600;&quot;&gt;TQQQ&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;25%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;19.37%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb; color: #dc2626;&quot;&gt;-5.63%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb; font-weight: 600;&quot;&gt;QQQ&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;35%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;0%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb; color: #dc2626;&quot;&gt;-35%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb; font-weight: 600;&quot;&gt;SCHD&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;40%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;41.88%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb; color: #16a34a;&quot;&gt;+1.88%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; font-weight: 600;&quot;&gt;USD 현금&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;-&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;38.75%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;QQQ를 아직 못 사고 있는 이유:&lt;/b&gt; QQQ 1주가 약 $601입니다. 현재 총 자산이 $739이니 1주만 사도 포트폴리오의 81%가 QQQ가 됩니다. 소액 운용 시 고가 ETF는 최소 거래 단위 문제로 비중 조절이 어렵습니다. 자산 규모가 커지면 자연스럽게 해결될 부분입니다.&lt;/p&gt;
&lt;div style=&quot;height: 1px; background: #e5e7eb; margin: 36px 0;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;!-- 7. 실제 리밸런싱 이력 --&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;7. 실제 리밸런싱 이력&lt;/h2&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;810&quot; data-origin-height=&quot;287&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/PAwnu/dJMcajnTpqS/tDx2IurkOyT8cLDYVMKGyk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/PAwnu/dJMcajnTpqS/tDx2IurkOyT8cLDYVMKGyk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/PAwnu/dJMcajnTpqS/tDx2IurkOyT8cLDYVMKGyk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FPAwnu%2FdJMcajnTpqS%2FtDx2IurkOyT8cLDYVMKGyk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;810&quot; height=&quot;287&quot; data-origin-width=&quot;810&quot; data-origin-height=&quot;287&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;p data-ke-size=&quot;size16&quot;&gt;8일간 총 &lt;b&gt;6회&lt;/b&gt; 리밸런싱이 실행되었습니다. (실제 매매 4회 + 비중 체크 2회)&lt;/p&gt;
&lt;table style=&quot;width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background: #4a7cff; color: #fff;&quot;&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left; border-radius: 8px 0 0 0;&quot;&gt;날짜&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: center;&quot;&gt;국면&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;매수 내역&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right; border-radius: 0 8px 0 0;&quot;&gt;TQQQ 가격&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;03.09&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background: #fee2e2; color: #dc2626; padding: 2px 8px; border-radius: 4px; font-size: 12px;&quot;&gt;BEAR&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;SCHD 3주&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;$46.01&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;03.09&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background: #fee2e2; color: #dc2626; padding: 2px 8px; border-radius: 4px; font-size: 12px;&quot;&gt;BEAR&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;SCHD 3주&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;$46.24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;03.11&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background: #dcfce7; color: #16a34a; padding: 2px 8px; border-radius: 4px; font-size: 12px;&quot;&gt;BULL&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;TQQQ 1주&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;$49.33&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;03.12&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background: #fef3c7; color: #d97706; padding: 2px 8px; border-radius: 4px; font-size: 12px;&quot;&gt;SIDEWAYS&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;TQQQ 3주, SCHD 7주&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;$49.11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;03.13&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background: #fef3c7; color: #d97706; padding: 2px 8px; border-radius: 4px; font-size: 12px;&quot;&gt;SIDEWAYS&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb; color: #888;&quot;&gt;트리거 미충족 (스킵)&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;$47.24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px;&quot;&gt;03.16&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center;&quot;&gt;&lt;span style=&quot;background: #fef3c7; color: #d97706; padding: 2px 8px; border-radius: 4px; font-size: 12px;&quot;&gt;SIDEWAYS&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; color: #888;&quot;&gt;트리거 미충족 (스킵)&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;$45.93&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 style=&quot;font-size: 18px; font-weight: 600; margin: 24px 0 12px;&quot; data-ke-size=&quot;size23&quot;&gt;이력 해석&lt;/h3&gt;
&lt;ul style=&quot;padding-left: 20px;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;b&gt;3/9 (BEAR):&lt;/b&gt; 최초 달러 입금 후 초기 매수 &amp;mdash; BEAR 국면이라 SCHD만 매수 (안전자산 우선)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;3/11 (BULL):&lt;/b&gt; 국면이 BULL로 전환 &amp;rarr; TQQQ 매수 시작&lt;/li&gt;
&lt;li&gt;&lt;b&gt;3/12 (SIDEWAYS):&lt;/b&gt; 추가 환전 후 대규모 매수 &amp;mdash; TQQQ 3주 + SCHD 7주&lt;/li&gt;
&lt;li&gt;&lt;b&gt;3/13, 3/16:&lt;/b&gt; 비중 편차가 트리거 기준 이내 &amp;rarr; 자동 스킵 (불필요한 매매 방지)&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;8일 동안 &lt;b&gt;BEAR &amp;rarr; BULL &amp;rarr; SIDEWAYS&lt;/b&gt;로 국면이 세 번 바뀌었고, 봇이 각 국면에 맞게 자동으로 포지션을 조절했습니다.&lt;/p&gt;
&lt;div style=&quot;height: 1px; background: #e5e7eb; margin: 36px 0;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;!-- 8. 장단점 정리 --&gt;
&lt;h2 id=&quot;s8&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;8. 장단점 정리&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 18px; font-weight: 600; margin: 24px 0 12px; color: #16a34a;&quot; data-ke-size=&quot;size23&quot;&gt;장점&lt;/h3&gt;
&lt;ul style=&quot;padding-left: 20px;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;b&gt;시장 국면 자동 판단:&lt;/b&gt; QQQ MA200, VIX를 매일 체크해서 BULL/SIDEWAYS/BEAR 자동 분류&lt;/li&gt;
&lt;li&gt;&lt;b&gt;감정 배제:&lt;/b&gt; 공포에 팔고 탐욕에 사는 실수를 방지&lt;/li&gt;
&lt;li&gt;&lt;b&gt;자동 분산:&lt;/b&gt; 달러 환전만 하면 목표 비중대로 자동 분배&lt;/li&gt;
&lt;li&gt;&lt;b&gt;투명한 이력:&lt;/b&gt; 모든 매매와 국면 변화가 기록됨&lt;/li&gt;
&lt;li&gt;&lt;b&gt;텔레그램 알림:&lt;/b&gt; 매매 결과를 실시간으로 받아볼 수 있음&lt;/li&gt;
&lt;li&gt;&lt;b&gt;안전장치:&lt;/b&gt; Kill Switch, Circuit Breaker 등 긴급 정지 기능&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;font-size: 18px; font-weight: 600; margin: 24px 0 12px; color: #dc2626;&quot; data-ke-size=&quot;size23&quot;&gt;단점&lt;/h3&gt;
&lt;ul style=&quot;padding-left: 20px;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;b&gt;소액 한계:&lt;/b&gt; QQQ가 $601/주라 소액으로는 비중 조절 불가 (현재 0주)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;달러 환전 수동:&lt;/b&gt; 원화 &amp;rarr; 달러 환전은 직접 해야 함 (봇은 달러만 사용)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;미국장 시간 제약:&lt;/b&gt; 주문은 미국 장 시간(한국 23:30~06:00)에만 가능&lt;/li&gt;
&lt;li&gt;&lt;b&gt;서버 필요:&lt;/b&gt; 24시간 돌아가는 서버가 있어야 함 (Mac 서버 + Docker 사용 중)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;font-size: 18px; font-weight: 600; margin: 24px 0 12px;&quot; data-ke-size=&quot;size23&quot;&gt;이런 분에게 추천&lt;/h3&gt;
&lt;ul style=&quot;padding-left: 20px;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;해외 ETF 포트폴리오를 분산 투자하고 싶은데 수동 관리가 귀찮은 분&lt;/li&gt;
&lt;li&gt;레버리지 ETF(TQQQ)의 비중을 시장 상황에 맞게 조절하고 싶은 분&lt;/li&gt;
&lt;li&gt;감정적 매매를 줄이고 규칙 기반 투자를 하고 싶은 분&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;height: 1px; background: #e5e7eb; margin: 36px 0;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;!-- 9. 마무리 --&gt;
&lt;h2 id=&quot;s9&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;9. 마무리&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;8일간 실전 운영해본 결과, 자동 리밸런싱 봇은 &lt;b&gt;생각보다 잘 동작&lt;/b&gt;합니다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;특히 국면 전환(BEAR &amp;rarr; BULL &amp;rarr; SIDEWAYS)이 자동으로 감지되고, 그에 맞게 포지션이 조절되는 게 인상적이었습니다. 사람이라면 &quot;지금 사도 되나?&quot; 고민하며 타이밍을 놓치기 쉬운 상황에서, 봇은 규칙대로 묵묵히 실행합니다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;아직은 소액($739)이라 QQQ를 못 사고 있지만, 자산 규모가 커지면 3종 ETF가 모두 목표 비중에 맞춰질 것입니다. 다음 글에서는 &lt;b&gt;주간 운영 후기&lt;/b&gt;와 함께 국면 변화에 따른 수익률 분석을 해보겠습니다.&lt;/p&gt;
&lt;blockquote style=&quot;border-left: 4px solid #4a7cff; background: #f0f4ff; padding: 14px 20px; margin: 24px 0; border-radius: 0 8px 8px 0; font-size: 14px;&quot; data-ke-style=&quot;style1&quot;&gt;같은 시스템으로 &lt;b&gt;암호화폐(BTC/ETH/XRP) 자동 리밸런싱&lt;/b&gt;도 운영 중입니다.&lt;br /&gt;코인 리밸런싱 후기가 궁금하시면 &amp;rarr; &lt;a style=&quot;color: #4a7cff;&quot; href=&quot;https://bigstupid.tistory.com/206&quot;&gt;암호화폐 자동 리밸런싱 12일 후기&lt;/a&gt;&lt;/blockquote&gt;
&lt;div style=&quot;height: 1px; background: #e5e7eb; margin: 36px 0;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background: #f8f9fa; border-radius: 8px; padding: 14px 20px; margin: 0 0 24px; font-size: 12px; color: #999; line-height: 1.7;&quot;&gt;&lt;b&gt;면책 고지:&lt;/b&gt; 이 글은 개인적인 투자 기록이며 특정 종목의 매수&amp;middot;매도를 권유하지 않습니다. 모든 투자의 책임은 본인에게 있으며, 레버리지 ETF(TQQQ)는 높은 변동성으로 원금 손실 위험이 큽니다. 투자 결정 전 충분한 검토를 권장합니다.&lt;/div&gt;
&lt;p style=&quot;color: #888; font-size: 13px;&quot; data-ke-size=&quot;size16&quot;&gt;태그: #ETF #TQQQ #QQQ #SCHD #자동리밸런싱 #한국투자증권 #해외주식 #포트폴리오관리 #시장국면 #자동매매 #레버리지ETF #Python&lt;/p&gt;
&lt;/div&gt;</description>
      <category>투자 일지/ETF 자동 리밸런싱</category>
      <category>ETF</category>
      <category>Python</category>
      <category>qqq</category>
      <category>TQQQ</category>
      <category>자동리밸런싱</category>
      <category>자동매매</category>
      <category>포트폴리오관리</category>
      <category>한국투자증권</category>
      <category>해외주식</category>
      <author>우기!</author>
      <guid isPermaLink="true">https://bigstupid.tistory.com/207</guid>
      <comments>https://bigstupid.tistory.com/207#entry207comment</comments>
      <pubDate>Mon, 16 Mar 2026 23:23:54 +0900</pubDate>
    </item>
    <item>
      <title>암호화폐 자동 리밸런싱 시스템, 12일간 직접 돌려본 후기</title>
      <link>https://bigstupid.tistory.com/206</link>
      <description>&lt;div style=&quot;max-width: 760px; margin: 0 auto; font-family: 'Pretendard','Apple SD Gothic Neo',sans-serif; color: #222; line-height: 1.8; font-size: 16px;&quot;&gt;&lt;!-- 목차 --&gt;
&lt;div style=&quot;background: #f8f9fa; border-radius: 12px; padding: 20px 28px; margin-bottom: 36px;&quot;&gt;
&lt;div class=&quot;revenue_unit_wrap&quot;&gt;
  &lt;div class=&quot;revenue_unit_item adsense responsive&quot;&gt;
    &lt;div class=&quot;revenue_unit_info&quot;&gt;반응형&lt;/div&gt;
    &lt;script src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot; async=&quot;async&quot;&gt;&lt;/script&gt;
    &lt;ins class=&quot;adsbygoogle&quot; style=&quot;display: block;&quot; data-ad-host=&quot;ca-host-pub-9691043933427338&quot; data-ad-client=&quot;ca-pub-8497090211222793&quot; data-ad-format=&quot;auto&quot;&gt;&lt;/ins&gt;
    &lt;script&gt;(adsbygoogle = window.adsbygoogle || []).push({});&lt;/script&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p style=&quot;font-weight: bold; font-size: 15px; margin: 0 0 10px; color: #555;&quot; data-ke-size=&quot;size16&quot;&gt;목차&lt;/p&gt;
&lt;ol style=&quot;margin: 0; padding-left: 20px; color: #333;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s1&quot;&gt;리밸런싱이 뭔데?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s2&quot;&gt;업비트 코인모으기(DCA)로 적립 중&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s3&quot;&gt;왜 자동 리밸런싱까지 만들었나&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s4&quot;&gt;시스템 구성&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s5&quot;&gt;목표 비율 설정&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s6&quot;&gt;12일간 운영 결과&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s7&quot;&gt;실제 리밸런싱 이력&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s8&quot;&gt;업비트 실제 잔고&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s9&quot;&gt;장단점 정리&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a style=&quot;color: #4a7cff; text-decoration: none;&quot; href=&quot;#s10&quot;&gt;마무리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: none; border-top: 1px solid #e5e7eb; margin: 36px 0;&quot; data-ke-style=&quot;style1&quot; /&gt;&lt;!-- 1. 리밸런싱이 뭔데? --&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;1. 리밸런싱이 뭔데?&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;코인 투자를 하다 보면 특정 코인만 올라서 포트폴리오 비중이 한쪽으로 쏠리는 경험, 다들 있을 겁니다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;예를 들어 BTC 40%, ETH 30%, XRP 20%, 현금 10%로 시작했는데, BTC만 올라서 BTC가 70%가 되어버리면 리스크가 한쪽에 집중됩니다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;리밸런싱&lt;/b&gt;은 이렇게 쏠린 비율을 원래 목표대로 되돌리는 것입니다. 많이 오른 건 일부 팔고, 적은 건 사서 비율을 맞추는 거죠.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;문제는 이걸 매번 수동으로 하기가 귀찮다는 겁니다. 그래서 자동화 시스템을 직접 만들어봤습니다.&lt;/p&gt;
&lt;hr style=&quot;border: none; border-top: 1px solid #e5e7eb; margin: 36px 0;&quot; data-ke-style=&quot;style1&quot; /&gt;&lt;!-- 2. 업비트 코인모으기 --&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;2. 업비트 코인모으기(DCA)로 적립 중&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;저는 원래 업비트의 &lt;b&gt;코인모으기&lt;/b&gt; 기능으로 비트코인을 꾸준히 적립하고 있었습니다.&lt;/p&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;1206&quot; data-origin-height=&quot;2098&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/HGSwF/dJMcadOLcP9/BldkscohNjDPexnQP80h2k/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/HGSwF/dJMcadOLcP9/BldkscohNjDPexnQP80h2k/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/HGSwF/dJMcadOLcP9/BldkscohNjDPexnQP80h2k/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FHGSwF%2FdJMcadOLcP9%2FBldkscohNjDPexnQP80h2k%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1206&quot; height=&quot;2098&quot; data-origin-width=&quot;1206&quot; data-origin-height=&quot;2098&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;1206&quot; data-origin-height=&quot;1857&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/m5k4V/dJMcagxZoBn/efGsuAnad7zJ6rTFEUruJ0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/m5k4V/dJMcagxZoBn/efGsuAnad7zJ6rTFEUruJ0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/m5k4V/dJMcagxZoBn/efGsuAnad7zJ6rTFEUruJ0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fm5k4V%2FdJMcagxZoBn%2FefGsuAnad7zJ6rTFEUruJ0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1206&quot; height=&quot;1857&quot; data-origin-width=&quot;1206&quot; data-origin-height=&quot;1857&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;p data-ke-size=&quot;size16&quot;&gt;현재 2개 플랜을 동시에 운영 중입니다:&lt;/p&gt;
&lt;table style=&quot;width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background: #4a7cff; color: #fff;&quot;&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left; border-radius: 8px 0 0 0;&quot;&gt;플랜&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left;&quot;&gt;주기&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;금액&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;누적 회차&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right; border-radius: 0 8px 0 0;&quot;&gt;누적 금액&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;주간 적립&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;매주 금요일&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;25,000원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;69/70회차&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;1,725,034원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;월간 적립&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;매월 12일&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;100,000원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;15/16회차&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;1,500,085원&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;코인모으기(DCA)는 &lt;b&gt;시점 분산&lt;/b&gt;에는 좋지만, 한 가지 문제가 있습니다. BTC만 계속 사니까 포트폴리오가 &lt;b&gt;비트코인 100%&lt;/b&gt;로 쏠린다는 거죠.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;ETH나 XRP도 가지고 싶은데, 코인모으기는 코인별로 따로 설정해야 하고 비율 관리가 안 됩니다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;그래서 생각한 조합이:&lt;/p&gt;
&lt;blockquote style=&quot;border-left: 4px solid #4a7cff; background: #f0f4ff; padding: 14px 20px; margin: 16px 0; border-radius: 0 8px 8px 0;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;코인모으기(DCA)로 BTC 적립&lt;/b&gt; + &lt;b&gt;자동 리밸런싱으로 ETH, XRP에 분산&lt;/b&gt;&lt;/blockquote&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;BTC가 목표 비율(40%)을 넘으면 자동으로 일부를 팔아서 ETH, XRP를 사는 구조입니다. 적립과 분산을 동시에 자동화한 셈이죠.&lt;/p&gt;
&lt;hr style=&quot;border: none; border-top: 1px solid #e5e7eb; margin: 36px 0;&quot; data-ke-style=&quot;style1&quot; /&gt;&lt;!-- 3. 왜 만들었나 --&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;3. 왜 자동 리밸런싱까지 만들었나&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;코인모으기만으로는 분산이 안 되니까 리밸런싱이 필요한데, 기존 서비스들은:&lt;/p&gt;
&lt;ul style=&quot;padding-left: 20px;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;API 키를 남의 서비스에 맡기는 게 불안했음&lt;/li&gt;
&lt;li&gt;내가 원하는 비율과 주기로 세밀하게 조절하고 싶었음&lt;/li&gt;
&lt;li&gt;개발자니까 직접 만들어보고 싶었음&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;그래서 &lt;b&gt;업비트 API + Next.js&lt;/b&gt;로 자동 리밸런싱 시스템을 만들었고, 실제로 12일간 실전 운영해본 결과를 공유합니다.&lt;/p&gt;
&lt;hr style=&quot;border: none; border-top: 1px solid #e5e7eb; margin: 36px 0;&quot; data-ke-style=&quot;style1&quot; /&gt;&lt;!-- 4. 시스템 구성 --&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;4. 시스템 구성&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;직접 만든 웹 대시보드에서 모든 걸 관리합니다.&lt;/p&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;901&quot; data-origin-height=&quot;529&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/zNZu8/dJMcafMFmhz/JesAEFpFbKcBnftO73UFE1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/zNZu8/dJMcafMFmhz/JesAEFpFbKcBnftO73UFE1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/zNZu8/dJMcafMFmhz/JesAEFpFbKcBnftO73UFE1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FzNZu8%2FdJMcafMFmhz%2FJesAEFpFbKcBnftO73UFE1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;901&quot; height=&quot;529&quot; data-origin-width=&quot;901&quot; data-origin-height=&quot;529&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주요 기능:&lt;/b&gt;&lt;/p&gt;
&lt;ul style=&quot;padding-left: 20px;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;포트폴리오 현재 비율 vs 목표 비율을 한눈에 확인&lt;/li&gt;
&lt;li&gt;자산 가치 추이 차트 (30일)&lt;/li&gt;
&lt;li&gt;수동 리밸런싱 실행 버튼&lt;/li&gt;
&lt;li&gt;잔고 확인 + 텔레그램 알림&lt;/li&gt;
&lt;li&gt;Kill Switch (긴급 정지)&lt;/li&gt;
&lt;li&gt;DRY-RUN 모드 (모의 실행)&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;자동 실행:&lt;/b&gt; 매일 오전 9시에 자동으로 리밸런싱을 체크합니다. 편차가 기준(5%p) 이상이면 자동 매매가 실행되고, 기준 이하면 스킵합니다.&lt;/p&gt;
&lt;hr style=&quot;border: none; border-top: 1px solid #e5e7eb; margin: 36px 0;&quot; data-ke-style=&quot;style1&quot; /&gt;&lt;!-- 5. 목표 비율 설정 --&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;5. 목표 비율 설정&lt;/h2&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;620&quot; data-origin-height=&quot;371&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/64jYx/dJMcaflztyp/WeGUrlbPviLwKYt0vuRu1k/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/64jYx/dJMcaflztyp/WeGUrlbPviLwKYt0vuRu1k/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/64jYx/dJMcaflztyp/WeGUrlbPviLwKYt0vuRu1k/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F64jYx%2FdJMcaflztyp%2FWeGUrlbPviLwKYt0vuRu1k%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;620&quot; height=&quot;371&quot; data-origin-width=&quot;620&quot; data-origin-height=&quot;371&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;p data-ke-size=&quot;size16&quot;&gt;제가 설정한 목표 비율은 이렇습니다:&lt;/p&gt;
&lt;table style=&quot;width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background: #4a7cff; color: #fff;&quot;&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left; border-radius: 8px 0 0 0;&quot;&gt;자산&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right; border-radius: 0 8px 0 0;&quot;&gt;목표 비율&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;KRW (현금)&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;10%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;BTC (비트코인)&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;40%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;ETH (이더리움)&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;30%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;XRP (리플)&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;20%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f0f4ff; font-weight: bold;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-radius: 0 0 0 8px;&quot;&gt;합계&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-radius: 0 0 8px 0;&quot;&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;BTC를 가장 높게, 현금을 10% 유지하는 보수적인 구성입니다. 설정 화면에서 1% 단위로 자유롭게 조절할 수 있습니다.&lt;/p&gt;
&lt;hr style=&quot;border: none; border-top: 1px solid #e5e7eb; margin: 36px 0;&quot; data-ke-style=&quot;style1&quot; /&gt;&lt;!-- 6. 12일간 운영 결과 --&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;6. 12일간 운영 결과&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 18px; font-weight: 600; margin: 24px 0 12px;&quot; data-ke-size=&quot;size23&quot;&gt;운영 기간&lt;/h3&gt;
&lt;ul style=&quot;padding-left: 20px;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;b&gt;시작일:&lt;/b&gt; 2026년 3월 5일&lt;/li&gt;
&lt;li&gt;&lt;b&gt;현재:&lt;/b&gt; 2026년 3월 16일 (12일차)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;font-size: 18px; font-weight: 600; margin: 24px 0 12px;&quot; data-ke-size=&quot;size23&quot;&gt;자산 변화&lt;/h3&gt;
&lt;table style=&quot;width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background: #4a7cff; color: #fff;&quot;&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left; border-radius: 8px 0 0 0;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;시작 (3/5)&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;현재 (3/16)&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right; border-radius: 0 8px 0 0;&quot;&gt;변화&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background: #f0f4ff; font-weight: bold;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;총 자산&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;약 46만원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb; color: #4a7cff;&quot;&gt;약 131만원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb; color: #16a34a;&quot;&gt;+85만원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;BTC&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;310,287원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;545,282원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;ETH&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;0원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;409,395원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;XRP&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;0원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;264,405원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px;&quot;&gt;KRW&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;151,557원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;98,149원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote style=&quot;border-left: 4px solid #f59e0b; background: #fffbeb; padding: 14px 20px; margin: 16px 0; border-radius: 0 8px 8px 0; font-size: 14px;&quot; data-ke-style=&quot;style1&quot;&gt;참고: 자산 증가분 대부분은 &lt;b&gt;추가 입금&lt;/b&gt;에 의한 것입니다. 시스템이 자동으로 입금된 현금을 목표 비율에 맞게 분배해줍니다.&lt;/blockquote&gt;
&lt;h3 style=&quot;font-size: 18px; font-weight: 600; margin: 24px 0 12px;&quot; data-ke-size=&quot;size23&quot;&gt;현재 비율 vs 목표&lt;/h3&gt;
&lt;table style=&quot;width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background: #4a7cff; color: #fff;&quot;&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left; border-radius: 8px 0 0 0;&quot;&gt;자산&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;목표&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;현재&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right; border-radius: 0 8px 0 0;&quot;&gt;편차&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;KRW&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;10%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;7.5%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb; color: #dc2626;&quot;&gt;-2.5%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;BTC&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;40%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;41.4%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb; color: #16a34a;&quot;&gt;+1.4%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;ETH&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;30%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;31.1%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb; color: #16a34a;&quot;&gt;+1.1%p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px;&quot;&gt;XRP&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;20%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;20.1%&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; color: #16a34a;&quot;&gt;+0.1%p&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;모든 자산이 목표 대비 &amp;plusmn;2.5%p 이내&lt;/b&gt;로 안정적으로 유지되고 있습니다. 시작 당시 BTC 편차가 +27%p였던 걸 생각하면 시스템이 잘 작동하고 있는 겁니다.&lt;/p&gt;
&lt;hr style=&quot;border: none; border-top: 1px solid #e5e7eb; margin: 36px 0;&quot; data-ke-style=&quot;style1&quot; /&gt;&lt;!-- 7. 실제 리밸런싱 이력 --&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;7. 실제 리밸런싱 이력&lt;/h2&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;891&quot; data-origin-height=&quot;426&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/RGUy9/dJMcaivM50o/pa4ozWO6wHx6sgdMEsGkC0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/RGUy9/dJMcaivM50o/pa4ozWO6wHx6sgdMEsGkC0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/RGUy9/dJMcaivM50o/pa4ozWO6wHx6sgdMEsGkC0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FRGUy9%2FdJMcaivM50o%2Fpa4ozWO6wHx6sgdMEsGkC0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;891&quot; height=&quot;426&quot; data-origin-width=&quot;891&quot; data-origin-height=&quot;426&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;p data-ke-size=&quot;size16&quot;&gt;12일간 총 &lt;b&gt;8회&lt;/b&gt; 리밸런싱이 실행되었습니다.&lt;/p&gt;
&lt;table style=&quot;width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background: #4a7cff; color: #fff;&quot;&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left; border-radius: 8px 0 0 0;&quot;&gt;날짜&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: center;&quot;&gt;상태&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;매도&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;매수&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right; border-radius: 0 8px 0 0;&quot;&gt;수수료&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;03.05 10:25&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background: #dcfce7; color: #16a34a; padding: 2px 8px; border-radius: 4px; font-size: 12px;&quot;&gt;COMPLETED&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;125,066원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;126,775원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;0원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;03.05 10:29&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background: #dcfce7; color: #16a34a; padding: 2px 8px; border-radius: 4px; font-size: 12px;&quot;&gt;COMPLETED&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;125,094원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;126,801원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;0원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;03.05 10:31&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background: #dcfce7; color: #16a34a; padding: 2px 8px; border-radius: 4px; font-size: 12px;&quot;&gt;COMPLETED&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;0원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;0원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;62원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;03.05 10:43&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background: #dcfce7; color: #16a34a; padding: 2px 8px; border-radius: 4px; font-size: 12px;&quot;&gt;COMPLETED&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;62,774원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;126,880원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;95원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;03.06 09:00&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background: #fef3c7; color: #d97706; padding: 2px 8px; border-radius: 4px; font-size: 12px;&quot;&gt;PARTIAL&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;0원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;59,272원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;30원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;03.07 09:00&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background: #dcfce7; color: #16a34a; padding: 2px 8px; border-radius: 4px; font-size: 12px;&quot;&gt;COMPLETED&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;79,733원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;58,746원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;69원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;03.12 09:00&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center; border-bottom: 1px solid #e5e7eb;&quot;&gt;&lt;span style=&quot;background: #fef3c7; color: #d97706; padding: 2px 8px; border-radius: 4px; font-size: 12px;&quot;&gt;PARTIAL&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;0원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;225,125원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;113원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px;&quot;&gt;03.13 09:00&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: center;&quot;&gt;&lt;span style=&quot;background: #dcfce7; color: #16a34a; padding: 2px 8px; border-radius: 4px; font-size: 12px;&quot;&gt;COMPLETED&lt;/span&gt;&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;128,634원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;31,258원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;80원&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p style=&quot;text-align: center; margin: 16px 0;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;display: inline-block; background: #f0f4ff; color: #4a7cff; font-weight: bold; padding: 10px 24px; border-radius: 8px; font-size: 15px;&quot;&gt;누적 수수료: 약 449원&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;수수료가 거의 안 드는 게 장점입니다. 46만~131만원 규모에서 12일간 총 449원이면 무시할 수 있는 수준이죠.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 18px; font-weight: 600; margin: 24px 0 12px;&quot; data-ke-size=&quot;size23&quot;&gt;이력 해석&lt;/h3&gt;
&lt;ul style=&quot;padding-left: 20px;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;b&gt;3/5&lt;/b&gt;: 처음 시작 &amp;mdash; BTC에 쏠려있던 비중을 ETH, XRP로 분산&lt;/li&gt;
&lt;li&gt;&lt;b&gt;3/6~7&lt;/b&gt;: 매일 오전 9시 자동 실행, 소폭 조정&lt;/li&gt;
&lt;li&gt;&lt;b&gt;3/12&lt;/b&gt;: 추가 입금 후 &amp;rarr; 현금을 ETH, XRP로 자동 분배 (225,125원 매수)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;3/13&lt;/b&gt;: BTC 비중 초과 &amp;rarr; 일부 매도 후 재분배&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;사람이 하면 귀찮아서 미루기 쉬운 작업을 시스템이 알아서 해줍니다.&lt;/p&gt;
&lt;hr style=&quot;border: none; border-top: 1px solid #e5e7eb; margin: 36px 0;&quot; data-ke-style=&quot;style1&quot; /&gt;&lt;!-- 8. 업비트 실제 잔고 --&gt;
&lt;h2 id=&quot;s8&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;8. 업비트 실제 잔고&lt;/h2&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;1206&quot; data-origin-height=&quot;1333&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/A8Saj/dJMcacvDsPf/IjaMuB1YlM8JAQoFgMPnFk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/A8Saj/dJMcacvDsPf/IjaMuB1YlM8JAQoFgMPnFk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/A8Saj/dJMcacvDsPf/IjaMuB1YlM8JAQoFgMPnFk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FA8Saj%2FdJMcacvDsPf%2FIjaMuB1YlM8JAQoFgMPnFk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1206&quot; height=&quot;1333&quot; data-origin-width=&quot;1206&quot; data-origin-height=&quot;1333&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;

&lt;p data-ke-size=&quot;size16&quot;&gt;실제 업비트 앱에서 확인한 잔고입니다. 시스템이 허수가 아니라 진짜 매매가 이루어지고 있습니다.&lt;/p&gt;
&lt;table style=&quot;width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead&gt;
&lt;tr style=&quot;background: #4a7cff; color: #fff;&quot;&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: left; border-radius: 8px 0 0 0;&quot;&gt;자산&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;보유 수량&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;평가금액&lt;/th&gt;
&lt;th style=&quot;padding: 10px 14px; text-align: right; border-radius: 0 8px 0 0;&quot;&gt;수익률&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;BTC&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;0.00502217&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;545,282원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb; color: #dc2626;&quot;&gt;-3.05%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 10px 14px; border-bottom: 1px solid #e5e7eb;&quot;&gt;ETH&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;0.12228072&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb;&quot;&gt;409,395원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; border-bottom: 1px solid #e5e7eb; color: #16a34a;&quot;&gt;+11.17%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;background: #f8f9fa;&quot;&gt;
&lt;td style=&quot;padding: 10px 14px;&quot;&gt;XRP&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;121.845&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right;&quot;&gt;264,405원&lt;/td&gt;
&lt;td style=&quot;padding: 10px 14px; text-align: right; color: #16a34a;&quot;&gt;+6.41%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;BTC는 소폭 마이너스지만, ETH와 XRP는 각각 +11%, +6%의 수익을 기록 중입니다. 리밸런싱 덕분에 ETH가 싸을 때 자동으로 매수된 효과가 있습니다.&lt;/p&gt;
&lt;hr style=&quot;border: none; border-top: 1px solid #e5e7eb; margin: 36px 0;&quot; data-ke-style=&quot;style1&quot; /&gt;&lt;!-- 9. 장단점 정리 --&gt;
&lt;h2 id=&quot;s9&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;9. 장단점 정리&lt;/h2&gt;
&lt;div style=&quot;display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0;&quot;&gt;
&lt;div style=&quot;flex: 1; min-width: 280px; background: #f0fdf4; border-radius: 12px; padding: 20px;&quot;&gt;
&lt;p style=&quot;font-weight: bold; font-size: 16px; margin: 0 0 12px; color: #16a34a;&quot; data-ke-size=&quot;size16&quot;&gt;장점&lt;/p&gt;
&lt;ul style=&quot;padding-left: 18px; margin: 0; color: #333;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;b&gt;감정 배제&lt;/b&gt;: 올랐을 때 팔고 내렸을 때 사는 걸 기계적으로 실행&lt;/li&gt;
&lt;li&gt;&lt;b&gt;자동 분산&lt;/b&gt;: 입금만 하면 목표 비율대로 자동 분배&lt;/li&gt;
&lt;li&gt;&lt;b&gt;투명한 이력&lt;/b&gt;: 모든 매매가 기록되어 추적 가능&lt;/li&gt;
&lt;li&gt;&lt;b&gt;낮은 수수료&lt;/b&gt;: 12일 8회 리밸런싱에 총 449원&lt;/li&gt;
&lt;li&gt;&lt;b&gt;텔레그램 알림&lt;/b&gt;: 매매 결과를 실시간으로 받아볼 수 있음&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div style=&quot;flex: 1; min-width: 280px; background: #fef2f2; border-radius: 12px; padding: 20px;&quot;&gt;
&lt;p style=&quot;font-weight: bold; font-size: 16px; margin: 0 0 12px; color: #dc2626;&quot; data-ke-size=&quot;size16&quot;&gt;단점&lt;/p&gt;
&lt;ul style=&quot;padding-left: 18px; margin: 0; color: #333;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;b&gt;급등 수익 제한&lt;/b&gt;: 특정 코인이 급등하면 일부 팔아버리므로 수익이 줄 수 있음&lt;/li&gt;
&lt;li&gt;&lt;b&gt;소액 한계&lt;/b&gt;: 금액이 작으면 최소 거래 금액에 걸려 PARTIAL(부분 체결)이 발생&lt;/li&gt;
&lt;li&gt;&lt;b&gt;서버 필요&lt;/b&gt;: 24시간 돌아가는 서버가 있어야 함&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3 style=&quot;font-size: 18px; font-weight: 600; margin: 24px 0 12px;&quot; data-ke-size=&quot;size23&quot;&gt;이런 분에게 추천&lt;/h3&gt;
&lt;ul style=&quot;padding-left: 20px;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;코인 포트폴리오를 분산 투자하고 싶은데 수동 관리가 귀찮은 분&lt;/li&gt;
&lt;li&gt;감정적 매매를 줄이고 규칙 기반 투자를 하고 싶은 분&lt;/li&gt;
&lt;li&gt;개발에 관심 있어서 직접 만들어보고 싶은 분&lt;/li&gt;
&lt;/ul&gt;
&lt;hr style=&quot;border: none; border-top: 1px solid #e5e7eb; margin: 36px 0;&quot; data-ke-style=&quot;style1&quot; /&gt;&lt;!-- 10. 마무리 --&gt;
&lt;h2 id=&quot;s10&quot; style=&quot;font-size: 22px; font-weight: bold; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #4a7cff;&quot; data-ke-size=&quot;size26&quot;&gt;10. 마무리&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;12일간 실전 운영해본 결과, 자동 리밸런싱 시스템은 &lt;b&gt;생각보다 잘 동작&lt;/b&gt;합니다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;특히 입금 후 자동 분배되는 것과, 매일 아침 알아서 비율을 맞춰주는 게 편합니다. 수수료도 거의 무시할 수 있는 수준이고요.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;다음 글에서는 &lt;b&gt;주간 운영 후기&lt;/b&gt;와 함께 수익률 변화를 추적해보겠습니다.&lt;/p&gt;
&lt;hr style=&quot;border: none; border-top: 1px solid #e5e7eb; margin: 36px 0;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;div style=&quot;background: #f8f9fa; border-radius: 8px; padding: 14px 20px; margin: 0 0 24px; font-size: 12px; color: #999; line-height: 1.7;&quot;&gt;&lt;b&gt;면책 고지:&lt;/b&gt; 이 글은 개인적인 투자 기록이며 특정 코인의 매수&amp;middot;매도를 권유하지 않습니다. 암호화폐는 높은 변동성으로 원금 손실 위험이 있으며, 모든 투자의 책임은 본인에게 있습니다. 투자 결정 전 충분한 검토를 권장합니다.&lt;/div&gt;
&lt;/div&gt;</description>
      <category>투자 일지/코인 자동 리밸런싱</category>
      <category>DCA</category>
      <category>Next.js</category>
      <category>리플</category>
      <category>비트코인</category>
      <category>암호화폐</category>
      <category>업비트API</category>
      <category>업비트코인모으기</category>
      <category>이더리움</category>
      <category>코인리밸런싱</category>
      <category>코인투자</category>
      <author>우기!</author>
      <guid isPermaLink="true">https://bigstupid.tistory.com/206</guid>
      <comments>https://bigstupid.tistory.com/206#entry206comment</comments>
      <pubDate>Mon, 16 Mar 2026 22:50:57 +0900</pubDate>
    </item>
    <item>
      <title>Spring form login RSA 암호화 적용</title>
      <link>https://bigstupid.tistory.com/205</link>
      <description>&lt;h2&gt;비밀번호 전송 양방향 암호화(rsa) 적용&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;view에서 서버로 계속 같은 비밀번호 전송하는걸 막기위해 rsa 양방향 암호화 적용&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;1.Rsa util 추가&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.spec.RSAPublicKeySpec;
import javax.crypto.Cipher;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class Rsa {

    public static String RSA_WEB_KEY = &amp;quot;_RSA_WEB_Key_&amp;quot;; // 개인키 session key
    public static String RSA_INSTANCE = &amp;quot;RSA&amp;quot;; // rsa transformation

    /**
     * 복호화
     *
     * @param privateKey
     * @param securedValue
     * @return
     * @throws Exception
     */
    public String decryptRsa(PrivateKey privateKey, String securedValue) throws Exception {
        Cipher cipher = Cipher.getInstance(Rsa.RSA_INSTANCE);
        byte[] encryptedBytes = hexToByteArray(securedValue);
        cipher.init(Cipher.DECRYPT_MODE, privateKey);
        byte[] decryptedBytes = cipher.doFinal(encryptedBytes);
        String decryptedValue = new String(decryptedBytes, &amp;quot;utf-8&amp;quot;); // 문자 인코딩 주의.
        return decryptedValue;
    }

    /**
     * 16진 문자열을 byte 배열로 변환한다.
     *
     * @param hex
     * @return
     */
    public static byte[] hexToByteArray(String hex) {
        if (hex == null || hex.length() % 2 != 0) { return new byte[] {}; }

        byte[] bytes = new byte[hex.length() / 2];
        for (int i = 0; i &amp;lt; hex.length(); i += 2) {
            byte value = (byte) Integer.parseInt(hex.substring(i, i + 2), 16);
            bytes[(int) Math.floor(i / 2)] = value;
        }
        return bytes;
    }

    /**
     * rsa 공개키, 개인키 생성
     *
     * @param request
     */
    public void initRsa(HttpServletRequest request) {
        HttpSession session = request.getSession();

        KeyPairGenerator generator;
        try {
            generator = KeyPairGenerator.getInstance(Rsa.RSA_INSTANCE);
            generator.initialize(1024);

            KeyPair keyPair = generator.genKeyPair();
            KeyFactory keyFactory = KeyFactory.getInstance(Rsa.RSA_INSTANCE);
            PublicKey publicKey = keyPair.getPublic();
            PrivateKey privateKey = keyPair.getPrivate();

            session.setAttribute(Rsa.RSA_WEB_KEY, privateKey); // session에 RSA 개인키를 세션에 저장

            RSAPublicKeySpec publicSpec = (RSAPublicKeySpec) keyFactory.getKeySpec(publicKey, RSAPublicKeySpec.class);
            String publicKeyModulus = publicSpec.getModulus().toString(16);
            String publicKeyExponent = publicSpec.getPublicExponent().toString(16);

            request.setAttribute(&amp;quot;RSAModulus&amp;quot;, publicKeyModulus); // rsa modulus 를 request 에 추가
            request.setAttribute(&amp;quot;RSAExponent&amp;quot;, publicKeyExponent); // rsa exponent 를 request 에 추가
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;2. jsp에 필요 js 추가 및 hidden 값추가&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-jsp&quot;&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;${_.contextPath}/resources/lib/RSA/rsa.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;${_.contextPath}/resources/lib/RSA/jsbn.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;${_.contextPath}/resources/lib/RSA/prng4.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;${_.contextPath}/resources/lib/RSA/rng.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;form&amp;gt; ...
                                &amp;lt;input type=&amp;quot;hidden&amp;quot; id=&amp;quot;RSAModulus&amp;quot; value=&amp;quot;${RSAModulus}&amp;quot;/&amp;gt;
                                &amp;lt;input type=&amp;quot;hidden&amp;quot; id=&amp;quot;RSAExponent&amp;quot; value=&amp;quot;${RSAExponent}&amp;quot;/&amp;gt;
&amp;lt;/form&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;3. js에 암호화 로직 추가 및 암호화&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;// 비밀번호 암호화
function rsa(pwd){
    var pw = pwd;
    // rsa 암호화
    var rsa = new RSAKey();
    rsa.setPublic($(&amp;#39;#RSAModulus&amp;#39;).val(),$(&amp;#39;#RSAExponent&amp;#39;).val());
    return rsa.encrypt(pw);
}
function bindLoginSubmit() {
  $(&amp;quot;#form_login&amp;quot;).submit(function (e) {
    e.preventDefault();
    var form = this;
    var options = {
      method: form.method
      /*, data: $(form).serialize()*/
      , data: {
          &amp;quot;username&amp;quot; :  rsa($(&amp;quot;input[name=&amp;#39;username&amp;#39;]&amp;quot;).val())
          ,&amp;quot;password&amp;quot; : rsa($(&amp;quot;input[name=&amp;#39;password&amp;#39;]&amp;quot;).val())
      }
    };
})
};&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;4. WebSecurityConfig에 RequestContextListener 추가 (HttpRequest 불러오기위해)&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;    @Bean
    public RequestContextListener requestContextListener(){
        return new RequestContextListener();
    }&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;5. 복호화 및 암호화 AuthenticationProvider에 추가&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;    @Override
    public Authentication authenticate(Authentication authentication) throws AuthenticationException {
        try {
            ServletRequestAttributes servletRequestAttribute = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes();
            HttpServletRequest request = servletRequestAttribute.getRequest();
            Rsa r = new Rsa();
            HttpSession session = request.getSession();
            //로그인전에 세션에 저장된 개인키를 가져온다.
            PrivateKey privateKey = (PrivateKey) session.getAttribute(Rsa.RSA_WEB_KEY);
            //암호화 된 비밀번호를 복호화 시킨다.
            String username = r.decryptRsa(privateKey, (String) authentication.getPrincipal());
            String password = r.decryptRsa(privateKey, (String) authentication.getCredentials());
            // ShA 256 암호화 = 단방향
            password = passwordEncoder.encode(password).replaceAll(&amp;quot;\\{sha256}&amp;quot;,&amp;quot;&amp;quot;);
        }
}
&lt;/code&gt;&lt;/pre&gt;</description>
      <category>개발 소발/개발 Spring</category>
      <category>formlogin</category>
      <category>RSA</category>
      <category>spring</category>
      <category>복호화</category>
      <category>암호화</category>
      <author>우기!</author>
      <guid isPermaLink="true">https://bigstupid.tistory.com/205</guid>
      <comments>https://bigstupid.tistory.com/205#entry205comment</comments>
      <pubDate>Thu, 18 Aug 2022 16:37:23 +0900</pubDate>
    </item>
  </channel>
</rss>