<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alex B</title>
    <description>The latest articles on DEV Community by Alex B (@alexbsolodev).</description>
    <link>https://dev.to/alexbsolodev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4179536%2F50ca3b4b-9cc8-4636-a817-cb239396cf51.png</url>
      <title>DEV Community: Alex B</title>
      <link>https://dev.to/alexbsolodev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alexbsolodev"/>
    <language>en</language>
    <item>
      <title>When a small defense company wins a contract, trading jumps. The price fades anyway.</title>
      <dc:creator>Alex B</dc:creator>
      <pubDate>Sat, 21 Nov 2026 15:05:21 +0000</pubDate>
      <link>https://dev.to/alexbsolodev/when-a-small-defense-company-wins-a-contract-trading-jumps-the-price-fades-anyway-475d</link>
      <guid>https://dev.to/alexbsolodev/when-a-small-defense-company-wins-a-contract-trading-jumps-the-price-fades-anyway-475d</guid>
      <description>&lt;p&gt;Price is a noisy yardstick. We checked whether trading volume tells a cleaner story after a contract win.&lt;/p&gt;

&lt;p&gt;A reader on our last defense-contracts post made a good point: price is a noisy yardstick. If an award is real news,&lt;br&gt;
&lt;strong&gt;trading&lt;/strong&gt; should jump the next day even when the price doesn't. Volume is much harder to move by accident.&lt;/p&gt;

&lt;p&gt;So we tested it, with the rules frozen before the first number came out.&lt;/p&gt;

&lt;h2&gt;
  
  
  The test
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Events:&lt;/strong&gt; 3,029 days when a U.S.-listed company appeared on the Defense Department's 5 p.m. daily contracts list,
2015 to October 2026.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The measure:&lt;/strong&gt; trading volume on the three sessions after the list, against the same stock's own normal (its
median volume over the weeks before), with splits taken out so they never look like a jump.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Two yardsticks:&lt;/strong&gt; how the whole defense sector (ITA) traded the same days, and the same stocks on random days.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The money question:&lt;/strong&gt; do the awards the market noticed most do better on price afterwards than the ones it ignored?&lt;/li&gt;
&lt;li&gt;Every combination we looked at (about 190 for volume, 72 for price) was recorded, and the significance bar was
corrected for all of them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What we found
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Big contractors: nothing.&lt;/strong&gt; For companies over $10 billion, volume after a new award was, if anything, slightly&lt;br&gt;
below the sector's that day. One award is a rounding error to a prime.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Small companies: volume does jump.&lt;/strong&gt; For companies under $2 billion, the three sessions after a new award traded&lt;br&gt;
about &lt;strong&gt;27% above normal&lt;/strong&gt; after taking out the sector's day (2021-2026; 46 awards, 27 companies; 63% of awards above&lt;br&gt;
zero; confidence interval roughly +6% to +56%). Trade counts said the same thing. Against the same stocks on random&lt;br&gt;
days it &lt;strong&gt;just missed&lt;/strong&gt; our bar (p = 0.052), and with ~190 comparisons on the table it does not survive the correction.&lt;br&gt;
So: consistent direction, too few events to call it proven.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The money question: no.&lt;/strong&gt; The small-company awards that drew the most attention &lt;strong&gt;lost 8.2% to the small-cap index&lt;br&gt;
over the next 60 sessions&lt;/strong&gt; (25 awards; interval -18.4% to -0.2%). Across all sizes, the most-noticed third and the&lt;br&gt;
least-noticed third ended up in the same place. Attention arrives, the price moves, and then it gives it back.&lt;/p&gt;

&lt;p&gt;One more thing worth a test of its own: on the &lt;strong&gt;list day itself, before the 5 p.m. release&lt;/strong&gt;, small companies already&lt;br&gt;
traded more than on random days. It did not survive the correction either, but it fits the rules: the details reach the&lt;br&gt;
Pentagon's press office the day before (see our post on when awards become public).&lt;/p&gt;

&lt;h2&gt;
  
  
  What this doesn't show
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It does not show volume can't predict anything: 46 small-company awards is a small sample.&lt;/li&gt;
&lt;li&gt;We used daily bars. Whether the list-day volume builds before 5 p.m. needs minute data.&lt;/li&gt;
&lt;li&gt;Awards under $9 million never make the list, so they are not in this test.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;"Did the market notice?" and "did it pay to buy?" are different questions. Here the answer was yes to the first for&lt;br&gt;
small companies, and no to the second for everyone.&lt;/p&gt;

&lt;h2&gt;
  
  
  A question for you
&lt;/h2&gt;

&lt;p&gt;Have you seen volume work as a filter for an event signal - where the noticed events behaved differently from the&lt;br&gt;
ignored ones? Link it and I'll credit you.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Research and education only - not investment advice. Award data: U.S. Department of Defense daily contract&lt;br&gt;
announcements (public domain).&lt;/em&gt;&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>finance</category>
      <category>python</category>
      <category>statistics</category>
    </item>
    <item>
      <title>A Pentagon contract is public the day it is awarded. The contract database shows it 90 days later.</title>
      <dc:creator>Alex B</dc:creator>
      <pubDate>Sat, 21 Nov 2026 03:36:16 +0000</pubDate>
      <link>https://dev.to/alexbsolodev/a-pentagon-contract-is-public-the-day-it-is-awarded-the-contract-database-shows-it-90-days-later-4nbb</link>
      <guid>https://dev.to/alexbsolodev/a-pentagon-contract-is-public-the-day-it-is-awarded-the-contract-database-shows-it-90-days-later-4nbb</guid>
      <description>&lt;p&gt;If you date defense-contract events from the federal database, your backtest may be trading on news three months early.&lt;/p&gt;

&lt;p&gt;If you backtest anything on U.S. defense contracts, the date you attach to each award decides whether your result is&lt;br&gt;
real. And the most convenient date - the one in the federal contract database - is about three months late for every&lt;br&gt;
Pentagon award.&lt;/p&gt;

&lt;p&gt;Here is when a Defense Department contract actually becomes public, step by step, from the rules themselves.&lt;/p&gt;

&lt;h2&gt;
  
  
  The order things happen
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. The day before the award: the Pentagon's press office already knows.&lt;/strong&gt; For any award over $9 million, the buying&lt;br&gt;
office must send the details - contract number, value, what is being bought, who wins - to the Pentagon's public&lt;br&gt;
affairs office "by the close of business the day before the date of the proposed award" (DFARS 205.303). Not public&lt;br&gt;
yet, but known to the buying office, the press office and the winning company.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Award day, 5 p.m. Eastern: the daily contracts list.&lt;/strong&gt; The award is published on the Defense Department's daily&lt;br&gt;
contracts page, after the stock market has closed. The same rule says members of Congress for the winner's state or&lt;br&gt;
district get the information "concurrent with the public announcement". For anyone outside the building, this list is&lt;br&gt;
the first public record.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Any time: the company itself.&lt;/strong&gt; The winner can put out its own press release or an 8-K the same day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. About 90 days later: the contract database.&lt;/strong&gt; Every federal contract action is reported to FPDS (now searched&lt;br&gt;
through SAM.gov), and USAspending copies it about two days after that. But Defense Department records are held back:&lt;br&gt;
they are "not available for public view ... until 90 days after the Date Signed data element", for operational&lt;br&gt;
security (DFARS PGI 204.604). We checked the public feed on 2026-11-15: counts by signed date were full&lt;br&gt;
up to about 91 days back and near zero after it.&lt;/p&gt;

&lt;p&gt;Civilian agencies have no such hold. Their awards reach the database within days (the rule is three business days).&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this breaks backtests
&lt;/h2&gt;

&lt;p&gt;The database is the easy source: one download, clean fields, every agency. If you date a Pentagon award by the day it&lt;br&gt;
appears there, you are ~90 days late - which is harmless but useless. If you date it by the &lt;strong&gt;signed date&lt;/strong&gt; printed in&lt;br&gt;
the record, you are using a date that was public only for awards big enough to make the 5 p.m. list. For everything&lt;br&gt;
under $9 million, nobody outside could have known on that date. A backtest that buys on the signed date is trading on&lt;br&gt;
news three months before it was published.&lt;/p&gt;

&lt;p&gt;The safe rule: &lt;strong&gt;an award's public time is the 5 p.m. list (or the company's own release), never a date from the&lt;br&gt;
database.&lt;/strong&gt; For awards too small for the list, the public time is when the database showed them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happens in the market on the real date
&lt;/h2&gt;

&lt;p&gt;We measured trading volume around the 5 p.m. list for 3,029 award days, 2015-2026, using the list date as day zero&lt;br&gt;
(details in the next post). Two things stood out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For the big contractors, nothing. One award is a rounding error to them.&lt;/li&gt;
&lt;li&gt;For companies under $2 billion, trading the three days after a new award ran about 27% above each stock's own normal
(2021-2026, 46 awards, 27 companies), after taking out how the whole defense sector traded those days.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What this doesn't show
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The 90-day hold is the published rule plus one check of the public feed on one day; individual records can arrive
later (corrections, late reports, urgency awards, which get 30 days to be reported).&lt;/li&gt;
&lt;li&gt;We did not measure how often a company's own release beats the 5 p.m. list.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A question for you
&lt;/h2&gt;

&lt;p&gt;If you use federal contract data, which date do you trust for "when it became public" - and have you found a source&lt;br&gt;
that beats the 5 p.m. list?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Research and education only - not investment advice. Sources: DFARS 205.303 and DFARS PGI 204.604 (acquisition.gov),&lt;br&gt;
FPDS's DoD data-availability notice, USAspending "About the Data"; award data: U.S. Department of Defense daily contract&lt;br&gt;
announcements (public domain).&lt;/em&gt;&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>finance</category>
      <category>python</category>
      <category>opendata</category>
    </item>
    <item>
      <title>We graded a model that fills in tick data from one-minute bars. It misses the minutes that matter.</title>
      <dc:creator>Alex B</dc:creator>
      <pubDate>Thu, 19 Nov 2026 14:05:45 +0000</pubDate>
      <link>https://dev.to/alexbsolodev/we-graded-a-model-that-fills-in-tick-data-from-one-minute-bars-it-misses-the-minutes-that-matter-4e73</link>
      <guid>https://dev.to/alexbsolodev/we-graded-a-model-that-fills-in-tick-data-from-one-minute-bars-it-misses-the-minutes-that-matter-4e73</guid>
      <description>&lt;p&gt;&lt;em&gt;Part two of the breakout series.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Last time we said we were training a model to fill in trade-by-trade detail from one-minute bars, with grades fixed&lt;br&gt;
before the first run. Here are the grades - all fifteen fields, including the ones that failed.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it was graded
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Trained on 150 days; graded on &lt;strong&gt;90 days from nine different market moods&lt;/strong&gt; it never saw (a calm bull market, the
2018 selloff, the 2020 crash, the 2021 retail mania, the 2022 bear market and four more), with a month of distance
between training and test days.&lt;/li&gt;
&lt;li&gt;The score is R2: the share of the real minute-to-minute variation the model explains on those unseen days.&lt;/li&gt;
&lt;li&gt;What it can't cover: a minute with trades but no one-minute bar can't be filled from a bar. Depending on the day that is 8-30% of traded
minutes but only about 0.1-0.3% of traded volume - tiny minutes, typically 15-26 shares. The grades cover the minutes that carry about
99.8% of the volume.&lt;/li&gt;
&lt;li&gt;GOOD = at least 0.60, PARTIAL = 0.25 to 0.60, POOR = under 0.25. Fixed before training.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The grades
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;GOOD - 7 of 15 fields, and they held up in every one of the nine moods:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;R2&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Largest single trade's share of the minute&lt;/td&gt;
&lt;td&gt;0.88&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bid-ask spread&lt;/td&gt;
&lt;td&gt;0.86&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Odd-lot share&lt;/td&gt;
&lt;td&gt;0.80&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Retail share&lt;/td&gt;
&lt;td&gt;0.74&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quote depth&lt;/td&gt;
&lt;td&gt;0.69&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Block-trade share&lt;/td&gt;
&lt;td&gt;0.63&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quote count&lt;/td&gt;
&lt;td&gt;0.61&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;PARTIAL - 5:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;R2&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Locked / crossed quotes&lt;/td&gt;
&lt;td&gt;0.51&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Order-flow imbalance&lt;/td&gt;
&lt;td&gt;0.46&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Buy share&lt;/td&gt;
&lt;td&gt;0.39&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Off-exchange share&lt;/td&gt;
&lt;td&gt;0.36&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Retail buy-minus-sell&lt;/td&gt;
&lt;td&gt;0.28&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Buy share is worth a second look: the classic shortcut that estimates buying from the bar alone (bulk volume&lt;br&gt;
classification) explains 0.09. The model gets more than four times that - and still only a partial grade.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;POOR - 3:&lt;/strong&gt; bid-minus-ask depth (0.03), first-ten-seconds share of the minute (0.04), intermarket sweep share (0.18).&lt;/p&gt;

&lt;h2&gt;
  
  
  The catch that matters
&lt;/h2&gt;

&lt;p&gt;The most important number isn't on the table. At the &lt;strong&gt;737 real breakout minutes&lt;/strong&gt; in the test days - the exact&lt;br&gt;
moments the exit question is about - the model explains only &lt;strong&gt;6%&lt;/strong&gt; of buy share, and it underestimates it: real buy&lt;br&gt;
share at those minutes averaged 71%, the model said 63%.&lt;/p&gt;

&lt;p&gt;It isn't only buy share. Retail share and off-exchange share are fine on a typical minute but weak at the breakout&lt;br&gt;
minutes (R2 0.21 and 0.20). The structural fields hold up there: spread, odd-lot share, block share and largest-trade&lt;br&gt;
share stay between 0.77 and 0.87.&lt;/p&gt;

&lt;p&gt;That makes sense once you see it. The buying pressure that made those minutes special is exactly what a one-minute&lt;br&gt;
bar cannot show. A model built from bars learns the ordinary minute well; it smooths over the unusual one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we do with this
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The GOOD fields are usable&lt;/strong&gt; for what we said: realistic spreads, depth and trade-size structure in simulations and
training environments where real ticks don't exist.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pressure-based exits get tested on real ticks only.&lt;/strong&gt; The generator is not good enough at the minutes that matter
to stand in for them.&lt;/li&gt;
&lt;li&gt;And the general rule stands: generated fields add no information a bar didn't have. Anything learned on them is
confirmed on real data before it means anything.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One process note, because it is the kind of thing that quietly ruins results: the first training sample had a bug - for&lt;br&gt;
2024-2025 it read one file per day where some days have many. It was caught before any result was used, the sample was&lt;br&gt;
rebuilt, and everything was regraded. The grades above are from the rebuilt sample.&lt;/p&gt;

&lt;h2&gt;
  
  
  A question for you
&lt;/h2&gt;

&lt;p&gt;If you have estimated buy pressure from bars, how did you score it - and did it hold up at the minutes that mattered&lt;br&gt;
most to your strategy?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Research and education only - not investment advice.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>datascience</category>
      <category>finance</category>
      <category>python</category>
    </item>
    <item>
      <title>We tested 892 ways to trade a breakout minute. None passed. The entry was real.</title>
      <dc:creator>Alex B</dc:creator>
      <pubDate>Wed, 18 Nov 2026 22:52:33 +0000</pubDate>
      <link>https://dev.to/alexbsolodev/we-tested-892-ways-to-trade-a-breakout-minute-none-passed-the-entry-was-real-5a11</link>
      <guid>https://dev.to/alexbsolodev/we-tested-892-ways-to-trade-a-breakout-minute-none-passed-the-entry-was-real-5a11</guid>
      <description>&lt;p&gt;&lt;em&gt;Rules frozen first; results reported pass or fail.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We spent two weeks testing one of the oldest ideas in trading: buy the minute a stock crosses above a key price level.&lt;br&gt;
We tested 892 ways to do it. None passed. But one piece of it was real - and it is why we are now building a generator&lt;br&gt;
that fills in trade-by-trade detail for years where we only have one-minute bars.&lt;/p&gt;

&lt;h2&gt;
  
  
  The test
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The trade:&lt;/strong&gt; a mid, large or mega company (over $2 billion) crosses above a key level - a 52-week high, or a level
built from where volume traded - and we buy in that minute, using the real trades and quotes of that minute
(trades 2016-2025, about 2,750 trading days of tick data). Company size is its market value the day before the cross.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What we varied:&lt;/strong&gt; what the order flow looked like at the cross (was buying pressure behind it or not), which
volatility-sized stop protects the trade early, and when a working trade is finally sold. Every distance was measured
in the stock's own volatility, never in dollars or fixed percentages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The bar to clear:&lt;/strong&gt; beat a plain stop, beat the same stock bought at a random minute of the same day, make money in
the typical month, survive costs - and survive a correction for testing 892 combinations at once.&lt;/li&gt;
&lt;li&gt;The core rules were written down before any result. Fixes added during the run (for data problems such as a ticker
passing from one company to another, or a cash buyout being priced as a bankruptcy) were each frozen and reviewed
before re-scoring. An independent reviewer re-read every score file.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What we found
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;0 of 892 passed.&lt;/strong&gt; Not on their own, and not after the correction for multiple tests. Some combinations looked good on&lt;br&gt;
average - a few percent a trade - and then failed the typical-month test or the random-minute test.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One thing was real: the entry minute.&lt;/strong&gt; When buying pressure was behind the cross, entering on that minute beat&lt;br&gt;
entering at a random minute the same day: 48 of the 60 combinations we could check that way cleared p below 0.001, and&lt;br&gt;
all 60 pointed the same way. The cross is not noise. What failed was everything&lt;br&gt;
after it: no stop and no exit rule we tried turned that better entry into a trade that passed.&lt;/p&gt;

&lt;p&gt;So the open question is the exit. And the most natural exits - "sell when the buying pressure turns", "sell when the&lt;br&gt;
spread widens" - need the same trade-by-trade detail the entry used.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why we're building a tick generator
&lt;/h2&gt;

&lt;p&gt;Tick data is huge and expensive, so most history only exists as one-minute bars: open, high, low, close, volume.&lt;br&gt;
We are training a model that takes a one-minute bar (plus the earlier minutes of that day) and fills in what the ticks&lt;br&gt;
would have shown: buy share, order-flow imbalance, spread, quote depth, odd-lot share, off-exchange share, block trades.&lt;/p&gt;

&lt;p&gt;How it is being tested, fixed before any training run:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trained on 150 days, graded on &lt;strong&gt;90 days from nine different market moods&lt;/strong&gt; it never saw: a flat quarter, a calm bull
market, the 2018 selloff, the 2020 crash, the 2021 retail mania, the 2022 bear market, a rally, a choppy quarter and
a shock-and-rebound quarter - with a month of distance between training and test days.&lt;/li&gt;
&lt;li&gt;Each field gets a grade from how much of the real variation it explains on those unseen days: GOOD (at least 60%),
PARTIAL (25-60%), POOR (under 25%).&lt;/li&gt;
&lt;li&gt;Buy share has an extra bar: it must beat the classic shortcut that estimates buying from the bar alone (bulk volume
classification), or it counts as POOR.&lt;/li&gt;
&lt;li&gt;It will also be graded on the 737 real breakout-cross minutes that fall on the test days - the exact minutes the exit
question is about.&lt;/li&gt;
&lt;li&gt;The first training run is done and independently checked; the grades are in the follow-up post.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What a generator like this can and can't do
&lt;/h2&gt;

&lt;p&gt;This is the part most "synthetic data" posts skip.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It can't add information.&lt;/strong&gt; Everything it produces is a function of the bar it was given. If a strategy finds an&lt;br&gt;
edge in the generated fields, that edge was already in the bar - or it is something the model invented. So our rule is&lt;br&gt;
simple: any test that uses generated fields is logged as such, and nothing gets traded until the same result shows up&lt;br&gt;
on &lt;strong&gt;real&lt;/strong&gt; ticks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it is useful for:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Training and testing exit logic&lt;/strong&gt; on years and stocks where real ticks don't exist, so you can see whether a rule
is even worth the cost of real data before you buy it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Realistic simulation:&lt;/strong&gt; a backtest or an agent trained only on bars never sees spreads widen or buyers disappear
inside a minute. Generated fields give it plausible microstructure to react to, so the training environment
behaves more like the market it will face.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stress-testing code:&lt;/strong&gt; pipelines that read tick fields can run on full history instead of a sample.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Results of the grading come in a follow-up, field by field - including the ones that come out POOR.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next: the exit
&lt;/h2&gt;

&lt;p&gt;The entry held up; the exits didn't. So the next test is the exit itself - rules driven by the tape instead of fixed&lt;br&gt;
stops. Candidates include a buying-pressure flip, an order-flow imbalance turn and a widening spread; the design isn't&lt;br&gt;
settled yet. It gets its own frozen rules, runs on real ticks first, and gets its own write-up, pass or fail.&lt;/p&gt;

&lt;h2&gt;
  
  
  A question for you
&lt;/h2&gt;

&lt;p&gt;If you have filled in tick-level detail from bars - buy share, spread, imbalance - what did you measure it against,&lt;br&gt;
and which fields held up?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Research and education only - not investment advice.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>python</category>
      <category>finance</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>We tested the viral AI chart model on dates it can't have seen. No edge.</title>
      <dc:creator>Alex B</dc:creator>
      <pubDate>Tue, 03 Nov 2026 15:05:25 +0000</pubDate>
      <link>https://dev.to/alexbsolodev/we-tested-the-viral-ai-chart-model-on-dates-it-cant-have-seen-no-edge-4n1g</link>
      <guid>https://dev.to/alexbsolodev/we-tested-the-viral-ai-chart-model-on-dates-it-cant-have-seen-no-edge-4n1g</guid>
      <description>&lt;p&gt;Everyone is sharing a free AI model for stock charts. We tested it the boring way, on dates it cannot have seen, against rules a beginner could write.&lt;/p&gt;

&lt;p&gt;A post going around X says an AI model "outperforms every model by 93%." It is called Kronos. It is free, it reads price charts the way a language model reads text, its paper went to AAAI 2026, and its GitHub repo has more than 40,000 stars. The conversation around it is roughly "a hedge fund in a free repo."&lt;/p&gt;

&lt;p&gt;We tested it on the only dates that can settle that: dates after its weights were published, which it cannot have seen.&lt;/p&gt;

&lt;p&gt;It found no edge.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;p&gt;53 weekly dates, October 1, 2025 to October 15, 2026, the 500 most-traded US stocks on each date:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Buying its top 50 picks each week lost 0.46 percentage points a week to SPY after costs.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Its price forecasts were less accurate than assuming nothing changes.&lt;/strong&gt; One day out it missed by 2.75% on average; "tomorrow = today" missed by 2.02%. Five days out, 8.62% against 4.60%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Its up-or-down calls were right 50.8% of the time&lt;/strong&gt; one day out and 50.9% five days out. The share of stocks that actually rose was 49.6% and 50.6%.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;0 of 4 pre-planned tests passed.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What "93%" actually measures
&lt;/h2&gt;

&lt;p&gt;It isn't returns. It is a ranking score called RankIC, where 1 means the forecast ordered everything perfectly and 0 means no relationship. The paper's own tables give the numbers behind the headline:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Average RankIC, price forecasting&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Kronos-large&lt;/td&gt;
&lt;td&gt;0.0267&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kronos-small&lt;/td&gt;
&lt;td&gt;0.0254&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TimesNet (best conventional model)&lt;/td&gt;
&lt;td&gt;0.0143&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Time-MOE-base (best rival foundation model)&lt;/td&gt;
&lt;td&gt;0.0138&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;0.0267 over 0.0138 is the 93%. Two things to know about it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The 93% belongs to a model you can't download.&lt;/strong&gt; The README's model table marks Kronos-large as not open source. The largest versions you can get are Kronos-base and Kronos-small. Small's gain works out to 84%, so this is not a scandal, but it is not the model people are running.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's 93% of a small number.&lt;/strong&gt; The move is from 0.014 to 0.027. That doesn't make it worthless: small scores can make money when they hold up across many bets and survive costs. It only means the score can't tell you whether they do. A money test can.&lt;/p&gt;

&lt;p&gt;The paper has one, on Chinese A-shares: Kronos-small averaged 17.9% a year above the index, against 16.8% for the next-best comparison model, at 0.15% per trade. We did not test Chinese stocks, so that result stands untouched here. We asked the question people on X are asking, which is about US stocks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The test
&lt;/h2&gt;

&lt;p&gt;We wrote the plan down before running anything.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model:&lt;/strong&gt; Kronos-small with its published tokenizer, 512 days of price history per stock, temperature 1.0, top-p 0.9, 5 forecast paths averaged. The README's example uses 1 path, so this gave the forecast more smoothing, not less.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dates:&lt;/strong&gt; The paper says training data ends June 2024, but the published weight files were last changed September 9, 2025, and we can't verify what they saw in between. So the main test starts October 1, 2025. The earlier window is reported separately and labelled "may overlap training."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stocks:&lt;/strong&gt; the 500 most-traded US common stocks on each date, price at least $5, chosen with only what was known that day. Stocks that died during a holding period were scored at their delisting return, not dropped.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Yardsticks, same stocks and same days:&lt;/strong&gt; no change, one-day reversal, 20-day momentum, random ranks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Money:&lt;/strong&gt; rank by the 5-day forecast, buy the top 50 at the next day's close, hold 5 trading days, charge 0.10% per side on what changed. Compared against the equal-weight 500 and against SPY.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Statistics:&lt;/strong&gt; four primary tests, corrected for running more than one. Every result was logged, pass or fail.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The results
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;After release (53 weeks)&lt;/th&gt;
&lt;th&gt;Kronos-small&lt;/th&gt;
&lt;th&gt;One-day reversal&lt;/th&gt;
&lt;th&gt;20-day momentum&lt;/th&gt;
&lt;th&gt;Random&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Ranking score, next day&lt;/td&gt;
&lt;td&gt;+0.026&lt;/td&gt;
&lt;td&gt;-0.015&lt;/td&gt;
&lt;td&gt;+0.002&lt;/td&gt;
&lt;td&gt;-0.003&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ranking score, next 5 days&lt;/td&gt;
&lt;td&gt;-0.010&lt;/td&gt;
&lt;td&gt;+0.006&lt;/td&gt;
&lt;td&gt;-0.009&lt;/td&gt;
&lt;td&gt;+0.003&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Top 50 vs SPY after costs, points per week&lt;/td&gt;
&lt;td&gt;-0.46&lt;/td&gt;
&lt;td&gt;-0.44&lt;/td&gt;
&lt;td&gt;-0.33&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Top 50 vs equal-weight after costs, points per week&lt;/td&gt;
&lt;td&gt;-0.33&lt;/td&gt;
&lt;td&gt;-0.30&lt;/td&gt;
&lt;td&gt;-0.19&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The simple rules lost to SPY too, so none of these columns is a strategy. The point is that Kronos didn't separate from them.&lt;/p&gt;

&lt;p&gt;It had one bright spot: the next-day ranking score of +0.026 has a p-value of 0.05 on its own. After correcting for four tests it has a q-value of 0.42, and its gap over 20-day momentum has a p-value of 0.25. It also didn't turn into money.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the dates matter, and what I can't claim
&lt;/h2&gt;

&lt;p&gt;On the earlier window, July 2024 to September 2025, which may overlap training, the same top 50 beat SPY by 0.31 points a week before costs (p 0.04) and 0.21 after costs (p 0.11). Same model, same code. After release: -0.46.&lt;/p&gt;

&lt;p&gt;The tempting story is that the model remembered. I can't tell you that, because 20-day momentum made the same trip: +0.30 points a week after costs on the earlier window, -0.33 on the later one. That window was kinder to simple rules as well.&lt;/p&gt;

&lt;p&gt;That is the reason to count only dates the weights can't have seen. If your backtest includes the others, a good number could be skill, memory or a friendly market, and you have no way to separate them.&lt;/p&gt;

&lt;h2&gt;
  
  
  We never ran their code
&lt;/h2&gt;

&lt;p&gt;Viral trading repos ask for broker and API keys and pull in long dependency lists. So we read the source as text, wrote our own inference code from the paper and that source (MIT licence, with credit), and loaded the weights as plain data from safetensors files, a format that can't carry executable code.&lt;/p&gt;

&lt;p&gt;The check that made this worth anything: our code had to reproduce the authors' published reference outputs before we could quote a single number. It matched to within 0.0002%.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this doesn't show
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Kronos-small only.&lt;/strong&gt; We didn't test Kronos-base, and Kronos-large isn't available.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No fine-tuning.&lt;/strong&gt; We used the published weights as they are. Fine-tuning on US stocks might change things, and we didn't test it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Daily US stocks only.&lt;/strong&gt; Not intraday, crypto, forex or Chinese A-shares.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One sampling setting, 53 weeks.&lt;/strong&gt; That is a small sample, and one that may have been unkind to everything we tested.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the honest claim is "we could not find an edge here," not "it can never work." The authors published a paper, weights and reference outputs you can check yourself against, which is more than most in this genre do, and it's the reason this test was possible at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three questions for the next viral model
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Which dates could the weights have seen?&lt;/strong&gt; Count only the ones after that.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better than what?&lt;/strong&gt; Test it against "nothing changes," a couple of simple rules and the index, on the same stocks and days.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;93% of what?&lt;/strong&gt; Ask for the number before the percentage.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  A question for you
&lt;/h2&gt;

&lt;p&gt;Has anyone gotten Kronos to hold up on US stocks after fine-tuning, on dates after the training cut-off? Link it and I'll credit you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Want this checked on your own data or backtest?&lt;/strong&gt; Backtest &amp;amp; Data Audit, one-week pilot: &lt;a href="https://altdataforge.com/audit" rel="noopener noreferrer"&gt;https://altdataforge.com/audit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Research and education only - not investment advice. Paper: Shi et al., "Kronos: A Foundation Model for the Language of Financial Markets," arXiv 2508.02739. Model and reference outputs: github.com/shiyu-coder/Kronos (MIT). Prices: US daily stock prices as of October 27, 2026; rechecked against November 2 data before publishing, and none of the 943,228 daily returns in the test had moved.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>finance</category>
      <category>python</category>
    </item>
    <item>
      <title>Defense contract awards looked like a 10% edge. It was the sector.</title>
      <dc:creator>Alex B</dc:creator>
      <pubDate>Mon, 02 Nov 2026 15:05:44 +0000</pubDate>
      <link>https://dev.to/alexbsolodev/defense-contract-awards-looked-like-a-10-edge-it-was-the-sector-5f28</link>
      <guid>https://dev.to/alexbsolodev/defense-contract-awards-looked-like-a-10-edge-it-was-the-sector-5f28</guid>
      <description>&lt;p&gt;A public, free, daily signal that sounds made for AI trading agents - tested properly, against four yardsticks instead of one.&lt;/p&gt;

&lt;p&gt;Every weekday, the U.S. Department of Defense publishes the contracts it awarded the day before. It is public, it is&lt;br&gt;
free, and it sounds like exactly the kind of signal an AI trading agent would love: a company wins a large government&lt;br&gt;
contract, so its stock should go up.&lt;/p&gt;

&lt;p&gt;We tested it properly. The answer is no - and the reason why is the most useful lesson in backtesting I know.&lt;/p&gt;

&lt;h2&gt;
  
  
  The test
&lt;/h2&gt;

&lt;p&gt;We froze the rules before running anything: which awards count, which holding periods (from 1 to 250 trading days),&lt;br&gt;
which company sizes, which costs, and what "passing" means. The plan was committed before the first number came out,&lt;br&gt;
so nothing could be tuned after seeing results. Every one of the 480 combinations was recorded, passing or not, so the&lt;br&gt;
multiple-testing correction counts all of them.&lt;/p&gt;

&lt;p&gt;Each result was compared against four yardsticks, not one:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the small-cap index,&lt;/li&gt;
&lt;li&gt;the defense-sector ETF,&lt;/li&gt;
&lt;li&gt;cash,&lt;/li&gt;
&lt;li&gt;and the &lt;strong&gt;same stocks bought on random dates&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What it looked like
&lt;/h2&gt;

&lt;p&gt;New contract awards, held for a year, beat the small-cap index by &lt;strong&gt;+10.1%&lt;/strong&gt; after costs (2021-2026, 509 awards across&lt;br&gt;
87 companies; confidence interval +5.6% to +17.2%).&lt;/p&gt;

&lt;p&gt;If you stopped there, you would have an edge. A backtest that only compares against cash - or against a broad index -&lt;br&gt;
stops there.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it really was
&lt;/h2&gt;

&lt;p&gt;The same awards &lt;strong&gt;lost to the defense ETF by 2.8%&lt;/strong&gt;, and &lt;strong&gt;lost to the same companies bought on random days by 2.2%&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Owning defense contractors paid over those years. Buying them &lt;em&gt;because&lt;/em&gt; they had just won an award added nothing. The&lt;br&gt;
"edge" was the sector.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;0 of the 480 combinations passed.&lt;/strong&gt; Not tradeable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two more things the data said
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Small companies react overnight, then fade.&lt;/strong&gt; For companies under $2 billion, an award worth at least 1% of the
company gapped up about &lt;strong&gt;+1.0%&lt;/strong&gt; at the next open - before anyone trading on daily data could act - and then lost
&lt;strong&gt;5.4% against the small-cap index over the next 20 trading days&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The sign flipped between periods.&lt;/strong&gt; In 2015-2020 the same small-company cells looked positive. In 2021-2026 they
were negative. An effect that changes sign with the calendar is not an effect you can rely on.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The lesson
&lt;/h2&gt;

&lt;p&gt;A result is only as good as the yardstick you compare it with. "Beats the index" is not enough if the stocks were all&lt;br&gt;
in a sector that beat the index. The two comparisons that caught this one cost almost nothing to add:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;the sector the stocks belong to&lt;/strong&gt;, and&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;the same stocks on random dates&lt;/strong&gt; (a placebo).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If your AI agent or backtest reports an edge, ask it for both before you believe it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I don't know
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Whether awards carry information the market has not priced in for companies too small to have a sector ETF that
fits them.&lt;/li&gt;
&lt;li&gt;Whether the overnight move is reachable at all for anyone who isn't watching the release minute by minute.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A question for you
&lt;/h2&gt;

&lt;p&gt;What yardstick do you hold a backtest against - and has the placebo test ever killed one of yours?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Want this checked on your own backtest?&lt;/strong&gt; Backtest &amp;amp; Data Audit, one-week pilot: &lt;a href="https://altdataforge.com/audit" rel="noopener noreferrer"&gt;https://altdataforge.com/audit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Research and education only - not investment advice. Award data: U.S. Department of Defense daily contract&lt;br&gt;
announcements (public domain).&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>datascience</category>
      <category>finance</category>
      <category>python</category>
    </item>
    <item>
      <title>A vendor bar for a day nothing traded - why our completeness check was 97% wrong</title>
      <dc:creator>Alex B</dc:creator>
      <pubDate>Thu, 29 Oct 2026 14:05:44 +0000</pubDate>
      <link>https://dev.to/alexbsolodev/a-vendor-bar-for-a-day-nothing-traded-why-our-completeness-check-was-97-wrong-a1a</link>
      <guid>https://dev.to/alexbsolodev/a-vendor-bar-for-a-day-nothing-traded-why-our-completeness-check-was-97-wrong-a1a</guid>
      <description>&lt;p&gt;The first check we built to measure missing price data was 97% wrong, and nothing in the data said so.&lt;/p&gt;

&lt;p&gt;Every backtest starts with an assumption nobody writes down: &lt;strong&gt;the price history is complete.&lt;/strong&gt; Every trading day a&lt;br&gt;
stock was listed, there is a bar.&lt;/p&gt;

&lt;p&gt;Ours wasn't. And the first check we built to measure how incomplete it was turned out to be 97% wrong - with nothing in&lt;br&gt;
the data to tell us.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gap
&lt;/h2&gt;

&lt;p&gt;We compared our own daily price files against the exchange calendar, stock by stock, inside each stock's own&lt;br&gt;
first-to-last trading span since June 2025. &lt;strong&gt;30,581 missing stock-days across 738 listed common stocks.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most of them were names that had changed ticker or listed recently. The list of symbols our fetcher asked for only knew&lt;br&gt;
names it already held, so a renamed company quietly stopped being fetched. One large bank was missing &lt;strong&gt;86 daily&lt;br&gt;
sessions&lt;/strong&gt; after its ticker change.&lt;/p&gt;

&lt;h2&gt;
  
  
  The first check: "is there a bar?"
&lt;/h2&gt;

&lt;p&gt;To separate real gaps from days a stock genuinely did not trade, we asked a market-data vendor one question per&lt;br&gt;
missing day: &lt;em&gt;do you have a bar for this stock on this day?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It said yes for &lt;strong&gt;29,793 of the 30,581&lt;/strong&gt;. That looked like a clean result: nearly every gap is real, go fill them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the bars actually were
&lt;/h2&gt;

&lt;p&gt;Before filling anything, we read a few of the worst cases by hand. The bars were there - with &lt;strong&gt;zero volume and zero&lt;br&gt;
trades.&lt;/strong&gt; The price was simply the previous day's close, carried forward.&lt;/p&gt;

&lt;p&gt;The vendor serves a bar for a day nothing traded. &lt;strong&gt;19,066&lt;/strong&gt; of the "real" gaps were these placeholders.&lt;/p&gt;

&lt;p&gt;Asking a different question - &lt;em&gt;does the vendor's bar have trades?&lt;/em&gt; - the real number was &lt;strong&gt;10,727 sessions across 240&lt;br&gt;
stocks.&lt;/strong&gt; All of them were filled the same morning (11,408 daily rows and 869,391 one-minute rows), and the same count&lt;br&gt;
now reads &lt;strong&gt;0&lt;/strong&gt;. It runs every night.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters for a backtest
&lt;/h2&gt;

&lt;p&gt;A placeholder bar is not harmless:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Volume filters lie.&lt;/strong&gt; A stock looks listed and priced on a day it had no market at all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Returns get smoothed.&lt;/strong&gt; A flat day carried forward hides the real move, which then lands all at once on the next
day that traded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Completeness" checks pass.&lt;/strong&gt; Any check that asks &lt;em&gt;does a row exist?&lt;/em&gt; is satisfied by a row that says nothing
happened.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We found the same thing in our own stored files: three sampled days held 189, 467 and 432 zero-volume rows.&lt;/p&gt;

&lt;h2&gt;
  
  
  The lesson
&lt;/h2&gt;

&lt;p&gt;A check that asks &lt;em&gt;does a record exist?&lt;/em&gt; measures the vendor's habits, not the market. Ask the question the record is&lt;br&gt;
supposed to answer: &lt;strong&gt;did this stock trade?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I don't know
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Whether the placeholder bars are documented behaviour, or a quirk of the way we ask for historical data.&lt;/li&gt;
&lt;li&gt;What the right storage policy is. A day with no trades arguably has no bar at all - but many tools expect one.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A question for you
&lt;/h2&gt;

&lt;p&gt;Who has a reliable public rule for "did this stock trade today" that doesn't depend on the vendor's own bar - the&lt;br&gt;
exchange's daily volume files, consolidated trade counts, something else? If you've solved it, I'd like to learn how.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Want this checked on your own data or backtest?&lt;/strong&gt; Backtest &amp;amp; Data Audit, one-week pilot: &lt;a href="https://altdataforge.com/audit" rel="noopener noreferrer"&gt;https://altdataforge.com/audit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Research and education only - not investment advice.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>dataengineering</category>
      <category>finance</category>
      <category>python</category>
    </item>
    <item>
      <title>How do you know your company matching is right? We had to grade the grader</title>
      <dc:creator>Alex B</dc:creator>
      <pubDate>Mon, 26 Oct 2026 14:05:24 +0000</pubDate>
      <link>https://dev.to/alexbsolodev/how-do-you-know-your-company-matching-is-right-we-had-to-grade-the-grader-1jki</link>
      <guid>https://dev.to/alexbsolodev/how-do-you-know-your-company-matching-is-right-we-had-to-grade-the-grader-1jki</guid>
      <description>&lt;p&gt;Every agent that reads financial text has to decide which company a name means. Here is how we graded ours - and why we had to grade the answer key first.&lt;/p&gt;

&lt;p&gt;Every AI agent that reads financial text has to answer one question before anything else: &lt;strong&gt;which company is this?&lt;/strong&gt;&lt;br&gt;
"Apple" in a filing. "MS" in a headline. A name that changed three years ago, or a ticker that now belongs to someone&lt;br&gt;
else. Get it wrong and everything downstream is confidently wrong.&lt;/p&gt;

&lt;p&gt;We have been building a lookup for exactly that: give it a company name as it was written, in a filing or an article,&lt;br&gt;
and a date, and it returns the company that name meant on that date - including renamed and delisted ones. This week&lt;br&gt;
we measured it properly. Three things surprised me.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. We had to check the answer key first
&lt;/h2&gt;

&lt;p&gt;To grade a matcher you need an answer key: a set of names where careful labellers have written down the right company.&lt;br&gt;
We split ours in two - one half to tune on, one half held out and never looked at while tuning.&lt;/p&gt;

&lt;p&gt;Before trusting any score, we had a second model act as a referee on 891 items of the key, without ever seeing what our&lt;br&gt;
lookup had answered. It cost about $3.50 of API usage. What it found:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;485 confirmed&lt;/strong&gt; as they stood.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;226 widened&lt;/strong&gt;: the original answer was right, but the same company also existed as a second record, and the two
had been offered as rivals. One company, two entries - both are now accepted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;101 settled&lt;/strong&gt;: items the labellers had marked "can't tell" now have an answer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2 reversed&lt;/strong&gt;: outright wrong labels.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the key was rarely wrong; it was incomplete. Every change is stored as its own record with a reason, on top of the&lt;br&gt;
original, never as a silent edit.&lt;/p&gt;

&lt;p&gt;On the checked key, the lookup scores &lt;strong&gt;0.927 on the held-out half (629 matches; lower bound 0.904)&lt;/strong&gt;. The part I find&lt;br&gt;
most useful: answers the lookup gave where the key said "can't tell" fell &lt;strong&gt;from 27 to 10&lt;/strong&gt; - most of them turned out&lt;br&gt;
to be the same company listed twice. Real wrong answers barely moved (37 to 36). Checking the key changed what we&lt;br&gt;
thought was a mistake, not how many mistakes we make.&lt;/p&gt;

&lt;p&gt;If you grade an entity matcher against an answer key nobody has audited, you are partly grading the key.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Same question, three different orderings
&lt;/h2&gt;

&lt;p&gt;Some names legitimately point to several entities - Morgan Stanley is a good example. When the lookup returned those&lt;br&gt;
tied alternatives, their order depended on a random seed that changes every time a program starts. Same question,&lt;br&gt;
three runs, three orderings. The answer itself never changed - only the order of the alternatives. For a person that is&lt;br&gt;
a shrug; for an agent that takes the first item in a list, it is a coin flip. Ties now break on a stable identifier, and&lt;br&gt;
the same question gets the same list every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. News is not filings
&lt;/h2&gt;

&lt;p&gt;Filings are formal; company names sit in predictable places. News prose is not. On FiNER-ORD, a public, human-labelled&lt;br&gt;
set of financial news text (Shah et al., 2023), rule-based name finding scored an F1 of &lt;strong&gt;0.350&lt;/strong&gt;. A free open model&lt;br&gt;
(GLiNER), fine-tuned on our filings data, scored &lt;strong&gt;0.820&lt;/strong&gt;. Rules that work on filings fall apart on headlines.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I don't know yet
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;How well &lt;em&gt;matching&lt;/em&gt; (not just finding) works on news text - there is no human-labelled answer key for that yet.&lt;/li&gt;
&lt;li&gt;Whether 0.927 holds outside SEC filings.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;We are working on letting AI agents ask this lookup directly - "which company did this name mean on this date?" -&lt;br&gt;
with the answer key's score attached to every answer. If you are building an agent that needs that, reply or write to&lt;br&gt;
&lt;a href="mailto:AlexB@AltDataForge.com"&gt;AlexB@AltDataForge.com&lt;/a&gt; and I'll let you know when there is something to try.&lt;/p&gt;

&lt;p&gt;Next post: &lt;strong&gt;when a ticker changes hands&lt;/strong&gt; - how one company's history quietly leaks into another's when a symbol is&lt;br&gt;
reused, and what it takes to stop it.&lt;/p&gt;

&lt;h2&gt;
  
  
  A question for you
&lt;/h2&gt;

&lt;p&gt;If you run entity resolution for agents or research: how do you grade it - and has your answer key ever turned out to&lt;br&gt;
be incomplete rather than wrong? If someone has published a good open answer key for company matching, link it and I'll&lt;br&gt;
credit it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Want this checked on your own data or backtest?&lt;/strong&gt; Backtest &amp;amp; Data Audit, one-week pilot: &lt;a href="https://altdataforge.com/audit" rel="noopener noreferrer"&gt;https://altdataforge.com/audit&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;FiNER-ORD: Shah et al., 2023, arXiv:2302.11157 (CC BY-NC 4.0; used here for evaluation only). The free SEC data&lt;br&gt;
dictionaries this work sits on: &lt;a href="https://alexbocio.github.io/us-gov-data-dictionary/" rel="noopener noreferrer"&gt;https://alexbocio.github.io/us-gov-data-dictionary/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>data</category>
      <category>machinelearning</category>
      <category>python</category>
    </item>
    <item>
      <title>Why your AI agent gets fund holdings wrong: the SEC's "Ticker" field isn't a ticker</title>
      <dc:creator>Alex B</dc:creator>
      <pubDate>Sat, 17 Oct 2026 14:58:25 +0000</pubDate>
      <link>https://dev.to/alexbsolodev/why-your-ai-agent-gets-fund-holdings-wrong-the-secs-ticker-field-isnt-a-ticker-7a4</link>
      <guid>https://dev.to/alexbsolodev/why-your-ai-agent-gets-fund-holdings-wrong-the-secs-ticker-field-isnt-a-ticker-7a4</guid>
      <description>&lt;p&gt;If you are building an agent or a model on SEC fund-holdings data, it will read a field called IDENTIFIER_TICKER and trust it. Here is what that field actually contains.&lt;/p&gt;

&lt;p&gt;If you build fund-ownership data from SEC Form N-PORT, you will read a field called IDENTIFIER_TICKER and treat it as a stock symbol. The SEC's data-set documentation describes it in one word: "Ticker".&lt;/p&gt;

&lt;p&gt;The form itself says more. Form N-PORT, Item C.1.e, asks for "at least one" other identifier: an ISIN, or a "Ticker (if ISIN is not available)", or some other identifier. Nothing requires the ticker to be an exchange symbol. It is a fallback.&lt;/p&gt;

&lt;p&gt;So we measured what funds actually put there - every quarter the SEC has published, 2019 Q4 to 2026 Q2:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;17,361,050 rows carry a ticker.&lt;/li&gt;
&lt;li&gt;72% are on common-stock lines, and they look like real tickers: MSFT, AMZN, AAPL.&lt;/li&gt;
&lt;li&gt;On mortgage-backed lines (676,336 rows) the "tickers" are agency pool-type prefixes: FN 161,550 rows, GN 109,156, FNMA 55,140, FHLMC 45,223.&lt;/li&gt;
&lt;li&gt;On bond lines (2,312,102 rows) the ticker is the ISSUER's stock symbol, not the bond's: AT&amp;amp;T bonds carry "T" on 86,298 rows.&lt;/li&gt;
&lt;li&gt;On derivative lines you find futures contract codes (TYZ2, ESZ2) and currency codes (USD, EUR).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why it matters: FG is a Freddie Mac pool prefix. It is also the NYSE ticker of F&amp;amp;G Annuities &amp;amp; Life. Join N-PORT's ticker field to a ticker list and Freddie Mac mortgage pools turn into holdings of an insurance company. Bond holdings turn into stock holdings. Ownership counts, "smart money" signals and flow features all inherit it - silently.&lt;/p&gt;

&lt;p&gt;Two more traps in the same files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Placeholders that look like data: ISSUER_CUSIP is "N/A" on 47.5 million rows, "000000000" on 15.2 million and "999999999" on 210 thousand. ISSUER_LEI is "N/A" on 67.6 million. Count those as filled and your coverage numbers are wrong.&lt;/li&gt;
&lt;li&gt;The SEC's machine-readable field list ships unchanged with every historical quarter, so a field "defined" there may not exist in older files (the VaR table is listed back to 2019 but only appears from 2022 Q1).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What to do: before trusting any identifier on an N-PORT line, check what kind of holding the line is (the ASSET_CAT field), and treat placeholder values as blank.&lt;/p&gt;

&lt;p&gt;What I don't know yet:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Whether anyone publishes an open mapping from N-PORT pool prefixes (FN, GN, FG...) to the agency programs they stand for. I could not find one.&lt;/li&gt;
&lt;li&gt;How much of the bond-line "issuer ticker" habit comes from filers themselves and how much from the software vendors that prepare their filings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We published the full N-PORT field dictionary - the SEC's definitions with citations, the official code lists, and what is actually in each field - free, under CC BY 4.0: &lt;a href="https://alexbocio.github.io/us-gov-data-dictionary/sec_nport.html" rel="noopener noreferrer"&gt;https://alexbocio.github.io/us-gov-data-dictionary/sec_nport.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source data: SEC Form N-PORT data sets, 2019 Q4 - 2026 Q2.&lt;/p&gt;

&lt;p&gt;If you build fund-ownership data from N-PORT: how do you handle the non-stock lines today - map them, or drop them? And if someone has already solved this better, link it in the comments and I'll credit it in the dictionary.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>data</category>
      <category>finance</category>
      <category>python</category>
    </item>
    <item>
      <title>One developer, one year, 1.8 billion rows: a point-in-time alternative-data platform</title>
      <dc:creator>Alex B</dc:creator>
      <pubDate>Mon, 12 Oct 2026 19:33:37 +0000</pubDate>
      <link>https://dev.to/alexbsolodev/one-developer-one-year-18-billion-rows-a-point-in-time-alternative-data-platform-382l</link>
      <guid>https://dev.to/alexbsolodev/one-developer-one-year-18-billion-rows-a-point-in-time-alternative-data-platform-382l</guid>
      <description>&lt;p&gt;In the last year I built, alone, a quantitative research data platform: about 1.8 billion rows across 764 tables of alternative data, SEC filings, government records and market data, engineered to be trusted in a backtest. I am self-taught. The discipline came from the work itself: 206 architecture decision records and 680 research notes, one for every problem worth not solving twice.&lt;/p&gt;

&lt;p&gt;The hard problems were not the ones anyone warns you about. They were data problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  The stack, in the terms the field uses
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Point-in-time (as-of) data.&lt;/strong&gt; Every record carries when it became public, not just when it happened, and 103 tables are bitemporal (valid time and recorded time). That is the defence against look-ahead bias, the most common way a backtest flatters itself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Survivorship-bias-free history.&lt;/strong&gt; Delisted and renamed companies stay in the data with their history, and a window in which a stock dies is scored with its delisting return instead of being dropped.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Entity resolution and a security master.&lt;/strong&gt; Record linkage across tickers, CIKs, LEIs and CUSIPs, with point-in-time symbology: tickers get renamed, reused and delisted, so "which company was this on that date" is answered as of the date.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Corporate actions.&lt;/strong&gt; Split and dividend adjustment validated against an independent source rather than against itself; the split-adjustment tool is open source.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Information extraction (NLP) from regulatory filings.&lt;/strong&gt; 8-K events, earnings guidance and reported results, press releases, IPO prospectuses, SEC comment letters, material contracts, Schedule 13D/13G beneficial ownership, insider Forms 3/4/5, foreign-issuer reports and XBRL financial statements, turned into structured, dated facts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A medallion lakehouse.&lt;/strong&gt; Bronze, silver and gold layers on Parquet, PostgreSQL for the serving tables, about 456 data contracts guarding them, and data lineage that answers "what breaks downstream if this table changes" in one command.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MLOps and model validation.&lt;/strong&gt; Feature pipelines, walk-forward and purged cross-validation, backtesting and paper trading, because a model that cannot fail a test is a horoscope.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Domain-specific language models.&lt;/strong&gt; Small models fine-tuned for narrow financial extraction tasks on a desktop GPU.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agentic workflows.&lt;/strong&gt; Model Context Protocol (MCP) servers that let AI agents query the data, and agent-to-agent orchestration around them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;All of it on one workstation,&lt;/strong&gt; with a resource broker that schedules heavy jobs so the machine does not eat itself.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By the numbers: 4,776 commits since 21 November 2025, 5,281 Python files, 738 of them tests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three lessons in data quality
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Labels lie; specifications do not.&lt;/strong&gt; The SEC's fund-holdings data (Form N-PORT) has a field called "Ticker". Measured across every quarter the SEC has published, about 28% of its 17.4 million values are not stock tickers: mortgage-pool codes, bond issuers' symbols, futures contracts. One pool code, FG, is also an NYSE ticker, so a naive join turns Freddie Mac mortgage pools into shares of an insurance company. The fix was metadata management, not cleverer code: the SEC's own form instructions say the field is a fallback identifier. I now build a data dictionary (a codebook, in the ISO/IEC 11179 sense) from each agency's official documentation before touching its data. The first seven dictionaries turned up twelve defects in the SEC's own published files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. A test that compares data with itself proves nothing.&lt;/strong&gt; One evening every data-quality check on prices passed. The next morning an independent reconciliation found 236 days of prices rewritten onto the wrong side of a stock split. Every check had been comparing the pipeline with its own output. Now a data-quality claim needs an external witness.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Coverage is not precision.&lt;/strong&gt; The easy metric in entity resolution is match rate. The useful one is precision. A shortcut that raised one match rate by ten points was right only 38% of the time against an independent identifier. It never shipped.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is public
&lt;/h2&gt;

&lt;p&gt;Two open-source releases so far:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;split-adjustment-tool&lt;/strong&gt; - verify, repair and apply stock-split adjustments against your own as-traded price tape. Vendor-neutral Python (Polars), Apache 2.0, release 0.4.0: &lt;a href="https://github.com/AlexBocio/split-adjustment-tool" rel="noopener noreferrer"&gt;https://github.com/AlexBocio/split-adjustment-tool&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;us-gov-data-dictionary&lt;/strong&gt; - machine-readable data dictionaries for seven SEC data sets: 1,469 fields, each with the SEC's own definition and citation, official code lists, and a profile of what the published files actually contain. W3C CSVW and SKOS formats, CC BY 4.0: &lt;a href="https://github.com/AlexBocio/us-gov-data-dictionary" rel="noopener noreferrer"&gt;https://github.com/AlexBocio/us-gov-data-dictionary&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More agencies are next. If you work with public financial data and it has ever quietly lied to you, I would like to hear the story.&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>python</category>
      <category>machinelearning</category>
      <category>finance</category>
    </item>
  </channel>
</rss>
