<?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: ishan</title>
    <description>The latest articles on DEV Community by ishan (@ishanjotdhahan7868).</description>
    <link>https://dev.to/ishanjotdhahan7868</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%2F4192238%2F282639f4-544b-4f95-ab13-7b3bc07b0697.png</url>
      <title>DEV Community: ishan</title>
      <link>https://dev.to/ishanjotdhahan7868</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ishanjotdhahan7868"/>
    <language>en</language>
    <item>
      <title>I built a graph that traces how news ripples through the stock market</title>
      <dc:creator>ishan</dc:creator>
      <pubDate>Sun, 18 Oct 2026 14:03:58 +0000</pubDate>
      <link>https://dev.to/ishanjotdhahan7868/i-built-a-graph-that-traces-how-news-ripples-through-the-stock-market-47lo</link>
      <guid>https://dev.to/ishanjotdhahan7868/i-built-a-graph-that-traces-how-news-ripples-through-the-stock-market-47lo</guid>
      <description>&lt;p&gt;Every day there's a headline like "Fed keeps rates high" and everyone knows the obvious move: banks, bonds, whatever. But the moves that actually matter are the ones a few steps away. Rates stay high → mortgages get more expensive → fewer people buy homes → homebuilders like Toll Brothers feel it a few months later.&lt;/p&gt;

&lt;p&gt;Nobody draws that chain out for you. So for Graph Hacks I built &lt;strong&gt;Ripple&lt;/strong&gt;, which does exactly that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it:&lt;/strong&gt; &lt;a href="https://ripple-beta-five.vercel.app" rel="noopener noreferrer"&gt;https://ripple-beta-five.vercel.app&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Code:&lt;/strong&gt; &lt;a href="https://github.com/IshanjotDhahan7868/ripple" rel="noopener noreferrer"&gt;https://github.com/IshanjotDhahan7868/ripple&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;You paste a headline. Ripple tells you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which stocks are likely to rise or fall&lt;/li&gt;
&lt;li&gt;roughly when (right away, in 3 months, in 6 months)&lt;/li&gt;
&lt;li&gt;the exact chain behind every call, with a one-line reason on each step&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every ticker is clickable too. Open a stock and you see everything upstream that can push it up or down, past calls on it, and the stocks that move with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a graph?
&lt;/h2&gt;

&lt;p&gt;Because the economy &lt;em&gt;is&lt;/em&gt; a graph. Interest rates affect housing, housing affects lumber and banks, oil affects shipping and airlines, and so on. Trying to do this with a chatbot alone means it just makes stuff up that sounds right. I wanted every answer to come from something you can actually check.&lt;/p&gt;

&lt;p&gt;So the economy lives in &lt;strong&gt;FalkorDB&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;79 Driver nodes&lt;/strong&gt;: Interest Rates, Oil Price, Housing, AI Compute Demand…&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;170 DRIVES edges&lt;/strong&gt; between them, each with a weight, a confidence, a lag in months, a direction (push up or push down) and a sentence explaining why&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;357 Asset nodes&lt;/strong&gt; (stocks, ETFs, commodities) linked to the drivers they're exposed to&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When a headline comes in, Claude does one small job: it picks which drivers the news is about and which way they're moving. That's it. It never writes queries and never names stocks.&lt;/p&gt;

&lt;p&gt;Then FalkorDB does the real work with Cypher. It walks paths up to 4 steps out, multiplies weight × confidence along the way so the push gets weaker the further it travels, multiplies the directions so "up" and "down" flip correctly, and adds up the lag so you get a "when". The whole thing comes back in a few milliseconds.&lt;/p&gt;

&lt;p&gt;For stock pages it runs backwards: start at the ticker and walk upstream to find everything that can move it. I also use graph algorithms (PageRank and reach) to find the economy's pressure points, meaning the shocks that spread the furthest.&lt;/p&gt;

&lt;p&gt;And there's a "show how this was worked out" button on every answer that shows you the exact Cypher queries that ran. No black box.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does it actually work?
&lt;/h2&gt;

&lt;p&gt;I didn't want to just claim it does, so I tested it.&lt;/p&gt;

&lt;p&gt;I froze the graph in January 2026, then fed it 10 big real headlines from the months after. For each one it named 5 stocks and a direction. Then I checked what those stocks actually did over the next 20 trading days compared to the S&amp;amp;P 500.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;35 of 50 calls were right (70%)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;random stocks on the same days: &lt;strong&gt;about 49%&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;8 of the 10 events came out ahead overall&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Honest caveats: 10 events is a small sample, and after only 5 days it's basically a coin flip. That makes sense to me, because knock-on effects take weeks to show up in prices. Every single call, right or wrong, is listed on the casebook page.&lt;/p&gt;

&lt;h2&gt;
  
  
  It runs by itself
&lt;/h2&gt;

&lt;p&gt;This was my favourite part. Every 2 hours a GitHub Action wakes up, reads business news from RSS feeds, matches headlines to drivers with simple rules (no AI, so it costs $0), spins up a throwaway FalkorDB container, traces the ripple and saves the calls. Later it grades each call against real prices after 5 and 20 trading days.&lt;/p&gt;

&lt;p&gt;Every few days I have Claude Code do a "checkup": it reads the robot's recent calls, finds misreads, teaches it new rules and withdraws bad calls &lt;em&gt;before&lt;/em&gt; they get graded. Withdrawn calls stay on the public record, so nothing gets hidden.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Graphs make AI honest.&lt;/strong&gt; Once the AI's only job is "point at the right node", it can't hallucinate a stock. Everything after that is just data you can trace.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cypher is perfect for this.&lt;/strong&gt; "Walk up to 4 hops and multiply strengths along the path" is basically one query. Doing that in Python before was way more code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weighted path queries take some trial and error.&lt;/strong&gt; Getting reduce() over relationships right took me a few tries, but once it clicked it was clean.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test your own claims.&lt;/strong&gt; Building the backtest changed how I wrote the whole site. I stopped saying "accurate" and started showing the actual numbers.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;More drivers and stocks on the map, more history in the backtest, and letting the live robot build a real track record over the next few months.&lt;/p&gt;

&lt;p&gt;If you try it, paste any headline you want and see where it lands.&lt;/p&gt;

</description>
      <category>graph</category>
      <category>ai</category>
      <category>database</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
