<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alex Vidovich on Medium]]></title>
        <description><![CDATA[Stories by Alex Vidovich on Medium]]></description>
        <link>https://medium.com/@alex_vidovich_?source=rss-227fa2d1c808------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*i5WgrquKlzqFdMqxPqZamw.jpeg</url>
            <title>Stories by Alex Vidovich on Medium</title>
            <link>https://medium.com/@alex_vidovich_?source=rss-227fa2d1c808------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 03:55:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alex_vidovich_/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[I Was Sure Nvidia Would Bounce Back. Then I Checked 825 CEO Exits.]]></title>
            <link>https://medium.com/the-investors-handbook/i-was-sure-nvidia-would-bounce-back-then-i-checked-825-ceo-exits-9d0595dc1cac?source=rss-227fa2d1c808------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d0595dc1cac</guid>
            <category><![CDATA[stocks]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[nvidia]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[investing]]></category>
            <dc:creator><![CDATA[Alex Vidovich]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 00:00:39 GMT</pubDate>
            <atom:updated>2026-11-17T15:21:02.585Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Written on November 17, 2026, before the market opened. You already know the Nvidia news. What almost nobody knows is what a stock usually does after its CEO leaves like this. I went through 825 CEO exits. In the ones that look like Nvidia’s, a bounce was likely and a full comeback happened 4 times in 10.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dTy3ggn6GvP78TznJqDEMw.jpeg" /></figure><p>On November 12, Nvidia said its founder and CEO, Jensen Huang, had resigned, with a board investigation open. You’ve read the rest everywhere, so I’ll skip it. What I wanted to know is what happens to the stock.</p><p>Start with the price, because it’s ugly. Nvidia closed at $156.14 on Monday. Six weeks ago it was at $239. On the day the resignation was announced, 749 million shares changed hands, about six times a normal day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QtMRmJGGV-9v38qO_HroAQ.jpeg" /></figure><p><em>Nvidia’s daily closing price since October 1.</em></p><p>I don’t know what happens next. This morning I wrote in my notes anyway: “I know now that they will rebound for sure, just not in the next 3 months.”</p><p>I figured it would blow over. Good company, ugly month, the boss goes, and a year later nobody remembers any of it. Then I realized I was just assuming that. So I checked.</p><h3>What the stock usually does</h3><p>Four management researchers (Gentry, Harrison, Quigley and Boivie) keep a public database of CEO exits at S&amp;P 1500 companies. They coded why each CEO left: results, conduct or legal trouble, retirement, another job. I stuck with their buckets. From 2016 on, the file has 1,131 exits. I could match 825 of them to a price history, and 239 of those are big companies, with at least $100 million of stock traded on a normal day. Unless I say otherwise, the returns below are measured against an S&amp;P 500 index fund.</p><p>I pulled out the 15 big companies where the CEO was pushed out over conduct. Their stocks did this:</p><ol><li>The news cost about 4%, in two days.</li><li>After that, nothing. Three months later the average was +0.6%. A year later it was +2.5%, and the middle case was 6% behind, so a few winners carry that average.</li><li>There was no warning. In the three months before, these stocks were about 1% ahead of the index.</li><li>The price from before the news came back. Of the 12 stocks that closed lower after the news, 10 were back at that price within three months, and all 12 within a year.</li></ol><p>The exits that cost real money are the ones over poor results (73 cases). The stock barely moves on the news, and then it ends the year 9.5% behind the index. After a CEO retires or takes another job, it ends the year 3% behind.</p><p>Single cases are all over the place. In 2018 two chip-industry CEOs left over conduct, six months apart. Intel slipped 2% on the news and a year later was down 9%. Lam Research, which makes chip-making equipment, fell 8% on the news and had nearly doubled a year later.</p><h3>When the stock was already down</h3><p>Those stocks hadn’t fallen before the news. Nvidia had. From $228.52 on October 13, it was already down 24% the day before the resignation news and 29% the day after it, at $162.85. Some of that is the whole chip sector. The sector fund lost 11% on November 5 alone. But since the last close before the board’s statement, Nvidia is down 16% while the chip-sector fund is flat.</p><p>So I pulled the cases that look like this one. The CEO is forced out, for any reason, and the stock is at least 15% below where it closed a month before. There are 58 since 2016. So what did those 58 do?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a7TgAczT_RYptagVArHzSA.jpeg" /></figure><p><em>How often the old price came back in the 58 cases.</em></p><ol><li>Most of them bounced. The stock got back to where it closed the day before the CEO news in 28 of 51 cases within three months, and in 41 of 51 within a year.</li><li>Fewer than half made the full comeback, back to the price of a month before. It happened in 15 of 58 cases within three months and in 24 of 58 within a year. That’s 41%.</li><li>They kept lagging. Over the next year the typical stock in the group finished 14 points behind the index, and 64% of them lagged it.</li><li>Deeper falls did worse. Of the 26 that were down 25% or more, as Nvidia is, 8 made the full comeback within a year. That’s a small slice, so take it lightly.</li></ol><p>Three of them you’ll know.</p><p>UnitedHealth, 2025. Down 19% on the news and 48% for the month. A year later it was up 31% from where it stood after the news, and still well under the old price. A stock that has been cut in half has to double to get back.</p><p>Walgreens, 2023. Down 25% in the month, a little less than Nvidia. It fell another 59% over the following year.</p><p>Discover Financial, 2023. Down 22% in the month, not back after three months, back within the year. That’s what I predicted for Nvidia, and it does happen.</p><h3>Where Nvidia sits against those lines</h3><p>A bounce means getting back to $173.73, the close on the day before the resignation news. That’s 11% above Monday’s close. In the group of 58, 55% were back at that line within three months and 80% within a year.</p><p>A full comeback means $228.52, the close a month before. That’s 46% above Monday’s close. 26% made it within three months and 41% within a year.</p><p>The price I had in mind this morning was $186.64, the last close before the board’s statement. That’s about 20% above Monday’s close, and it sits between the two lines. So the past puts the odds of seeing it again within a year somewhere between 4 in 10 and 8 in 10. Those are decent odds. It isn’t “for sure”, and “for sure” is what I wrote.</p><p>“Not in the next 3 months” is shakier than I thought. Depending on the line, between just under half and three quarters of the 58 hadn’t made it back by then.</p><p>The 58 aren’t a perfect match. Nvidia is losing its founder, and the database doesn’t track that. The company calls it a resignation. I put it with the forced exits because he left with a board investigation open. These numbers are a starting point. They’re not a forecast.</p><p>So here’s the call, written down before I can weasel out of it:</p><ul><li>No close above $186.64 through February 17, 2027. I’d put that at 60%.</li><li>A close above $186.64 by November 17, 2027. I’d put that at 60%.</li><li>A full comeback, a close at or above $228.52 by November 17, 2027. I’d put that at 40%.</li></ul><p>I’ll update this post on those dates. A lot can happen before then, and I expect at least one of these numbers to look silly.</p><p><em>Don’t buy or sell anything because of this post. It isn’t investment advice.</em></p><h3>Fine print</h3><p>Yes, I picked the 58 and the 15% line after looking at Nvidia. It’s a description, not a test. It’s also small. Only 8 of the 58 are big companies (3 of them made the full comeback within a year), and the conduct group is 15 cases. The 26 with the deeper falls are a slice of a slice.</p><p>The “price came back” counts use the stock’s own price, not the index. The bounce is counted on the 51 stocks that closed below the day-before price after the news. The range I give for $186.64 is my own reasoning from the two lines. It was not measured. Nvidia’s 29% is measured the way the 58 were: from the close 22 trading days before the announcement to the close one day after it. All Nvidia prices are unadjusted daily closes up to November 16.</p><p>306 of the 1,131 exits have no price. For 265 of them the reason is that the database has no tickers and I couldn’t match the company name. I don’t know whether the missing ones differ from the rest. About 180 exits over results have no announcement date and are left out. A few dates in the database are off by some days.</p><p>After the first run I added three rules: use the leaving date when a conduct exit has no announcement date, chase renamed tickers, and drop cases with patchy prices or a one-day move of 300% or more. None of them depends on which way the stock went. A stock that stopped trading during a window keeps its last price.</p><p>The index fund beat the average big stock in these years, which is why even the voluntary exits show −3%. They are the fair baseline. Against them, none of the 12-month gaps clears the bar I use, a t-value of 3 (2 is the usual one). Results: −6.4 points (t −1.3) at big companies and −6.2 (t −1.7) at all sizes. Conduct: +5.5 (t 0.6) and +2.2 (t 0.3). The 58-case group trails the index by 19.4% on average with a t of −3.7, but that is against the index and on a group I picked after the fact, so I don’t count it.</p><p>The named companies are just examples. Those returns are the stocks’ own moves. The database only lists CEOs who left, so it can’t say how often a board investigation ends with the CEO staying. The two company facts in this post come from Nvidia’s board statement of November 8 and its SEC filing of November 12.</p><h3>Source</h3><p>CEO exits and the reason for each: Gentry, Harrison, Quigley and Boivie, “A database of CEO turnover and dismissal in S&amp;P 1500 firms”, Strategic Management Journal 42(5), 2021, pages 968–991. Data: Zenodo record 23328926 (doi.org/10.5281/zenodo.23328926), licence CC BY 4.0. The exit reasons are the authors’. The ticker matching, prices and mistakes are mine.</p><p><em>AI tools helped with the data work and the drafting. The calls and any mistakes are mine.Keywords: macro, Nvidia, CEO turnover, stock market, base rates, market history.</em></p><p><em>Originally published at </em><a href="https://alexvidovich.com/writing/what-a-stock-does-after-its-ceo-is-forced-out"><em>https://alexvidovich.com</em></a><em> on November 17, 2026.</em></p><h3>Make Better Financial Decisions With Your Own Numbers</h3><p>At <strong>Investor’s Handbook</strong>, we turn real investing and money questions into practical frameworks and <strong>free downloadable Excel models</strong> you can use to evaluate your own decisions.</p><p>Join our free newsletter for the Tuesday Digest, Thursday Weekly Framework, and a growing library of financial tools covering investing, retirement, debt, and building wealth.</p><p>📩 <a href="https://investorshandbook-newsletter-c72f94.beehiiv.com/"><strong>Get Free Financial Models &amp; Join Investor’s Handbook</strong></a></p><p><em>Learn the framework. Run the model. Make the decision.</em></p><p>🎥 <a href="https://www.youtube.com/channel/UCLcEzBcpLsD8cDUZGG246DQ"><strong>Watch on YouTube</strong></a> · 𝕏 <a href="https://x.com/InvestorsHndbk"><strong>Follow on X</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d0595dc1cac" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-investors-handbook/i-was-sure-nvidia-would-bounce-back-then-i-checked-825-ceo-exits-9d0595dc1cac">I Was Sure Nvidia Would Bounce Back. Then I Checked 825 CEO Exits.</a> was originally published in <a href="https://medium.com/the-investors-handbook">Investor’s Handbook</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The End-of-Day Reversal After 2019: What a Pre-Registered Test Found]]></title>
            <link>https://medium.com/the-investors-handbook/the-end-of-day-reversal-after-2019-what-a-pre-registered-test-found-595175522163?source=rss-227fa2d1c808------2</link>
            <guid isPermaLink="false">https://medium.com/p/595175522163</guid>
            <category><![CDATA[investing]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[quantitative-finance]]></category>
            <dc:creator><![CDATA[Alex Vidovich]]></dc:creator>
            <pubDate>Fri, 06 Nov 2026 00:00:23 GMT</pubDate>
            <atom:updated>2026-11-09T10:18:12.613Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Intraday losers beat intraday winners in the last half hour of trading. A published anomaly, sample ending 2019. We tested it on 2020–2026 under a pre-registration written before the run. New paper, free PDF below; replication archive on Zenodo, paper on arXiv.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AA7bXtzewfHBbJROUMep2w.jpeg" /></figure><p>Baltussen, Da and Soebhag (2025) documented an end-of-day reversal in U.S. stocks: the names that fell between the prior close and 3:00 p.m. outperform the morning’s winners over the last half hour. Their sample ends in December 2019. Anomalies usually shrink once their sample ends, so the natural question is whether this one did.</p><p>We tested it on point-in-time S&amp;P 500 members from 2016 to October 2026, with one deliberate cut: about 80 large, heavily traded stocks whose recent intraday data we had examined in earlier, unpublished work were excluded, so that nothing we had already seen could shape the result. The list is not released. The paper says why, and what the cut costs.</p><h3>The registration came first</h3><p>The estimators, the thresholds and the wording of each verdict were fixed before the run. A reproduction test came before anything else: the 2016–2019 data had to show the published sign at t ≥ 2 before any statistic linking the sort to the outcome was computed on later data. Only after that result was committed was the confirmatory script executed, once, on all periods, under a lock that blocks a second execution.</p><p>The design, the pre-registration and the decision rules were drafted by an AI model and adopted by us. An AI agent then ran an adversarial audit of the design and found two defects that would have let the paper overstate a change. Both were fixed before any primary-sample outcome was seen. Appendix B lists them.</p><h3>What the registered test says</h3><p>Measured to the last trade before the closing auction, the dollar-volume-weighted reversal is 3.13 bps a day in 2016–2019 and 3.05 bps a day in 2023–2026. The registered no-weakening verdict holds, and the one-sided 95% bound on the decline is 61% of the 2016–2019 effect. A proxy sample that anyone can rebuild from public data, added after the run and reported as descriptive, gives 2.81 and 3.86 bps.</p><h3>What it depends on</h3><p>Three things, and the paper puts each on the table.</p><p>The window. 44% of the later sessions fall in 2020–2022, where the reversal is indistinguishable from zero. Over all sessions from 2020 it is 1.69 bps, 46% below 2016–2019, and the bound on the decline becomes 91%. The 2023–2026 estimate rests on 2023, the strongest year; 2024–2026 alone cannot be told apart from 2020–2022.</p><p>The end point. Ending at 3:55 instead of the last trade before 4:00 raises the bound to 90%. The closing auction itself carries a reversal in every period, and it grew.</p><p>The sample. On the full index the reversal falls from 3.40 to 0.74 bps. The fall is short of the registered bar of t = −3, so under the registration it does not count as a weakening, but equal weights, square-root weights or dropping the five largest stocks each day restore it. The weakness sits in the very largest names, where dollar-volume weight became far more concentrated after 2019.</p><h3>Mechanisms: none passes</h3><p>Four pre-registered mechanism tests, one Holm family: a market component, an idiosyncratic component, the weekdays that gained same-day index options, and single-stock leveraged-ETF launches. None passes. The market component moved from slight continuation to reversal, in the direction a dampening story predicts, but not past the threshold. The leveraged-ETF test could not be judged: too few treated stocks sit in the sample, and the paper says so rather than reading a sign into twelve names.</p><p>One by-product may be useful elsewhere. We release a table of first single-stock leveraged-ETF launch dates for S&amp;P 500 members, each sourced from issuer documents, because the aggregator we first used placed nine launches up to ten months too early.</p><h3>The largest number in the paper</h3><p>On the full index in 2023–2026, intraday winners beat intraday losers from 3:30 p.m. to the next open by 13.7 bps. It is not a split or dividend artefact, it rests on the weights, and it is not in the primary or proxy samples. We offer no mechanism and do not test why it occurs. It is reported because a reader who sees only the half-hour result would miss it.</p><h3>Where to read it</h3><p>The full paper, fifteen pages with the decision rules, the audit record and every post-run addition marked as such, is on its <a href="https://alexvidovich.com/papers/eod-reversal">abstract page</a> as a PDF, with BibTeX. The replication archive, with the scoring code, the point-in-time membership file, the launch-date table and public copies of the pre-registration documents, is on Zenodo as <a href="https://doi.org/10.5281/zenodo.24003093">10.5281/zenodo.24003093</a>. It is also on arXiv as <a href="https://arxiv.org/abs/2611.09286">https://arxiv.org/abs/2611.09286</a> (q-fin.ST, cross-listed q-fin.TR).</p><p>Two sentences from the paper that we mean exactly as written. It makes no claim net of costs and does not propose a trading strategy. The authors do not trade a strategy based on the end-of-day reversal.</p><p><em>Keywords: end-of-day reversal, intraday returns, pre-registration, out-of-sample replication, leveraged ETFs, market anomaly.</em></p><p><em>Originally published at </em><a href="https://alexvidovich.com/writing/the-end-of-day-reversal-after-2019"><em>https://alexvidovich.com</em></a><em> on November 6, 2026.</em></p><p>📩 <a href="https://investorshandbook-newsletter-c72f94.beehiiv.com/"><strong>Join Investor’s Handbook</strong></a> — get the Tuesday Digest, Thursday Weekly Framework, and free financial tools designed to help you make better decisions about investing, money, and building wealth.</p><p><strong>Learn the framework. Run the model. Make the decision.</strong></p><p>🎥 <strong>Watch </strong><a href="https://www.youtube.com/channel/UCLcEzBcpLsD8cDUZGG246DQ"><strong>Investor’s Handbook on YouTube</strong></a> · 𝕏 <strong>Follow </strong><a href="https://x.com/InvestorsHndbk"><strong>Investor’s Handbook on X</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=595175522163" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-investors-handbook/the-end-of-day-reversal-after-2019-what-a-pre-registered-test-found-595175522163">The End-of-Day Reversal After 2019: What a Pre-Registered Test Found</a> was originally published in <a href="https://medium.com/the-investors-handbook">Investor’s Handbook</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Homebuilders Lost 62% While the S&P 500 Hit a Record. That’s How 2008 Really Started.]]></title>
            <link>https://medium.com/the-investors-handbook/homebuilders-lost-62-while-the-s-p-500-hit-a-record-thats-how-2008-really-started-9696f5bae20d?source=rss-227fa2d1c808------2</link>
            <guid isPermaLink="false">https://medium.com/p/9696f5bae20d</guid>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[economics]]></category>
            <category><![CDATA[financial-crisis]]></category>
            <category><![CDATA[investing]]></category>
            <dc:creator><![CDATA[Alex Vidovich]]></dc:creator>
            <pubDate>Sun, 25 Oct 2026 00:00:24 GMT</pubDate>
            <atom:updated>2026-10-25T15:34:57.871Z</atom:updated>
            <content:encoded><![CDATA[<p><em>The 2008 crash didn’t arrive in one day. It travelled for 27 months before it reached the S&amp;P 500, and you can watch it go.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jScMnxdNoLSZwQqVB8jH_A.jpeg" /></figure><p>October 9, 2007. The S&amp;P 500 closes at 1,565. A record. It won’t close higher again for five and a half years.</p><p>Here’s the strange part. On that same day, the six big American homebuilders were already down 62% on average from their highs. The mortgage insurer Radian had lost 64%. And asset-backed commercial paper, short-term IOUs backed by pools of loans that banks’ side vehicles renewed every few days or weeks, had shrunk by $283 billion in eight weeks.</p><p>A record and a crisis, on the same day. It depended on where you looked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k4uuZtEelM3Hs8XzSPHk4A.jpeg" /></figure><p><em>What $100 invested in January 2005 was worth: the homebuilders, the banks and the S&amp;P 500.</em></p><h3>The crash didn’t happen on one day</h3><p>We tell 2008 as one event. Housing crashed, the banks went with it, then Lehman. Clean.</p><p>Prices tell it differently. I pulled daily closing prices for 38 things: stocks, indexes, funds, oil, copper, gold. Before fetching a single price, though knowing how 2008 ended, I sorted them into ten groups by how close their business sat to an American home mortgage. Homebuilders first. Then mortgage lenders, insurers, investment banks, commercial banks, the financial sector as a whole, the big US indexes, consumer and industrial companies, foreign markets, and commodities last.</p><p>Then I asked one thing of each: between January 2002 and the crisis low in March 2009, when was your highest close? For some, Tokyo’s Nikkei for one, that wasn’t an all-time record. It was the top of this cycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZgNVRQyAXyGQSw9RrwQo1A.jpeg" /></figure><p><em>Each group’s highest close between 2002 and the March 2009 low, grouped by how close it sat to US mortgages.</em></p><p>Here’s what came back:</p><ul><li><strong>July 2005.</strong> All six big homebuilders peak within eight days of each other. D.R. Horton, Toll Brothers, KB Home, Lennar, Pulte, NVR. The Case-Shiller national house price index won’t peak for another year.</li><li><strong>November 2006 to February 2007.</strong> Bank of America, Citigroup, the bond insurer MBIA, Radian, the main bank index.</li><li><strong>Spring 2007.</strong> UBS, JPMorgan, Deutsche Bank.</li><li><strong>June 2007.</strong> The index of Wall Street brokers and the financial sector as a whole.</li><li><strong>June and July 2007.</strong> London, Tokyo, Europe, US small caps.</li><li><strong>October 9, 2007.</strong> The S&amp;P 500 and the Dow.</li><li><strong>July 2008.</strong> Copper and oil.</li></ul><p>Not a crash. A wave. It started in one corner of the economy and rolled outward, one layer at a time, for 27 months before it reached the index on the evening news.</p><h3>Is the order real, or am I seeing faces in clouds?</h3><p>Fair question.</p><p>So I put a number on it. Each group’s date is the middle (median) of its members’ highs. Rank the ten groups from closest to mortgages (1) to farthest (10), and compare that ranking with the order in which they peaked. A perfect match scores 1. No relationship scores about 0. This one scores <strong>0.87</strong>.</p><p>Then I shuffled the group labels at random, 200,000 times, to see how often luck alone produces an order that neat. About once in a thousand tries.</p><p>One warning. I picked those groups knowing how 2008 ended. The shuffle says the pattern is unusual. It can’t say how obvious it would have looked to someone in 2006. Nobody gets that test after the fact.</p><p>And some things don’t fit. Freddie Mac and the mortgage insurer MGIC topped out in 2004, before the homebuilders. The broker index peaked on June 1, 2007, but Goldman Sachs, the broker everyone knows, kept rising until October 31. Wells Fargo’s high came on September 19, 2008, the day a ban on short selling financial stocks took effect. And some of the companies closest to the fire aren’t in my data at all: Lehman and New Century went bankrupt, Countrywide and Bear Stearns were swallowed in rescue deals, and the free price source I used drops companies that no longer trade. I don’t know where they’d land.</p><h3>Meanwhile, in the plumbing</h3><p>The wave reached the real danger zone in August 2007.</p><p>A lot of mortgage bonds were paid for with short-term borrowing that had to be renewed every few days or weeks. Most buyers treated that paper as nearly as safe as cash, and few dug into what was behind it. Then subprime losses started showing up, and nobody could tell which bonds were the bad ones. So the buyers refused to renew.</p><p>On August 9, the French bank BNP Paribas froze three funds, blaming “the complete evaporation of liquidity.” Within weeks, about a third of the programs that issued asset-backed commercial paper were facing a run, according to Federal Reserve economists. In September, savers queued outside Northern Rock branches across Britain, in what was widely called the country’s first bank run since 1866.</p><p>And the S&amp;P 500? It went <em>up</em> 4.5% between August 8 and October 9.</p><h3>Why the index didn’t notice</h3><p>Because the S&amp;P 500 isn’t a mortgage index. It’s a basket of 500 companies weighted by size, and in 2007 many of the big ones were doing great.</p><p>From August 8 to October 9, the S&amp;P energy sector fund rose 9%. Materials 8%. Tech 6%. Oil and metals were booming, the dollar was down about 6% since January, and none of that had much to do with somebody’s adjustable-rate loan in Phoenix. Financial stocks barely moved, up 3% and still 6% below their June high. Energy, materials and tech rising much faster was enough to lift the whole index. For a while.</p><p>Two of the gauges people trust most made things look calmer than they were.</p><p>The VIX, Wall Street’s fear gauge, spiked to about 31 in mid-August, then eased back to 16 by the record. Still above the 11 it showed early in the year, but nowhere near panic.</p><p>And the yield curve, the most famous recession warning there is, flipped back to “normal” in August. Sounds like good news. It wasn’t. Scared investors piled into three-month Treasury bills and pushed their yield down. The curve looked healthier <em>because</em> people were panicking.</p><h3>The one strange day</h3><p>There was one statistically extreme day on the stock screen, seven months before the peak.</p><p>On February 27, 2007, the S&amp;P 500 dropped 3.5%. It was set off mainly by an almost 9% one-day fall in Shanghai and fresh talk of a US recession, not by mortgages. But look at the size. The night before, the VIX sat at 11. At that level options were pricing daily swings of about 0.7%. The market moved five times that.</p><p>I checked every trading day from December 1998 to October 2026, using the previous day’s VIX each time. About 7,000 days. That’s the only one where the market moved more than four and a half times what options were pricing.</p><p>By mid-April the index was back above where it started that day. On May 30 it passed its old dot-com record. And on it went.</p><h3>Nobody acted like they knew</h3><p>This is the part that keeps me honest.</p><p>Look at the chart and it all seems obvious. Most of the people inside the system didn’t behave as if it was. Bank CEOs kept their own shares going into the crisis and lost fortunes on them. Mid-level people at the firms packaging mortgages bought houses for themselves near the top. In March 2007, Fed Chairman Ben Bernanke told Congress that the damage from subprime to the broader economy and financial markets “seems likely to be contained.”</p><p>A few did see it. Goldman Sachs started cutting its mortgage bets in December 2006, after ten straight days of losses on its mortgage desk. A handful of investors bet against subprime bonds and got rich. They were the exception.</p><p>Some prices turned early. No single price told the whole story. You only see it when you line them up by date.</p><h3>What I’m not saying</h3><p>I’m not saying you could have called the top. Every date on that chart is clear <em>now</em>. Living through it, it was a mess of mixed signals, and plenty of famous warnings since then have been flat wrong. The 10-year minus 3-month Treasury curve was inverted on every trading day of 2023 and on most days of 2024. In January 2024, with that curve still inverted by more than a full point, the S&amp;P 500 broke its old record and kept climbing.</p><p>I’m also not saying 2008 proves a law. It’s one episode.</p><h3>What’s next</h3><p>Next I’ll run the same test on other crashes, with the rules written down first. If crises travel outward from where the trouble starts, the order should show up again: internet and telecom stocks first in 2000, property and the savings-and-loan banks in 1990, the long-dated growth stocks that rising rates hurt first in 2022.</p><p>2020 is the control. A virus hit most of the market within weeks. That’s not a slow spread from one corner over years, so a 2008-style wave shouldn’t appear. (I haven’t looked at the 2020 sector data yet, on purpose.)</p><p>If the wave shows up where the trouble started and fades in 2020, that’s something real. If it only shows up in 2008, I’ll tell you that too.</p><p><em>Sources: daily prices from Yahoo Finance; the VIX, interbank spreads, Treasury yields and commercial paper from the St. Louis Fed’s FRED database; house prices from the S&amp;P CoreLogic Case-Shiller index. Research: Gorton &amp; Metrick (2012) and Covitz, Liang &amp; Suarez (2013) on the run on short-term funding; Fahlenbrach &amp; Stulz (2011) on bank CEOs’ shareholdings; Cheng, Raina &amp; Xiong (2014) on securitisation staff buying homes; the Financial Crisis Inquiry Commission report (2011) on Goldman Sachs; Bernanke’s testimony to the Joint Economic Committee, March 28, 2007; the UK House of Commons Treasury Committee report on Northern Rock (2008). Not investment advice.Keywords: macro, 2008 financial crisis, housing bubble, S&amp;P 500, market history.</em></p><p><em>Originally published at </em><a href="https://alexvidovich.com/writing/how-2008-really-started"><em>https://alexvidovich.com</em></a><em> on October 25, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9696f5bae20d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-investors-handbook/homebuilders-lost-62-while-the-s-p-500-hit-a-record-thats-how-2008-really-started-9696f5bae20d">Homebuilders Lost 62% While the S&amp;P 500 Hit a Record. That’s How 2008 Really Started.</a> was originally published in <a href="https://medium.com/the-investors-handbook">Investor’s Handbook</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Thermometer, Not an Analyst: Six Gates Before a Text Model Touches a Trading Lab]]></title>
            <link>https://medium.com/the-investors-handbook/a-thermometer-not-an-analyst-six-gates-before-a-text-model-touches-a-trading-lab-d352a5e42dba?source=rss-227fa2d1c808------2</link>
            <guid isPermaLink="false">https://medium.com/p/d352a5e42dba</guid>
            <category><![CDATA[quantitative-finance]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Alex Vidovich]]></dc:creator>
            <pubDate>Fri, 09 Oct 2026 00:00:03 GMT</pubDate>
            <atom:updated>2026-10-09T14:04:27.297Z</atom:updated>
            <content:encoded><![CDATA[<p>A small text model reads headlines beside a live trading lab. It may write stamps after the close. It may never touch a number. New paper, free PDF below; posted on SSRN.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d352a5e42dba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-investors-handbook/a-thermometer-not-an-analyst-six-gates-before-a-text-model-touches-a-trading-lab-d352a5e42dba">A Thermometer, Not an Analyst: Six Gates Before a Text Model Touches a Trading Lab</a> was originally published in <a href="https://medium.com/the-investors-handbook">Investor’s Handbook</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Six Ways Our Backtest Lied to Us — and None of Them Showed in the Results]]></title>
            <link>https://medium.com/the-investors-handbook/six-ways-our-backtest-lied-to-us-and-none-of-them-showed-in-the-results-722060a76d0f?source=rss-227fa2d1c808------2</link>
            <guid isPermaLink="false">https://medium.com/p/722060a76d0f</guid>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[investing]]></category>
            <category><![CDATA[quantitative-finance]]></category>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Alex Vidovich]]></dc:creator>
            <pubDate>Thu, 24 Sep 2026 00:00:09 GMT</pubDate>
            <atom:updated>2026-10-16T07:44:34.849Z</atom:updated>
            <content:encoded><![CDATA[<p>Every defect sat where two paths that should agree had quietly drifted apart. New paper, free PDF below; posted on SSRN and arXiv.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D7TWs8oMRq5QeHU5MstFuQ.jpeg" /></figure><p>The first test a backtest has to pass is not a statistical one. It is this: take a day the live system actually traded, replay it through the backtest, and check that the two made the same decision at the same price and size. If they didn’t, nothing the backtest says afterwards is worth much.</p><p>We ran that test on one intraday US equity system and kept running it. Over a few months it caught six defects. What unnerved us is that not one of them showed in the summary statistics. Returns looked plausible. Hit rates looked plausible. The numbers were wrong in ways that only a narrow, concrete look could see — one trade against the cache, one bar from four sources, one day’s decision record re-read.</p><p>The paper writes each one up as symptom, magnitude, root cause and the test that now guards it. Here is the short version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*okBi5oLDa0I2o9b9hMDZLQ.jpeg" /></figure><h3>1. The default data feed was not the consolidated tape</h3><p>We asked the vendor for historical bars without pinning which feed. It returned single-exchange data. Opening-minute volume in our cache was 0.1–2% of the real figure, on every single trading day we checked, while full-day totals were correct — so nothing looked off. Every feature built from opening-minute data was wrong. One month replayed both ways understated, the next overstated; one losing trade became a winning one. A permutation test we had already run was voided.</p><p><em>Lesson: pin every vendor parameter that changes what the data means, and then check, at the point of use, a property the bug would break.</em></p><h3>2. Dividend-adjusted history against unadjusted live fills</h3><p>A commit switched the fetch to dividend-adjusted prices. That restates every historical bar on today’s price basis, which is fine for charts and wrong for execution: live orders fill at the unadjusted price. 37 of 98 symbols shifted, every one a dividend payer. One replayed trade combined an unadjusted entry with an adjusted exit and came out far from the live result. Two full runs were thrown away.</p><p><em>Lesson: adjusted prices answer “what was this worth in today’s terms”. A backtest must answer “what would my order have filled at that day”.</em></p><h3>3. A sizing step that scaled past the binding limit</h3><p>Sizing is a chain of steps. The strategy applied the account’s buying-power limit correctly; a later step, one that can increase size, multiplied the already-limited notional with no second check. 20 of 61 simulated fills were sized at a notional the live account can never take — about 18% too large. Live was never exposed, because it re-checks real buying power at order time. The backtest had a field live doesn’t.</p><p><em>Lesson: apply the binding limit last, or re-apply it after every step that can increase size. Test with a position already at the limit — that is the case that breaks.</em></p><h3>4. The clock is UTC. The market is New York.</h3><p>A research scan picked the opening bar with the fixed key “13:30”. That is 9:30 New York only in summer. In winter it is 8:30, an hour before the open. Thirty percent of the study period was winter; on those days 16% of stock-mornings were scored on a pre-market bar and the rest were silently dropped by a completeness check. Eleven scans were affected. No verdict flipped. Almost every number moved. A reviewer who checks only verdicts would never see it. The same trap had been logged months earlier as an operational note, not turned into shared code — so it came back.</p><p><em>Lesson: never compare clock times as strings. Convert once, in one shared helper, and put a winter day and a summer day in every time-dependent test.</em></p><h3>5. Data the live path downloads and the replay did not</h3><p>One real-money day would not reconcile. Three weeks later we chased it: the live system downloads data beyond the stocks it trades, and one decision input depends on it. The replay built its request from the list of traded stocks. The two lists had drifted apart. With that data missing, the input silently read zero in every harness run for about four months. It feeds several decision rules. Restoring it changed one real-money decision in twenty — and re-explained a live-versus-replay gap we had wrongly blamed on quote timing.</p><p><em>Lesson: build the replay’s data request from the live system’s own list of required inputs, never from the list of things it trades. Never let a missing input fall back silently to a neutral value. Chase every unexplained parity divergence to the end.</em></p><h3>6. “Enabled in config” is not “connected in the execution path”</h3><p>A family of three. An exit rule that was switched on and ignored, because its reason code was not in the honored set — and the simulation stopped at the ignored exit, hiding every later one. A sizing rule wired only into a backtest-only branch; two live trades were sized as if it didn’t exist, and its “end-to-end confirmation” had checked that the flag loaded, not that orders changed. And 53 settings read by production code but never declared — a quarter of the surface — including one that turns order execution on, living in a file nobody audited.</p><p><em>Lesson: for every setting, test that it changes something observable in the path that places orders. Then check behavior in production logs, because the config file may not be the only place settings live.</em></p><h3>What the six have in common</h3><p>Each sat between two paths that should have agreed: a historical request and a same-day one, a field that exists only in the backtest, a data list built from what is traded rather than what is required, configuration and the code that actually places orders. In five of the six, the path closer to live was right.</p><p>None was found by reviewing results. One erred in both directions. One moved almost every number and flipped no verdict. One changed a single decision in twenty. One produced a false pass because two errors cancelled. A bug that makes results absurd gets caught. These made results look plausible.</p><p>And written lessons did not stop recurrence. The clock trap came back months after it was logged. The sizing-chain lesson came back in a step its own test did not cover. Tests are necessary. They are not sufficient either — one class recurred past its test. The honest state of the paper’s own evidence: every figure produced while Defect 5 was present carries it, and none has been re-run yet.</p><h3>The checklist</h3><ol><li>Pin the data feed in every request; test the parameter.</li><li>At decision time, alarm if opening volume collapses across the whole universe at once.</li><li>Use unadjusted prices for execution simulation; test the parameter.</li><li>Replay live trades regularly; after any data change, match one fill to the cent.</li><li>Re-apply the binding size limit after every step that can increase size; test at the limit.</li><li>Convert timestamps in one shared exchange-time helper, tested on a winter and a summer day.</li><li>Build the replay’s data request from the live path’s required-input list; make missing inputs loud.</li><li>Chase every unexplained replay-versus-live difference to its root cause.</li><li>For every setting, test that it changes an observable action in the order path; declare every key the code reads.</li><li>Check live behavior in logs daily, not settings.</li></ol><h3>Where to read it</h3><p>The full paper — eight pages, all six defects with magnitudes, the parity evidence, a worked example of the request-recording test, and an unusually long limitations section — is on the <a href="https://alexvidovich.com/papers">papers page</a> as a PDF. It is also on SSRN as abstract 7517378 (https://papers.ssrn.com/sol3/papers.cfm?abstract_id=7517378), DOI 10.2139/ssrn.7517378.</p><p>One sentence from the abstract that we mean exactly as written: we make no claim about whether the system is profitable. The paper is about whether a backtest is even measuring the system it claims to measure. That question comes first, and it is the one almost nobody tests.</p><p><em>Keywords: backtesting, backtest-live parity, implementation error, research infrastructure.</em></p><p><em>Originally published at </em><a href="https://alexvidovich.com/writing/six-ways-our-backtest-lied-to-us"><em>https://alexvidovich.com</em></a><em> on September 24, 2026.</em></p><p>📩 <strong>Join </strong><a href="https://investorshandbook-newsletter-c72f94.beehiiv.com/"><strong>Investor’s Handbook Digest</strong></a><strong> — get the best investing, markets, and wealth-building insights each week.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=722060a76d0f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-investors-handbook/six-ways-our-backtest-lied-to-us-and-none-of-them-showed-in-the-results-722060a76d0f">Six Ways Our Backtest Lied to Us — and None of Them Showed in the Results</a> was originally published in <a href="https://medium.com/the-investors-handbook">Investor’s Handbook</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Yen Carry Trade Explained: Why One Small Rate Hike in Tokyo Can Crash US Stocks]]></title>
            <link>https://medium.com/the-investors-handbook/japan-is-the-next-watch-point-7b1e227804ba?source=rss-227fa2d1c808------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b1e227804ba</guid>
            <category><![CDATA[japan]]></category>
            <category><![CDATA[economics]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[investing]]></category>
            <dc:creator><![CDATA[Alex Vidovich]]></dc:creator>
            <pubDate>Fri, 11 Sep 2026 00:00:03 GMT</pubDate>
            <atom:updated>2026-10-07T11:07:38.834Z</atom:updated>
            <content:encoded><![CDATA[<p><em>In 2024 a crowded yen trade turned a small Tokyo rate hike and one weak US jobs report into the worst day for Japanese stocks since 1987. The trade unwound in two weeks and has since been rebuilt. The same sequence is lining up again, this time with $40 trillion of US federal debt behind it.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kOVe1j439-V2VWEBfm0QzA.jpeg" /></figure><p>The 2024 version ran on a clock. On July 11 Japan intervened in the currency market to stop the yen from falling. On July 31 the Bank of Japan raised its policy rate from 0.10% to 0.25%, and Governor Ueda said more was coming. On Friday August 2 the US jobs report came in soft, with unemployment at 4.3%, which tripped the Sahm rule. On Monday August 5 the Nikkei fell 12.4%, its worst session since 1987. The S&amp;P 500 lost 3%. The VIX touched 65 intraday, a level it had only reached in 2008 and in March 2020. It closed at 38.6, which tells you how much of the panic was mechanical.</p><p>Fifteen basis points did not do that on their own. The hike primed a very crowded position and the US data set it off. The trigger was ordinary. The size of the reaction came from the structure.</p><p>Two years later the structure is back, and the debt underneath it is much larger. The dates are at the end.</p><h3>What the trade is, and what it pays now</h3><p>Japan held rates near zero for most of thirty years, and the world built a habit on top of that. Borrow yen for almost nothing, convert to dollars, buy anything with a yield: Treasuries, the S&amp;P, credit, crypto. Keep the spread. Add leverage. Repeat.</p><p>In 2024 the spread was about five percentage points. Today it is thinner. The Bank of Japan is at <strong>1.0%</strong>, its highest rate since 1995, and the Fed is at <strong>3.50 to 3.75%</strong>. Call it two and a half points. That spread is the whole reason the trade exists, and both central banks get to move it in the same week this month.</p><p>How big is the position? Estimates span an order of magnitude, and that range is a warning in itself. The measurable slice, yen borrowing visible in bank data, runs in the hundreds of billions. At the other end, Deutsche Bank has called Japan’s entire public-sector balance sheet, about $20 trillion, one giant carry trade. That is a framing, not a count of speculative borrowing, but it shows how deep the yen-funding habit goes. Nobody sees the whole book. That has been true before every leveraged accident I can think of.</p><h3>It unwound. Then it came back.</h3><p>The common line about 2024 is that the carry trade never really unwound. The CFTC data says otherwise.</p><p>Speculators held a record short yen position of about <strong>180,000 contracts</strong> in July 2024. Within two weeks of the crash they were net <em>long</em>. The stampede happened, all the way through.</p><p>Then the position was rebuilt. Through 2025 and into 2026 the shorts came back, and as of early September 2026 net yen shorts are around <strong>92,000 contracts</strong>, about half the 2024 peak, and growing week by week. The people who got run over went back in, because the spread still pays and because the last crash turned out to be survivable. That second reason is the one that sets up the next crash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h6IGWsRu4ehe8fFXxdzstg.png" /></figure><p><strong><em>Fig. 1.</em></strong><em> The sequence that produced August 5, 2024, and the 2026 calendar so far. The parallel is structural, not a prediction. The third box in the second row is still open.</em></p><h3>Why the exit is violent</h3><p>The mechanics have not changed. To get out, a fund buys back yen. That strengthens the yen, which deepens the losses of everyone still short, which forces more of them out. One fund leaving is a transaction. A crowd leaving is a stampede through a door that gets narrower the more people run at it. In this trade the safest position is the earliest exit. That is why the 2024 move was so far out of proportion to its trigger, and why the next one will not need a big trigger either.</p><h3>The debt underneath it</h3><p>The equity crash is what people remember from 2024. The debt is what makes 2026 heavier.</p><p>US federal debt passed <strong>$40 trillion</strong> in August 2026, up a trillion in five months. To be precise about that number: it is total public debt outstanding. About <strong>$32 trillion</strong> of it is debt held by the public, the part that investors actually own and trade. The rest sits in government trust funds. Either way, Washington now pays over <strong>$1.1 trillion a year in interest</strong>, more than it spends on defense, and a government issuing at that pace needs a deep bid for its bonds every single week. The price of money is set by the marginal buyer.</p><p>Japan is the largest foreign holder of Treasuries, at about <strong>$1.19 trillion</strong>. And for the first time in a generation, Japanese institutions have a reason to stay home. The 30-year Japanese government bond cleared auction <strong>above 4%</strong> on September 3, 2026, against domestic inflation of around 3%. A Japanese life insurer can now earn a real return without shipping capital across the Pacific.</p><p>Two cautions, because this is where the scary version of the story usually overreaches. First, these are different people from the carry speculators. Pensions and insurers own yen rather than borrow it, and a BoJ policy hike does not squeeze them. What pulls them home is the long end of the JGB curve, and that is driven by Japan’s own fiscal picture. Second, the repatriation is a drip, not a cliff. Sell-side consensus is a 5 to 12% reduction over two to three years, and Japan’s Treasury holdings actually <em>rose</em> into 2026. But a drip at the margin of a $32 trillion market still moves the price of money. Two independent pressures, one speculative and one institutional, are rising in the same window for different reasons. They do not share a trigger. They share a month.</p><h3>The calendar</h3><p>2024 went: intervention on July 11, hike on July 31, shock on August 2 to 5.</p><p>2026 so far: the US and Japan jointly intervened to support the yen on <strong>July 31</strong>, after it hit 160 in June. The Fed meets <strong>September 15 to 16</strong> and decides one side of the spread. The Bank of Japan meets <strong>September 17 to 18</strong> and decides the other. Ueda has said a hike is on the table at every meeting, including this one. Markets price the next step to 1.25% by December. The bigger risk is not any one telegraphed hike but a change of pace, from a hike every half-year to one every quarter. Every quarter point closes the spread that 92,000 contracts of rebuilt shorts are standing on.</p><p>Intervention has happened. Two central banks meet back to back next week. The third box is open.</p><h3>The other side</h3><p>I do not trust pieces that only try to scare me, so here is the case against. The BoJ’s gradualism is deliberate and loudly communicated. It watched August 2024 from the inside and has every reason to defuse rather than detonate. A good share of the measured positions are hedged or short-dated. The biggest size estimates mix public balance sheets with speculative borrowing. Authorities intervened in July and will again. Japanese repatriation is slow by consensus and by design. And 2024 itself showed the system can absorb a historic shock in days.</p><p>All of that is true. None of it removes the structure. It argues about how much pressure the trigger needs, not about whether the trigger is there.</p><h3>What I watch</h3><p>The pace of BoJ hikes, not the level. The Fed’s side of the spread, decided two days earlier. Yen implied volatility, which is the market pricing its own unwind risk. CFTC yen positioning, where the rebuild shows up every Friday. And the 30-year JGB yield: the longer it holds above 4%, the stronger the pull on Japanese capital away from a Treasury market that has never needed it more.</p><p>August 2024 got explained in an afternoon and filed as an event that ended. It was a mechanism showing itself at full speed. The position that produced it is back at half strength and growing. The spread it lives on is being squeezed from Tokyo. There is $40 trillion of federal debt behind it. And the sequence that came before the last accident is two boxes into a three-box row.</p><p>Japan is the watch point. It has been all along.</p><p><em>Research commentary on public market mechanics. Not investment advice, not a prediction, and nothing here is a recommendation to buy, sell, or hold anything.</em><strong>Sources</strong></p><ul><li>BoJ hike to 0.25% (July 31, 2024), Aug 5 2024 moves (Nikkei −12.4%, S&amp;P −3%, VIX 65 intraday / 38.6 close): contemporaneous reporting, Reuters/Bloomberg/CNBC</li><li><a href="https://www.cnbc.com/2026/06/16/boj-rate-hike-historic-inflation.html">BoJ at 1.0%, highest since 1995 (June 2026) — CNBC</a></li><li><a href="https://asia.nikkei.com/economy/bank-of-japan/boj-chief-says-rate-hikes-on-table-at-every-meeting-including-this-month-s">BoJ governor: hikes on the table at every meeting, incl. Sept 17–18 — Nikkei Asia</a></li><li><a href="https://www.bloomberg.com/news/articles/2026-09-03/japan-s-30-year-bond-sale-demand-stronger-than-12-month-average">30-year JGB auction clears above 4% (Sept 3, 2026) — Bloomberg</a> · <a href="https://www.tradingeconomics.com/japan/30-year-bond-yield">yield history — Trading Economics</a></li><li><a href="https://www.fx.co/en/forex-news/3144112">CFTC yen net shorts ≈ −92K contracts (Sept 2026) — FX.co</a> · <a href="https://www.fxstreet.com/news/nobody-has-unwound-the-japanese-yen-carry-trade-yet-202609071701">carry-trade rebuild commentary — FXStreet</a></li><li><a href="https://www.schwab.com/learn/story/fomc-meeting">Fed on hold at 3.50–3.75% — Schwab</a> · <a href="https://www.federalreserve.gov/monetarypolicy/fomcminutes20260729.htm">FOMC minutes, July 2026 — Federal Reserve</a></li><li><a href="https://www.exchangerates.org.uk/news/46775/2026-08-09-japanese-yen-intervention-may-have-changed-the-usd-jpy-trend.html">Joint US-Japan yen intervention, July 31, 2026 — exchangerates.org.uk</a> · <a href="https://www.cnbc.com/2026/09/03/yen-japan-intervention-boj.html">yen surge on BoJ bets — CNBC</a></li><li><a href="https://www.bloomberg.com/news/articles/2026-08-19/us-public-debt-hits-40-trillion-high-raising-doom-loop-risk">US gross debt passes $40T (Aug 2026) — Bloomberg</a> · <a href="https://www.crfb.org/papers/qa-gross-debt-versus-debt-held-public">gross debt vs. ~$32T held by the public — CRFB</a> · <a href="https://www.aljazeera.com/economy/2026/8/20/us-debt-hits-40-trillion-who-does-washington-owe-and-why-does-it-matter">$1.1T interest &gt; defense — Al Jazeera</a></li><li><a href="https://www.marketscreener.com/quote/stock/DEUTSCHE-BANK-AG-56358396/news/Japan-s-govt-debt-is-a-20-trln-carry-trade-Deutsche-Bank-45345736/">Deutsche Bank: Japan’s public sector as a $20T carry trade — MarketScreener</a></li><li><a href="https://www.tmscapitalresearch.com/p/japan-treasury-holdings-2025-repatriation-analysis">Japan Treasury holdings ≈ $1.19T, repatriation consensus 5–12% over 2–3 yrs — TMS Capital</a> · <a href="https://fred.stlouisfed.org/series/FORTREASPOS42609">FRED series</a></li></ul><p><em>Originally published at </em><a href="https://alexvidovich.com/writing/the-trade-that-never-unwound"><em>https://alexvidovich.com</em></a><em> on September 11, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b1e227804ba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-investors-handbook/japan-is-the-next-watch-point-7b1e227804ba">The Yen Carry Trade Explained: Why One Small Rate Hike in Tokyo Can Crash US Stocks</a> was originally published in <a href="https://medium.com/the-investors-handbook">Investor’s Handbook</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[New Paper: The Protocol That Cuts Backtest False Positives from 37% to 0.4%]]></title>
            <link>https://medium.com/the-investors-handbook/new-paper-the-protocol-that-cuts-backtest-false-positives-from-37-to-0-4-bf3de522a1c2?source=rss-227fa2d1c808------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf3de522a1c2</guid>
            <category><![CDATA[backtest-false-positives]]></category>
            <category><![CDATA[quantitative-finance]]></category>
            <dc:creator><![CDATA[Alex Vidovich]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 00:00:31 GMT</pubDate>
            <atom:updated>2026-10-07T11:09:00.513Z</atom:updated>
            <content:encoded><![CDATA[<p>For two months this site has published working notes about ideas that failed our tests. A fair question kept coming back: what exactly is the test? The answer is now a 13-page paper, free on <a href="https://ssrn.com/abstract=7260379">SSRN</a>, with every number reproducible from <a href="https://alexvidovich.com/paper/monte-carlo-v2.py">public simulation code</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qTJpTzoZCiEqL4glqEqv-Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wp73tuK7Bck0ZwyVhT0fjg.jpeg" /></figure><h3>What’s inside</h3><p><strong>A Monte Carlo of both error types.</strong> We simulated thousands of strategy families with no real edge, then measured how often common research habits approve them anyway. Tuning on the full sample: 36.9% false approval. Selecting on a reused holdout: the same 36.9% — a closed-form identity, because a holdout you consult for selection is not a holdout anymore. A disciplined single holdout: 2.3%. A hurdle that charges for the number of trials behind a result: 0.4%.</p><p><strong>An uncomfortable finding we published anyway.</strong> The popular “profitable in most folds” heuristic passed 88% of pure noise in our experiments. Selection contaminates every fold, so the rule audits almost nothing. We’d been treating fold counts with more respect than they earned.</p><p><strong>A new criterion: leave-best-era-out.</strong> Drop the candidate’s best-performing era and demand it clear the hurdle on what remains. Era-locked candidates — real effects confined to one regime — go from fooling 92% of the standard stack to passing 1.2% of the time. The cost is measured, not hidden: detection of modest stable effects falls too, and the paper reports exactly how much.</p><p><strong>The burial-record system.</strong> The template this lab uses to turn every rejection into a durable, searchable record — including an operational rule for the one quantity every deflated statistic depends on and almost no presentation reports: how many trials were actually run.</p><h3>Where to get it</h3><p>The paper is open access under CC BY-NC-ND: <a href="https://ssrn.com/abstract=7260379">ssrn.com/abstract=7260379</a>. The simulation code is a single Python file with a fixed seed — it reproduces every table in a few minutes on a laptop. If you find an error, that’s the process working; tell me and the next revision will say so.</p><p><em>Keywords: backtesting, multiple testing, negative results, cross-validation, pre-registration.</em></p><p><em>Originally published at </em><a href="https://alexvidovich.com/writing/new-paper-the-protocol-that-cuts-backtest-false-positives-from-37-to-0-4"><em>https://alexvidovich.com</em></a><em> on August 14, 2026.</em></p><p>📩 <strong>Join </strong><a href="https://investorshandbook-newsletter-c72f94.beehiiv.com/"><strong>Investor’s Handbook Digest</strong></a><strong> — get the best investing, markets, and wealth-building insights each week.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf3de522a1c2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-investors-handbook/new-paper-the-protocol-that-cuts-backtest-false-positives-from-37-to-0-4-bf3de522a1c2">New Paper: The Protocol That Cuts Backtest False Positives from 37% to 0.4%</a> was originally published in <a href="https://medium.com/the-investors-handbook">Investor’s Handbook</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Obsidian + Claude Code: The Cheapest Second Brain You Can Build]]></title>
            <link>https://ai.plainenglish.io/obsidian-claude-code-the-cheapest-second-brain-you-can-build-6a557fa14a07?source=rss-227fa2d1c808------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a557fa14a07</guid>
            <category><![CDATA[obsidia]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Alex Vidovich]]></dc:creator>
            <pubDate>Wed, 05 Aug 2026 15:30:00 GMT</pubDate>
            <atom:updated>2026-10-07T11:10:03.598Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Abstract.</strong> This note describes the knowledge system behind everything else in this series — and, unusually for this series, you can copy it in ten minutes. The entire setup is a folder of markdown files (an Obsidian vault) plus one protocol file, with the Claude Code CLI pointed at the folder. No plugins, no vector database, no embeddings, no retrieval pipeline. It is also, by a wide margin, the cheapest agent memory we have used: because the agent navigates links and reads only the pages a question actually requires, a session touches a few thousand tokens of notes instead of re-ingesting a corpus — and the protocol file ends the most expensive habit in agent work, re-explaining your context every session. Karpathy’s recently published “LLM wiki” arrives, by a different route, at nearly the same architecture. We take this as encouraging.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GEZAUHpIgDFEOQnFieELdQ.jpeg" /></figure><h3>1. Introduction</h3><p>Every discipline this series has described depends on record-keeping. A graveyard without burial records is just a mood. A pre-registered constant that lives in someone’s recollection is not pre-registered; it is negotiable. The drawer of note №9 has a calendar, and a calendar must be written somewhere that survives enthusiasm.</p><p>For years the somewhere was the usual sediment: scattered documents, commit messages, the false memory of having written things down. The current arrangement replaced all of it, and is simple enough to describe in one sentence: <strong>a vault of plain markdown files, linked into a graph, that a language-model agent reads and writes alongside us.</strong></p><h3>2. The whole setup</h3><p>We list it in full because the brevity is the argument:</p><ol><li><strong>A folder of markdown files.</strong> Ours is an Obsidian vault, though nothing depends on Obsidian — the files are the system.1Territories: research studies (one file per hypothesis, proposal to verdict), backtest reports, an incident log, architecture decisions, and an _index.md that summarizes the whole.</li><li><strong>Links.</strong> [[wikilinks]] between pages do the structural work - a study links to the method that judged it, the incident that motivated it, the earlier funeral it must not repeat. Obsidian renders this as a graph; the graph is stored in the text itself.</li><li><strong>One protocol file.</strong> A CLAUDE.md at the vault root: the lab&#39;s standing rules, loaded automatically into every session. Naming conventions, what a burial record must contain, what the agent may write and may not decide.</li><li><strong>The Claude Code CLI, pointed at the folder.</strong> cd vault &amp;&amp; claude. That is the entire integration.</li></ol><p>There is no step five. Setting this up took an afternoon; most of the afternoon was moving old notes in.</p><h3>3. The token economics</h3><p>The arrangement is cheap for a structural reason worth spelling out, because it is the opposite of the default architecture.</p><p>The default architecture — retrieval-augmented generation — embeds the corpus, stores it in a vector database, and stuffs retrieved chunks into every prompt. You pay to embed everything, you pay to re-embed what changes, and you pay again each session for retrieved context of uncertain relevance.</p><p>The navigating agent pays differently. It opens _index.md - one small page - follows two or three links, and reads only the files the question actually requires. A typical session touches a handful of pages, not a corpus. The protocol file compounds the saving: the standing context that users of chat interfaces re-paste every morning - who we are, how we work, what the rules are - loads once, automatically, from disk. 2And markdown itself is the cheap format: the same content that costs a fortune as OCR&#39;d PDF or exported HTML is a few hundred tokens of clean text.</p><p>The failure modes are cheaper too. When a RAG pipeline retrieves nonsense, the failure is buried in an embedding space. When a navigating agent reads the wrong page, the wrong page is right there in the session log, and the fix is a better link or a better index entry — repairs a human makes in the same medium, in seconds.</p><h3>4. What the agent actually does</h3><p>It drafts study writeups from run artifacts. It files burial certificates in the graveyard with cross-links to the refuting evidence. It keeps the index honest. And — its most quietly valuable habit — it flags when a new proposal resembles a resident of the graveyard. The second coming of an idea, which note №1 priced at “a lookup,” is now priced at zero: the lookup performs itself.</p><p>Fig. 1 shows the topology, stylized. Clusters are research themes; the dense node in each cluster is usually a method or an index page; the orphans at the periphery are unfinished thinking, which the graph renders visible instead of forgettable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*eTecS8_2YS3HlJALK4SQwg.png" /></figure><p><strong><em>Fig. 1.</em></strong><em> This figure shows a stylized rendering of the research vault’s link graph. Gray edges are links made by the human; red dashed edges are cross-references added by the agent, which traverses the graph the way a researcher follows citations — the red node marks its position mid-traversal. Outlined nodes are orphans: pages not yet linked into the structure, i.e., thinking not yet finished. The topology is illustrative; the real graph’s contents are, as usual, not shown.</em></p><p>What does not change is authority. The agent writes pages; it does not write verdicts. Constants are set by humans before studies run; the agent’s role in pre-registration is to be the notary, not the judge. One hygiene rule is worth stating: agent-drafted pages must cite their sources — the run artifact, the linked study — because a fluent summary with no provenance is the knowledge-base equivalent of a backtest with no trial count. 3</p><h3>5. Distinguished company</h3><p>We built this for local reasons, so it was instructive to watch Karpathy (2025) publish, as a general recommendation, nearly the same machine: an Obsidian vault in which raw captured material flows into one directory and an agent continuously refines it into an interlinked wiki of markdown pages with backlinks and a maintained index — explicitly <em>instead of</em> retrieval-augmented generation. His reasoning matches our accounting: markdown is vendor-free, version-controllable, diffable, and — a fact that still feels like a coincidence but is not — the format language models read and write most fluently. The zettelkasten tradition (Ahrens, 2017) arrived at the linked-note graph decades before there was an agent to walk it; the agent, it turns out, is the reader that architecture was waiting for.</p><h3>6. Conclusion</h3><p>The laboratory notebook is the oldest institution in experimental science, and its function was never storage; it was the enforcement of honesty across time. Ours now talks back — proposes links, remembers funerals, recites the protocol to every new session — and it costs a folder, one rules file, and the tokens of the pages actually read. If you build one thing from this series, build this. The graveyard can come later; it will need somewhere to live.</p><p><strong>Notes</strong></p><ol><li>This is the property to insist on if the reader builds one: the application must be dispensable. Our vault would survive Obsidian’s disappearance as a folder of readable files; the graph lives in the [[wikilink]] syntax, not in a database.</li><li>The protocol file is the closest thing the arrangement has to a constitution, and it accumulates the way constitutions do: each amendment traceable to the incident that motivated it.</li><li>The rule has a second function: it keeps the agent’s confident register honest. A language model summarizes with the same fluency whether its source is strong or thin; a mandatory provenance link lets the reader — human or machine, next week or next year — reweight the fluency by the evidence.</li></ol><p><strong>References</strong></p><p>Ahrens, S., 2017. <em>How to Take Smart Notes: One Simple Technique to Boost Writing, Learning and Thinking.</em> CreateSpace, North Charleston.</p><p>Karpathy, A., 2025. LLM wiki: an agent-maintained markdown knowledge base. Design note, github.com/karpathy.</p><p><em>Keywords: Obsidian, Claude Code, knowledge graph, plain text, agents, zettelkasten, token efficiency.</em></p><p><em>Originally published at </em><a href="https://alexvidovich.com/writing/obsidian-claude-code-the-cheapest-second-brain-you-can-build"><em>https://alexvidovich.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a557fa14a07" width="1" height="1" alt=""><hr><p><a href="https://ai.plainenglish.io/obsidian-claude-code-the-cheapest-second-brain-you-can-build-6a557fa14a07">Obsidian + Claude Code: The Cheapest Second Brain You Can Build</a> was originally published in <a href="https://ai.plainenglish.io/">Artificial Intelligence in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Give Every Agent Its Own Database]]></title>
            <link>https://medium.com/@alex_vidovich_/give-every-agent-its-own-database-96d0be5cd1c8?source=rss-227fa2d1c808------2</link>
            <guid isPermaLink="false">https://medium.com/p/96d0be5cd1c8</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-agents-in-action]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Alex Vidovich]]></dc:creator>
            <pubDate>Wed, 05 Aug 2026 15:28:36 GMT</pubDate>
            <atom:updated>2026-10-07T11:11:01.868Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Abstract.</strong> Note №11 described the memory our agents share; this note describes the data they don’t. When we let language-model agents and batch validation jobs loose on our research infrastructure, the first casualty was the central analytical store: agent workloads are concurrent, bursty, retry-happy, and indifferent to the queue etiquette that human analysts provide for free. Our fix inverted the architecture — every agent now carries its own embedded analytical engine and reads immutable, content-addressed snapshots instead of querying a shared warehouse. The inversion cost one afternoon of plumbing, eliminated the contention class entirely, and delivered an unplanned dividend that turned out to matter more: backtests that name their inputs by digest are reproducible in a way that “we queried the database on Tuesday” never was. Reis (2026) recently articulated the general architecture with a rigor we won’t attempt to match; consider this the field report from a one-person lab that arrived at the same shape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l9MTo06UuE2e6DmM2HfjUg.jpeg" /></figure><h3>1. Introduction</h3><p>A central analytical database is a reasonable design under an assumption so old it is invisible: that the things issuing queries are people. People query at human pace. They inspect results before acting. They do not retry a failed query four hundred times in ninety seconds, and they do not spawn six copies of themselves to check a hypothesis from six angles.</p><p>Agents do all of these things, and our infrastructure met them the way most does: with a queue. Validation folds waited on report generators; report generators waited on an agent’s exploratory scan; everything waited on whoever asked the biggest question first. The warehouse had become what shared mutable state always becomes under concurrency — a lock with a data model attached. 1</p><h3>2. The inversion</h3><p>The fix we landed on has two components, both boring on purpose.</p><p><em>Embedded engines.</em> Every agent and every batch job gets its own analytical database — an embedded, in-process engine (ours is DuckDB; the choice matters less than the property that it runs inside the consumer and shares nothing). 2There is no server to contend for. Concurrency scales with processes, which for a research program means: with the number of questions being asked.</p><p><em>Immutable slices.</em> Consumers never read “the data.” They read a <em>slice</em> — a snapshot of a dataset, frozen at a point in time, named by what it contains:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*1ogCwMe3XF0rWc-bdBBW6g.png" /></figure><p>A small catalog maps names to digests; the slices themselves live as plain columnar files that any engine can open. Producing a new snapshot never mutates an old one. An agent that needs fresher data takes a newer slice; an agent mid-study keeps the one it pinned. Fig. 1 contrasts the two worlds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*WWZCdA19qH_F8mDV31-FSg.png" /></figure><p><strong><em>Fig. 1.</em></strong><em> This figure contrasts the two architectures. Left: a central warehouse in which every consumer — human or agent — queues for the same query engine, and one expensive question stalls the rest. Right: the inverted design, in which each agent (gray) carries its own embedded analytical engine (dark) and consumers exchange immutable snapshots addressed by content digest; the central component shrinks to a catalog of identifiers (dashed), which serves no queries. The topology is schematic.</em></p><h3>3. The dividend: reproducibility by construction</h3><p>We adopted the inversion to kill a queue. Its lasting value turned out to be epistemic, which is why it belongs in this series.</p><p>A backtest whose input is “the prices table” is not a fact; it is an anecdote about whatever that table contained at the moment of the run. Re-run it after any upstream revision — a vendor correction, a late fill, a schema tweak — and the result moves, and there is no way to say why. A backtest whose input is content: sha256:9c47... is a different object entirely: every study in our archive now names its inputs by digest, which means any result can be re-derived, byte-identical, from the vault&#39;s burial record - or shown to depend on a revision, which is itself a finding. 3</p><p>The tier field does quiet governance work of the same flavor. Slices marked SOURCE can only be produced by the ingestion path; anything an agent derives is DERIVED, permanently, no matter how many transformations later. Reis (2026) calls the failure this prevents <em>laundering provenance</em> - derived data drifting upstream in authority until someone conditions a study on their own artifact. In a lab where agents produce most of the intermediate data, we regard this single bit as load-bearing: it is the data-layer version of the rule that the agent writes pages, not verdicts.</p><h3>4. What we skipped</h3><p>Honesty about scale: Reis’s full design — peer-to-peer slice exchange, three-layer semantic contracts, signed lineage DAGs — is architecture for organizations. A one-person research program needs perhaps a fifth of it, and we built roughly that fifth: embedded engines, content-addressed snapshots, the tier bit, and a catalog small enough to read at breakfast. We record what we skipped as deliberately as what we kept, because infrastructure has the same failure mode as strategy design — components added for plausible reasons, never validated by load, carried forever. 4The mesh can apply for admission when the lab has peers.</p><h3>5. Conclusion</h3><p>The pattern generalizes past data: shared mutable anything is a bet that consumers will be polite, and agents are not polite — they are fast, parallel, and tireless, which is why we hired them. Giving each one its own engine and immutable inputs replaces etiquette with arithmetic. That it also made every backtest in the archive citable by digest was, for us, the difference between an optimization and a principle.</p><p>The warehouse is dead; long live the catalog.</p><p><strong>Notes</strong></p><ol><li>The failure mode is not load in the benchmark sense — the volumes involved would amuse anyone running real infrastructure. It is <em>interference</em>: heterogeneous consumers with heterogeneous deadlines sharing one scheduler. The smallest agent retry storm degraded every study in flight, which for a validation protocol is not slowness but contamination of timing-sensitive runs.</li><li>Raasveldt and Mühleisen (2019) state the design point precisely: analytical workloads embedded in the consuming process, eliminating the client-server boundary. That the same property later turned out to be exactly what agent workloads want is one of those accidents that looks like foresight from a distance.</li><li>Helland (2015) is the standing reference for this worldview — append-only, immutable data as the foundation that makes distributed systems (and, we would add, research archives) reasonable about the past. Our slices are his “immutability changes everything” applied at the scale of one stubborn lab.</li><li>The parallel is exact enough to state as policy: infrastructure components face the same adoption bar as strategy components — demonstrated need on realized load, not anticipated need on imagined load. The drawer of note №9 has a shelf for architecture too.</li></ol><p><strong>References</strong></p><p>Helland, P., 2015. Immutability changes everything. In: <em>Proceedings of the 7th Biennial Conference on Innovative Data Systems Research (CIDR)</em>.</p><p>Raasveldt, M., Mühleisen, H., 2019. DuckDB: an embeddable analytical database. In: <em>Proceedings of the 2019 International Conference on Management of Data (SIGMOD)</em>, 1981–1984.</p><p>Reis, J., 2026. To every agent its own database. Practical Data Modeling (Substack), joereis.substack.com.</p><p><em>Keywords: agents, embedded databases, DuckDB, immutability, provenance, reproducibility.</em></p><p><em>Originally published at </em><a href="https://alexvidovich.com/writing/give-every-agent-its-own-database"><em>https://alexvidovich.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96d0be5cd1c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developing a ‘Self-Healing’ Trading Bot with OpenAI’s o1 Model]]></title>
            <link>https://medium.com/@alex_vidovich_/developing-a-self-healing-trading-bot-with-openai-s-o1-model-dbb0f839ffcf?source=rss-227fa2d1c808------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbb0f839ffcf</guid>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[trading-bot]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Alex Vidovich]]></dc:creator>
            <pubDate>Wed, 20 Nov 2024 04:19:10 GMT</pubDate>
            <atom:updated>2026-10-07T11:12:00.604Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine a trading bot that not only executes trades but also learns from its <strong>past performance</strong>, refining its strategies over time without human intervention.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PF1YsJJZVfGBh1fdlGZmEA.jpeg" /></figure><p>By leveraging OpenAI’s o1 model — a reasoning AI that thinks before it acts — this project explores the creation of a “self-healing” trading bot that analyzes its weekly performance, learns from past trades, and continuously improves its decision-making process.</p><h3><strong>Can the Latest AI Models Beat Human Traders?</strong></h3><p>We are testing whether the latest AI models can outperform human traders in the stock market. By utilizing advanced artificial intelligence designed for deliberate reasoning and problem-solving, we aim to assess if these models can make <strong>trading decisions more effectively than humans.</strong> Unlike traditional AI focused on speed, these cutting-edge models internally analyze complex tasks before acting, potentially giving them an edge in high-stakes trading scenarios.</p><h3>Implementing the ‘Self-heal’ Approach</h3><p>The core of our trading bot lies in its ability to “self-heal” — to autonomously analyze and improve its trading strategies based on past performance by leveraging OpenAI’s o1 model to adjust its own code.</p><p>img: Initial deploy</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C3YR8wIHM0PlAmiHfxz8eA.png" /></figure><h3><strong>Here’s how this self-improvement works:</strong></h3><p><strong>Performance/Strategy Analysis - </strong>At the end of each trading day, the bot conducts a thorough evaluation of its performance.</p><p><strong>Trade Statistics: </strong>Win rate, Total trades, Profitable/losing trades count, Average profit/loss per trade, Average holding period</p><p><strong>Risk Metrics: </strong>Value at Risk (VaR) at 95% and 99% confidence levels, Expected Shortfall (CVaR), Maximum drawdown, Sortino and Calmar ratios</p><p><strong>Returns and Volatility: </strong>Total return, Sharpe ratio, Daily/monthly returns, Volatility</p><p><strong>Data Integration — </strong>The bot retrieves and integrates: <strong>Historical Market Data / Alpaca &amp; Yfinance, Trading History Logs / Mongodb</strong></p><h4>Strategy Refinement</h4><p>Based on its analysis, the bot recalibrates its code: <strong>Adjusts Technical Indicators, Optimizes Position Sizing, Enhances Risk Management</strong></p><p><strong>Deployment</strong>: Docker image, AWS Elastic Container Registry (ECR), AWS Elastic Container Service (ECS).</p><h3>From Initial Deployment</h3><h4>Day 1: A Promising Launch</h4><p>$HIMS</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nIfCTDtrjcQAyOm7PjpE3A.png" /></figure><p>The initial deployment of the trading bot was encouraging. After setting up the infrastructure with <strong>Alpaca</strong> for trading and market data, and <strong>MongoDB</strong> for data storage, everything seemed to operate as intended. The bot successfully executed its first trades, integrated historical and real-time data seamlessly, and began collecting performance metrics. It was a solid start.</p><h4>Day 2: Unforeseen Complications</h4><p>However, the following day presented unexpected challenges. The <strong>o1 model</strong>, which was intended to adjust trading parameters to optimize performance, began making unintended changes to the codebase. Instead of solely tweaking parameters, the model altered significant portions of the code. With auto-deployment enabled, these unintended modifications were automatically pushed to production, leading to a cascade of issues:</p><ul><li><strong>Docker Image Failures, ECS Failures</strong></li></ul><h4>Day 3: Manual Fixes</h4><p>Addressing these problems required fixing the codebase.</p><h4>Day 4: Switching to Sonnet 3.5</h4><p>Trying to avoid similar risks moving forward, we decided to switch to the <strong>Sonnet 3.5 model</strong>, known to perform better in code writing, hoping it would offer more reliable and controlled adjustments.</p><p>Unfortunately, the transition did not go as planned. Despite the improved safeguards, Sonet 3.5 also encountered issues:</p><ul><li><strong>Unintended Code Changes:</strong> Similar to the o1 model, Sonet 3.5 began making unexpected alterations to the code, affecting both trading logic and other critical components.</li><li><strong>Deployment Failures:</strong> These changes led to further Docker image breakdowns and ECS disruptions, resulting in repeated downtimes.</li></ul><p>The persistent issues with autonomous code modifications reinforced the challenges of balancing AI-driven optimization with system stability.</p><h4>Day 4: Manual Adjustments</h4><p>After the hectic first few days, we decided to take matters into our own hands by implementing changes based on the o1 model’s recommendations.</p><p>So far, the bot has been modestly successful, hitting up to ~3% gains daily. It’s important to note that the S&amp;P 500 has been <strong>trading sideways recently</strong>, which limits trading opportunities. We’re hopeful that as market volatility picks up, the bot will perform even better.</p><h3><strong>To be continued…</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbb0f839ffcf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>