{"id":1304,"date":"2026-02-16T02:10:32","date_gmt":"2026-02-16T06:10:32","guid":{"rendered":"https:\/\/jolivo.xenius.org\/?p=1304"},"modified":"2026-02-27T13:50:38","modified_gmt":"2026-02-27T17:50:38","slug":"stonkbot-my-attempt-at-a-quantitative-trading-terminal","status":"publish","type":"post","link":"https:\/\/jolivo.xenius.org\/?p=1304","title":{"rendered":"StonkBot: My Attempt at a Quantitative Trading Terminal"},"content":{"rendered":"<h2 style=\"text-align: center;\"><strong>Status:<\/strong>\u00a0Alpha \/ &#8220;Works on my machine&#8221;<\/h2>\n<p>I finished the first version of <strong>StonkBot<\/strong>, my weekend project to help me stop losing money on crypto (hopefully). I wanted to build something that looked like those fancy Bloomberg terminals but ran on my laptop and didn&#8217;t cost $24k a year.<\/p>\n<h2 id=\"user-content-what-is-it\" style=\"text-align: center;\">What is it?<\/h2>\n<p>Basically, it&#8217;s a locally run <strong>trading dashboard<\/strong>. It acts like a flight simulator for trading. You can toggle between &#8220;Dry Run&#8221; mode (which just pretends to trade using simulated money) and real API connections.<\/p>\n<p>I built it because I was tired of using five different websites just to check a chart, see the order book, and track my portfolio. I wanted it all in one screen.<\/p>\n<h2 id=\"user-content-cool-features-i-built\" style=\"text-align: center;\">Features:<\/h2>\n<ul>\n<li><strong>Provider Independent:<\/strong> It uses an &#8220;Abstract Base Class,&#8221; so you can plug in Yahoo Finance, Alpaca, or whatever. If one API goes down, the bot doesn&#8217;t crash.<\/li>\n<li><strong>The Visualization Engine:<\/strong>\u00a0I used\u00a0<strong>Plotly<\/strong> to make interactive charts. It&#8217;s got:\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong>Heikin-Ashi Candles:<\/strong>\u00a0To smooth out the noise.<\/li>\n<li><strong>Volume Profile:<\/strong>\u00a0Shows where the buying\/selling is actually happening.<\/li>\n<li><strong>Market Depth:<\/strong>\u00a0A scifi-looking chart that shows bid\/ask walls.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>Simulated Portfolio:<\/strong>\u00a0It tracks your &#8220;fake&#8221; USD and Bitcoin balance. You can click BUY\/SELL and it actually updates your P&amp;L.<\/li>\n<li><strong>AI Stuff (Experimental):<\/strong>\u00a0I started adding some hooks for\u00a0<strong>Anthropic&#8217;s Claude<\/strong>\u00a0to analyze the charts for me. It&#8217;s still pretty basic, but the idea is to have an AI co-pilot telling me if a setup looks good.<\/li>\n<\/ul>\n<h2 id=\"user-content-technical-requirements-how-to-run-it\" style=\"text-align: center;\">Technical Requirements (How to run it)<\/h2>\n<p>If you want to try it out, you&#8217;ll need Python installed. It&#8217;s built on\u00a0<strong>Streamlit<\/strong>.<\/p>\n<p><strong>Stuff you need to install:<\/strong><\/p>\n<ul>\n<li><code class=\"whitespace-pre-wrap\">python 3.8+<\/code><\/li>\n<li><code class=\"whitespace-pre-wrap\">streamlit<\/code> (The UI)<\/li>\n<li><code class=\"whitespace-pre-wrap\">plotly<\/code>\u00a0(For the charts)<\/li>\n<li><code class=\"whitespace-pre-wrap\">yfinance<\/code> (Free data)<\/li>\n<li><code class=\"whitespace-pre-wrap\">pandas<\/code><\/li>\n<li><code class=\"whitespace-pre-wrap\">pydantic<\/code> (Keeps the data structures sane)<\/li>\n<\/ul>\n<p><strong>Optional but recommended:<\/strong><\/p>\n<ul>\n<li><code class=\"whitespace-pre-wrap\">scipy<\/code>\u00a0(For some of the math-heavy indicators)<\/li>\n<li>API Keys for\u00a0<strong>Alpaca<\/strong>\u00a0or\u00a0<strong>FMP<\/strong>\u00a0if you want real-time data instead of the delayed\/simulated stuff.<\/li>\n<\/ul>\n<p>I will make this available as soon as I ensure that the data is safe and the app doesn&#8217;t absolutely chew up AI tokens.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Status:\u00a0Alpha \/ &#8220;Works on my machine&#8221; I finished the first version of StonkBot, my weekend project to help me stop losing money on crypto (hopefully). I wanted to build something that looked like those fancy Bloomberg terminals but ran on my laptop and didn&#8217;t cost $24k a year. What is it? Basically, it&#8217;s a locally [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1307,"comment_status":"open","ping_status":"open","sticky":false,"template":"template-simple-featured-image.php","format":"standard","meta":{"footnotes":""},"categories":[14,1],"tags":[],"class_list":["post-1304","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-rants","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/jolivo.xenius.org\/index.php?rest_route=\/wp\/v2\/posts\/1304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jolivo.xenius.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jolivo.xenius.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jolivo.xenius.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jolivo.xenius.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1304"}],"version-history":[{"count":9,"href":"https:\/\/jolivo.xenius.org\/index.php?rest_route=\/wp\/v2\/posts\/1304\/revisions"}],"predecessor-version":[{"id":1324,"href":"https:\/\/jolivo.xenius.org\/index.php?rest_route=\/wp\/v2\/posts\/1304\/revisions\/1324"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jolivo.xenius.org\/index.php?rest_route=\/wp\/v2\/media\/1307"}],"wp:attachment":[{"href":"https:\/\/jolivo.xenius.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jolivo.xenius.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jolivo.xenius.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}