<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Trading the Breaking: Research]]></title><description><![CDATA[Welcome to my lab! A testing ground for algorithms, models, and ideas built at the edge of what’s possible. Here, we dissect the machinery behind finance, technology, and intelligent systems—where theory is challenged, experiments are run, and innovation is forced to prove itself in the market.]]></description><link>https://www.quantbeckman.com/s/research</link><image><url>https://substackcdn.com/image/fetch/$s_!AJt2!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cedd76e-1949-481c-a904-be1a249336c5_1280x1280.png</url><title>Trading the Breaking: Research</title><link>https://www.quantbeckman.com/s/research</link></image><generator>Substack</generator><lastBuildDate>Fri, 07 Aug 2026 17:31:21 GMT</lastBuildDate><atom:link href="https://www.quantbeckman.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Quant Beckman]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[quantbeckman@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[quantbeckman@substack.com]]></itunes:email><itunes:name><![CDATA[Quant Beckman]]></itunes:name></itunes:owner><itunes:author><![CDATA[Quant Beckman]]></itunes:author><googleplay:owner><![CDATA[quantbeckman@substack.com]]></googleplay:owner><googleplay:email><![CDATA[quantbeckman@substack.com]]></googleplay:email><googleplay:author><![CDATA[Quant Beckman]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[[PORTFOLIO] Quant Portfolio Manager]]></title><description><![CDATA[August 2026]]></description><link>https://www.quantbeckman.com/p/portfolio-quant-portfolio-manager</link><guid isPermaLink="false">https://www.quantbeckman.com/p/portfolio-quant-portfolio-manager</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Thu, 06 Aug 2026 13:30:09 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/eb8b79cd-62fe-45fe-a420-836896174221_982x784.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9syC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e41438-3c7e-4270-8618-c66d3432552e_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9syC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e41438-3c7e-4270-8618-c66d3432552e_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!9syC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e41438-3c7e-4270-8618-c66d3432552e_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!9syC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e41438-3c7e-4270-8618-c66d3432552e_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!9syC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e41438-3c7e-4270-8618-c66d3432552e_1672x941.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9syC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e41438-3c7e-4270-8618-c66d3432552e_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/94e41438-3c7e-4270-8618-c66d3432552e_1672x941.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1140303,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/210069412?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e41438-3c7e-4270-8618-c66d3432552e_1672x941.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9syC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e41438-3c7e-4270-8618-c66d3432552e_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!9syC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e41438-3c7e-4270-8618-c66d3432552e_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!9syC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e41438-3c7e-4270-8618-c66d3432552e_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!9syC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F94e41438-3c7e-4270-8618-c66d3432552e_1672x941.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L05y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8912aa9a-688e-4cc3-86d8-44a5ce209f7c_1668x609.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L05y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8912aa9a-688e-4cc3-86d8-44a5ce209f7c_1668x609.png 424w, https://substackcdn.com/image/fetch/$s_!L05y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8912aa9a-688e-4cc3-86d8-44a5ce209f7c_1668x609.png 848w, https://substackcdn.com/image/fetch/$s_!L05y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8912aa9a-688e-4cc3-86d8-44a5ce209f7c_1668x609.png 1272w, https://substackcdn.com/image/fetch/$s_!L05y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8912aa9a-688e-4cc3-86d8-44a5ce209f7c_1668x609.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L05y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8912aa9a-688e-4cc3-86d8-44a5ce209f7c_1668x609.png" width="1456" height="532" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8912aa9a-688e-4cc3-86d8-44a5ce209f7c_1668x609.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:532,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:949899,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/210069412?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8912aa9a-688e-4cc3-86d8-44a5ce209f7c_1668x609.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!L05y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8912aa9a-688e-4cc3-86d8-44a5ce209f7c_1668x609.png 424w, https://substackcdn.com/image/fetch/$s_!L05y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8912aa9a-688e-4cc3-86d8-44a5ce209f7c_1668x609.png 848w, https://substackcdn.com/image/fetch/$s_!L05y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8912aa9a-688e-4cc3-86d8-44a5ce209f7c_1668x609.png 1272w, https://substackcdn.com/image/fetch/$s_!L05y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8912aa9a-688e-4cc3-86d8-44a5ce209f7c_1668x609.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;"><span>Before you begin, remember that you have an index with the newsletter content </span><strong>organized</strong><span> by clicking below.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QplJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d38c359-0500-434e-8e2f-c158c15d560e_1535x1024.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QplJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d38c359-0500-434e-8e2f-c158c15d560e_1535x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!QplJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d38c359-0500-434e-8e2f-c158c15d560e_1535x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!QplJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d38c359-0500-434e-8e2f-c158c15d560e_1535x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!QplJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d38c359-0500-434e-8e2f-c158c15d560e_1535x1024.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QplJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d38c359-0500-434e-8e2f-c158c15d560e_1535x1024.jpeg" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7d38c359-0500-434e-8e2f-c158c15d560e_1535x1024.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:205588,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/210069412?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d38c359-0500-434e-8e2f-c158c15d560e_1535x1024.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QplJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d38c359-0500-434e-8e2f-c158c15d560e_1535x1024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!QplJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d38c359-0500-434e-8e2f-c158c15d560e_1535x1024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!QplJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d38c359-0500-434e-8e2f-c158c15d560e_1535x1024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!QplJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d38c359-0500-434e-8e2f-c158c15d560e_1535x1024.jpeg 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;text&quot;:&quot;INDEX&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantbeckman.com/p/welcome"><span>INDEX</span></a></p><div><hr></div><h4>What changed this month</h4><p>I have decided to introduce a variation in the MarketOps section. From now on, I will share two of my portfolios with you. </p><p>One based on monthly rotation using momentum stocks, and another based on mean reversion, which I will share whenever stocks meet the governing criteria for entry.</p><p>Each update combines long-term performance context with the portfolios&#8217; current positioning, recent activity and next scheduled actions.</p><p>The mean-reversion model currently has four next-session signals in WDC, AMD, GOOGL and GOOG. Its report tracks active and expired signals, completed trades, entry levels, targets, exit deadlines and recent net results after transaction costs.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RKmi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ed44578-bb77-41f8-a262-d63cf7627d2e_1056x488.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RKmi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ed44578-bb77-41f8-a262-d63cf7627d2e_1056x488.png 424w, https://substackcdn.com/image/fetch/$s_!RKmi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ed44578-bb77-41f8-a262-d63cf7627d2e_1056x488.png 848w, https://substackcdn.com/image/fetch/$s_!RKmi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ed44578-bb77-41f8-a262-d63cf7627d2e_1056x488.png 1272w, https://substackcdn.com/image/fetch/$s_!RKmi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ed44578-bb77-41f8-a262-d63cf7627d2e_1056x488.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RKmi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ed44578-bb77-41f8-a262-d63cf7627d2e_1056x488.png" width="1056" height="488" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3ed44578-bb77-41f8-a262-d63cf7627d2e_1056x488.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:488,&quot;width&quot;:1056,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:57473,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/210069412?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ed44578-bb77-41f8-a262-d63cf7627d2e_1056x488.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RKmi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ed44578-bb77-41f8-a262-d63cf7627d2e_1056x488.png 424w, https://substackcdn.com/image/fetch/$s_!RKmi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ed44578-bb77-41f8-a262-d63cf7627d2e_1056x488.png 848w, https://substackcdn.com/image/fetch/$s_!RKmi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ed44578-bb77-41f8-a262-d63cf7627d2e_1056x488.png 1272w, https://substackcdn.com/image/fetch/$s_!RKmi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ed44578-bb77-41f8-a262-d63cf7627d2e_1056x488.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>At the latest market close, the momentum portfolio remains in a risk-on regime and holds five positions: AMAT, LITE, MU, TER and WDC. The report also shows the portfolio&#8217;s current volatility allocation, position weights, recent transactions and the schedule for the next monthly review.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Rwb4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5bc50c-ba2c-410a-b065-872bb5967dff_1051x486.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Rwb4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5bc50c-ba2c-410a-b065-872bb5967dff_1051x486.png 424w, https://substackcdn.com/image/fetch/$s_!Rwb4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5bc50c-ba2c-410a-b065-872bb5967dff_1051x486.png 848w, https://substackcdn.com/image/fetch/$s_!Rwb4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5bc50c-ba2c-410a-b065-872bb5967dff_1051x486.png 1272w, https://substackcdn.com/image/fetch/$s_!Rwb4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5bc50c-ba2c-410a-b065-872bb5967dff_1051x486.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Rwb4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5bc50c-ba2c-410a-b065-872bb5967dff_1051x486.png" width="1051" height="486" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b5bc50c-ba2c-410a-b065-872bb5967dff_1051x486.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:486,&quot;width&quot;:1051,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:80417,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/210069412?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5bc50c-ba2c-410a-b065-872bb5967dff_1051x486.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Rwb4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5bc50c-ba2c-410a-b065-872bb5967dff_1051x486.png 424w, https://substackcdn.com/image/fetch/$s_!Rwb4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5bc50c-ba2c-410a-b065-872bb5967dff_1051x486.png 848w, https://substackcdn.com/image/fetch/$s_!Rwb4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5bc50c-ba2c-410a-b065-872bb5967dff_1051x486.png 1272w, https://substackcdn.com/image/fetch/$s_!Rwb4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b5bc50c-ba2c-410a-b065-872bb5967dff_1051x486.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Together, the two reports provide a complete view of how the portfolios are behaving across different market conditions. Momentum seeks to remain exposed to persistent relative strength, while mean reversion looks for shorter-term dislocations within a filtered Nasdaq universe.</p><h4>Reports</h4>
      <p>
          <a href="https://www.quantbeckman.com/p/portfolio-quant-portfolio-manager">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[INTEL REPORT] The price of escalation ]]></title><description><![CDATA[Iran, energy routes and the financial consequences of a widening regional war]]></description><link>https://www.quantbeckman.com/p/intel-report-the-price-of-escalation</link><guid isPermaLink="false">https://www.quantbeckman.com/p/intel-report-the-price-of-escalation</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Fri, 31 Jul 2026 11:55:32 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/2ad6dcf1-e61b-40d5-a646-6412a430ec7b_582x451.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Tj7H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae595069-8a48-4ec4-a6cd-e11a25540f73_1157x792.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Tj7H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae595069-8a48-4ec4-a6cd-e11a25540f73_1157x792.png 424w, https://substackcdn.com/image/fetch/$s_!Tj7H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae595069-8a48-4ec4-a6cd-e11a25540f73_1157x792.png 848w, https://substackcdn.com/image/fetch/$s_!Tj7H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae595069-8a48-4ec4-a6cd-e11a25540f73_1157x792.png 1272w, https://substackcdn.com/image/fetch/$s_!Tj7H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae595069-8a48-4ec4-a6cd-e11a25540f73_1157x792.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Tj7H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae595069-8a48-4ec4-a6cd-e11a25540f73_1157x792.png" width="1157" height="792" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ae595069-8a48-4ec4-a6cd-e11a25540f73_1157x792.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:792,&quot;width&quot;:1157,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Tj7H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae595069-8a48-4ec4-a6cd-e11a25540f73_1157x792.png 424w, https://substackcdn.com/image/fetch/$s_!Tj7H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae595069-8a48-4ec4-a6cd-e11a25540f73_1157x792.png 848w, https://substackcdn.com/image/fetch/$s_!Tj7H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae595069-8a48-4ec4-a6cd-e11a25540f73_1157x792.png 1272w, https://substackcdn.com/image/fetch/$s_!Tj7H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae595069-8a48-4ec4-a6cd-e11a25540f73_1157x792.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Table of contents:</strong></p><ol><li><p>Introduction.</p></li><li><p>US&#8211;Iran escalation.</p></li><li><p>Shipping routes, and the global supply.</p></li><li><p>Regional alliances and proxy networks.</p></li><li><p>United States, China, Russia, and the Dollar system.</p></li><li><p>Macro-financial transmission across asset classes.</p></li></ol>
      <p>
          <a href="https://www.quantbeckman.com/p/intel-report-the-price-of-escalation">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[QUANT LECTURE] Moving from question to hypothesis]]></title><description><![CDATA[Hypothesis-Driven Trading Research]]></description><link>https://www.quantbeckman.com/p/quant-lecture-moving-from-question</link><guid isPermaLink="false">https://www.quantbeckman.com/p/quant-lecture-moving-from-question</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Fri, 24 Jul 2026 14:05:47 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/c4160b3d-981f-4b20-bb9e-98827962584e_1544x1032.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VXp6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d2e0e7f-cf2c-4306-9f29-f0c90a54b040_1586x992.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VXp6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d2e0e7f-cf2c-4306-9f29-f0c90a54b040_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!VXp6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d2e0e7f-cf2c-4306-9f29-f0c90a54b040_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!VXp6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d2e0e7f-cf2c-4306-9f29-f0c90a54b040_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!VXp6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d2e0e7f-cf2c-4306-9f29-f0c90a54b040_1586x992.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VXp6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d2e0e7f-cf2c-4306-9f29-f0c90a54b040_1586x992.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3d2e0e7f-cf2c-4306-9f29-f0c90a54b040_1586x992.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1031922,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/208331236?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d2e0e7f-cf2c-4306-9f29-f0c90a54b040_1586x992.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VXp6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d2e0e7f-cf2c-4306-9f29-f0c90a54b040_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!VXp6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d2e0e7f-cf2c-4306-9f29-f0c90a54b040_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!VXp6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d2e0e7f-cf2c-4306-9f29-f0c90a54b040_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!VXp6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d2e0e7f-cf2c-4306-9f29-f0c90a54b040_1586x992.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!caoU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4356ddd2-7f0f-42fc-9460-1405f0c0aad3_805x740.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!caoU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4356ddd2-7f0f-42fc-9460-1405f0c0aad3_805x740.png 424w, https://substackcdn.com/image/fetch/$s_!caoU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4356ddd2-7f0f-42fc-9460-1405f0c0aad3_805x740.png 848w, https://substackcdn.com/image/fetch/$s_!caoU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4356ddd2-7f0f-42fc-9460-1405f0c0aad3_805x740.png 1272w, https://substackcdn.com/image/fetch/$s_!caoU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4356ddd2-7f0f-42fc-9460-1405f0c0aad3_805x740.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!caoU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4356ddd2-7f0f-42fc-9460-1405f0c0aad3_805x740.png" width="805" height="740" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4356ddd2-7f0f-42fc-9460-1405f0c0aad3_805x740.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:740,&quot;width&quot;:805,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:156102,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/208331236?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4356ddd2-7f0f-42fc-9460-1405f0c0aad3_805x740.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!caoU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4356ddd2-7f0f-42fc-9460-1405f0c0aad3_805x740.png 424w, https://substackcdn.com/image/fetch/$s_!caoU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4356ddd2-7f0f-42fc-9460-1405f0c0aad3_805x740.png 848w, https://substackcdn.com/image/fetch/$s_!caoU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4356ddd2-7f0f-42fc-9460-1405f0c0aad3_805x740.png 1272w, https://substackcdn.com/image/fetch/$s_!caoU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4356ddd2-7f0f-42fc-9460-1405f0c0aad3_805x740.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;"><span>Before you begin, remember that you have an index with the newsletter content </span><strong>organized</strong><span> by clicking below.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YcS-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ebad37a-e77d-4ea1-9a25-f5592c137e9e_1535x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YcS-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ebad37a-e77d-4ea1-9a25-f5592c137e9e_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!YcS-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ebad37a-e77d-4ea1-9a25-f5592c137e9e_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!YcS-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ebad37a-e77d-4ea1-9a25-f5592c137e9e_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!YcS-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ebad37a-e77d-4ea1-9a25-f5592c137e9e_1535x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YcS-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ebad37a-e77d-4ea1-9a25-f5592c137e9e_1535x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6ebad37a-e77d-4ea1-9a25-f5592c137e9e_1535x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1443299,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/208331236?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ebad37a-e77d-4ea1-9a25-f5592c137e9e_1535x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YcS-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ebad37a-e77d-4ea1-9a25-f5592c137e9e_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!YcS-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ebad37a-e77d-4ea1-9a25-f5592c137e9e_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!YcS-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ebad37a-e77d-4ea1-9a25-f5592c137e9e_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!YcS-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ebad37a-e77d-4ea1-9a25-f5592c137e9e_1535x1024.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;text&quot;:&quot;INDEX&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantbeckman.com/p/welcome"><span>INDEX</span></a></p><div><hr></div><h4>From research question to testable hypothesis</h4><p>Quantitative trading research begins with market intuition, but it becomes empirically useful only when the researcher defines the instruments, market state, activation trigger, response window, expected price path, and causal mechanism. Strong hypothesis fixes these elements before testing, separates the source of the edge from its execution, and establishes the conditions under which the claim remains valid or expires.</p><p><strong>What&#8217;s inside:</strong></p><ol><li><p><strong>Narrowing the phenomenon:</strong> The researcher reduces a broad market observation to a specific inefficiency by defining the relevant instruments, environmental state, and natural time horizon.</p></li><li><p><strong>Selecting instruments, states, and horizons:</strong> Assets should be close to the source of the market force, conditions should support the proposed mechanism, and the holding period should match the speed at which the effect unfolds.</p></li><li><p><strong>Defining the expected effect:</strong> The hypothesis specifies the direction, shape, magnitude, duration, and decay of the anticipated response, including mean reversion, continuation, spread compression, or ranking changes.</p></li><li><p><strong>Connecting price action to economic meaning:</strong> Expected returns require a causal explanation based on information diffusion, liquidity recovery, forced order flow, institutional execution, funding constraints, or another identifiable market process.</p></li><li><p><strong>Defining the trade lifecycle:</strong> Entry conditions activate the claim, maintenance conditions verify that its mechanism remains present, and breakdown conditions identify when the original hypothesis has expired.</p></li><li><p><strong>Separating observation from explanation:</strong> Similar chart patterns can emerge from different forces. Research must look beyond visual geometry to identify participants, incentives, liquidity constraints, venues, and transmission channels.</p></li><li><p><strong>Separating idea, hypothesis, and execution:</strong> A trading idea provides intuition, the research hypothesis identifies the source of predictive value, and the execution method determines how to capture it. Each portfolio component must possess its own causal foundation.</p></li></ol><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!Ngmp!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ad61772-2e5f-49a9-a836-845293b9a42d_1544x1032.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Sample</div><div class="file-embed-details-h2">1.92MB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/2bd23266-c6ca-4767-bc2e-7c3a11c4c15c.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/2bd23266-c6ca-4767-bc2e-7c3a11c4c15c.pdf"><span class="file-embed-button-text">Download</span></a></div></div>
      <p>
          <a href="https://www.quantbeckman.com/p/quant-lecture-moving-from-question">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[WITH CODE] Feature selection: Wrapper-based feature selection methods ]]></title><description><![CDATA[Model-dependent approaches]]></description><link>https://www.quantbeckman.com/p/with-code-feature-selection-wrapper</link><guid isPermaLink="false">https://www.quantbeckman.com/p/with-code-feature-selection-wrapper</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Sun, 12 Jul 2026 13:11:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!AJt2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cedd76e-1949-481c-a904-be1a249336c5_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uWS0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uWS0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uWS0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1039286,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/205475473?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uWS0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zI5r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a87ea-12e9-4c05-983d-80523e9bcb05_1068x922.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zI5r!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a87ea-12e9-4c05-983d-80523e9bcb05_1068x922.png 424w, https://substackcdn.com/image/fetch/$s_!zI5r!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a87ea-12e9-4c05-983d-80523e9bcb05_1068x922.png 848w, https://substackcdn.com/image/fetch/$s_!zI5r!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a87ea-12e9-4c05-983d-80523e9bcb05_1068x922.png 1272w, https://substackcdn.com/image/fetch/$s_!zI5r!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a87ea-12e9-4c05-983d-80523e9bcb05_1068x922.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zI5r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a87ea-12e9-4c05-983d-80523e9bcb05_1068x922.png" width="1068" height="922" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/413a87ea-12e9-4c05-983d-80523e9bcb05_1068x922.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:922,&quot;width&quot;:1068,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:85050,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/205475473?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a87ea-12e9-4c05-983d-80523e9bcb05_1068x922.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zI5r!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a87ea-12e9-4c05-983d-80523e9bcb05_1068x922.png 424w, https://substackcdn.com/image/fetch/$s_!zI5r!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a87ea-12e9-4c05-983d-80523e9bcb05_1068x922.png 848w, https://substackcdn.com/image/fetch/$s_!zI5r!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a87ea-12e9-4c05-983d-80523e9bcb05_1068x922.png 1272w, https://substackcdn.com/image/fetch/$s_!zI5r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F413a87ea-12e9-4c05-983d-80523e9bcb05_1068x922.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;"><span>Before you begin, remember that you have an index with the newsletter content </span><strong>organized</strong><span> by clicking below.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CZIx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CZIx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CZIx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1151002,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/205475473?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CZIx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;text&quot;:&quot;INDEX&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantbeckman.com/p/welcome"><span>INDEX</span></a></p><div><hr></div><h3><strong>From candidate features to validated trading models</strong></h3><p><span>Wrapper-based feature selection evaluates predictive inputs through the exact model and validation framework intended for live deployment. Unlike statistical filters that judge variables in isolation, wrappers score candidate subsets by repeatedly training the target algorithm under purged cross-validation. This structure ties feature value directly to net economic performance, accounting for turnover, execution fees, and collinearity risks.</span></p><p><strong>What&#8217;s inside:</strong></p><ol><li><p><strong><span>Defining the wrapper paradigm:</span></strong><span> The framework wraps a search algorithm around a target model, scoring subsets on out-of-sample performance to capture joint feature interactions that univariate statistical filters miss.</span></p></li><li><p><strong><span>Accounting for market frictions:</span></strong><span> Objective functions must penalize execution friction, turnover, and subset dimension, ensuring statistical predictive power translates into net strategy returns.</span></p></li><li><p><strong><span>Sequential Forward Selection:</span></strong><span> Building compact feature sets from zero limits latency and operational pipeline fragility, though greedy forward steps risk missing variables that only add value in specific pairs.</span></p></li><li><p><strong><span>Sequential Backward Selection:</span></strong><span> Starting with the complete feature matrix preserves joint interaction structures, but early pruning steps require regularization to manage matrix instability from collinear market inputs.</span></p></li><li><p><strong><span>Exhaustive Feature Selection:</span></strong><span> Evaluating all possible subsets guarantees locating the global in-sample optimum, but exponential search spaces create massive computational costs and high selection bias under noise.</span></p></li><li><p><strong><span>Sequential Floating Selection:</span></strong><span> Integrating conditional backward passes into forward search paths dynamically purges early variable additions that become redundant as complementary features enter the model.</span></p></li><li><p><strong><span>Recursive Feature Elimination:</span></strong><span> Pruning variables based on standardized coefficients or block-permutation scores directly leverages internal model weights, requiring grouped evaluations when features share underlying market drivers.</span></p></li></ol><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!feYe!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1ca8216-b4cd-4c8a-9903-824b5a0b6b03_1789x1280.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Sample</div><div class="file-embed-details-h2">575KB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/552c9623-2034-4742-8d88-eaae2f8b0f3a.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/552c9623-2034-4742-8d88-eaae2f8b0f3a.pdf"><span class="file-embed-button-text">Download</span></a></div></div>
      <p>
          <a href="https://www.quantbeckman.com/p/with-code-feature-selection-wrapper">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[QUANT LECTURE] From market observation to research question ]]></title><description><![CDATA[Hypothesis-Driven Trading Research]]></description><link>https://www.quantbeckman.com/p/quant-lecture-from-market-observation</link><guid isPermaLink="false">https://www.quantbeckman.com/p/quant-lecture-from-market-observation</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Sat, 27 Jun 2026 12:45:02 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/2e8cdbda-b052-441c-a9d6-b0a0dc39105c_1544x1032.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fpfQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F889ba0a4-cc1f-4a73-a1d9-888ecba535e6_1586x992.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fpfQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F889ba0a4-cc1f-4a73-a1d9-888ecba535e6_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!fpfQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F889ba0a4-cc1f-4a73-a1d9-888ecba535e6_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!fpfQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F889ba0a4-cc1f-4a73-a1d9-888ecba535e6_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!fpfQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F889ba0a4-cc1f-4a73-a1d9-888ecba535e6_1586x992.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fpfQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F889ba0a4-cc1f-4a73-a1d9-888ecba535e6_1586x992.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/889ba0a4-cc1f-4a73-a1d9-888ecba535e6_1586x992.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1031922,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/203828904?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F889ba0a4-cc1f-4a73-a1d9-888ecba535e6_1586x992.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fpfQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F889ba0a4-cc1f-4a73-a1d9-888ecba535e6_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!fpfQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F889ba0a4-cc1f-4a73-a1d9-888ecba535e6_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!fpfQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F889ba0a4-cc1f-4a73-a1d9-888ecba535e6_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!fpfQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F889ba0a4-cc1f-4a73-a1d9-888ecba535e6_1586x992.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!l-D4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0881be-6bcc-4443-9d24-754a53f2ddad_842x785.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!l-D4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0881be-6bcc-4443-9d24-754a53f2ddad_842x785.png 424w, https://substackcdn.com/image/fetch/$s_!l-D4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0881be-6bcc-4443-9d24-754a53f2ddad_842x785.png 848w, https://substackcdn.com/image/fetch/$s_!l-D4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0881be-6bcc-4443-9d24-754a53f2ddad_842x785.png 1272w, https://substackcdn.com/image/fetch/$s_!l-D4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0881be-6bcc-4443-9d24-754a53f2ddad_842x785.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!l-D4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0881be-6bcc-4443-9d24-754a53f2ddad_842x785.png" width="842" height="785" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0b0881be-6bcc-4443-9d24-754a53f2ddad_842x785.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:785,&quot;width&quot;:842,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:163271,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/203828904?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0881be-6bcc-4443-9d24-754a53f2ddad_842x785.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!l-D4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0881be-6bcc-4443-9d24-754a53f2ddad_842x785.png 424w, https://substackcdn.com/image/fetch/$s_!l-D4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0881be-6bcc-4443-9d24-754a53f2ddad_842x785.png 848w, https://substackcdn.com/image/fetch/$s_!l-D4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0881be-6bcc-4443-9d24-754a53f2ddad_842x785.png 1272w, https://substackcdn.com/image/fetch/$s_!l-D4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b0881be-6bcc-4443-9d24-754a53f2ddad_842x785.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized</strong> by clicking below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A3dw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b7a5d6-a45a-43e1-875a-2345614b80cc_1535x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A3dw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b7a5d6-a45a-43e1-875a-2345614b80cc_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!A3dw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b7a5d6-a45a-43e1-875a-2345614b80cc_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!A3dw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b7a5d6-a45a-43e1-875a-2345614b80cc_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!A3dw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b7a5d6-a45a-43e1-875a-2345614b80cc_1535x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!A3dw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b7a5d6-a45a-43e1-875a-2345614b80cc_1535x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/62b7a5d6-a45a-43e1-875a-2345614b80cc_1535x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1443299,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/203828904?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b7a5d6-a45a-43e1-875a-2345614b80cc_1535x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!A3dw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b7a5d6-a45a-43e1-875a-2345614b80cc_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!A3dw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b7a5d6-a45a-43e1-875a-2345614b80cc_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!A3dw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b7a5d6-a45a-43e1-875a-2345614b80cc_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!A3dw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62b7a5d6-a45a-43e1-875a-2345614b80cc_1535x1024.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;text&quot;:&quot;INDEX&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantbeckman.com/p/welcome"><span>INDEX</span></a></p><div><hr></div><h4>From market observation to research question</h4><p>The process begins with visible market behavior, but it becomes useful only when the researcher defines the phenomenon, classifies the market setting, identifies the mechanism, specifies the scope, and formulates a testable claim. Strong research moves from intuition toward measurable, comparable, and falsifiable market processes.</p><p><strong>What&#8217;s inside:</strong></p><ol><li><p><strong>Market observation.</strong> Trading ideas begin with repeated contact between price, volume, liquidity, time, events, and relative asset behavior.</p></li><li><p><strong>Phenomenon classification.</strong> The researcher separates observations into single-instrument responses, delayed adjustments, event-driven reactions, and cross-sectional or relative-value behavior.</p></li><li><p><strong>Reversal and continuation patterns.</strong> Price responses are studied through their lifecycle: initial pressure, dislocation, liquidity return, continuation path, or movement back toward balance.</p></li><li><p><strong>Delayed adjustment.</strong> Some opportunities arise when one instrument reacts first and another follows later because of market clocks, venues, liquidity pools, or transmission delays.</p></li><li><p><strong>Event-driven research.</strong> Earnings, macro releases, order-flow shocks, scheduled events, and surprise events create clean windows for studying price discovery, liquidity withdrawal, drift, dispersion, and repricing.</p></li><li><p><strong>Cross-sectional and relative-value behavior.</strong> We study how dispersion, peer-group misalignment, and linked-instrument spreads reveal hidden capital migration and market friction beneath index-level returns.</p></li><li><p><strong>Research question formation.</strong> A raw idea becomes research-ready when it defines the trigger, asset universe, market state, response window, expected path, and comparison benchmark.</p></li><li><p><strong>Existence, conditional, and mechanism questions.</strong> Research asks whether the effect appears, when it strengthens or weakens, and why it exists through identifiable forces, transmission channels, and sustaining agents. </p></li></ol><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!QMHI!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c38a7e9-362e-49dc-99da-b7e0368a35df_1821x1410.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Sample</div><div class="file-embed-details-h2">1.9MB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/55f81c8e-ffb5-4e26-890b-b06d8af4c580.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/55f81c8e-ffb5-4e26-890b-b06d8af4c580.pdf"><span class="file-embed-button-text">Download</span></a></div></div>
      <p>
          <a href="https://www.quantbeckman.com/p/quant-lecture-from-market-observation">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[WITH CODE] Feature selection: Filter-based methods ]]></title><description><![CDATA[Supervised approches]]></description><link>https://www.quantbeckman.com/p/with-code-feature-selection-filter</link><guid isPermaLink="false">https://www.quantbeckman.com/p/with-code-feature-selection-filter</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Tue, 16 Jun 2026 12:53:04 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!AJt2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cedd76e-1949-481c-a904-be1a249336c5_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!c5Nu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2decaa86-b219-4d27-b13f-2583ed9dd00e_1586x992.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!c5Nu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2decaa86-b219-4d27-b13f-2583ed9dd00e_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!c5Nu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2decaa86-b219-4d27-b13f-2583ed9dd00e_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!c5Nu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2decaa86-b219-4d27-b13f-2583ed9dd00e_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!c5Nu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2decaa86-b219-4d27-b13f-2583ed9dd00e_1586x992.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!c5Nu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2decaa86-b219-4d27-b13f-2583ed9dd00e_1586x992.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2decaa86-b219-4d27-b13f-2583ed9dd00e_1586x992.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1039286,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/201584274?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2decaa86-b219-4d27-b13f-2583ed9dd00e_1586x992.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!c5Nu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2decaa86-b219-4d27-b13f-2583ed9dd00e_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!c5Nu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2decaa86-b219-4d27-b13f-2583ed9dd00e_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!c5Nu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2decaa86-b219-4d27-b13f-2583ed9dd00e_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!c5Nu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2decaa86-b219-4d27-b13f-2583ed9dd00e_1586x992.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GuOQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F257d7f4d-fb4f-4ce6-96b0-59ed30aaef5f_1032x1080.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GuOQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F257d7f4d-fb4f-4ce6-96b0-59ed30aaef5f_1032x1080.png 424w, https://substackcdn.com/image/fetch/$s_!GuOQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F257d7f4d-fb4f-4ce6-96b0-59ed30aaef5f_1032x1080.png 848w, https://substackcdn.com/image/fetch/$s_!GuOQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F257d7f4d-fb4f-4ce6-96b0-59ed30aaef5f_1032x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!GuOQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F257d7f4d-fb4f-4ce6-96b0-59ed30aaef5f_1032x1080.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GuOQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F257d7f4d-fb4f-4ce6-96b0-59ed30aaef5f_1032x1080.png" width="1032" height="1080" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/257d7f4d-fb4f-4ce6-96b0-59ed30aaef5f_1032x1080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1080,&quot;width&quot;:1032,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:97084,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/201584274?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F257d7f4d-fb4f-4ce6-96b0-59ed30aaef5f_1032x1080.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GuOQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F257d7f4d-fb4f-4ce6-96b0-59ed30aaef5f_1032x1080.png 424w, https://substackcdn.com/image/fetch/$s_!GuOQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F257d7f4d-fb4f-4ce6-96b0-59ed30aaef5f_1032x1080.png 848w, https://substackcdn.com/image/fetch/$s_!GuOQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F257d7f4d-fb4f-4ce6-96b0-59ed30aaef5f_1032x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!GuOQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F257d7f4d-fb4f-4ce6-96b0-59ed30aaef5f_1032x1080.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized</strong> by clicking below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1vhK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffce7fdf2-b963-47d8-b6c6-d61b2b3537c8_1535x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1vhK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffce7fdf2-b963-47d8-b6c6-d61b2b3537c8_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!1vhK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffce7fdf2-b963-47d8-b6c6-d61b2b3537c8_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!1vhK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffce7fdf2-b963-47d8-b6c6-d61b2b3537c8_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!1vhK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffce7fdf2-b963-47d8-b6c6-d61b2b3537c8_1535x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1vhK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffce7fdf2-b963-47d8-b6c6-d61b2b3537c8_1535x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fce7fdf2-b963-47d8-b6c6-d61b2b3537c8_1535x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1151002,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/201584274?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffce7fdf2-b963-47d8-b6c6-d61b2b3537c8_1535x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1vhK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffce7fdf2-b963-47d8-b6c6-d61b2b3537c8_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!1vhK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffce7fdf2-b963-47d8-b6c6-d61b2b3537c8_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!1vhK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffce7fdf2-b963-47d8-b6c6-d61b2b3537c8_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!1vhK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffce7fdf2-b963-47d8-b6c6-d61b2b3537c8_1535x1024.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;text&quot;:&quot;INDEX&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantbeckman.com/p/welcome"><span>INDEX</span></a></p><div><hr></div><h3><strong>From raw market data to scalable statistical filters</strong></h3><p><span>Filter-based feature selection evaluates the intrinsic statistical properties of candidate variables independent of downstream model training. By screening out noisy inputs before fitting complex algorithms, statistical filters reduce dimensional overreach, limit execution friction, and protect systematic strategies from temporal leakage.</span></p><p><strong>What&#8217;s inside:</strong></p><ol><li><p><strong><span>Defining the filter paradigm:</span></strong><span> Filters evaluate features through direct statistical tests against target labels outside the model training loop, providing a fast screening layer against high-dimensional noise.</span></p></li><li><p><strong><span>Controlling selection risks:</span></strong><span> Ranking variables on statistical scores can mislead researchers if a feature increases turnover, inflates execution costs, or relies on unavailable forward bar data.</span></p></li><li><p><strong><span>Measuring Information Gain:</span></strong><span> Discretizing continuous metrics into quantile bins isolates entropy reduction, revealing non-linear regime thresholds that standard linear filters overlook.</span></p></li><li><p><strong><span>Class separation with Fisher Score and ANOVA:</span></strong><span> Comparing between-class variance against within-class dispersion highlights features with distinct conditional distributions, while Welch&#8217;s ANOVA corrects for fat tails and non-constant variance.</span></p></li><li><p><strong><span>Capturing non-linear signals through Mutual Information:</span></strong><span> Applying continuous nearest-neighbor estimators detects non-linear dependencies, preserving valuable predictive signals such as U-shaped volume reversals.</span></p></li><li><p><strong><span>Uncovering joint dependencies with ReliefF:</span></strong><span> Evaluating instances against their nearest hits and misses in multi-dimensional space isolates localized feature interactions without training a full model.</span></p></li><li><p><strong><span>Preventing collinearity with mRMR:</span></strong><span> Optimizing target relevance against pairwise mutual information keeps feature sets diverse and stops models from clustering around identical risk drivers.</span></p></li></ol><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!mDzE!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2eb7261-b3ad-4995-a80d-e8f3c007a598_985x796.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Sample</div><div class="file-embed-details-h2">386KB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/31ec27a5-66a7-45ed-aacd-2b6527dcf479.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/31ec27a5-66a7-45ed-aacd-2b6527dcf479.pdf"><span class="file-embed-button-text">Download</span></a></div></div>
      <p>
          <a href="https://www.quantbeckman.com/p/with-code-feature-selection-filter">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[QUANT LECTURE] Quality standards of a hypothesis ]]></title><description><![CDATA[Hypothesis-Driven Trading Research]]></description><link>https://www.quantbeckman.com/p/quant-lecture-quality-standards-of</link><guid isPermaLink="false">https://www.quantbeckman.com/p/quant-lecture-quality-standards-of</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Thu, 04 Jun 2026 11:38:38 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/b9368ad3-e02a-4270-8bdf-2366f0bc6a06_1544x1032.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JTTs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f506db5-d7fa-4c3b-a203-779718df7a95_1456x911.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JTTs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f506db5-d7fa-4c3b-a203-779718df7a95_1456x911.png 424w, https://substackcdn.com/image/fetch/$s_!JTTs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f506db5-d7fa-4c3b-a203-779718df7a95_1456x911.png 848w, https://substackcdn.com/image/fetch/$s_!JTTs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f506db5-d7fa-4c3b-a203-779718df7a95_1456x911.png 1272w, https://substackcdn.com/image/fetch/$s_!JTTs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f506db5-d7fa-4c3b-a203-779718df7a95_1456x911.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JTTs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f506db5-d7fa-4c3b-a203-779718df7a95_1456x911.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f506db5-d7fa-4c3b-a203-779718df7a95_1456x911.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:505755,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/200598983?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f506db5-d7fa-4c3b-a203-779718df7a95_1456x911.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JTTs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f506db5-d7fa-4c3b-a203-779718df7a95_1456x911.png 424w, https://substackcdn.com/image/fetch/$s_!JTTs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f506db5-d7fa-4c3b-a203-779718df7a95_1456x911.png 848w, https://substackcdn.com/image/fetch/$s_!JTTs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f506db5-d7fa-4c3b-a203-779718df7a95_1456x911.png 1272w, https://substackcdn.com/image/fetch/$s_!JTTs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f506db5-d7fa-4c3b-a203-779718df7a95_1456x911.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!meuG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91206b4e-33d7-4cc1-89ec-ecf5288ba250_1225x650.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!meuG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91206b4e-33d7-4cc1-89ec-ecf5288ba250_1225x650.png 424w, https://substackcdn.com/image/fetch/$s_!meuG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91206b4e-33d7-4cc1-89ec-ecf5288ba250_1225x650.png 848w, https://substackcdn.com/image/fetch/$s_!meuG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91206b4e-33d7-4cc1-89ec-ecf5288ba250_1225x650.png 1272w, https://substackcdn.com/image/fetch/$s_!meuG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91206b4e-33d7-4cc1-89ec-ecf5288ba250_1225x650.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!meuG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91206b4e-33d7-4cc1-89ec-ecf5288ba250_1225x650.png" width="1225" height="650" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/91206b4e-33d7-4cc1-89ec-ecf5288ba250_1225x650.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:650,&quot;width&quot;:1225,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:126185,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/200598983?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91206b4e-33d7-4cc1-89ec-ecf5288ba250_1225x650.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!meuG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91206b4e-33d7-4cc1-89ec-ecf5288ba250_1225x650.png 424w, https://substackcdn.com/image/fetch/$s_!meuG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91206b4e-33d7-4cc1-89ec-ecf5288ba250_1225x650.png 848w, https://substackcdn.com/image/fetch/$s_!meuG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91206b4e-33d7-4cc1-89ec-ecf5288ba250_1225x650.png 1272w, https://substackcdn.com/image/fetch/$s_!meuG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F91206b4e-33d7-4cc1-89ec-ecf5288ba250_1225x650.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized</strong> by clicking on the image below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_b9z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ea2cf4-18a0-4ec4-8d55-bf4ac27f7407_1456x971.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_b9z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ea2cf4-18a0-4ec4-8d55-bf4ac27f7407_1456x971.png 424w, https://substackcdn.com/image/fetch/$s_!_b9z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ea2cf4-18a0-4ec4-8d55-bf4ac27f7407_1456x971.png 848w, https://substackcdn.com/image/fetch/$s_!_b9z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ea2cf4-18a0-4ec4-8d55-bf4ac27f7407_1456x971.png 1272w, https://substackcdn.com/image/fetch/$s_!_b9z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ea2cf4-18a0-4ec4-8d55-bf4ac27f7407_1456x971.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_b9z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ea2cf4-18a0-4ec4-8d55-bf4ac27f7407_1456x971.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/60ea2cf4-18a0-4ec4-8d55-bf4ac27f7407_1456x971.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:677424,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/200598983?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ea2cf4-18a0-4ec4-8d55-bf4ac27f7407_1456x971.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_b9z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ea2cf4-18a0-4ec4-8d55-bf4ac27f7407_1456x971.png 424w, https://substackcdn.com/image/fetch/$s_!_b9z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ea2cf4-18a0-4ec4-8d55-bf4ac27f7407_1456x971.png 848w, https://substackcdn.com/image/fetch/$s_!_b9z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ea2cf4-18a0-4ec4-8d55-bf4ac27f7407_1456x971.png 1272w, https://substackcdn.com/image/fetch/$s_!_b9z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60ea2cf4-18a0-4ec4-8d55-bf4ac27f7407_1456x971.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;text&quot;:&quot;INDEX&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.quantbeckman.com/p/welcome"><span>INDEX</span></a></p><div><hr></div><h4>Quality standards of a strong trading hypothesis</h4><p>A strong trading hypothesis turns a market idea into an research object. It defines what is claimed, where the claim applies, how the effect appears in data, and how evidence improves the hypothesis over time. Precision, measurability, and falsifiability give the hypothesis structure and make the research process coherent, testable, and repeatable.</p><p><strong>What&#8217;s inside:</strong></p><ol><li><p><strong>Precision.</strong> A strong hypothesis defines the exact claim, the market setting, and the expected response.</p></li><li><p><strong>Precise wording.</strong> Clear wording transforms broad ideas such as pressure, stress, momentum, or dislocation into specific market processes.</p></li><li><p><strong>Precise scope.</strong> The hypothesis identifies the asset universe, market state, event type, time horizon, and environment where the effect belongs.</p></li><li><p><strong>Precise outcome definition.</strong> The research defines the empirical object used to judge the effect, such as return, spread compression, rank shift, abnormal movement, path behavior, or persistence.</p></li><li><p><strong>Measurability.</strong> The hypothesis enters the data through observable variables, classifiable states, and outcomes that can be scored consistently.</p></li><li><p><strong>Observable variables and classifiable states.</strong> Market concepts such as crowding, hidden demand, liquidity pressure, or absorption become defensible proxies and coherent state definitions.</p></li><li><p><strong>Falsifiability.</strong> The hypothesis exposes the claim to evidence by defining the conditions that weaken, contradict, or challenge the proposed mechanism.</p></li><li><p><strong>Revision after contradiction.</strong> Evidence improves the hypothesis by narrowing the trigger, refining the state filter, adjusting the horizon, improving the outcome, or replacing the mechanism when needed.   </p></li></ol><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!oUz2!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f88124d-aae4-4713-9262-f2a240f0d352_1225x650.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Sample</div><div class="file-embed-details-h2">1.92MB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/952fe6bb-7935-45d3-a390-28e0b68c40e5.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/952fe6bb-7935-45d3-a390-28e0b68c40e5.pdf"><span class="file-embed-button-text">Download</span></a></div></div>
      <p>
          <a href="https://www.quantbeckman.com/p/quant-lecture-quality-standards-of">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[WITH CODE] Infra: Free data from Tradingview ]]></title><description><![CDATA[Download all the data from TradingView&#8217;s servers for $0.]]></description><link>https://www.quantbeckman.com/p/with-code-infra-free-data-from-tradingview</link><guid isPermaLink="false">https://www.quantbeckman.com/p/with-code-infra-free-data-from-tradingview</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Mon, 25 May 2026 12:44:06 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!AJt2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cedd76e-1949-481c-a904-be1a249336c5_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uWS0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uWS0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uWS0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1039286,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/205475473?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!uWS0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rLmG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd324619-49e3-42e1-9a52-6686553e8c02_1031x1135.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rLmG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd324619-49e3-42e1-9a52-6686553e8c02_1031x1135.png 424w, https://substackcdn.com/image/fetch/$s_!rLmG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd324619-49e3-42e1-9a52-6686553e8c02_1031x1135.png 848w, https://substackcdn.com/image/fetch/$s_!rLmG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd324619-49e3-42e1-9a52-6686553e8c02_1031x1135.png 1272w, https://substackcdn.com/image/fetch/$s_!rLmG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd324619-49e3-42e1-9a52-6686553e8c02_1031x1135.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rLmG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd324619-49e3-42e1-9a52-6686553e8c02_1031x1135.png" width="1031" height="1135" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dd324619-49e3-42e1-9a52-6686553e8c02_1031x1135.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1135,&quot;width&quot;:1031,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:97228,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/198696914?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd324619-49e3-42e1-9a52-6686553e8c02_1031x1135.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rLmG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd324619-49e3-42e1-9a52-6686553e8c02_1031x1135.png 424w, https://substackcdn.com/image/fetch/$s_!rLmG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd324619-49e3-42e1-9a52-6686553e8c02_1031x1135.png 848w, https://substackcdn.com/image/fetch/$s_!rLmG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd324619-49e3-42e1-9a52-6686553e8c02_1031x1135.png 1272w, https://substackcdn.com/image/fetch/$s_!rLmG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd324619-49e3-42e1-9a52-6686553e8c02_1031x1135.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized</strong> by clicking below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CZIx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CZIx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CZIx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1151002,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/205475473?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!CZIx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;text&quot;:&quot;INDEX&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.quantbeckman.com/p/welcome"><span>INDEX</span></a></p><div><hr></div><h3><strong>From market endpoints to research-ready data</strong></h3><p><span>Quantitative trading strategies depend on the historical records that feed them. Acquiring free market data through custom web scrapers lowers upfront capital costs and expands research flexibility, but it introduces operational risks like protocol shifts, rate limits, and missing fields. Building a transparent pipeline around raw WebSocket connections ensures data transformations remain visible and verifiable before strategy testing begins.</span></p><p><strong>What&#8217;s inside:</strong></p><ol><li><p><strong><span>Data trade-offs:</span></strong><span> Free feeds provide rapid experimentation and broad market access, but lack the service-level guarantees, corporate-action histories, and delisting data typical of institutional vendors.</span></p></li><li><p><strong><span>Managing protocol fragility:</span></strong><span> Relying on unofficial endpoints exposes pipelines to breakage when vendors adjust message headers, change packet envelopes, or enforce stricter rate limits.</span></p></li><li><p><strong><span>Maintaining a tight dependency envelope:</span></strong><span> Constructing sockets and HTTP requests using standard library modules keeps data transformations visible and prevents third-party wrappers from hiding parsing errors.</span></p></li><li><p><strong><span>Handling raw WebSocket transport:</span></strong><span> Direct management of TCP connections, TLS handshakes, frame masking, and ping-pong liveness maintains link stability across large multi-symbol requests.</span></p></li><li><p><strong><span>Parsing TradingView message envelopes:</span></strong><span> Reading length-prefixed packet markers prevents buffer corruption, while explicit session and adjustment flags document whether prices reflect raw or split-adjusted trades.</span></p></li><li><p><strong><span>Enforcing structured schema validation:</span></strong><span> Formatting raw bars into typed NumPy arrays preserves missing volume as unallocated values rather than zero, protecting liquidity filters from distortion.</span></p></li><li><p><strong><span>Harvesting and de-duplicating universes:</span></strong><span> Paginating scanner endpoints allows researchers to build multi-asset ticker lists, though static current-day universes carry survivorship bias that requires explicit research controls.</span></p></li></ol><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!A0I7!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F777ba3be-e05f-437a-bbcd-d6be502b9aa2_985x796.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Sample</div><div class="file-embed-details-h2">429KB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/0004a6e1-5c1f-44d5-aae0-8cc80a555103.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/0004a6e1-5c1f-44d5-aae0-8cc80a555103.pdf"><span class="file-embed-button-text">Download</span></a></div></div>
      <p>
          <a href="https://www.quantbeckman.com/p/with-code-infra-free-data-from-tradingview">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[QUANT LECTURE] Internal anatomy of a good hypothesis ]]></title><description><![CDATA[Hypothesis-Driven Trading Research]]></description><link>https://www.quantbeckman.com/p/quant-lecture-internal-anatomy-of</link><guid isPermaLink="false">https://www.quantbeckman.com/p/quant-lecture-internal-anatomy-of</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Mon, 11 May 2026 13:45:02 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/4c837594-263d-47ed-815b-e66f3ccc3634_1544x1032.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eBOQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079aceb3-7fc4-4977-89a2-ea3e4b6385ac_1456x911.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eBOQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079aceb3-7fc4-4977-89a2-ea3e4b6385ac_1456x911.png 424w, https://substackcdn.com/image/fetch/$s_!eBOQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079aceb3-7fc4-4977-89a2-ea3e4b6385ac_1456x911.png 848w, https://substackcdn.com/image/fetch/$s_!eBOQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079aceb3-7fc4-4977-89a2-ea3e4b6385ac_1456x911.png 1272w, https://substackcdn.com/image/fetch/$s_!eBOQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079aceb3-7fc4-4977-89a2-ea3e4b6385ac_1456x911.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eBOQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079aceb3-7fc4-4977-89a2-ea3e4b6385ac_1456x911.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/079aceb3-7fc4-4977-89a2-ea3e4b6385ac_1456x911.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:505755,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/197212953?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079aceb3-7fc4-4977-89a2-ea3e4b6385ac_1456x911.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eBOQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079aceb3-7fc4-4977-89a2-ea3e4b6385ac_1456x911.png 424w, https://substackcdn.com/image/fetch/$s_!eBOQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079aceb3-7fc4-4977-89a2-ea3e4b6385ac_1456x911.png 848w, https://substackcdn.com/image/fetch/$s_!eBOQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079aceb3-7fc4-4977-89a2-ea3e4b6385ac_1456x911.png 1272w, https://substackcdn.com/image/fetch/$s_!eBOQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079aceb3-7fc4-4977-89a2-ea3e4b6385ac_1456x911.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!axw3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942eb09c-46de-4615-9359-51b7a368a4cc_1000x522.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!axw3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942eb09c-46de-4615-9359-51b7a368a4cc_1000x522.png 424w, https://substackcdn.com/image/fetch/$s_!axw3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942eb09c-46de-4615-9359-51b7a368a4cc_1000x522.png 848w, https://substackcdn.com/image/fetch/$s_!axw3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942eb09c-46de-4615-9359-51b7a368a4cc_1000x522.png 1272w, https://substackcdn.com/image/fetch/$s_!axw3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942eb09c-46de-4615-9359-51b7a368a4cc_1000x522.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!axw3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942eb09c-46de-4615-9359-51b7a368a4cc_1000x522.png" width="1000" height="522" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/942eb09c-46de-4615-9359-51b7a368a4cc_1000x522.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:522,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:93211,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/197212953?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942eb09c-46de-4615-9359-51b7a368a4cc_1000x522.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!axw3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942eb09c-46de-4615-9359-51b7a368a4cc_1000x522.png 424w, https://substackcdn.com/image/fetch/$s_!axw3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942eb09c-46de-4615-9359-51b7a368a4cc_1000x522.png 848w, https://substackcdn.com/image/fetch/$s_!axw3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942eb09c-46de-4615-9359-51b7a368a4cc_1000x522.png 1272w, https://substackcdn.com/image/fetch/$s_!axw3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F942eb09c-46de-4615-9359-51b7a368a4cc_1000x522.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized</strong> by clicking on the image below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0Ccy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b043af-3551-4e3b-953b-7b8f6135fb5e_1456x971.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0Ccy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b043af-3551-4e3b-953b-7b8f6135fb5e_1456x971.png 424w, https://substackcdn.com/image/fetch/$s_!0Ccy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b043af-3551-4e3b-953b-7b8f6135fb5e_1456x971.png 848w, https://substackcdn.com/image/fetch/$s_!0Ccy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b043af-3551-4e3b-953b-7b8f6135fb5e_1456x971.png 1272w, https://substackcdn.com/image/fetch/$s_!0Ccy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b043af-3551-4e3b-953b-7b8f6135fb5e_1456x971.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0Ccy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b043af-3551-4e3b-953b-7b8f6135fb5e_1456x971.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/96b043af-3551-4e3b-953b-7b8f6135fb5e_1456x971.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:677424,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/197212953?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b043af-3551-4e3b-953b-7b8f6135fb5e_1456x971.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0Ccy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b043af-3551-4e3b-953b-7b8f6135fb5e_1456x971.png 424w, https://substackcdn.com/image/fetch/$s_!0Ccy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b043af-3551-4e3b-953b-7b8f6135fb5e_1456x971.png 848w, https://substackcdn.com/image/fetch/$s_!0Ccy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b043af-3551-4e3b-953b-7b8f6135fb5e_1456x971.png 1272w, https://substackcdn.com/image/fetch/$s_!0Ccy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b043af-3551-4e3b-953b-7b8f6135fb5e_1456x971.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;text&quot;:&quot;INDEX&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.quantbeckman.com/p/welcome"><span>INDEX</span></a></p><div><hr></div><h4>Internal anatomy of a good hypothesis</h4><p>A genuine hypothesis has an internal structure. It defines when the claim begins, what market response should appear, and why that response should emerge. Its value comes from connecting activation, response, mechanism, and evidence into one coherent research object that can be tested, challenged, refined, and extended.</p><p><strong>What&#8217;s inside:</strong></p><ol><li><p><strong>Internal anatomy of a good hypothesis.</strong> The lecture presents a hypothesis as an organized structure whose parts must fit together.</p></li><li><p><strong>The condition that activates the claim.</strong> A hypothesis begins by identifying the market state in which the effect should appear. </p></li><li><p><strong>Trigger variable.</strong> The trigger translates pressure, dislocation, surprise, imbalance, or regime transition into a variable that can select relevant episodes.</p></li><li><p><strong>State filter.</strong> The state filter places the trigger inside the right market environment. </p></li><li><p><strong>Eligibility rule.</strong> The eligibility rule protects the empirical sample and decides which observations belong to the same research object by controlling for trading session, liquidity, data quality, structural breaks, and special distortions.</p></li><li><p><strong>The response that defines the effect.</strong> A hypothesis must specify what should happen after activation. </p></li><li><p><strong>Sign, magnitude, and timing.</strong> Sign defines direction, such as continuation, reversal, convergence, or divergence. Magnitude defines economic substance after costs and frictions. Timing defines the internal path of adjustment after the trigger appears.</p></li><li><p><strong>The mechanism that explains the effect.</strong> The final part explains why the trigger should lead to the response.  </p></li></ol><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!64Uw!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b6f7e78-d510-4b9b-9f2f-627f20e4147e_1000x522.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Sample</div><div class="file-embed-details-h2">1.96MB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/9396c79f-d439-42cf-86fd-52849521ba86.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/9396c79f-d439-42cf-86fd-52849521ba86.pdf"><span class="file-embed-button-text">Download</span></a></div></div>
      <p>
          <a href="https://www.quantbeckman.com/p/quant-lecture-internal-anatomy-of">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[WITH CODE] Data transformations: Text preprocessing ]]></title><description><![CDATA[From market language to model input]]></description><link>https://www.quantbeckman.com/p/with-code-data-transformations-text</link><guid isPermaLink="false">https://www.quantbeckman.com/p/with-code-data-transformations-text</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Mon, 04 May 2026 11:45:13 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!AJt2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cedd76e-1949-481c-a904-be1a249336c5_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uWS0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uWS0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uWS0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1039286,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/205475473?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!uWS0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!s1lx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d4d2ba-ac98-4923-8b80-a526b70254f3_1029x1102.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!s1lx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d4d2ba-ac98-4923-8b80-a526b70254f3_1029x1102.png 424w, https://substackcdn.com/image/fetch/$s_!s1lx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d4d2ba-ac98-4923-8b80-a526b70254f3_1029x1102.png 848w, https://substackcdn.com/image/fetch/$s_!s1lx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d4d2ba-ac98-4923-8b80-a526b70254f3_1029x1102.png 1272w, https://substackcdn.com/image/fetch/$s_!s1lx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d4d2ba-ac98-4923-8b80-a526b70254f3_1029x1102.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!s1lx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d4d2ba-ac98-4923-8b80-a526b70254f3_1029x1102.png" width="1029" height="1102" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/88d4d2ba-ac98-4923-8b80-a526b70254f3_1029x1102.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1102,&quot;width&quot;:1029,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:95127,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/195628963?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d4d2ba-ac98-4923-8b80-a526b70254f3_1029x1102.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!s1lx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d4d2ba-ac98-4923-8b80-a526b70254f3_1029x1102.png 424w, https://substackcdn.com/image/fetch/$s_!s1lx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d4d2ba-ac98-4923-8b80-a526b70254f3_1029x1102.png 848w, https://substackcdn.com/image/fetch/$s_!s1lx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d4d2ba-ac98-4923-8b80-a526b70254f3_1029x1102.png 1272w, https://substackcdn.com/image/fetch/$s_!s1lx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F88d4d2ba-ac98-4923-8b80-a526b70254f3_1029x1102.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized</strong> by clicking below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CZIx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CZIx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CZIx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1151002,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/205475473?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!CZIx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;text&quot;:&quot;INDEX&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.quantbeckman.com/p/welcome"><span>INDEX</span></a></p><div><hr></div><p><strong>From raw text streams to market trading signals</strong></p><p><span>Text preprocessing in quantitative trading acts as an active signal-shaping operator rather than a passive data-cleaning routine. Splitting tokens, stripping punctuation, or deleting words directly alters the geometry of the feature space, changing the conditional expectation of forward returns and impacting strategy execution.</span></p><p><strong>What&#8217;s inside:</strong></p><ol><li><p><strong><span>Evaluating preprocessing as a signal operator:</span></strong><span> Preprocessing logic directly modifies input vectors, meaning every string transformation parameterizes the feature space and dictates what the classifier can observe.</span></p></li><li><p><strong><span>Preventing semantic and structural failure modes:</span></strong><span> Unaligned text rules introduce structural risks, including semantic inversion from deleted negations, unstable feature representations across vendor feeds, and collapsed entity definitions.</span></p></li><li><p><strong><span>Preserving entity meaning through canonicalization:</span></strong><span> Universal lowercasing acts as a destructive projection operator, merging distinct ticker symbols, corporate entities, and ordinary nouns into identical feature coordinates.</span></p></li><li><p><strong><span>Defining typed token boundaries:</span></strong><span> Protected regular expressions preserve specialized financial spans, keeping currency pairs, percentages, and execution log values intact before standard tokenizers shatter them.</span></p></li><li><p><strong><span>Protecting logical sign with targeted stopword filters:</span></strong><span> Retaining direction-governing terms like &#8220;not,&#8221; &#8220;under,&#8221; and &#8220;without&#8221; prevents semantic inversion in sentiment classification and stops false trade signals.</span></p></li><li><p><strong><span>Validating morphological reduction under economic loss:</span></strong><span> Naive stemming merges distinct temporal and probabilistic risk states, making it necessary to distill contextual language model insights into deterministic lookup tables.</span></p></li><li><p><strong><span>Combining multi-channel sparse and dense representations:</span></strong><span> Ensembling deterministic sparse vectors with dense contextual embeddings balances explicit, auditable feature attribution against abstract semantic interpretation.</span></p></li></ol><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!9lNC!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52cda77a-97df-430a-bff0-fe62c67ca120_985x796.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Sample</div><div class="file-embed-details-h2">759KB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/9b8d0926-7e56-4aa9-950b-bdf1be5b9995.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/9b8d0926-7e56-4aa9-950b-bdf1be5b9995.pdf"><span class="file-embed-button-text">Download</span></a></div></div>
      <p>
          <a href="https://www.quantbeckman.com/p/with-code-data-transformations-text">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[QUANT LECTURE] What a trading hypothesis is not ]]></title><description><![CDATA[Hypothesis-Driven Trading Research]]></description><link>https://www.quantbeckman.com/p/what-a-trading-hypothesis-is-not</link><guid isPermaLink="false">https://www.quantbeckman.com/p/what-a-trading-hypothesis-is-not</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Fri, 24 Apr 2026 12:10:37 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/22e51875-15fb-4511-adc7-3ac5799705bf_1544x1032.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_aQ1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F291c38d5-7c04-4f73-bb73-7a08ed49683c_1456x911.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_aQ1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F291c38d5-7c04-4f73-bb73-7a08ed49683c_1456x911.png 424w, https://substackcdn.com/image/fetch/$s_!_aQ1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F291c38d5-7c04-4f73-bb73-7a08ed49683c_1456x911.png 848w, https://substackcdn.com/image/fetch/$s_!_aQ1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F291c38d5-7c04-4f73-bb73-7a08ed49683c_1456x911.png 1272w, https://substackcdn.com/image/fetch/$s_!_aQ1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F291c38d5-7c04-4f73-bb73-7a08ed49683c_1456x911.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_aQ1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F291c38d5-7c04-4f73-bb73-7a08ed49683c_1456x911.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/291c38d5-7c04-4f73-bb73-7a08ed49683c_1456x911.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:505755,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/195339959?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F291c38d5-7c04-4f73-bb73-7a08ed49683c_1456x911.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_aQ1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F291c38d5-7c04-4f73-bb73-7a08ed49683c_1456x911.png 424w, https://substackcdn.com/image/fetch/$s_!_aQ1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F291c38d5-7c04-4f73-bb73-7a08ed49683c_1456x911.png 848w, https://substackcdn.com/image/fetch/$s_!_aQ1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F291c38d5-7c04-4f73-bb73-7a08ed49683c_1456x911.png 1272w, https://substackcdn.com/image/fetch/$s_!_aQ1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F291c38d5-7c04-4f73-bb73-7a08ed49683c_1456x911.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hC4K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff701d23e-a485-46c4-83ed-52bb6b077442_1022x584.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hC4K!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff701d23e-a485-46c4-83ed-52bb6b077442_1022x584.png 424w, https://substackcdn.com/image/fetch/$s_!hC4K!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff701d23e-a485-46c4-83ed-52bb6b077442_1022x584.png 848w, https://substackcdn.com/image/fetch/$s_!hC4K!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff701d23e-a485-46c4-83ed-52bb6b077442_1022x584.png 1272w, https://substackcdn.com/image/fetch/$s_!hC4K!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff701d23e-a485-46c4-83ed-52bb6b077442_1022x584.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hC4K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff701d23e-a485-46c4-83ed-52bb6b077442_1022x584.png" width="1022" height="584" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f701d23e-a485-46c4-83ed-52bb6b077442_1022x584.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:584,&quot;width&quot;:1022,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:124522,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/195339959?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff701d23e-a485-46c4-83ed-52bb6b077442_1022x584.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hC4K!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff701d23e-a485-46c4-83ed-52bb6b077442_1022x584.png 424w, https://substackcdn.com/image/fetch/$s_!hC4K!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff701d23e-a485-46c4-83ed-52bb6b077442_1022x584.png 848w, https://substackcdn.com/image/fetch/$s_!hC4K!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff701d23e-a485-46c4-83ed-52bb6b077442_1022x584.png 1272w, https://substackcdn.com/image/fetch/$s_!hC4K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff701d23e-a485-46c4-83ed-52bb6b077442_1022x584.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized</strong> by clicking on the image below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oEfr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06fd84d8-0d07-4ad8-990e-8e1345e26594_1456x971.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oEfr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06fd84d8-0d07-4ad8-990e-8e1345e26594_1456x971.png 424w, https://substackcdn.com/image/fetch/$s_!oEfr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06fd84d8-0d07-4ad8-990e-8e1345e26594_1456x971.png 848w, https://substackcdn.com/image/fetch/$s_!oEfr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06fd84d8-0d07-4ad8-990e-8e1345e26594_1456x971.png 1272w, https://substackcdn.com/image/fetch/$s_!oEfr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06fd84d8-0d07-4ad8-990e-8e1345e26594_1456x971.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oEfr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06fd84d8-0d07-4ad8-990e-8e1345e26594_1456x971.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/06fd84d8-0d07-4ad8-990e-8e1345e26594_1456x971.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:677424,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/195339959?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06fd84d8-0d07-4ad8-990e-8e1345e26594_1456x971.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oEfr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06fd84d8-0d07-4ad8-990e-8e1345e26594_1456x971.png 424w, https://substackcdn.com/image/fetch/$s_!oEfr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06fd84d8-0d07-4ad8-990e-8e1345e26594_1456x971.png 848w, https://substackcdn.com/image/fetch/$s_!oEfr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06fd84d8-0d07-4ad8-990e-8e1345e26594_1456x971.png 1272w, https://substackcdn.com/image/fetch/$s_!oEfr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F06fd84d8-0d07-4ad8-990e-8e1345e26594_1456x971.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;text&quot;:&quot;INDEX&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.quantbeckman.com/p/welcome"><span>INDEX</span></a></p><div><hr></div><h4>What a trading hypothesis is not</h4><p>The lecture explains that charts, indicators, and backtests can all be useful, but none of them are complete hypotheses on their own. Their value appears only when they are connected to mechanism, scope, timing, variable design, and evidence, so the researcher can move from surface regularity to a claim that can be tested, challenged, and refined.</p><p><strong>What&#8217;s inside:</strong></p><ol><li><p><strong>What a trading hypothesis is not.</strong> The lecture begins by separating a genuine hypothesis from three incomplete objects (a chart pattern, an indicator, and a backtest result).</p></li><li><p><strong>A chart pattern without explanatory content.</strong> A visual formation may reveal tension, compression, rupture, or recovery, but it remains only an empirical clue until the researcher explains what market process could have produced it.</p></li><li><p><strong>Visual regularity without mechanism.</strong> Repeated shapes on a chart can create the impression of structure, but research begins only when those shapes are translated into participants, frictions, information, liquidity, or structural relations.</p></li><li><p><strong>Repetition without causal interpretation.</strong> A pattern that appears many times does not automatically become a hypothesis. Repetition gains research value only when it is linked to a stable cause and a clear condition under which it should persist or disappear.</p></li><li><p><strong>Description without research value.</strong> Statements such as &#8220;price tends to bounce after strong declines&#8221; are useful starting observations, but they need scope, variables, comparison design, and evidence criteria before they become researchable.</p></li><li><p><strong>An indicator without market logic.</strong> Indicators compress data into signals, thresholds, scores, or ratios, but they matter scientifically only when they represent a real market condition such as crowding, strain, dislocation, liquidity withdrawal, or delayed adjustment.</p></li><li><p><strong>A backtest result without a prior claim.</strong> A good historical result is not enough. The lecture emphasizes that a backtest should examine a claim stated in advance, rather than becoming a machine for discovering attractive performance and inventing explanations afterward.</p></li><li><p><strong>The importance of forward logic.</strong> Strong research moves from observation to mechanism, from mechanism to formal claim, and from claim to evidence. This order gives meaning to both success and failure, allowing the  researcher to learn from the market rather than simply collect historical artifacts. </p></li></ol><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!BumJ!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8738b22-c061-4db8-8d59-b7cd859fb69f_1022x584.webp"></image><div class="file-embed-details"><div class="file-embed-details-h1">Sample</div><div class="file-embed-details-h2">1.9MB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/2ea7d81b-2173-467f-bfb7-36460dcd88b6.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/2ea7d81b-2173-467f-bfb7-36460dcd88b6.pdf"><span class="file-embed-button-text">Download</span></a></div></div>
      <p>
          <a href="https://www.quantbeckman.com/p/what-a-trading-hypothesis-is-not">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[WITH CODE] Data transformations: Data shape and predictive features ]]></title><description><![CDATA[Table of contents:]]></description><link>https://www.quantbeckman.com/p/with-code-data-transformations-data</link><guid isPermaLink="false">https://www.quantbeckman.com/p/with-code-data-transformations-data</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Mon, 13 Apr 2026 11:45:13 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!AJt2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cedd76e-1949-481c-a904-be1a249336c5_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uWS0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uWS0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uWS0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uWS0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fAPp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42232cfc-86e8-4448-82c4-2559e1eaea6f_1374x1209.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fAPp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42232cfc-86e8-4448-82c4-2559e1eaea6f_1374x1209.png 424w, https://substackcdn.com/image/fetch/$s_!fAPp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42232cfc-86e8-4448-82c4-2559e1eaea6f_1374x1209.png 848w, https://substackcdn.com/image/fetch/$s_!fAPp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42232cfc-86e8-4448-82c4-2559e1eaea6f_1374x1209.png 1272w, https://substackcdn.com/image/fetch/$s_!fAPp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42232cfc-86e8-4448-82c4-2559e1eaea6f_1374x1209.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fAPp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42232cfc-86e8-4448-82c4-2559e1eaea6f_1374x1209.png" width="1374" height="1209" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/42232cfc-86e8-4448-82c4-2559e1eaea6f_1374x1209.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1209,&quot;width&quot;:1374,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:108205,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/193786830?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42232cfc-86e8-4448-82c4-2559e1eaea6f_1374x1209.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fAPp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42232cfc-86e8-4448-82c4-2559e1eaea6f_1374x1209.png 424w, https://substackcdn.com/image/fetch/$s_!fAPp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42232cfc-86e8-4448-82c4-2559e1eaea6f_1374x1209.png 848w, https://substackcdn.com/image/fetch/$s_!fAPp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42232cfc-86e8-4448-82c4-2559e1eaea6f_1374x1209.png 1272w, https://substackcdn.com/image/fetch/$s_!fAPp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42232cfc-86e8-4448-82c4-2559e1eaea6f_1374x1209.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized </strong>by clicking on &#8220;<em>Read the newsletter index</em>&#8221; in this image.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CZIx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CZIx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CZIx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CZIx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;text&quot;:&quot;INDEX&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantbeckman.com/p/welcome"><span>INDEX</span></a></p><div><hr></div><h4><strong>From raw price paths to structurally aligned features</strong></h4><p><span>Data-shape transformation represents the first structural choice in model construction rather than a routine cleanup step. Every transformation operator selects specific variations in a market path while suppressing others, determining whether a model observes genuine economic signals or sample-specific noise. Aligning these operators with the strategy&#8217;s target holding period prevents false statistical stability and preserves the underlying alpha.</span></p><p><strong>What&#8217;s inside:</strong></p><ol><li><p><strong><span>Reframing data transformations:</span></strong><span> Treating transformations as active structural choices ensures the mathematical shape of the input feature matches the economic mechanism behind the trade.</span></p></li><li><p><strong><span>Recognizing transformation risks:</span></strong><span> Indiscriminate differencing or scaling can amputate trend signals, introduce causality leakage through full-sample parameters, or distort high-dimensional distance geometry.</span></p></li><li><p><strong><span>Extracting state-space surprises:</span></strong><span> Applying local linear trend models yields one-step-ahead forecast errors, isolating orthogonal price surprises from predictable local drift.</span></p></li><li><p><strong><span>Neutralizing dynamic benchmarks:</span></strong><span> Rolling regression residuals project asset returns into the null space of a benchmark, stripping out market beta to expose pure relative-value dislocations.</span></p></li><li><p><strong><span>Eliminating stochastic drift via cointegration:</span></strong><span> Engle-Granger equilibrium spreads remove shared unit-root trends between paired assets, producing stationary inputs designed for mean-reversion models.</span></p></li><li><p><strong><span>Isolating multiscale wavelet details:</span></strong><span> Discrete Haar wavelet filter banks decouple overlapping frequency bands, targeting scale-specific shocks while filtering out macro drift and microstructural noise.</span></p></li><li><p><strong><span>Encoding bounded state ranges:</span></strong><span> Rolling min-max positions compress nominal prices into a [0, 1] interval, removing cross-sectional scale disparities and allowing tree algorithms to process boundary rejections.</span></p></li></ol><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!AVQr!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa451fd6e-a840-4db0-81b8-726ba5764aa8_985x796.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Sample</div><div class="file-embed-details-h2">450KB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/8dff7726-a7a3-42b4-9949-8689d82e46d4.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/8dff7726-a7a3-42b4-9949-8689d82e46d4.pdf"><span class="file-embed-button-text">Download</span></a></div></div>
      <p>
          <a href="https://www.quantbeckman.com/p/with-code-data-transformations-data">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[QUANT LECTURE] Why a trading hypothesis? ]]></title><description><![CDATA[Hypothesis-Driven Trading Research]]></description><link>https://www.quantbeckman.com/p/quant-lecture-why-a-trading-hypothesis</link><guid isPermaLink="false">https://www.quantbeckman.com/p/quant-lecture-why-a-trading-hypothesis</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Sat, 04 Apr 2026 10:52:49 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/679cfc4a-d39d-47d1-ae59-a896f457aacc_1544x1032.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6Z9S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ebb024-e4ee-4323-a27d-8b06bf8c5441_1456x911.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6Z9S!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ebb024-e4ee-4323-a27d-8b06bf8c5441_1456x911.png 424w, https://substackcdn.com/image/fetch/$s_!6Z9S!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ebb024-e4ee-4323-a27d-8b06bf8c5441_1456x911.png 848w, https://substackcdn.com/image/fetch/$s_!6Z9S!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ebb024-e4ee-4323-a27d-8b06bf8c5441_1456x911.png 1272w, https://substackcdn.com/image/fetch/$s_!6Z9S!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ebb024-e4ee-4323-a27d-8b06bf8c5441_1456x911.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6Z9S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ebb024-e4ee-4323-a27d-8b06bf8c5441_1456x911.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/08ebb024-e4ee-4323-a27d-8b06bf8c5441_1456x911.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:505755,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/193153436?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ebb024-e4ee-4323-a27d-8b06bf8c5441_1456x911.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6Z9S!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ebb024-e4ee-4323-a27d-8b06bf8c5441_1456x911.png 424w, https://substackcdn.com/image/fetch/$s_!6Z9S!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ebb024-e4ee-4323-a27d-8b06bf8c5441_1456x911.png 848w, https://substackcdn.com/image/fetch/$s_!6Z9S!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ebb024-e4ee-4323-a27d-8b06bf8c5441_1456x911.png 1272w, https://substackcdn.com/image/fetch/$s_!6Z9S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08ebb024-e4ee-4323-a27d-8b06bf8c5441_1456x911.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pdSY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc284f5-1287-4a6c-b46e-cbb6a6fa11e1_989x588.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pdSY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc284f5-1287-4a6c-b46e-cbb6a6fa11e1_989x588.png 424w, https://substackcdn.com/image/fetch/$s_!pdSY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc284f5-1287-4a6c-b46e-cbb6a6fa11e1_989x588.png 848w, https://substackcdn.com/image/fetch/$s_!pdSY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc284f5-1287-4a6c-b46e-cbb6a6fa11e1_989x588.png 1272w, https://substackcdn.com/image/fetch/$s_!pdSY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc284f5-1287-4a6c-b46e-cbb6a6fa11e1_989x588.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pdSY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc284f5-1287-4a6c-b46e-cbb6a6fa11e1_989x588.png" width="989" height="588" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6dc284f5-1287-4a6c-b46e-cbb6a6fa11e1_989x588.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:588,&quot;width&quot;:989,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:116412,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/193153436?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc284f5-1287-4a6c-b46e-cbb6a6fa11e1_989x588.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pdSY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc284f5-1287-4a6c-b46e-cbb6a6fa11e1_989x588.png 424w, https://substackcdn.com/image/fetch/$s_!pdSY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc284f5-1287-4a6c-b46e-cbb6a6fa11e1_989x588.png 848w, https://substackcdn.com/image/fetch/$s_!pdSY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc284f5-1287-4a6c-b46e-cbb6a6fa11e1_989x588.png 1272w, https://substackcdn.com/image/fetch/$s_!pdSY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc284f5-1287-4a6c-b46e-cbb6a6fa11e1_989x588.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized</strong> by clicking on the image below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GhZs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb43090c-4f54-45a5-b3cd-c1c0af617288_1456x971.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GhZs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb43090c-4f54-45a5-b3cd-c1c0af617288_1456x971.png 424w, https://substackcdn.com/image/fetch/$s_!GhZs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb43090c-4f54-45a5-b3cd-c1c0af617288_1456x971.png 848w, https://substackcdn.com/image/fetch/$s_!GhZs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb43090c-4f54-45a5-b3cd-c1c0af617288_1456x971.png 1272w, https://substackcdn.com/image/fetch/$s_!GhZs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb43090c-4f54-45a5-b3cd-c1c0af617288_1456x971.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GhZs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb43090c-4f54-45a5-b3cd-c1c0af617288_1456x971.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cb43090c-4f54-45a5-b3cd-c1c0af617288_1456x971.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:677424,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/193153436?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb43090c-4f54-45a5-b3cd-c1c0af617288_1456x971.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GhZs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb43090c-4f54-45a5-b3cd-c1c0af617288_1456x971.png 424w, https://substackcdn.com/image/fetch/$s_!GhZs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb43090c-4f54-45a5-b3cd-c1c0af617288_1456x971.png 848w, https://substackcdn.com/image/fetch/$s_!GhZs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb43090c-4f54-45a5-b3cd-c1c0af617288_1456x971.png 1272w, https://substackcdn.com/image/fetch/$s_!GhZs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb43090c-4f54-45a5-b3cd-c1c0af617288_1456x971.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h4>Why a trading hypothesis?</h4><p>A trading hypothesis is presented as the first scientific form of a market idea, one that transforms intuition into a structured claim with an activating condition, an expected response, a time horizon, and a proposed mechanism. The lecture develops this framework as the bridge between market logic and empirical evidence, and explains how restriction, precision, and coherence turn a vague observation into a research object that can be tested, challenged, and refined.</p><p><strong>What&#8217;s inside:</strong></p><ol><li><p><strong>Why a trading hypothesis matters.</strong> A trading hypothesis is the first formal research object in quantitative trading because it gives direction, causal meaning, and empirical consequences to an otherwise informal market observation.</p></li><li><p><strong>Hypothesis as a conditional claim about market behavior.</strong> The lecture defines a genuine hypothesis as a structured conditional statement that specifies when a market condition appears, what response should follow, over what horizon, and because of what underlying process.</p></li><li><p><strong>The activating condition.</strong> A hypothesis begins with a trigger that identifies when the market enters a meaningful state, such as a volatility expansion, spread dislocation, order flow imbalance, or liquidity shock, so the sample becomes selective in a principled way.</p></li><li><p><strong>The expected market response.</strong> The claim must state what should happen after activation by defining the object of movement, the direction of adjustment, and the scale or relevance of that movement, so the idea acquires a clear empirical identity.</p></li><li><p><strong>The horizon over which the response should emerge.</strong> Time is treated as part of the hypothesis itself because different mechanisms operate on different clocks, and the validity of the research depends on matching the response window to the real rhythm of the market process.</p></li><li><p><strong>A bridge between market logic and empirical evidence.</strong> The lecture shows that a good hypothesis connects two domains at once, the logic of participants, frictions, and structural forces on one side, and the language of variables, samples, outcomes, and comparisons on the other.</p></li><li><p><strong>Empirical signature and supporting evidence.</strong> A strong hypothesis does not predict profitability alone, but a specific patterned trace in the data, including direction, structure, timing, conditional strength, and comparative contrast, so support comes from alignment rather than from one backtest statistic. </p></li><li><p><strong>The hypothesis as a restricted object.</strong> The lecture explains that every valid hypothesis must be restricted to a coherent asset universe, a defined market state, and a proper time horizon, because restriction is what gives the claim scientific shape and protects it from vague breadth.  </p></li></ol><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!sde3!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0390273a-9bbe-4d48-96e3-7788dcf14218_989x588.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Sample</div><div class="file-embed-details-h2">1.87MB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/e546b29e-bbcf-4574-bd85-120bf1258997.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/e546b29e-bbcf-4574-bd85-120bf1258997.pdf"><span class="file-embed-button-text">Download</span></a></div></div>
      <p>
          <a href="https://www.quantbeckman.com/p/quant-lecture-why-a-trading-hypothesis">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[WITH CODE] Data transformations: Time series preparation ]]></title><description><![CDATA[The hidden statistical problems inside untransformed market series]]></description><link>https://www.quantbeckman.com/p/with-code-data-transformations-preprocessing</link><guid isPermaLink="false">https://www.quantbeckman.com/p/with-code-data-transformations-preprocessing</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Fri, 27 Mar 2026 15:55:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!AJt2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cedd76e-1949-481c-a904-be1a249336c5_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uWS0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uWS0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uWS0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uWS0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 424w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 848w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1272w, https://substackcdn.com/image/fetch/$s_!uWS0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e362632-ec02-4161-b0cc-44aa6d20ad66_1586x992.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Kzml!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58dac974-82f0-47ff-9ad8-566b9c59d0f9_940x1133.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Kzml!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58dac974-82f0-47ff-9ad8-566b9c59d0f9_940x1133.png 424w, https://substackcdn.com/image/fetch/$s_!Kzml!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58dac974-82f0-47ff-9ad8-566b9c59d0f9_940x1133.png 848w, https://substackcdn.com/image/fetch/$s_!Kzml!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58dac974-82f0-47ff-9ad8-566b9c59d0f9_940x1133.png 1272w, https://substackcdn.com/image/fetch/$s_!Kzml!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58dac974-82f0-47ff-9ad8-566b9c59d0f9_940x1133.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Kzml!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58dac974-82f0-47ff-9ad8-566b9c59d0f9_940x1133.png" width="940" height="1133" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/58dac974-82f0-47ff-9ad8-566b9c59d0f9_940x1133.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1133,&quot;width&quot;:940,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:107188,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/191955670?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58dac974-82f0-47ff-9ad8-566b9c59d0f9_940x1133.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Kzml!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58dac974-82f0-47ff-9ad8-566b9c59d0f9_940x1133.png 424w, https://substackcdn.com/image/fetch/$s_!Kzml!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58dac974-82f0-47ff-9ad8-566b9c59d0f9_940x1133.png 848w, https://substackcdn.com/image/fetch/$s_!Kzml!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58dac974-82f0-47ff-9ad8-566b9c59d0f9_940x1133.png 1272w, https://substackcdn.com/image/fetch/$s_!Kzml!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58dac974-82f0-47ff-9ad8-566b9c59d0f9_940x1133.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized </strong>by clicking on &#8220;<em>Read the newsletter index</em>&#8221; in this image.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CZIx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CZIx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CZIx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CZIx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 424w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 848w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!CZIx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F574b714e-6f5e-4ee8-b8a6-6a3b64ec3da2_1535x1024.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;text&quot;:&quot;INDEX&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantbeckman.com/p/welcome"><span>INDEX</span></a></p><div><hr></div><p><strong>From raw market series to stationary model inputs</strong></p><p><span>Raw price series carry unbounded drift, non-constant variance, and heavy tails that break numerical optimizers through singular matrices and vanishing gradients. Effective time series preparation replaces naive preprocessing with targeted mathematical operators that make market structure legible to learning algorithms without destroying predictive memory or leaking future data.</span></p><p><strong>What&#8217;s inside:</strong></p><ol><li><p><strong><span>Controlling transformation risks:</span></strong><span> Standard Z-scores distort skewed downside risks, hard Winsorization erases capitulation signals, and global scaling leaks future variance into historical training sets.</span></p></li><li><p><strong><span>Preserving long-range memory:</span></strong><span> Integer differencing (d=1) discards over 60% of predictive memory, whereas fractional differencing uses exponentially decaying weights to achieve stationarity while retaining historical path memory.</span></p></li><li><p><strong><span>Mapping fat-tailed distributions:</span></strong><span> Converting skewed returns through Cornish-Fisher expansions or rank-to-Gaussian transforms prevents optimizers from treating real market tail shocks as mathematically impossible anomalies.</span></p></li><li><p><strong><span>Sampling on information time:</span></strong><span> Chronological time bars generate zero-inflated distributions and intraday volatility spikes, while Dollar Bars sample data on dynamic fiat thresholds to produce more stable return properties.</span></p></li><li><p><strong><span>Eliminating volatility ghost effects:</span></strong><span> Standardizing returns with GARCH(1,1) conditional volatility adjusts for autoregressive variance clustering, avoiding the abrupt artificial drops caused by flat rolling lookback windows.</span></p></li><li><p><strong><span>Mitigating noise and multicollinearity:</span></strong><span> Combining Shannon entropy soft-clipping with Marchenko-Pastur PCA thresholding compresses extreme shocks without losing rank order and strips out correlated noise vectors.</span></p></li><li><p><strong><span>Reconstructing phase-space geometry:</span></strong><span> Applying Takens&#8217; Delay Embedding Theorem lifts 1D price series into multi-dimensional phase space, exposing hidden market regime structures to spatial classifiers.</span></p></li></ol><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!JmYs!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F233f304d-45cc-4f6a-8bd4-db87b3a196ea_985x796.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Sample</div><div class="file-embed-details-h2">650KB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/7fb18cda-de77-4c84-ae81-e1cbed8e9ab6.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/7fb18cda-de77-4c84-ae81-e1cbed8e9ab6.pdf"><span class="file-embed-button-text">Download</span></a></div></div>
      <p>
          <a href="https://www.quantbeckman.com/p/with-code-data-transformations-preprocessing">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[QUANT LECTURE] Sufficient statistics and minimal signals ]]></title><description><![CDATA[Market Inefficiencies - Information Theoretic Approach]]></description><link>https://www.quantbeckman.com/p/quant-lecture-sufficient-statistics</link><guid isPermaLink="false">https://www.quantbeckman.com/p/quant-lecture-sufficient-statistics</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Fri, 20 Mar 2026 12:55:21 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/df050bd9-ea29-4e25-aa82-1f094b78ad25_1544x1032.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XwJq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63da2b5f-498d-4e7c-ab3e-d721920f815a_1456x911.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XwJq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63da2b5f-498d-4e7c-ab3e-d721920f815a_1456x911.png 424w, https://substackcdn.com/image/fetch/$s_!XwJq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63da2b5f-498d-4e7c-ab3e-d721920f815a_1456x911.png 848w, https://substackcdn.com/image/fetch/$s_!XwJq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63da2b5f-498d-4e7c-ab3e-d721920f815a_1456x911.png 1272w, https://substackcdn.com/image/fetch/$s_!XwJq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63da2b5f-498d-4e7c-ab3e-d721920f815a_1456x911.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XwJq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63da2b5f-498d-4e7c-ab3e-d721920f815a_1456x911.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/63da2b5f-498d-4e7c-ab3e-d721920f815a_1456x911.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:505755,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/191576018?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63da2b5f-498d-4e7c-ab3e-d721920f815a_1456x911.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XwJq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63da2b5f-498d-4e7c-ab3e-d721920f815a_1456x911.png 424w, https://substackcdn.com/image/fetch/$s_!XwJq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63da2b5f-498d-4e7c-ab3e-d721920f815a_1456x911.png 848w, https://substackcdn.com/image/fetch/$s_!XwJq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63da2b5f-498d-4e7c-ab3e-d721920f815a_1456x911.png 1272w, https://substackcdn.com/image/fetch/$s_!XwJq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63da2b5f-498d-4e7c-ab3e-d721920f815a_1456x911.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!R8tJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17442e78-7eff-471b-9d5a-b702ac501353_1022x597.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!R8tJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17442e78-7eff-471b-9d5a-b702ac501353_1022x597.png 424w, https://substackcdn.com/image/fetch/$s_!R8tJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17442e78-7eff-471b-9d5a-b702ac501353_1022x597.png 848w, https://substackcdn.com/image/fetch/$s_!R8tJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17442e78-7eff-471b-9d5a-b702ac501353_1022x597.png 1272w, https://substackcdn.com/image/fetch/$s_!R8tJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17442e78-7eff-471b-9d5a-b702ac501353_1022x597.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!R8tJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17442e78-7eff-471b-9d5a-b702ac501353_1022x597.png" width="1022" height="597" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/17442e78-7eff-471b-9d5a-b702ac501353_1022x597.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:597,&quot;width&quot;:1022,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:125705,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/191576018?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17442e78-7eff-471b-9d5a-b702ac501353_1022x597.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!R8tJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17442e78-7eff-471b-9d5a-b702ac501353_1022x597.png 424w, https://substackcdn.com/image/fetch/$s_!R8tJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17442e78-7eff-471b-9d5a-b702ac501353_1022x597.png 848w, https://substackcdn.com/image/fetch/$s_!R8tJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17442e78-7eff-471b-9d5a-b702ac501353_1022x597.png 1272w, https://substackcdn.com/image/fetch/$s_!R8tJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17442e78-7eff-471b-9d5a-b702ac501353_1022x597.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized</strong> by clicking on the image below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TeKG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8ed5c9-f995-4354-883d-74c68b28c12d_1456x971.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TeKG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8ed5c9-f995-4354-883d-74c68b28c12d_1456x971.png 424w, https://substackcdn.com/image/fetch/$s_!TeKG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8ed5c9-f995-4354-883d-74c68b28c12d_1456x971.png 848w, https://substackcdn.com/image/fetch/$s_!TeKG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8ed5c9-f995-4354-883d-74c68b28c12d_1456x971.png 1272w, https://substackcdn.com/image/fetch/$s_!TeKG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8ed5c9-f995-4354-883d-74c68b28c12d_1456x971.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TeKG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8ed5c9-f995-4354-883d-74c68b28c12d_1456x971.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5a8ed5c9-f995-4354-883d-74c68b28c12d_1456x971.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:677424,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/191576018?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8ed5c9-f995-4354-883d-74c68b28c12d_1456x971.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TeKG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8ed5c9-f995-4354-883d-74c68b28c12d_1456x971.png 424w, https://substackcdn.com/image/fetch/$s_!TeKG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8ed5c9-f995-4354-883d-74c68b28c12d_1456x971.png 848w, https://substackcdn.com/image/fetch/$s_!TeKG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8ed5c9-f995-4354-883d-74c68b28c12d_1456x971.png 1272w, https://substackcdn.com/image/fetch/$s_!TeKG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5a8ed5c9-f995-4354-883d-74c68b28c12d_1456x971.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;text&quot;:&quot;INDEX&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantbeckman.com/p/welcome"><span>INDEX</span></a></p><div><hr></div><h4><strong>Sufficient statistics and minimal signals</strong></h4><p>This lecture defines a trading signal through sufficiency rather than through a rule, threshold, or pattern. A signal is a compression of the decision-time information set that preserves the conditional law of the declared outcome, so predictive meaning remains tied to the future law rather than to a single backtest metric. The lecture then develops minimality, bottleneck design, and representation stability as the conditions that make that compressed state usable under finite data, drift, and noise.</p><p><strong>What&#8217;s inside:</strong></p><ol><li><p><strong>Sufficiency as the definition of signal.</strong> A signal is a representation that preserves the conditional distribution of the outcome, which separates signal from strategy and makes feature relevance a property of conditional-law preservation rather than raw correlation.</p></li><li><p><strong>Signal as compression with law preservation.</strong> Compression becomes signal construction when the reduced state carries the same predictive content as the full decision-time information set, which lets the system operate on a smaller and more stable representation without changing the law it conditions on.</p></li><li><p><strong>Approximate sufficiency in practice.</strong> Exact sufficiency appears as the ideal case, while practical sufficiency is defined through a declared tolerance using divergence, proper-score regret, and the residual predictive content that remains outside the bottleneck.</p></li><li><p><strong>Minimal sufficient sets.</strong> The lecture shows that a minimal signal is the smallest representation that still preserves the full conditional law, removes nuisance variation, lowers selection pressure, and keeps the signal portable across operators and model classes.</p></li><li><p><strong>Non-uniqueness of sufficient representations.</strong> Many different representations can preserve the same predictive law, so the scientific question is whether preservation exists, while the engineering question is which representation remains most stable under noise, drift, and deployment constraints.</p></li><li><p><strong>Bottleneck trade-offs.</strong> Bottleneck design becomes an information-budget problem that balances relevance against representational capacity, because too little compression increases variance and selection pressure, while too much compression removes predictive fragments the outcome still needs.</p></li><li><p><strong>Overcompression and undercompression.</strong> The lecture explains that overcompression distorts the conditional law by blending distinct regimes, while undercompression creates a high-capacity overfitting surface where sharp in-sample structure often fails under recurrence and proper scoring.</p></li><li><p><strong>Representation stability.</strong> A minimal signal must retain stable meaning under measurement noise, drift in state occupancy, and regime mixtures, so conditional beliefs, calibration, and divergence structure remain coherent when the signal moves from research into live deployment.</p></li></ol><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!5g60!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86df4384-3a83-4cd8-a829-114583e823f6_1544x1032.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Sample</div><div class="file-embed-details-h2">1.93MB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/36a910b4-b850-4194-a27c-46718e1f84ec.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/36a910b4-b850-4194-a27c-46718e1f84ec.pdf"><span class="file-embed-button-text">Download</span></a></div></div>
      <p>
          <a href="https://www.quantbeckman.com/p/quant-lecture-sufficient-statistics">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[WITH CODE] Infra: Financial APIs ]]></title><description><![CDATA[How to build a trading API]]></description><link>https://www.quantbeckman.com/p/with-code-infra-financial-apis</link><guid isPermaLink="false">https://www.quantbeckman.com/p/with-code-infra-financial-apis</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Fri, 13 Mar 2026 13:52:22 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!AJt2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cedd76e-1949-481c-a904-be1a249336c5_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4zl9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4zl9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 424w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 848w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 1272w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4zl9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png" width="1142" height="716" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:716,&quot;width&quot;:1142,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:496259,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/155848302?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!4zl9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 424w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 848w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 1272w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p><strong>Table of contents:</strong></p><ol><li><p>Introduction.</p></li><li><p>The API layer.</p></li><li><p>Protocol semantics, transport choice, and system state.</p></li><li><p>Risk and financial APIs limitations.</p></li><li><p>Historical-live non-equivalence and data reconstruction error.</p></li><li><p>Execution state machines and order routing.</p></li><li><p>Simulation and live trading.</p></li><li><p>Creating the architecture for a trading API.</p></li></ol><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized</strong> by clicking on &#8220;<em>Read the newsletter index</em>&#8221; in this image.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.quantbeckman.com/p/welcome" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DI2x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 424w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 848w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 1272w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DI2x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png" width="1040" height="496" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:496,&quot;width&quot;:1040,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:639128,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/198696914?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!DI2x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 424w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 848w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 1272w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h4><strong>Introduction</strong></h4><p>Before moving on to the next series, there&#8217;s an important point that any algorithmic trader needs to know: the point about APIs. </p><p>A quant can state the issue in simple terms. Let <em>s<sub>t</sub></em>&#8203; denote latent market state and let <em>x<sub>t</sub></em>&#8203; denote observed state at decision time. The strategy trades on <em>x<sub>t</sub></em>&#8203; rather than <em>s<sub>t</sub></em>&#8203;. The transformation from <em>s<sub>t</sub></em>&#8203; to <em>x<sub>t</sub></em>&#8203; includes vendor capture, transport, buffering, schema validation, clock alignment, and local state reconstruction. When that transformation changes, the strategy changes with it, even if the signal formula stays fixed. </p><p>The API layer belongs to the hypothesis itself because it determines the admissible information set on which the strategy acts.</p><p>This point matters because the gap between research and deployment tends to emerge at the boundary where information becomes software state. Bars in a notebook arrive sorted and complete. Live messages arrive through sessions, quotes, reconnect paths, and transport rules. Orders in a backtest pass from signal to fill in one step. Orders in production pass through acceptance, routing, queue interaction, etc. In a systematic process, those choices carry mathematical weight because they alter the state space on which the strategy operates.</p><p>The live strategy therefore admits a fuller description than the research signal alone. A useful expression is</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{Live strategy} = \\text{Signal model} + \\text{Information contract} + \\text{Execution contract} + \\text{Reconciliation logic}.&quot;,&quot;id&quot;:&quot;SMVQEKKDTA&quot;}" data-component-name="LatexBlockToDOM"></div><p>Many teams place their energy on features, models, and optimization while the interface layer receives less formal treatment. That habit carries a cost. A signal derived from one information regime and deployed through another regime becomes a different object. A simulator that treats execution as an atomic event studies a market process distinct from the one live code encounters.</p><p>The API layer is where these fractures surface. It is also where discipline can restore coherence. If you want a stack to start with, here it is:</p><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!9ehK!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d3c6d3f-f0ab-4f46-a8f6-a88b28e6094c_542x763.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Algorithmic Trading in the Global FX Market</div><div class="file-embed-details-h2">176KB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/faf01f8c-e6c6-481d-8aaf-46526281bdb0.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/faf01f8c-e6c6-481d-8aaf-46526281bdb0.pdf"><span class="file-embed-button-text">Download</span></a></div></div><p>An API is an information contract, a timing contract, and an execution contract. That&#8217;s to say, data fields need causal meaning, timestamps need clear authority, order states need legal transitions, internal services need shared schemas across research, simulation, and live trading. Do you get the ida right? Under those conditions, performance claims acquire stronger footing because the path from observation to action remains explicit.</p><p>The subject here is the form through which market enters the strategy and the form through which strategy intent reaches the market. Code style, framework choice, and endpoint count matter through their effect on that form. A live trading stack earns coherence when the objects that move across it stay explicit, typed, and stable across the full path from research to execution. That coherence is a design choice and it begins at the API layer.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!r9dP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1f6989e-1012-46f5-bc8e-bd1771886d19_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!r9dP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1f6989e-1012-46f5-bc8e-bd1771886d19_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!r9dP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1f6989e-1012-46f5-bc8e-bd1771886d19_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!r9dP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1f6989e-1012-46f5-bc8e-bd1771886d19_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!r9dP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1f6989e-1012-46f5-bc8e-bd1771886d19_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!r9dP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1f6989e-1012-46f5-bc8e-bd1771886d19_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c1f6989e-1012-46f5-bc8e-bd1771886d19_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:768483,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/190500174?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1f6989e-1012-46f5-bc8e-bd1771886d19_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!r9dP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1f6989e-1012-46f5-bc8e-bd1771886d19_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!r9dP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1f6989e-1012-46f5-bc8e-bd1771886d19_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!r9dP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1f6989e-1012-46f5-bc8e-bd1771886d19_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!r9dP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1f6989e-1012-46f5-bc8e-bd1771886d19_1536x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>The API layer</h4><p>In a trading system, the central question asks what is known, when it becomes known, and which representation carries it. The API layer lives at that boundary. It defines the admissible information set available to the strategy at decision time. That framing captures the practical source of failure with precision.</p><p>Let the latent market state at event index <em>t</em> be <em>s<sub>t</sub></em>. The strategy never accesses that state in raw form. It receives an encoded view <em>x<sub>t</sub></em>, produced through venue generation, vendor capture, normalization, transport, buffering, decoding, and local deserialization. If those operations are compressed into a single operator <em>H</em>, then the strategy acts on</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;x_t = H(s_t)&quot;,&quot;id&quot;:&quot;JXTUHTSDVI&quot;}" data-component-name="LatexBlockToDOM"></div><p>In live systems, <em>H</em> belongs to a family of transformations shaped by endpoint choice, session state, codec, throttling behavior, aggregation policy, and recovery logic. The research question therefore asks two things at once: whether a mapping  <em>f</em>(<em>x<sub>t</sub></em>) carries predictive value, and whether the <em>x<sub>t</sub></em> used in research belongs to the same family as the <em>x<sub>t </sub></em>available in deployment.</p><p>A useful decomposition is</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;x_t^{obs} = H_t(s_{0:t}) + \\varepsilon_t&quot;,&quot;id&quot;:&quot;PAVKYAWEWM&quot;}" data-component-name="LatexBlockToDOM"></div><p>The term <em>H<sub>t</sub></em>(<em>s<sub>0:t</sub></em>) shows that observed state may depend on a path rather than a single contemporaneous latent state. Corrections, delayed packets, local aggregation, and dropped messages create that path dependence. The residual term &#949;<em><sub>t</sub></em> collects the user-facing uncertainty generated by packet loss, schema surprises, decoder failure, clock mismatch, and hidden vendor behavior. In a calm hourly-bar strategy, &#949;<em><sub>t</sub></em> may occupy a small role. In a short-horizon or execution-sensitive strategy, it often defines the core challenge.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gm9c!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3699a497-03e9-47b7-b294-b41491e3b5ab_1600x988.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gm9c!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3699a497-03e9-47b7-b294-b41491e3b5ab_1600x988.png 424w, https://substackcdn.com/image/fetch/$s_!gm9c!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3699a497-03e9-47b7-b294-b41491e3b5ab_1600x988.png 848w, https://substackcdn.com/image/fetch/$s_!gm9c!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3699a497-03e9-47b7-b294-b41491e3b5ab_1600x988.png 1272w, https://substackcdn.com/image/fetch/$s_!gm9c!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3699a497-03e9-47b7-b294-b41491e3b5ab_1600x988.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gm9c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3699a497-03e9-47b7-b294-b41491e3b5ab_1600x988.png" width="1456" height="899" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3699a497-03e9-47b7-b294-b41491e3b5ab_1600x988.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:899,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;A Crash Course on REST APIs - ByteByteGo Newsletter&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A Crash Course on REST APIs - ByteByteGo Newsletter" title="A Crash Course on REST APIs - ByteByteGo Newsletter" srcset="https://substackcdn.com/image/fetch/$s_!gm9c!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3699a497-03e9-47b7-b294-b41491e3b5ab_1600x988.png 424w, https://substackcdn.com/image/fetch/$s_!gm9c!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3699a497-03e9-47b7-b294-b41491e3b5ab_1600x988.png 848w, https://substackcdn.com/image/fetch/$s_!gm9c!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3699a497-03e9-47b7-b294-b41491e3b5ab_1600x988.png 1272w, https://substackcdn.com/image/fetch/$s_!gm9c!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3699a497-03e9-47b7-b294-b41491e3b5ab_1600x988.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This perspective dissolves a common misconception. Many quants treat the API as a latency channel and connect latency risk with high-frequency trading. A richer view sees the API as a state-visibility mechanism. Consider a breakout rule triggered when price crosses a level and volume in the same interval exceeds a threshold. One endpoint may publish aggregated bars with finalized volume, while another may publish incremental trades that require local accumulation. The rule then sees different objects. </p><blockquote><p>Speed alone does not resolve that difference. One representation is final. The other is provisional. One is bounded by bar closure. The other evolves through the interval. If research evaluates the final object while deployment trades the provisional one, then backtest and live trading inhabit different information worlds.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iINK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c9fb5ed-8c93-46af-8e5a-9e13968167c1_1189x590.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iINK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c9fb5ed-8c93-46af-8e5a-9e13968167c1_1189x590.png 424w, https://substackcdn.com/image/fetch/$s_!iINK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c9fb5ed-8c93-46af-8e5a-9e13968167c1_1189x590.png 848w, https://substackcdn.com/image/fetch/$s_!iINK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c9fb5ed-8c93-46af-8e5a-9e13968167c1_1189x590.png 1272w, https://substackcdn.com/image/fetch/$s_!iINK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c9fb5ed-8c93-46af-8e5a-9e13968167c1_1189x590.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iINK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c9fb5ed-8c93-46af-8e5a-9e13968167c1_1189x590.png" width="1189" height="590" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5c9fb5ed-8c93-46af-8e5a-9e13968167c1_1189x590.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:590,&quot;width&quot;:1189,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iINK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c9fb5ed-8c93-46af-8e5a-9e13968167c1_1189x590.png 424w, https://substackcdn.com/image/fetch/$s_!iINK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c9fb5ed-8c93-46af-8e5a-9e13968167c1_1189x590.png 848w, https://substackcdn.com/image/fetch/$s_!iINK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c9fb5ed-8c93-46af-8e5a-9e13968167c1_1189x590.png 1272w, https://substackcdn.com/image/fetch/$s_!iINK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5c9fb5ed-8c93-46af-8e5a-9e13968167c1_1189x590.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The official protocol and framework documentation supports this view from the software side. HTTP semantics are defined as stateless at the application-protocol level. That property makes HTTP well suited for resource retrieval, explicit commands, and idempotent inspection, while state continuity moves into higher layers. The OpenAPI specification makes HTTP service capabilities machine-readable through paths, parameters, schemas, and responses. FastAPI builds on that structure by generating OpenAPI descriptions and interactive documentation from Python declarations. Pydantic treats typed data models as executable contracts and emits JSON Schema from those models. Finance gives special weight to this alignment because state integrity sits at the center of the problem.</p><p>For a systematic trading system, the internal data model becomes a compact statement of admissible knowledge. A well-defined <code>Bar</code> object can enforce monotonic timestamps, nonnegative volume, high-low consistency, a declared timezone, and provenance metadata. A <code>Signal</code> object can enforce a causal timestamp, a horizon, a generation identifier, and a confidence field interpreted consistently by the risk layer. An <code>OrderIntent</code> object can separate intent from broker acknowledgment, so the system preserves a clean distinction between desired action, accepted action, and executed action. These structures carry operational value because they keep portfolio state, execution state, and research state aligned across time.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Zr-N!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Zr-N!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 424w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 848w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 1272w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Zr-N!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png" width="1200" height="610" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:610,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Zr-N!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 424w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 848w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 1272w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantbeckman.com/subscribe?"><span>Subscribe now</span></a></p><h4>Protocol semantics, transport choice, and system state</h4><p>A familiar hierarchy pairs REST with slower interactions, WebSocket with streaming interactions, and FIX with institutional workflows. A stronger formulation sees each protocol as an organizer of interaction and, through that role, as a designer of local architecture.</p><p>Start with HTTP. Under RFC 9110, HTTP defines resource-oriented request-response semantics, methods, status codes, headers, and representations. It serves clear operations with strong structure: fetching historical bars, querying account state, placing an order, canceling an order, requesting configuration, and obtaining a health report. It also supports documentation with high clarity. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yUPz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af3677-fc18-45b2-b377-38b30148585f_859x277.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yUPz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af3677-fc18-45b2-b377-38b30148585f_859x277.png 424w, https://substackcdn.com/image/fetch/$s_!yUPz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af3677-fc18-45b2-b377-38b30148585f_859x277.png 848w, https://substackcdn.com/image/fetch/$s_!yUPz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af3677-fc18-45b2-b377-38b30148585f_859x277.png 1272w, https://substackcdn.com/image/fetch/$s_!yUPz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af3677-fc18-45b2-b377-38b30148585f_859x277.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yUPz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af3677-fc18-45b2-b377-38b30148585f_859x277.png" width="859" height="277" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/75af3677-fc18-45b2-b377-38b30148585f_859x277.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:277,&quot;width&quot;:859,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:58617,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/190500174?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af3677-fc18-45b2-b377-38b30148585f_859x277.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yUPz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af3677-fc18-45b2-b377-38b30148585f_859x277.png 424w, https://substackcdn.com/image/fetch/$s_!yUPz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af3677-fc18-45b2-b377-38b30148585f_859x277.png 848w, https://substackcdn.com/image/fetch/$s_!yUPz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af3677-fc18-45b2-b377-38b30148585f_859x277.png 1272w, https://substackcdn.com/image/fetch/$s_!yUPz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af3677-fc18-45b2-b377-38b30148585f_859x277.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Request methods</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LpqW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358ddfb6-0a76-490f-b256-3e916bc54ef7_859x430.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LpqW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358ddfb6-0a76-490f-b256-3e916bc54ef7_859x430.png 424w, https://substackcdn.com/image/fetch/$s_!LpqW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358ddfb6-0a76-490f-b256-3e916bc54ef7_859x430.png 848w, https://substackcdn.com/image/fetch/$s_!LpqW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358ddfb6-0a76-490f-b256-3e916bc54ef7_859x430.png 1272w, https://substackcdn.com/image/fetch/$s_!LpqW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358ddfb6-0a76-490f-b256-3e916bc54ef7_859x430.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LpqW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358ddfb6-0a76-490f-b256-3e916bc54ef7_859x430.png" width="859" height="430" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/358ddfb6-0a76-490f-b256-3e916bc54ef7_859x430.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:430,&quot;width&quot;:859,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:76737,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/190500174?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358ddfb6-0a76-490f-b256-3e916bc54ef7_859x430.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LpqW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358ddfb6-0a76-490f-b256-3e916bc54ef7_859x430.png 424w, https://substackcdn.com/image/fetch/$s_!LpqW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358ddfb6-0a76-490f-b256-3e916bc54ef7_859x430.png 848w, https://substackcdn.com/image/fetch/$s_!LpqW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358ddfb6-0a76-490f-b256-3e916bc54ef7_859x430.png 1272w, https://substackcdn.com/image/fetch/$s_!LpqW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F358ddfb6-0a76-490f-b256-3e916bc54ef7_859x430.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Status codes</figcaption></figure></div><p>For internal trading services, that structure has high value. The stack gains clear contracts, reproducible input schemas, and rapid client generation.</p><p>HTTP also channels interaction through discrete exchanges. Applications that consume a continuous stream of trade events, order updates, heartbeats, or PnL deltas benefit from WebSocket. RFC 6455 defines a bidirectional protocol over TCP with an opening handshake and framed messages, built for two-way communication.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IKp0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd752399c-a161-4996-aacd-40a728e3feec_859x289.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IKp0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd752399c-a161-4996-aacd-40a728e3feec_859x289.png 424w, https://substackcdn.com/image/fetch/$s_!IKp0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd752399c-a161-4996-aacd-40a728e3feec_859x289.png 848w, https://substackcdn.com/image/fetch/$s_!IKp0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd752399c-a161-4996-aacd-40a728e3feec_859x289.png 1272w, https://substackcdn.com/image/fetch/$s_!IKp0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd752399c-a161-4996-aacd-40a728e3feec_859x289.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IKp0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd752399c-a161-4996-aacd-40a728e3feec_859x289.png" width="859" height="289" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d752399c-a161-4996-aacd-40a728e3feec_859x289.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:289,&quot;width&quot;:859,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:40881,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/190500174?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd752399c-a161-4996-aacd-40a728e3feec_859x289.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IKp0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd752399c-a161-4996-aacd-40a728e3feec_859x289.png 424w, https://substackcdn.com/image/fetch/$s_!IKp0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd752399c-a161-4996-aacd-40a728e3feec_859x289.png 848w, https://substackcdn.com/image/fetch/$s_!IKp0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd752399c-a161-4996-aacd-40a728e3feec_859x289.png 1272w, https://substackcdn.com/image/fetch/$s_!IKp0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd752399c-a161-4996-aacd-40a728e3feec_859x289.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Comparison</figcaption></figure></div><p>For example, Alpaca&#8217;s streaming documentation&#8212;I mean, the broker&#8212;presents trade, account, and order updates over WebSocket and highlights frame types across endpoints, plus authorization and stream subscription after connection. For a quant system, the implication is clear: <em>WebSocket provides continuity, and continuity assigns responsibility.</em> A persistent connection requires reconnect handling, duplicate control, interval recovery, subscription replay, sequence validation, and local buffering.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eiUI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21bd769e-cd32-49e5-9131-727dd6371a19_1047x597.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eiUI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21bd769e-cd32-49e5-9131-727dd6371a19_1047x597.png 424w, https://substackcdn.com/image/fetch/$s_!eiUI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21bd769e-cd32-49e5-9131-727dd6371a19_1047x597.png 848w, https://substackcdn.com/image/fetch/$s_!eiUI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21bd769e-cd32-49e5-9131-727dd6371a19_1047x597.png 1272w, https://substackcdn.com/image/fetch/$s_!eiUI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21bd769e-cd32-49e5-9131-727dd6371a19_1047x597.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eiUI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21bd769e-cd32-49e5-9131-727dd6371a19_1047x597.png" width="1047" height="597" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/21bd769e-cd32-49e5-9131-727dd6371a19_1047x597.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:597,&quot;width&quot;:1047,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:119806,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/190500174?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21bd769e-cd32-49e5-9131-727dd6371a19_1047x597.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eiUI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21bd769e-cd32-49e5-9131-727dd6371a19_1047x597.png 424w, https://substackcdn.com/image/fetch/$s_!eiUI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21bd769e-cd32-49e5-9131-727dd6371a19_1047x597.png 848w, https://substackcdn.com/image/fetch/$s_!eiUI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21bd769e-cd32-49e5-9131-727dd6371a19_1047x597.png 1272w, https://substackcdn.com/image/fetch/$s_!eiUI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21bd769e-cd32-49e5-9131-727dd6371a19_1047x597.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;fec69625-79aa-45ea-b712-1a1dbb8974f7&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">{
  "action": "auth",
  "key": "{YOUR_API_KEY_ID}",
  "secret": "{YOUR_API_SECRET_KEY}"
}</code></pre></div><p><em>FIX</em> addresses a different problem. The FIX Trading Community describes FIX as: </p><blockquote><p>A standardized transaction language across the securities trade cycle, with message types aligned to steps such as quote request and new order, and with standardized fields as the building blocks. </p></blockquote><p>That matters because institutional trading depends on precise business semantics across a workflow that spans indication, order, execution report, allocation, and post-trade reporting. FIX draws strength from a protocol that already speaks the language of the transaction. A modern retail or semi-professional quant stack may begin on other connectivity paths, yet it can still absorb the lesson: trading systems gain stability when message meanings stay explicit, durable, and tied to the lifecycle they govern.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6P6Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d7ebda4-eefa-441c-bcff-e95bd231abcc_1171x727.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6P6Y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d7ebda4-eefa-441c-bcff-e95bd231abcc_1171x727.png 424w, https://substackcdn.com/image/fetch/$s_!6P6Y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d7ebda4-eefa-441c-bcff-e95bd231abcc_1171x727.png 848w, https://substackcdn.com/image/fetch/$s_!6P6Y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d7ebda4-eefa-441c-bcff-e95bd231abcc_1171x727.png 1272w, https://substackcdn.com/image/fetch/$s_!6P6Y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d7ebda4-eefa-441c-bcff-e95bd231abcc_1171x727.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6P6Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d7ebda4-eefa-441c-bcff-e95bd231abcc_1171x727.png" width="1171" height="727" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0d7ebda4-eefa-441c-bcff-e95bd231abcc_1171x727.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:727,&quot;width&quot;:1171,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:295288,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/190500174?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d7ebda4-eefa-441c-bcff-e95bd231abcc_1171x727.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6P6Y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d7ebda4-eefa-441c-bcff-e95bd231abcc_1171x727.png 424w, https://substackcdn.com/image/fetch/$s_!6P6Y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d7ebda4-eefa-441c-bcff-e95bd231abcc_1171x727.png 848w, https://substackcdn.com/image/fetch/$s_!6P6Y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d7ebda4-eefa-441c-bcff-e95bd231abcc_1171x727.png 1272w, https://substackcdn.com/image/fetch/$s_!6P6Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d7ebda4-eefa-441c-bcff-e95bd231abcc_1171x727.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">FIX Protocol and technical standards</figcaption></figure></div><p>The mathematics of transport stays simple. Let <em>T<sub>total</sub></em> denote end-to-end delay from the moment a signal becomes ready to the moment a fill event reaches local state. Then</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;T_{\\text{total}} = T_{\\text{signal}} + T_{\\text{serialize}} + T_{\\text{uplink}} + T_{\\text{broker}} + T_{\\text{venue}} + T_{\\text{downlink}} + T_{\\text{reconcile}}&quot;,&quot;id&quot;:&quot;WLAXFIHBQX&quot;}" data-component-name="LatexBlockToDOM"></div><p>A robust analysis evaluates the whole sum. In many implementations, <em>T<sub>broker</sub></em> and <em>T<sub>reconcile</sub></em> generate more variation than raw network travel time. Serialization, authentication, request signing, broker throttling, internal queuing, and local reconciliation can dominate the tails. Tail behavior matters more than averages because losses tend to concentrate there. A mean delay of 20 ms with a 95th percentile of 60 ms may fit one strategy and damage another whose edge concentrates in short-lived bursts.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iJka!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab6b56-6d43-48d5-9ac6-ece5e203f7e8_765x449.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iJka!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab6b56-6d43-48d5-9ac6-ece5e203f7e8_765x449.png 424w, https://substackcdn.com/image/fetch/$s_!iJka!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab6b56-6d43-48d5-9ac6-ece5e203f7e8_765x449.png 848w, https://substackcdn.com/image/fetch/$s_!iJka!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab6b56-6d43-48d5-9ac6-ece5e203f7e8_765x449.png 1272w, https://substackcdn.com/image/fetch/$s_!iJka!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab6b56-6d43-48d5-9ac6-ece5e203f7e8_765x449.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iJka!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab6b56-6d43-48d5-9ac6-ece5e203f7e8_765x449.png" width="765" height="449" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f4ab6b56-6d43-48d5-9ac6-ece5e203f7e8_765x449.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:449,&quot;width&quot;:765,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:33948,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/190500174?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab6b56-6d43-48d5-9ac6-ece5e203f7e8_765x449.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iJka!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab6b56-6d43-48d5-9ac6-ece5e203f7e8_765x449.png 424w, https://substackcdn.com/image/fetch/$s_!iJka!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab6b56-6d43-48d5-9ac6-ece5e203f7e8_765x449.png 848w, https://substackcdn.com/image/fetch/$s_!iJka!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab6b56-6d43-48d5-9ac6-ece5e203f7e8_765x449.png 1272w, https://substackcdn.com/image/fetch/$s_!iJka!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4ab6b56-6d43-48d5-9ac6-ece5e203f7e8_765x449.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The histogram decomposes end-to-end order latency into plausible components and shows the aggregate distribution. The plot reveals that total latency is a sum of heterogeneous terms and that the tail can widen even when most components remain well behaved.</p><h4>Risk and financial APIs limitation</h4><p>Once the API is treated as a formal component, the next task is classification. Risk in financial APIs represents a family of failure modes that interact. A useful taxonomy separates at least seven categories: <em>data risk, temporal risk, schema risk, session risk, throughput risk, execution risk, and governance risk. </em></p><ol><li><p><strong>Data risk</strong><em> </em>concerns what is transmitted. This includes missing fields, inconsistent bar construction, delayed corrections, undocumented transformations, and ambiguity about what a timestamp refers to. Is the bar timestamp the interval open, the interval close, or publication time? Are trades condition-filtered? Are odd lots included? Is volume consolidated at the same cadence in historical and live endpoints? Vendor documentation sometimes answers these questions, sometimes not. The point is that the risk exists even when the feed looks clean. A clean feed can still describe the wrong object for the strategy.</p></li><li><p><strong>Temporal risk </strong>concerns when the data is available and in which order. Clock drift between client, broker, and data vendor is the obvious part. More subtle is the distinction between event time and arrival time. A message may encode one time but arrive at another. Streaming systems can also deliver temporary disorder. If the strategy assumes a total order while the transport offers only a best-effort order plus reconnect recovery, then the local state machine must restore order or at least detect that order was broken.</p></li><li><p><strong>Schema risk</strong> concerns how the data is structured. An endpoint that changes a field name, adds a nullable attribute, changes a numeric type from integer to string, or alters nesting may be perfectly legal at the API level and still break live trading. This is why type validation libraries matter. </p></li><li><p><strong>Session risk </strong>is operational but critical. Authentication expiry, refresh tokens, signed requests, environment separation, and broker session exclusivity determine whether the trading path remains live. Some APIs are quite clear that trading-enabled sessions have different restrictions than generic access, including brokerage-level single-session limits.</p></li><li><p><strong>Throughput risk </strong>includes rate limits, quotas, pagination, backpressure, and resource exhaustion. This category is often underestimated by quants who work first in notebooks. Yet the feasible research surface is shaped by what the API allows. If a cross-sectional study requires more requests per minute than the provider permits, then the signal either needs a different collection design, a local cache, a licensed feed, or a narrower universe. Throughput is a constraint on the set of admissible strategies.</p></li><li><p><strong>Execution risk</strong> concerns the gap between request acceptance and actual market interaction. Here a good example of why this matters: &#8220;the order object has identifiers, statuses, and a lifecycle that can be queried after placement. That is useful, but it also confirms the obvious point that the initial placement call is only one transition in a larger process. SEC routing and execution disclosures exist because the path from broker to venue materially affects outcomes&#8221;. In trading, the request path and the execution path should never be conflated.</p></li><li><p><strong>Governance risk</strong> covers versioning, deprecation, environment drift, and organizational ambiguity. An internal API that is undocumented, lacks version tags, or mixes research-only fields with live-only fields can corrupt an otherwise sound strategy. Governance is what keeps the contract stable long enough for experiments to be comparable.</p></li></ol><p>A convenient formalization is to model observed system risk as the union of these categories:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;R_{\\mathrm{API}}\n=\nR_{\\mathrm{data}}\n\\cup\nR_{\\mathrm{time}}\n\\cup\nR_{\\mathrm{schema}}\n\\cup\nR_{\\mathrm{session}}\n\\cup\nR_{\\mathrm{throughput}}\n\\cup\nR_{\\mathrm{exec}}\n\\cup\nR_{\\mathrm{governance}}&quot;,&quot;id&quot;:&quot;VEJBSYOXAB&quot;}" data-component-name="LatexBlockToDOM"></div><p>Each component can be associated with observables: gap counts, duplicate counts, validation failures, authentication renewals, request rejections, order rejects, and contract-version mismatches. The important point is that API risk becomes measurable only after categories are explicit.</p><p>The table below compresses this pitfalls:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YT9s!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07bdaea1-ad3d-4b3c-883b-92bfbc33a22c_1021x645.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YT9s!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07bdaea1-ad3d-4b3c-883b-92bfbc33a22c_1021x645.png 424w, https://substackcdn.com/image/fetch/$s_!YT9s!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07bdaea1-ad3d-4b3c-883b-92bfbc33a22c_1021x645.png 848w, https://substackcdn.com/image/fetch/$s_!YT9s!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07bdaea1-ad3d-4b3c-883b-92bfbc33a22c_1021x645.png 1272w, https://substackcdn.com/image/fetch/$s_!YT9s!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07bdaea1-ad3d-4b3c-883b-92bfbc33a22c_1021x645.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YT9s!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07bdaea1-ad3d-4b3c-883b-92bfbc33a22c_1021x645.png" width="1021" height="645" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/07bdaea1-ad3d-4b3c-883b-92bfbc33a22c_1021x645.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:645,&quot;width&quot;:1021,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:114949,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/190500174?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07bdaea1-ad3d-4b3c-883b-92bfbc33a22c_1021x645.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YT9s!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07bdaea1-ad3d-4b3c-883b-92bfbc33a22c_1021x645.png 424w, https://substackcdn.com/image/fetch/$s_!YT9s!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07bdaea1-ad3d-4b3c-883b-92bfbc33a22c_1021x645.png 848w, https://substackcdn.com/image/fetch/$s_!YT9s!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07bdaea1-ad3d-4b3c-883b-92bfbc33a22c_1021x645.png 1272w, https://substackcdn.com/image/fetch/$s_!YT9s!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07bdaea1-ad3d-4b3c-883b-92bfbc33a22c_1021x645.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Throughput deserves one extra comment because it changes research conclusions. Assume that trade opportunities survive for a characteristic time constant &#964; and that the system polls every &#916; units of time rather than consuming a push stream. A rough first-order miss model is:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;P(\\mathrm{miss}) \\approx \\exp\\!\\left(-\\frac{\\tau}{\\Delta}\\right)&quot;,&quot;id&quot;:&quot;WJHNJQHEUH&quot;}" data-component-name="LatexBlockToDOM"></div><p>This formula is for illustrative purposes. It says that when opportunity duration is short relative to the observation interval, miss probability rises quickly. Coarser polling  changes the distribution of observed opportunities. The picture below visualizes that relationship:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BhWp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca9516-cd62-40d4-b205-1154a48296a7_610x361.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BhWp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca9516-cd62-40d4-b205-1154a48296a7_610x361.png 424w, https://substackcdn.com/image/fetch/$s_!BhWp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca9516-cd62-40d4-b205-1154a48296a7_610x361.png 848w, https://substackcdn.com/image/fetch/$s_!BhWp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca9516-cd62-40d4-b205-1154a48296a7_610x361.png 1272w, https://substackcdn.com/image/fetch/$s_!BhWp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca9516-cd62-40d4-b205-1154a48296a7_610x361.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BhWp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca9516-cd62-40d4-b205-1154a48296a7_610x361.png" width="610" height="361" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/64ca9516-cd62-40d4-b205-1154a48296a7_610x361.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:361,&quot;width&quot;:610,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:29377,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/190500174?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca9516-cd62-40d4-b205-1154a48296a7_610x361.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BhWp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca9516-cd62-40d4-b205-1154a48296a7_610x361.png 424w, https://substackcdn.com/image/fetch/$s_!BhWp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca9516-cd62-40d4-b205-1154a48296a7_610x361.png 848w, https://substackcdn.com/image/fetch/$s_!BhWp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca9516-cd62-40d4-b205-1154a48296a7_610x361.png 1272w, https://substackcdn.com/image/fetch/$s_!BhWp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64ca9516-cd62-40d4-b205-1154a48296a7_610x361.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Quants often frame API problems as reliability problems. They are also selection problems. The feed, the protocol, and the quota choose which events you ever get the chance to model. That means a strategy discovered under one data-access regime may not even be defined under another. Once this is understood, the response becomes sharper. </p><h4>Historical-live non-equivalence and data reconstruction error</h4><p>Historical endpoints and live endpoints are seldom equivalent in the strict sense required by causal research. They may deliver related objects, but related is not enough. Historical data is often cleaned, deduplicated, repaired, aligned to bar boundaries, and packaged into stable records. Live data is incremental, provisional, and susceptible to temporary disorder. A strategy that learns on one and trades on the other inherits a<em> reconstruction problem.</em></p><p>There are at least four sources of non-equivalence:</p><ol><li><p>The first is <strong>finalization</strong>: Historical bars tend to be final objects. Live bars, unless the provider specifically publishes only completed intervals, may be in progress. </p></li><li><p>The second is <strong>correction policy</strong><em>:</em> Historical vendors can revise prior records after exchange corrections or internal data-quality routines. Live systems receive the pre-correction path and may or may not later receive explicit correction messages. </p></li><li><p>The third is <strong>aggregation method</strong>: A historical endpoint may aggregate on server-side rules that differ from a client&#8217;s local reconstruction from trade ticks. </p></li><li><p>The last one is <strong>delivery semantics</strong>: Historical data is fetched as a completed array. Live data is delivered as a stream in which messages can be delayed, duplicated, or arrive after reconnect.</p></li></ol><p>Any research process should ask a simple but uncomfortable question: i<em>s the historical object used in research reproducible from the live stream using only information available at the time</em>? If the answer is no, then the strategy is at risk of hidden lookahead or deployment drift. Sometimes the mismatch is harmless. Often it is not. Opening-range logic, event-triggered strategies, and execution-sensitive systems are especially vulnerable because they depend on exact temporal boundaries.</p><p>One clean way to formalize the problem is to define a reconstruction operator G that maps a live stream path into a bar or state record:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;b_t^{live-recon} = G(m_{0:t})&quot;,&quot;id&quot;:&quot;NOEXHANYKF&quot;}" data-component-name="LatexBlockToDOM"></div><p>The historical dataset supplies b<sub>t</sub><sup>hist</sup>. The research assumption that often goes unstated is that <em>b<sub>t</sub><sup>hist</sup> = b<sub>t</sub><sup>live_recon</sup></em>. This is rare. The true object of concern is the reconstruction error:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;&#948;_t = b_t^{hist} - b_t^{live-recon}&quot;,&quot;id&quot;:&quot;KPMCWDJJSE&quot;}" data-component-name="LatexBlockToDOM"></div><p>A strategy that is stable under small &#948;<em><sub>t</sub></em> may survive deployment. A strategy that changes sign, entry timing, or position size under small &#948;<em><sub>t</sub></em> may lose money even if the backtest looks good. This is one reason why mature groups insist on <em>replay tests.</em> They record live messages, reconstruct the internal state offline, and compare it with both the production decision log and the historical vendor view.</p><p>Out-of-order delivery is a particularly sharp example. Suppose messages carry event timestamps <em>e<sub>i</sub></em> but arrive at times <em>a<sub>i</sub></em>. A client that sorts by arrival time instead of event time assumes that sign(<em>a<sub>i</sub></em> - <em>a<sub>j</sub></em>) equals sign(<em>e<sub>i</sub></em> - <em>e<sub>j</sub></em>) for all pairs. That assumption is false in many real networks. Once it breaks, local bars, rolling indicators, or event-triggered conditions may shift. The correct response is to build reordering logic with bounded buffers and explicit policy for what to do when order cannot be restored with confidence.</p><p>Here is a minimal sketch of such a guard:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;09716d76-be62-4dcd-9251-47c208b32b22&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">from dataclasses import dataclass
from heapq import heappush, heappop


@dataclass(order=True)
class MarketEvent:
    seq: int
    ts_event_ns: int
    payload: dict


class ReorderBuffer:
    def __init__(self, max_gap: int = 32):
        self.expected = 0
        self.max_gap = max_gap
        self.heap = []

    def push(self, event: MarketEvent):
        if event.seq &lt; self.expected:
            return []  # duplicate or stale replay

        heappush(self.heap, event)
        out = []

        while self.heap and self.heap[0].seq == self.expected:
            out.append(heappop(self.heap))
            self.expected += 1

        if self.heap and self.heap[0].seq - self.expected &gt; self.max_gap:
            raise RuntimeError("sequence gap too large")

        return out</code></pre></div><p>The point of the snippet is to show the shape of the invariant. Local state should advance only when sequence integrity is acceptable. If the gap exceeds a declared tolerance, the client should raise an incident, resubscribe, or rebuild state from a safer source.</p><p>The next plot shows the operational consequence of delayed observations on a simple synthetic crossover-style entry. The delayed observation sees the same price path later and enters later. The lesson is that even modest observation delay can transform entry timing in a way that a clean historical backtest never exposed.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!k1Hg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2f7726-4c67-4fe1-88d6-2d70fae394b6_1719x695.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!k1Hg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2f7726-4c67-4fe1-88d6-2d70fae394b6_1719x695.png 424w, https://substackcdn.com/image/fetch/$s_!k1Hg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2f7726-4c67-4fe1-88d6-2d70fae394b6_1719x695.png 848w, https://substackcdn.com/image/fetch/$s_!k1Hg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2f7726-4c67-4fe1-88d6-2d70fae394b6_1719x695.png 1272w, https://substackcdn.com/image/fetch/$s_!k1Hg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2f7726-4c67-4fe1-88d6-2d70fae394b6_1719x695.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!k1Hg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2f7726-4c67-4fe1-88d6-2d70fae394b6_1719x695.png" width="1456" height="589" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9d2f7726-4c67-4fe1-88d6-2d70fae394b6_1719x695.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:589,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:127426,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/190500174?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2f7726-4c67-4fe1-88d6-2d70fae394b6_1719x695.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!k1Hg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2f7726-4c67-4fe1-88d6-2d70fae394b6_1719x695.png 424w, https://substackcdn.com/image/fetch/$s_!k1Hg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2f7726-4c67-4fe1-88d6-2d70fae394b6_1719x695.png 848w, https://substackcdn.com/image/fetch/$s_!k1Hg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2f7726-4c67-4fe1-88d6-2d70fae394b6_1719x695.png 1272w, https://substackcdn.com/image/fetch/$s_!k1Hg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2f7726-4c67-4fe1-88d6-2d70fae394b6_1719x695.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Delayed entre vs True entry</figcaption></figure></div><p>A common response is to smooth the signal until these issues disappear. That can help, but it does not solve the identification problem. If the strategy only works when final corrected bars are used, then the strategy depends on a state that may not exist in live trading. </p><p>First, define decision-time objects. Second, test historical-live parity by replaying captured live streams into the same internal schemas used in production. Third, store provenance metadata with every derived bar or indicator: source, reconstruction mode, timezone, sequence completeness, and whether the object is provisional or finalized. Fourth, make non-equivalence visible in research by introducing uncertainty envelopes. If a signal flips under plausible reconstruction perturbations, that signal should not be promoted.</p><h4>Execution state machines and order routing</h4><p>The industry still tolerates expressions like: &#8220;send the order&#8221;, &#8220;the order is in&#8221;, &#8220;the order got filled&#8221;. For software, these phrases hide critical distinctions. For PnL, they hide money. However, execution should be modeled as a state machine.</p><p>A request to place an order is only a statement of intent until the broker acknowledges it. The acknowledgment is not yet a fill or the fill may be partial. The remaining quantity may rest, cancel, expire, or be modified by subsequent logic. Some APIs reflect these transitions in a REST resource that can be queried after placement; others also emit asynchronous trade or order updates over a stream; sometimes users place, monitor, and cancel orders through the Trading API, and that order identifiers and status objects support later inspection. The best approach is to maintain two separate layers: <em>account and order routing</em>. That separation is healthy because it prevents one channel from pretending to be the whole lifecycle.</p><p>Okay, let&#8217;s talk about the second one: routing. SEC rules on order execution and order routing disclosure exist because the path an order takes after leaving the customer-facing system affects economic results. A retail API client sees only part of the venue-level journey, and the system designer should treat that journey as relevant. Even if the internal API abstracts away venue detail, it should preserve enough state to distinguish user intent, broker acceptance, downstream routing outcome, and final position reconciliation.</p><p>A minimal lifecycle can be written as:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{Intent} \\rightarrow \\text{Accepted} \\rightarrow \\text{Working} \\rightarrow \\text{Partially filled} \\rightarrow \\text{F\nilled}\n&quot;,&quot;id&quot;:&quot;WRORVBUDAM&quot;}" data-component-name="LatexBlockToDOM"></div><p>with additional branches for rejected, canceled, expired, and replaced. Not every broker surfaces each branch in the same way. The internal system should anyway. Doing so has three advantages. First, it prevents false certainty. Second, it enables reconciliation. Third, it supports simulation. A sound backtest represents the full state machine between signal and filled position, because those intermediate transitions reveal failure modes that materially shape PnL.</p><p>Consider expected execution price. A crude but useful decomposition is:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;P_{\\mathrm{exec}} = P_{\\mathrm{ref}} + S_{\\mathrm{queue}} + S_{\\mathrm{latency}} + S_{\\mathrm{impact}} + S_{\\mathrm{fees}}\n&quot;,&quot;id&quot;:&quot;RMPXOCPUNY&quot;}" data-component-name="LatexBlockToDOM"></div><p>Here <em>P<sub>ref</sub></em> is a chosen reference price, <em>S<sub>queue</sub></em> captures queue-position effects and spread interaction, <em>S<sub>latency</sub></em> captures adverse movement while the order is in flight, <em>S<sub>impact</sub></em> captures self-induced price movement for non-negligible size, and <em>S<sub>fees</sub></em> captures commissions, exchange fees, rebates, and financing where relevant. Many prototype systems focus on <em>S<sub>latency</sub></em> and ignore the rest. That is tolerable for a toy simulator, but not for a research workflow that wants to claim tradability. Even a simple simulator should at least model partial fills, expiry, and side-dependent slippage under volatility.</p><p>An internal order model should therefore separate three objects:</p><ol><li><p><strong>OrderIntent</strong>: what the strategy wants. </p></li><li><p><strong>BrokerOrderState</strong>: what the broker has acknowledged and how it has evolved. </p></li><li><p><strong>PositionLedgerEntry</strong>: what the portfolio believes happened after reconciliation. </p></li></ol><p>Conflating them creates the classic bug where the strategy believes it is flat because its own intent was to exit, while the broker still shows a partially open quantity.</p><p>A minimal type sketch might look like this:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;0383c249-993c-4a4a-8808-40be0a81c760&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">from enum import Enum
from pydantic import BaseModel, Field, field_validator
from typing import Optional


class OrderSide(str, Enum):
    BUY = "BUY"
    SELL = "SELL"


class OrderState(str, Enum):
    INTENT = "INTENT"
    ACCEPTED = "ACCEPTED"
    WORKING = "WORKING"
    PARTIALLY_FILLED = "PARTIALLY_FILLED"
    FILLED = "FILLED"
    REJECTED = "REJECTED"
    CANCELED = "CANCELED"
    EXPIRED = "EXPIRED"


class OrderIntent(BaseModel):
    client_order_id: str
    symbol: str
    side: OrderSide
    qty: float = Field(gt=0)
    limit_price: Optional[float] = Field(default=None, gt=0)


class BrokerOrderState(BaseModel):
    client_order_id: str
    broker_order_id: Optional[str] = None
    state: OrderState
    filled_qty: float = Field(ge=0)
    avg_fill_price: Optional[float] = None

    @field_validator("avg_fill_price")
    @classmethod
    def positive_price_if_present(cls, v):
        if v is not None and v &lt;= 0:
            raise ValueError("avg_fill_price must be positive")
        return v</code></pre></div><p>The exact fields can be adjusted. Once these objects are defined, live logic becomes cleaner. Reconciliation compares the latest broker state with the internal ledger. Simulation advances through legal states instead of jumping from signal to fill. Risk logic defines kill-switch conditions in terms of state divergence, not only PnL.</p><p>Quants often focus on price improvement as the hard part of execution. In many systems, the hard part is state certainty. A robust system determines with high confidence whether an order is live, whether a cancel request succeeded, and whether a partial fill changed net exposure. Alpha only matters when the process itself is reliable. The real objective is to build an execution engine whose states are clear enough that later improvements rest on solid assumptions.</p><p>This leads to prototype API design. Even at the prototyping stage, order endpoints benefit from idempotency, accept client-generated identifiers, distinguish acceptance from fill, and expose a machine-readable state model. Internal consumers rely on structured state as the source of truth. Human-readable logs still help, but they support the contract rather than define it.</p><p>The external side of the problem therefore becomes clear: financial APIs present data and orders as evolving states carried through channels with meaningful semantics. The constructive response is to assign those states formal names and transitions. Once that structure is in place, the internal API becomes the stable surface across which research, simulation, and live code remain aligned.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lF1e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lF1e!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!lF1e!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!lF1e!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!lF1e!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lF1e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1158490,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/198696914?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!lF1e!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!lF1e!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!lF1e!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!lF1e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.amazon.com/Quantitative-Research-Foundations-Quant-Beckman/dp/B0GWGJWDS3&quot;,&quot;text&quot;:&quot;Send me a copy&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.amazon.com/Quantitative-Research-Foundations-Quant-Beckman/dp/B0GWGJWDS3"><span>Send me a copy</span></a></p><h4>Simulation and live trading</h4><p>One script uses the same field names as the next, timezones remain consistent across services, the execution engine works with normalized order states, the backtester uses the same fill object as live trading, and the monitoring service reads position exposure from a shared contract rather than reconstructing it from logs. That  is manageable at small scale and essential at medium scale. The solution is to design an internal API.</p><p>The main purpose of an internal API is contract preservation. Research, paper trading, backtesting, and live services should consume and emit the same conceptual objects even when their data sources differ. If one system produces <code>Signal(direction, generated_at, horizon, confidence)</code> and another expects <code>alpha_score</code>, <code>entry_ts</code>, and <code>weight_hint</code>, the boundary needs stronger alignment. The internal API creates that alignment by enforcing shared names, units, valid ranges, and temporal interpretation.</p><p>A sensible contract design starts with five invariants:</p><ol><li><p><strong>Causality</strong>: Every object that can influence a decision carries a timestamp or event key that identifies when it became admissible. This includes bars, features, signals, risk checks, and order updates. With that structure in place, replay testing becomes meaningful.</p></li><li><p><strong>Provenance</strong>: A bar is more than OHLCV. It carries information about whether it came from vendor history, live reconstruction, a synthetic resampler, or a replay archive. That small field turns future debugging into straightforward engineering.</p></li><li><p><strong>State separability</strong>: Data objects, signal objects, order-intent objects, broker-state objects, and portfolio-ledger objects each remain distinct. This separation keeps assumptions from leaking across modules and preserves clarity at the interfaces.</p></li><li><p><strong>Versioning</strong>: Schemas evolve, and they should evolve explicitly. A <code>schema_version</code> field together with artifacted OpenAPI snapshots provides inexpensive and reliable protection.</p></li><li><p><strong>Idempotency</strong>: Commands that change state, especially order-related commands, should support replay without accidental duplication. Client order IDs provide the standard mechanism.</p></li></ol><p>These invariants can be supported with concise Pydantic models. Here is a small example:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;92e3c7d5-e9f9-4b3b-b16b-aba26bafb311&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">from datetime import datetime, timezone
from pydantic import BaseModel, Field, field_validator
from typing import Literal


class Bar(BaseModel):
    schema_version: str = "1.0"
    source: Literal["vendor_history", "live_recon", "replay"]
    symbol: str
    ts_open: datetime
    ts_close: datetime
    open: float = Field(gt=0)
    high: float = Field(gt=0)
    low: float = Field(gt=0)
    close: float = Field(gt=0)
    volume: float = Field(ge=0)

    @field_validator("ts_open", "ts_close")
    @classmethod
    def enforce_timezone(cls, v: datetime):
        if v.tzinfo is None:
            raise ValueError("timestamps must be timezone-aware")
        return v.astimezone(timezone.utc)


class Signal(BaseModel):
    schema_version: str = "1.0"
    generated_at: datetime
    symbol: str
    direction: int
    horizon_s: int = Field(gt=0)
    confidence: float = Field(ge=0.0, le=1.0)
    model_tag: str</code></pre></div><p>The snippet already delivers three concrete benefits. Invalid states fail early, schemas become inspectable by both humans and machines and, client libraries can be generated or written against a stable description rather than inherited through oral tradition.</p><p>The internal API also makes research and live mode comparable by design. A strong pattern places all market-data acquisition behind adapter interfaces and exposes only canonical internal models to the rest of the stack. The rest of the code then works with the same objects whether bars came from Alpaca, IBKR, a CSV archive, a replay file, or MetaTrader. Sources are not interchangeable, but their specific oddities belong at the boundary, where they can be normalized, instead of spreading through the strategy codebase.</p><p>Do you know what is premature? To build a large platform before the contracts are understood. A lean internal API can live inside a single FastAPI application with a few strict models and a small set of endpoints. What matters is that the contracts are defined before the complexity arrives.</p><p>A practical minimal endpoint set for a quant prototyping API includes <code>/health</code>, <code>/bars</code>, <code>/signal/run</code>, <code>/orders/simulate</code>, <code>/orders/submit</code>, <code>/positions</code>, <code>/portfolio/state</code>, and <code>/backtest/run</code>. Each one benefits from typed inputs and outputs, deterministic validation, and a precise statement of time semantics.</p><p>The internal API also supports replay, allowing a team to verify that the object evaluated in research matches the object the live system would have seen. An endpoint that consumes archived messages and emits canonical internal states often adds more value than a second optimization endpoint. Little by little we will be building things like this: </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kG1j!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F900c7fd1-9507-4857-8597-be81a3bd3157_1506x389.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kG1j!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F900c7fd1-9507-4857-8597-be81a3bd3157_1506x389.png 424w, https://substackcdn.com/image/fetch/$s_!kG1j!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F900c7fd1-9507-4857-8597-be81a3bd3157_1506x389.png 848w, https://substackcdn.com/image/fetch/$s_!kG1j!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F900c7fd1-9507-4857-8597-be81a3bd3157_1506x389.png 1272w, https://substackcdn.com/image/fetch/$s_!kG1j!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F900c7fd1-9507-4857-8597-be81a3bd3157_1506x389.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kG1j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F900c7fd1-9507-4857-8597-be81a3bd3157_1506x389.png" width="1456" height="376" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/900c7fd1-9507-4857-8597-be81a3bd3157_1506x389.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:376,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:129673,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/190500174?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F900c7fd1-9507-4857-8597-be81a3bd3157_1506x389.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kG1j!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F900c7fd1-9507-4857-8597-be81a3bd3157_1506x389.png 424w, https://substackcdn.com/image/fetch/$s_!kG1j!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F900c7fd1-9507-4857-8597-be81a3bd3157_1506x389.png 848w, https://substackcdn.com/image/fetch/$s_!kG1j!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F900c7fd1-9507-4857-8597-be81a3bd3157_1506x389.png 1272w, https://substackcdn.com/image/fetch/$s_!kG1j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F900c7fd1-9507-4857-8597-be81a3bd3157_1506x389.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>Creating the architecture for a trading API</h4>
      <p>
          <a href="https://www.quantbeckman.com/p/with-code-infra-financial-apis">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[QUANT LECTURE] Calibration and scoring under uncertainty ]]></title><description><![CDATA[Market Inefficiencies - Information Theoretic Approach]]></description><link>https://www.quantbeckman.com/p/quant-lecture-calibration-and-scoring</link><guid isPermaLink="false">https://www.quantbeckman.com/p/quant-lecture-calibration-and-scoring</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Fri, 06 Mar 2026 13:43:22 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/8e1b8324-a75c-4bf2-b7cb-3756aa7bdf53_1544x1032.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Voqz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d52f87-52f2-4608-b685-f89363684f1c_1456x911.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Voqz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d52f87-52f2-4608-b685-f89363684f1c_1456x911.png 424w, https://substackcdn.com/image/fetch/$s_!Voqz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d52f87-52f2-4608-b685-f89363684f1c_1456x911.png 848w, https://substackcdn.com/image/fetch/$s_!Voqz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d52f87-52f2-4608-b685-f89363684f1c_1456x911.png 1272w, https://substackcdn.com/image/fetch/$s_!Voqz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d52f87-52f2-4608-b685-f89363684f1c_1456x911.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Voqz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d52f87-52f2-4608-b685-f89363684f1c_1456x911.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e6d52f87-52f2-4608-b685-f89363684f1c_1456x911.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:505755,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/190082614?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d52f87-52f2-4608-b685-f89363684f1c_1456x911.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Voqz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d52f87-52f2-4608-b685-f89363684f1c_1456x911.png 424w, https://substackcdn.com/image/fetch/$s_!Voqz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d52f87-52f2-4608-b685-f89363684f1c_1456x911.png 848w, https://substackcdn.com/image/fetch/$s_!Voqz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d52f87-52f2-4608-b685-f89363684f1c_1456x911.png 1272w, https://substackcdn.com/image/fetch/$s_!Voqz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe6d52f87-52f2-4608-b685-f89363684f1c_1456x911.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZibY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd396449-83d7-4bd6-b7f3-85793f10e885_1040x620.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZibY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd396449-83d7-4bd6-b7f3-85793f10e885_1040x620.png 424w, https://substackcdn.com/image/fetch/$s_!ZibY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd396449-83d7-4bd6-b7f3-85793f10e885_1040x620.png 848w, https://substackcdn.com/image/fetch/$s_!ZibY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd396449-83d7-4bd6-b7f3-85793f10e885_1040x620.png 1272w, https://substackcdn.com/image/fetch/$s_!ZibY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd396449-83d7-4bd6-b7f3-85793f10e885_1040x620.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZibY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd396449-83d7-4bd6-b7f3-85793f10e885_1040x620.png" width="1040" height="620" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bd396449-83d7-4bd6-b7f3-85793f10e885_1040x620.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:620,&quot;width&quot;:1040,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:126538,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/190082614?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd396449-83d7-4bd6-b7f3-85793f10e885_1040x620.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZibY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd396449-83d7-4bd6-b7f3-85793f10e885_1040x620.png 424w, https://substackcdn.com/image/fetch/$s_!ZibY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd396449-83d7-4bd6-b7f3-85793f10e885_1040x620.png 848w, https://substackcdn.com/image/fetch/$s_!ZibY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd396449-83d7-4bd6-b7f3-85793f10e885_1040x620.png 1272w, https://substackcdn.com/image/fetch/$s_!ZibY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbd396449-83d7-4bd6-b7f3-85793f10e885_1040x620.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized</strong> by clicking on the image below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YMw1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F218bfcda-535a-4f00-a3f9-4b5a40aa86d4_1456x971.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YMw1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F218bfcda-535a-4f00-a3f9-4b5a40aa86d4_1456x971.png 424w, https://substackcdn.com/image/fetch/$s_!YMw1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F218bfcda-535a-4f00-a3f9-4b5a40aa86d4_1456x971.png 848w, https://substackcdn.com/image/fetch/$s_!YMw1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F218bfcda-535a-4f00-a3f9-4b5a40aa86d4_1456x971.png 1272w, https://substackcdn.com/image/fetch/$s_!YMw1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F218bfcda-535a-4f00-a3f9-4b5a40aa86d4_1456x971.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YMw1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F218bfcda-535a-4f00-a3f9-4b5a40aa86d4_1456x971.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/218bfcda-535a-4f00-a3f9-4b5a40aa86d4_1456x971.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:677424,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/190082614?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F218bfcda-535a-4f00-a3f9-4b5a40aa86d4_1456x971.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YMw1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F218bfcda-535a-4f00-a3f9-4b5a40aa86d4_1456x971.png 424w, https://substackcdn.com/image/fetch/$s_!YMw1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F218bfcda-535a-4f00-a3f9-4b5a40aa86d4_1456x971.png 848w, https://substackcdn.com/image/fetch/$s_!YMw1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F218bfcda-535a-4f00-a3f9-4b5a40aa86d4_1456x971.png 1272w, https://substackcdn.com/image/fetch/$s_!YMw1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F218bfcda-535a-4f00-a3f9-4b5a40aa86d4_1456x971.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;text&quot;:&quot;INDEX&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.quantbeckman.com/p/welcome"><span>INDEX</span></a></p><div><hr></div><h4>Calibration and scoring under uncertainty</h4><p>This chapter turns an inefficiency claim into a measurable probabilistic object. A model earns credibility when its output remains a truthful conditional description of the future under the same decision-time information that defines the claim. Proper scoring rules provide that bridge. They test whether probabilities, quantiles, or densities align with realized outcomes, and they do so inside the exact state regions where the strategy intends to deploy capital.</p><p><strong>What&#8217;s inside:</strong></p><ol><li><p><strong>Scoring for conditional evidence.</strong> The chapter defines prediction as a conditional statement about the future and explains why scoring must reward truthful reporting of the conditional law rather than flattering in-sample behavior.</p></li><li><p><strong>Proper scoring fundamentals.</strong> It establishes the role of strict propriety and separates probabilistic description from downstream action, so learning targets the conditional mechanism itself rather than the trade rule built on top of it.</p></li><li><p><strong>Log score and likelihood geometry.</strong> Full conditional densities are evaluated through log score, which measures how much probability mass the model assigns to realized outcomes and turns distributional mismatch into an empirical cost.</p></li><li><p><strong>Brier score and probability geometry.</strong> Binary event probabilities are scored through squared probability error, which makes calibration visible and tests whether reported event likelihoods match realized frequencies.</p></li><li><p><strong>Pinball loss and quantile geometry.</strong> Conditional quantile boundaries are evaluated through asymmetric loss that checks whether reported boundaries retain the correct crossing behavior under the declared state and horizon.</p></li><li><p><strong>Calibration under state selection.</strong> The chapter shows why a model can look acceptable on pooled data while failing in the narrow states where capital is actually deployed, so calibration must be checked on the same conditional sample that drives execution.</p></li><li><p><strong>Conditional calibration.</strong> Local inefficiency claims require local validation, so probabilities and quantiles must retain their interpretation inside the same state regions where divergence suggests conditional structure.</p></li><li><p><strong>Miscalibration as false inefficiency.</strong> The chapter explains how overconfident outputs can manufacture the illusion of edge when threshold-based decision rules amplify extreme signals that lack stable probabilistic meaning.</p></li><li><p><strong>Decision-aware scoring.</strong> Evaluation is aligned with the architecture of risk, exposure, and constraints, so errors matter most where the portfolio carries the highest operational sensitivity.</p></li></ol><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!43J8!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4da09cbb-ba77-42ce-a650-d108fb4b4334_1544x1032.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Sample</div><div class="file-embed-details-h2">1.94MB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/fd0c0097-b2a6-436d-9a1d-994121beb3d2.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/fd0c0097-b2a6-436d-9a1d-994121beb3d2.pdf"><span class="file-embed-button-text">Download</span></a></div></div>
      <p>
          <a href="https://www.quantbeckman.com/p/quant-lecture-calibration-and-scoring">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[WITH CODE] Infra: Scraping financial data ]]></title><description><![CDATA[Systematic fund scraping]]></description><link>https://www.quantbeckman.com/p/with-code-infra-scraping-financial</link><guid isPermaLink="false">https://www.quantbeckman.com/p/with-code-infra-scraping-financial</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Mon, 23 Feb 2026 13:36:36 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!AJt2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cedd76e-1949-481c-a904-be1a249336c5_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4zl9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4zl9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 424w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 848w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 1272w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4zl9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png" width="1142" height="716" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:716,&quot;width&quot;:1142,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:496259,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/155848302?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!4zl9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 424w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 848w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 1272w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p><strong>Table of contents:</strong></p><ol><li><p>Introduction.</p></li><li><p>What is web scraping in a quantitative context?</p></li><li><p>Where does it come from?</p></li><li><p>How web scraping actually works.</p></li><li><p>Risks and limitations of the protocol.</p></li><li><p>Screener network topography.</p></li><li><p>Scraping fund positions.</p></li></ol><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized </strong>by clicking on &#8220;<em>Read the newsletter index</em>&#8221; in this image.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.quantbeckman.com/p/welcome" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DI2x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 424w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 848w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 1272w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DI2x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png" width="1040" height="496" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:496,&quot;width&quot;:1040,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:639128,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/198696914?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!DI2x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 424w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 848w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 1272w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h4>Introduction</h4><p>In fund research, the input that matters most is simple: <em>what stocks are inside the funds right now, and in what weight. </em>Without that look-through layer, fund momentum, category rotation, or risk exposure becomes a label-driven proxy. </p><p>We are going to construct and execute a systematic fund scraping operation. The explicit objective of this architecture is to expose what underlying stocks these otherwise opaque mutual funds and ETFs are holding. </p><p>If you intend to calculate true portfolio variance, isolate specific factor exposures, or detect hidden beta overlap across multiple assets, you must possess the exact equity constituents and their precise percentage weightings for every fund in your cross-section. Without ticker-level resolution, you might allocate capital to two distinct Diversified Value funds that both hold massive, highly correlated positions in the exact same mega-cap technology stock. </p><p>So, we will engineer a deterministic data pipelineto get a clean, structured JSON. The architecture we are deploying will execute in distinct, logical phases:</p><ol><li><p>We will intercept the provider&#8217;s APIs to extract the core fund metadata and historical return vectors.</p></li><li><p>We will utilize concurrent, threaded I/O operations to query the global holdings API.</p></li><li><p>We will map this extracted data into memory-contiguous C-arrays. </p></li><li><p>We will apply algorithmic deduplication using tokenized lexical analysis and tuple signatures to eliminate share class multicollinearity. </p></li></ol><p>The final output of this operation will be a sanitized, lightweight matrix of unique portfolios, ready for immediate ingestion into our engine.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!r4e6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b798247-5c17-4000-a4b2-6fdaad08c2ab_1046x620.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!r4e6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b798247-5c17-4000-a4b2-6fdaad08c2ab_1046x620.png 424w, https://substackcdn.com/image/fetch/$s_!r4e6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b798247-5c17-4000-a4b2-6fdaad08c2ab_1046x620.png 848w, https://substackcdn.com/image/fetch/$s_!r4e6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b798247-5c17-4000-a4b2-6fdaad08c2ab_1046x620.png 1272w, https://substackcdn.com/image/fetch/$s_!r4e6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b798247-5c17-4000-a4b2-6fdaad08c2ab_1046x620.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!r4e6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b798247-5c17-4000-a4b2-6fdaad08c2ab_1046x620.png" width="1046" height="620" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1b798247-5c17-4000-a4b2-6fdaad08c2ab_1046x620.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:620,&quot;width&quot;:1046,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:871421,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/188876954?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b798247-5c17-4000-a4b2-6fdaad08c2ab_1046x620.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!r4e6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b798247-5c17-4000-a4b2-6fdaad08c2ab_1046x620.png 424w, https://substackcdn.com/image/fetch/$s_!r4e6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b798247-5c17-4000-a4b2-6fdaad08c2ab_1046x620.png 848w, https://substackcdn.com/image/fetch/$s_!r4e6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b798247-5c17-4000-a4b2-6fdaad08c2ab_1046x620.png 1272w, https://substackcdn.com/image/fetch/$s_!r4e6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b798247-5c17-4000-a4b2-6fdaad08c2ab_1046x620.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>What is web scraping in a quantitative context?</h4><p>To understand the architecture we build for trading, we must first define what web scraping is at a fundamental, computational level. In the broader software engineering industry, web scraping is often defined as the automated gathering of information from the internet. In quantitative finance, we require a technical definition.</p><blockquote><p>Web scraping is the automated, programmatic execution of HTTP network protocols to request, receive, and extract specific data structures from external servers, translating unstructured or semi-structured web payloads into strict, localized, memory-contiguous matrices for immediate algorithmic ingestion.</p></blockquote><p>To know more about scraping check that pdf:</p><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!n9VH!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d47193c-446f-44b1-9ef1-41cc02cb6375_547x737.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Web Scrapping: The basics explained</div><div class="file-embed-details-h2">236KB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/6efdb7f0-5724-495a-b99b-58f116652a48.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/6efdb7f0-5724-495a-b99b-58f116652a48.pdf"><span class="file-embed-button-text">Download</span></a></div></div><p>When a quantitative researcher builds a cross-sectional momentum strategy or a fundamental mean-reversion model, the model requires historical price vectors, dividend yields, expense ratios, constituent weights, etc. Historically, this data was locked behind expensive, proprietary data terminals operated by a few institutional vendors.</p><p>Web scraping bypasses this vendor lock-in. It allows a trading desk to aggregate fragmented public data from asset managers, regulatory filings, and financial portals directly into a local array or a structured SQL database. It is the direct acquisition of the raw material required for alpha generation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rT0U!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6703f57f-a627-4f79-a0c3-6bfd52e6a26a_1562x837.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rT0U!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6703f57f-a627-4f79-a0c3-6bfd52e6a26a_1562x837.png 424w, https://substackcdn.com/image/fetch/$s_!rT0U!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6703f57f-a627-4f79-a0c3-6bfd52e6a26a_1562x837.png 848w, https://substackcdn.com/image/fetch/$s_!rT0U!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6703f57f-a627-4f79-a0c3-6bfd52e6a26a_1562x837.png 1272w, https://substackcdn.com/image/fetch/$s_!rT0U!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6703f57f-a627-4f79-a0c3-6bfd52e6a26a_1562x837.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rT0U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6703f57f-a627-4f79-a0c3-6bfd52e6a26a_1562x837.png" width="1456" height="780" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6703f57f-a627-4f79-a0c3-6bfd52e6a26a_1562x837.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:780,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:298301,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/188876954?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6703f57f-a627-4f79-a0c3-6bfd52e6a26a_1562x837.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rT0U!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6703f57f-a627-4f79-a0c3-6bfd52e6a26a_1562x837.png 424w, https://substackcdn.com/image/fetch/$s_!rT0U!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6703f57f-a627-4f79-a0c3-6bfd52e6a26a_1562x837.png 848w, https://substackcdn.com/image/fetch/$s_!rT0U!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6703f57f-a627-4f79-a0c3-6bfd52e6a26a_1562x837.png 1272w, https://substackcdn.com/image/fetch/$s_!rT0U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6703f57f-a627-4f79-a0c3-6bfd52e6a26a_1562x837.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Furthermore, standard vendor data is often commoditized. If every quant receives the exact same fundamental dataset at the exact same millisecond via an identical API feed, the alpha decays. Constructing custom extraction architecture allows a quantitative team to ingest alternative data&#8212;such as retail sentiment from localized forums, unstructured XBRL data from SEC 10-Q filings, or dynamically updating ETF composition lists directly from the issuer&#8217;s backend. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Zr-N!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Zr-N!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 424w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 848w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 1272w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Zr-N!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png" width="1200" height="610" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:610,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Zr-N!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 424w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 848w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 1272w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantbeckman.com/subscribe?"><span>Subscribe now</span></a></p><h4>Where does it come from?</h4><p>The methodology of data extraction has evolved in parallel with the evolution of web architecture itself. We can trace this lineage through distinct technological eras, driven by the need to parse complex data delivery mechanisms. Understanding this history is critical to understanding why modern quantitative infrastructure rejects certain parsing libraries.</p><p><strong>Era 1: Static transfer and regular expressions</strong></p><p>In the early days of the internet, web pages were static HTML documents stored directly on server hard drives. When a client sent an HTTP GET request, the server responded with the exact text file. Scraping in this era involved basic command-line tools executing standard network fetches.</p><p>The data was extracted using Regular Expressions (Regex). Regex operates as a finite state machine that matches specific string patterns. If a researcher wanted a stock price, they wrote a strictly defined string-matching algorithm to locate a sequence of numbers immediately following a specific HTML text block.</p><p>This was efficient computationally. A regex search over a 10-megabyte text file resolves in milliseconds. However, it was incredibly brittle from an operational standpoint. Consider the following HTML string: <code>&lt;td class="price"&gt;150.25&lt;/td&gt;</code>. A regex designed to capture the float inside the tags (<code>r'class="price"&gt;(\d+\.\d+)&lt;'</code>) works fine. But if the webmaster updates the website and injects a bold tag for visual styling&#8212;<code>&lt;td class="price"&gt;&lt;b&gt;150.25&lt;/b&gt;&lt;/td&gt;</code>&#8212;the regex logic fails. It returns a null value. In a trading pipeline, a null value propagates through the covariance matrix, zeroes out the optimization weights, and halts the entire trading execution.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zHzs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c02dbd4-6d7c-45cb-bb4a-7674de80d4cf_1906x899.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zHzs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c02dbd4-6d7c-45cb-bb4a-7674de80d4cf_1906x899.png 424w, https://substackcdn.com/image/fetch/$s_!zHzs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c02dbd4-6d7c-45cb-bb4a-7674de80d4cf_1906x899.png 848w, https://substackcdn.com/image/fetch/$s_!zHzs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c02dbd4-6d7c-45cb-bb4a-7674de80d4cf_1906x899.png 1272w, https://substackcdn.com/image/fetch/$s_!zHzs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c02dbd4-6d7c-45cb-bb4a-7674de80d4cf_1906x899.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zHzs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c02dbd4-6d7c-45cb-bb4a-7674de80d4cf_1906x899.png" width="1906" height="899" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4c02dbd4-6d7c-45cb-bb4a-7674de80d4cf_1906x899.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:899,&quot;width&quot;:1906,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:401133,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/188876954?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F76d57406-d8bc-47ca-ba77-80b77a42ab10_1906x899.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zHzs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c02dbd4-6d7c-45cb-bb4a-7674de80d4cf_1906x899.png 424w, https://substackcdn.com/image/fetch/$s_!zHzs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c02dbd4-6d7c-45cb-bb4a-7674de80d4cf_1906x899.png 848w, https://substackcdn.com/image/fetch/$s_!zHzs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c02dbd4-6d7c-45cb-bb4a-7674de80d4cf_1906x899.png 1272w, https://substackcdn.com/image/fetch/$s_!zHzs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c02dbd4-6d7c-45cb-bb4a-7674de80d4cf_1906x899.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Pattern matching</figcaption></figure></div><p><strong>Era 2: The Document Object Model and structural parsing</strong></p><p>As web pages evolved into generated templates mapping to backend databases, relying on raw string matching became impossible. The industry shifted to structural parsing. Browsers render HTML into a hierarchical tree structure known as the Document Object Model (DOM).</p><p>Scrapers evolved to replicate this exact rendering process in memory. Python libraries, such as <code>BeautifulSoup</code> utilizing <code>lxml</code> parsers, were developed to download the HTML string, parse it into an internal tree data structure, and allow engineers to search the tree using XPath or CSS selectors. We stopped searching for text strings and started searching for specific structural nodes, such as the third cell of the second row within a specific table ID.</p><p>While more robust than Regex, structural parsing introduces severe computational overhead. Converting a 5-megabyte HTML string into a fully traversable DOM tree requires significant CPU cycles and RAM allocation. The search algorithm must execute <em>O</em>(<em>N</em>) traversal operations across thousands of nested nodes. When running high-frequency data ingestion across thousands of financial instruments, the CPU time spent building these DOM trees severely limits the concurrency capacity of the extraction server.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CNxt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff943d96-ae62-4612-aa8b-233a35b19373_778x908.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CNxt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff943d96-ae62-4612-aa8b-233a35b19373_778x908.png 424w, https://substackcdn.com/image/fetch/$s_!CNxt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff943d96-ae62-4612-aa8b-233a35b19373_778x908.png 848w, https://substackcdn.com/image/fetch/$s_!CNxt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff943d96-ae62-4612-aa8b-233a35b19373_778x908.png 1272w, https://substackcdn.com/image/fetch/$s_!CNxt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff943d96-ae62-4612-aa8b-233a35b19373_778x908.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CNxt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff943d96-ae62-4612-aa8b-233a35b19373_778x908.png" width="778" height="908" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ff943d96-ae62-4612-aa8b-233a35b19373_778x908.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:908,&quot;width&quot;:778,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:307989,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/188876954?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b149c15-f6c0-40f9-bbbe-333030c2d015_778x908.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CNxt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff943d96-ae62-4612-aa8b-233a35b19373_778x908.png 424w, https://substackcdn.com/image/fetch/$s_!CNxt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff943d96-ae62-4612-aa8b-233a35b19373_778x908.png 848w, https://substackcdn.com/image/fetch/$s_!CNxt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff943d96-ae62-4612-aa8b-233a35b19373_778x908.png 1272w, https://substackcdn.com/image/fetch/$s_!CNxt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff943d96-ae62-4612-aa8b-233a35b19373_778x908.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">DOM</figcaption></figure></div><p><strong>Era 3: Single Page Applications and JavaScript rendering</strong></p><p>The critical inflection point occurred when web development shifted to reactive JavaScript frameworks (React, Angular, Vue). The server no longer returned HTML containing the financial data. Instead, the server returned an empty HTML shell and a massive JavaScript file. The client&#8217;s browser was expected to execute the JavaScript, which would then dynamically fetch the data and build the DOM locally on the user&#8217;s machine.</p><p>Standard HTML parsers broke; they would download the empty shell, parse it, and find zero data. To combat this, scrapers evolved into headless browsers. Infrastructure had to spin up entirely automated, invisible instances of Chromium in the background, load the page, wait for the V8 JavaScript engine to execute the rendering logic, wait for the network requests to resolve, and then extract the data from the rendered DOM.</p><p>This was disastrous. Running a single headless browser instance requires hundreds of megabytes of RAM. If a quantitative pipeline requires 100 concurrent workers to update the daily pricing matrix before the market opens, the server must allocate over 50 gigabytes of RAM strictly for browser overhead. This is inefficient and unscalable for certain types of trading systems.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pcHE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4492ba9-b648-43cf-8ea2-51cdd7fcb5d5_1200x630.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pcHE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4492ba9-b648-43cf-8ea2-51cdd7fcb5d5_1200x630.webp 424w, https://substackcdn.com/image/fetch/$s_!pcHE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4492ba9-b648-43cf-8ea2-51cdd7fcb5d5_1200x630.webp 848w, https://substackcdn.com/image/fetch/$s_!pcHE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4492ba9-b648-43cf-8ea2-51cdd7fcb5d5_1200x630.webp 1272w, https://substackcdn.com/image/fetch/$s_!pcHE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4492ba9-b648-43cf-8ea2-51cdd7fcb5d5_1200x630.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pcHE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4492ba9-b648-43cf-8ea2-51cdd7fcb5d5_1200x630.webp" width="1200" height="630" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a4492ba9-b648-43cf-8ea2-51cdd7fcb5d5_1200x630.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:630,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pcHE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4492ba9-b648-43cf-8ea2-51cdd7fcb5d5_1200x630.webp 424w, https://substackcdn.com/image/fetch/$s_!pcHE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4492ba9-b648-43cf-8ea2-51cdd7fcb5d5_1200x630.webp 848w, https://substackcdn.com/image/fetch/$s_!pcHE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4492ba9-b648-43cf-8ea2-51cdd7fcb5d5_1200x630.webp 1272w, https://substackcdn.com/image/fetch/$s_!pcHE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4492ba9-b648-43cf-8ea2-51cdd7fcb5d5_1200x630.webp 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">TPL vs SPA</figcaption></figure></div><p><strong>Era 4: API interception</strong></p><p>This brings us to the modern quantitative standard. Because Single Page Applications must retrieve their dynamic data from somewhere, they utilize Application Programming Interfaces (APIs)&#8212;typically REST or GraphQL architectures.</p><p>Instead of rendering a heavy headless browser, we utilize network monitoring tools to observe the traffic generated by the web application. We identify the exact API endpoint the JavaScript is querying, and we replicate that precise HTTP request from our Python architecture. We bypass the HTML entirely. We bypass the JavaScript rendering engine. We request the raw, serialized JSON data directly from the provider&#8217;s backend database. This is the optimal state of data extraction: maximum fidelity, minimum computational overhead.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_ktc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e20dee7-93cb-4300-ad71-d8941deae556_1344x569.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_ktc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e20dee7-93cb-4300-ad71-d8941deae556_1344x569.png 424w, https://substackcdn.com/image/fetch/$s_!_ktc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e20dee7-93cb-4300-ad71-d8941deae556_1344x569.png 848w, https://substackcdn.com/image/fetch/$s_!_ktc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e20dee7-93cb-4300-ad71-d8941deae556_1344x569.png 1272w, https://substackcdn.com/image/fetch/$s_!_ktc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e20dee7-93cb-4300-ad71-d8941deae556_1344x569.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_ktc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e20dee7-93cb-4300-ad71-d8941deae556_1344x569.png" width="1344" height="569" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5e20dee7-93cb-4300-ad71-d8941deae556_1344x569.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:569,&quot;width&quot;:1344,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:388749,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/188876954?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e20dee7-93cb-4300-ad71-d8941deae556_1344x569.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_ktc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e20dee7-93cb-4300-ad71-d8941deae556_1344x569.png 424w, https://substackcdn.com/image/fetch/$s_!_ktc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e20dee7-93cb-4300-ad71-d8941deae556_1344x569.png 848w, https://substackcdn.com/image/fetch/$s_!_ktc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e20dee7-93cb-4300-ad71-d8941deae556_1344x569.png 1272w, https://substackcdn.com/image/fetch/$s_!_ktc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e20dee7-93cb-4300-ad71-d8941deae556_1344x569.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Scraping vs API</figcaption></figure></div><h4>How web scraping actually works</h4><p>To extract data, you must understand the exact sequence of network events that occur during a programmatic request. Web scraping is the programmatic automation of the standard client-server architecture, executing at speeds unachievable by human interaction.</p><p><strong>Step 1: The network handshake and request formulation</strong></p><p>The process begins when our Python architecture instantiates a TCP connection. We formulate a strict HTTP request, this request consists of a specific method (<code>GET</code> for retrieving data, <code>POST</code> for submitting query parameters), the target URL, and a dictionary of Headers.</p><p>Headers are critical, they dictate the exact rules of engagement with the target server. We set the <code>User-Agent</code> header to declare what type of client we are. By default, Python networking libraries broadcast their standard identity (e.g., <code>python-requests/2.31.0</code>). Modern Web Application Firewalls flag this string and drop the TCP connection. We must inject standard browser headers to bypass basic heuristic checks.</p><p>Furthermore, we must configure advanced headers such as <code>Accept-Encoding: gzip, deflate, br</code> to inform the server that we can handle compressed byte streams, reducing network transit time.</p><p>Modern security also involves TLS (Transport Layer Security) fingerprinting. Servers analyze the specific cryptographic cipher suites our client proposes during the initial connection setup (the Client Hello packet). Standard Python networking libraries propose a different sequence of ciphers than a standard Google Chrome browser. If the server detects a mismatch between the <code>User-Agent</code> claiming to be Chrome and a TLS fingerprint matching Python, it blocks the request. Advanced quantitative architecture utilizes specialized network adapters to mimic exact browser TLS signatures, guaranteeing connection acceptance.</p><p>Before we even introduce anything, let&#8217;s start here with our practical example.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;b78902e9-28fe-4c9e-a614-0631f0d8c37e&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">import requests

url = "https://lt.morningstar.com/api/rest.svc/klr5zyak8x/security/screener?page=1&amp;pageSize=50&amp;sortOrder=ReturnM120%20desc&amp;outputType=json&amp;version=1&amp;languageId=es-ES&amp;currencyId=EUR&amp;universeIds=FOESP%24%24ALL&amp;securityDataPoints=SecId%7CName%7CPriceCurrency%7CTenforeId%7CLegalName%7CClosePrice%7CYield_M12%7CCategoryName%7CAnalystRatingScale%7CStarRatingM255%7CQuantitativeRating%7CSustainabilityRank%7CReturnD1%7CReturnW1%7CReturnM1%7CReturnM3%7CReturnM6%7CReturnM0%7CReturnM12%7CReturnM36%7CReturnM60%7CReturnM120%7CFeeLevel%7CManagerTenure%7CMaxDeferredLoad%7CInitialPurchase%7CFundTNAV%7CEquityStyleBox%7CBondStyleBox%7CAverageMarketCapital%7CAverageCreditQualityCode%7CEffectiveDuration%7CMorningstarRiskM255%7CAlphaM36%7CBetaM36%7CR2M36%7CStandardDeviationM36%7CSharpeM36%7CTrackRecordExtension&amp;filters=&amp;term=&amp;subUniverseId="

r = requests.get(url, timeout=20)
print("status:", r.status_code)
print("content-type:", r.headers.get("content-type"))
print("content-encoding:", r.headers.get("content-encoding"))
print("head:", r.text[:200])</code></pre></div><p><strong>Step 2: Server-side resolution and response</strong></p><p>Upon receiving the formulated request, the target server evaluates it against its internal security protocols. It checks for IP reputation, rate limit thresholds (Token Bucket algorithms), and geographic blocking rules. If the request passes these validation checks, the server queries its internal SQL or NoSQL database, formats the result into the requested format, and transmits the payload back to our server over the open connection.</p><p>The server prefaces the payload with an HTTP Status Code. We evaluate this code before reading the data buffer. A <code>200 OK</code> indicates absolute success. A <code>403 Forbidden</code> indicates our IP or TLS signature was blocked by the WAF. A <code>429 Too Many Requests</code> indicates we have exceeded the permissible concurrency limit. When a 429 is encountered, our infrastructure immediately halts execution on that specific thread and initiates a deterministic exponential backoff algorithm, calculating a precise wait time before re-attempting the connection.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;a406989d-b7ce-4f46-a6a6-eba17f3e1e09&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">status: 200
content-type: application/json
content-encoding: gzip
head: {"total": 49441,"page": 1,"pageSize": 50,"rows": [{"SecId": "F00000S8RT","Name": "Multipartner Konwave Gold Equity C USD","PriceCurrency": "USD","TenforeId": "52.8.LU1001014080","LegalName": "Multipar</code></pre></div><p><strong>Step 3: Payload deserialization and matrix mapping</strong></p><p>Once the payload bytes are received locally via the network interface card, they must be transformed into operational data. In modern scraping (API interception), the response header <code>Content-Type</code> is typically <code>application/json</code>. The data arrives as a serialized, UTF-8 encoded byte string.</p><p>We execute a high-speed deserialization function. In environments prioritizing microseconds, standard libraries are replaced by C-compiled alternatives like <code>orjson</code> or <code>ujson</code> that map JSON strings to memory structures faster. The deserializer parses the string and maps the key-value pairs into native Python dictionaries and lists.</p><p>From this state, we execute our extraction logic. We iterate through the arrays, filtering out the specific financial metrics we require, and allocating them into contiguous memory blocks. We actively cast data types at this stage&#8212;ensuring strings representing numbers are cast directly to <code>float64</code> objects in a structured array,  preparing the data for immediate ingestion into linear algebra operations.</p><p>To demonstrate the evolutionary mechanics, observe the explicit difference in code execution between legacy DOM parsing and modern high-speed JSON deserialization:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;91dc2caf-14ab-4550-b673-e6bf3cc14d5e&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">import json
from bs4 import BeautifulSoup
import orjson
import numpy as np

# Legacy Mechanics: Structural DOM Parsing (Era 2) 
# The server returns a heavy string of markup logic mixed with data.
html_payload = """
&lt;div class="financial-table"&gt;
    &lt;div class="row"&gt;
        &lt;span class="ticker"&gt;AAPL&lt;/span&gt;
        &lt;span class="price"&gt;150.25&lt;/span&gt;
    &lt;/div&gt;
&lt;/div&gt;
"""
# We must allocate significant memory to build the entire tree structure just to find one float.
# This requires CPU cycles to parse the entire string, handle malformed tags, and build node relationships.
tree = BeautifulSoup(html_payload, "html.parser")
legacy_price = float(tree.find("span", class_="price").text)

# Modern Mechanics: API Deserialization (Era 4) 
# The server returns strictly serialized data with zero HTML rendering logic.
json_payload_bytes = b'{"data": [{"ticker": "AAPL", "price": 150.25}]}'

# We execute a direct memory mapping using a C-optimized parser (orjson).
# This bypasses standard Python object creation overhead where possible.
parsed_data = orjson.loads(json_payload_bytes)

# We extract the specific float and immediately allocate it into a NumPy array type.
modern_price = np.float64(parsed_data["data"][0]["price"])</code></pre></div><p>The difference is structural and computational. Legacy scraping reads documents; modern scraping queries databases. By understanding the lineage and the strict network mechanics, we engineer scraping pipelines that don&#8217;t simulate human browsing. Instead, they operate as direct, high-speed, database-to-database communication protocols executing over the public internet.</p><h4>Risks and limitations of the protocol</h4><p>The execution of thousands of sequential HTTP requests introduces specific, quantifiable, and systemic risks to the trading infrastructure. These risks are guaranteed events in any large-scale network operation. They manifest as missing data rows, unhandled exceptions, TCP timeouts, and truncated JSON payloads, which directly corrupt the backtesting matrix.</p><p>The primary operational risks are categorized by standard HTTP response codes. We anticipate HTTP 429 (Too Many Requests) errors when our extraction loops exceed the provider&#8217;s token bucket algorithm limits. We expect TCP connection timeouts when network routing degrades. We will encounter 502 Bad Gateway responses during dynamic load balancer reallocations, and 503 Service Unavailable responses when the backend database cluster is executing routine locking operations or snapshots.</p><p>To mitigate these risks, we construct a session adapter using the <code>urllib3</code> library. We implement a deterministic exponential backoff algorithm. When a 429 or 5xx status code is returned, the system pauses before executing a retry, reducing the concurrency pressure on the provider&#8217;s server. We target the 429, 500, 502, 503, and 504 codes. We exclude 400 (Bad Request) and 404 (Not Found) codes, as those represent structural errors in our query parameters that a retry will never resolve.</p><p>Here is the implementation of the retry adapter used in our pipeline:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;60dfef9e-2d18-42a2-ba64-f47b2f5fd043&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">import time
import requests
from requests.adapters import HTTPAdapter
from urllib3.util.retry import Retry

def _make_retry_adapter() -&gt; HTTPAdapter:
    retry = Retry(
        total=6,
        backoff_factor=0.5,
        status_forcelist=(429, 500, 502, 503, 504),
        allowed_methods=("GET",),
        raise_on_status=False,
    )
    return HTTPAdapter(max_retries=retry, pool_connections=50, pool_maxsize=50)

def _lt_session() -&gt; requests.Session:
    # We precisely replicate standard browser headers to bypass basic WAF heuristic checks.
    LT_HEADERS = {
        "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122 Safari/537.36",
        "Accept": "application/json, text/plain, */*",
        "Accept-Language": "es-ES,es;q=0.9,en;q=0.8",
        "Referer": "[https://lt.morningstar.com/](https://lt.morningstar.com/)",
    }
    s = requests.Session()
    s.headers.update(LT_HEADERS)
    adapter = _make_retry_adapter()
    s.mount("https://", adapter)
    s.mount("http://", adapter)
    return s
</code></pre></div><p>Notice the specific performance parameters initialized in the adapter: <code>pool_connections=50</code> and <code>pool_maxsize=50</code>. This keeps 50 distinct TCP connections open in the background, bound to the <code>Session</code> object. By utilizing the HTTP Keep-Alive header within the <code>requests.Session</code> architecture, we completely bypass the severe latency introduced by repeated Transport Layer Security handshakes.</p><p>Every new HTTPS request requires DNS resolution, a 3-way TCP handshake (SYN, SYN-ACK, ACK), and an expensive TLS cryptographic key exchange. This sequence  requires 150 to 300 milliseconds of network overhead before a single byte of actual data is transmitted. This is the <em>protocol tax</em>. If we initiate a new session for 5,000 distinct requests, we incur 25 minutes of pure dead time negotiating connections. By pooling connections and persisting them, we reduce network overhead to the strict physical transfer time of the payload itself, dropping the marginal connection time to zero.</p><p>To visualize the progression of the exponential backoff risk mitigation, consider the following plot. It models the exact delay duration sequence based on the specified <code>backoff_factor</code>, demonstrating how the system slows down to prevent triggering a permanent IP ban.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wq8E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28da627c-f305-4938-84cc-130ea10a1e3c_846x475.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wq8E!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28da627c-f305-4938-84cc-130ea10a1e3c_846x475.png 424w, https://substackcdn.com/image/fetch/$s_!wq8E!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28da627c-f305-4938-84cc-130ea10a1e3c_846x475.png 848w, https://substackcdn.com/image/fetch/$s_!wq8E!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28da627c-f305-4938-84cc-130ea10a1e3c_846x475.png 1272w, https://substackcdn.com/image/fetch/$s_!wq8E!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28da627c-f305-4938-84cc-130ea10a1e3c_846x475.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wq8E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28da627c-f305-4938-84cc-130ea10a1e3c_846x475.png" width="846" height="475" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/28da627c-f305-4938-84cc-130ea10a1e3c_846x475.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:475,&quot;width&quot;:846,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wq8E!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28da627c-f305-4938-84cc-130ea10a1e3c_846x475.png 424w, https://substackcdn.com/image/fetch/$s_!wq8E!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28da627c-f305-4938-84cc-130ea10a1e3c_846x475.png 848w, https://substackcdn.com/image/fetch/$s_!wq8E!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28da627c-f305-4938-84cc-130ea10a1e3c_846x475.png 1272w, https://substackcdn.com/image/fetch/$s_!wq8E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F28da627c-f305-4938-84cc-130ea10a1e3c_846x475.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This is the precise moment the entire architecture upgrades. We stop looking at the rendered web page, and we start interrogating the network layer.</p><p>By opening the developer tools within a controlled Chromium environment and monitoring the <code>Fetch/XHR</code> network traffic generated by the web application during standard user interaction, we discover and intercept the underlying API. We isolate the exact network request executing the database search. We identify the explicit endpoint serving the raw data to the frontend UI: </p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;5418d0fd-9e99-4adb-9106-9b007600413c&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">https://lt.morningstar.com/api/rest.svc/klr5zyak8x/security/screener.</code></pre></div><p>This endpoint doesn&#8217;t return complex, nested HTML documents. It accepts defined query parameters that dictate the SQL-equivalent operations on the backend: pagination offsets, sorting directives, universe limiters, and projection columns (<code>securityDataPoints</code>). In return, it provides a raw JSON payload.</p><p>By interfacing with this REST API, the extraction process transitions from a heuristic, error-prone text-parsing operation into a deterministic database query. We send a formalized HTTP GET request, and we receive a serialized data structure that maps into our operational memory. A float value is transmitted as a float. A string is transmitted as a string. There is no string-manipulation required to strip percentage signs or currency symbols, which eliminates an entire class of data engineering bugs.</p><p>This single event renders all traditional web scraping techniques&#8212;BeautifulSoup HTML parsing, XPath selection, and resource-heavy headless browsers like Selenium or Playwright&#8212; obsolete within our infrastructure.</p><h4>Screener network topography</h4><p>Having established the foundational infrastructure and intercepted the correct REST API endpoint, we now face the challenge of extracting the financial data. The provider&#8217;s backend database contains tens of thousands of mutual funds, exchange-traded funds, and institutional share classes. This dataset is vastly larger than the maximum permitted payload size for a single HTTP response.</p><p>The endpoint enforces a strict <code>pageSize</code> limit. This is a direct mechanism to prevent memory exhaustion on their internal database cluster. When a client requests data, the provider&#8217;s server must execute a SQL or NoSQL query, allocate a continuous block of RAM to hold the result set, serialize that data into a JSON string, and transmit it over the network interface. Requesting 10,000 rows creates a massive serialization overhead. To bypass these hard limits, we define our extraction parameter as <code>pageSize=50</code>.</p><p>Extracting the complete cross-sectional universe requires mapping the network topography and iterating over a paginated endpoint recursively. We must calculate the required number of requests based on the total record count returned in the initial response. We can&#8217;t hardcode the total page count, as the universe size fluctuates daily due to fund liquidations, mergers, and new product launches.</p><p>The algorithmic execution proceeds sequentially for the initialization phase. We fetch page 1. We parse the initial JSON payload to read the <code>total</code> integer field, which dictates the absolute size of the dataset for that specific query. We calculate the ceiling of the division of <code>total</code> by <code>pageSize</code> (<code>math.ceil(total / page_size)</code>). This yields the exact integer value of total pages required to complete the extraction. If the total is 0, we default to 1 to avoid ZeroDivisionError exceptions in downstream processing logic.</p><p>Besides, we pass specific query parameters in the HTTP request: <code>universeIds=FOESP$$ALL</code> specifies the precise fund universe routing key on the provider&#8217;s backend. We inject the parameter <code>securityDataPoints=SecId|LegalName|CategoryName|ReturnM120</code> to  isolate only the necessary relational columns.</p><p>We request the <code>SecId</code>, the <code>LegalName</code>, the <code>CategoryName</code>, and the <code>ReturnM120</code> (the 120-month historical return, which is the foundational variable for long-term quantitative momentum analysis).</p><p>If we omit the <code>securityDataPoints</code> parameter, the API defaults to returning every available column&#8212;over 100 data points including tracking error, manager tenure, and daily standard deviation. This inflates the JSON payload from 50 kilobytes to over 5 megabytes per page. Requesting unnecessary data points saturates network bandwidth, increases TLS decryption time, and degrades the JSON parsing speed. We limit the payload to our exact algorithmic requirements.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;b0082820-febf-4aa4-8a91-6bba71039409&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">import math
import numpy as np
import requests

LT_BASE = "[https://lt.morningstar.com/api/rest.svc/klr5zyak8x/security/screener](https://lt.morningstar.com/api/rest.svc/klr5zyak8x/security/screener)"
SECURITY_POINTS = "SecId|LegalName|CategoryName|ReturnM120"

def fetch_lt_page(session: requests.Session, page: int, page_size: int) -&gt; dict:
    params = {
        "page": int(page),
        "pageSize": int(page_size),
        "sortOrder": "ReturnM120 desc",
        "outputType": "json",
        "version": 1,
        "languageId": "es-ES",
        "currencyId": "EUR",
        "universeIds": "FOESP$$ALL",
        "securityDataPoints": SECURITY_POINTS,
        "filters": "",
        "term": "",
        "subUniverseId": "",
    }
    # Notice the exact tuple for the timeout: (4, 20)
    # 4 seconds allocated for the TCP SYN/ACK connection handshake.
    # 20 seconds allocated for the server to process the query and return the first byte.
    r = session.get(LT_BASE, params=params, timeout=(4, 20))
    ct = (r.headers.get("content-type") or "").lower()
    if r.status_code != 200 or "json" not in ct or not r.content:
        raise RuntimeError(f"LT bad response: {r.status_code} ct={ct} head={r.text[:200]!r}")
    return r.json()

def _normalize_pages(pages, total_pages: int):
    # This logic dictates the strict operational scope of the extraction matrix.
    if pages is None:
        # None implies a full universe extraction. WARNING: Huge data pull spanning gigabytes of memory.
        return range(1, total_pages + 1)
    if isinstance(pages, (int, np.integer)):
        # Integer implies pulling the top N pages strictly based on the sortOrder parameter.
        n = int(pages)
        return range(1, min(max(n, 0), total_pages) + 1)
    # List implies pulling specific, explicit page indices, useful for error-handling retry loops.
    # We apply a set comprehension to mathematically eliminate duplicate page requests.
    lst = sorted({int(p) for p in pages if 1 &lt;= int(p) &lt;= total_pages})
    return lst</code></pre></div><p>The pagination handler <code>_normalize_pages</code> is engineered to accept three distinct input states, providing the system with deterministic flexibility. If a researcher is running a lightweight daily update to assess the top decile of momentum performers, they pass an integer <code>pages=10</code> to scan only the top 500 funds. If the infrastructure team is bootstrapping the initial quantitative database from a blank state, they pass <code>None</code> to fetch the absolute entirety of the universe. If a previous extraction loop dropped specific network packets, the error handler passes a list <code>pages=[14, 22, 105]</code> to specifically target the missing vectors. The use of a set comprehension <code>{int(p) ...}</code> guarantees that duplicate page indices are stripped before execution, preventing redundant network I/O.</p><p>We append these scalar values into localized lists. Python lists operate with <em>O</em>(1) amortized append time complexity because they over-allocate memory buffers under the hood. We can&#8217;t initialize the final, rigid structured array at this specific stage because we don&#8217;t yet know the exact valid row count; we filter out invalid JSON objects&#8212;such as funds missing a critical <code>SecId</code>&#8212;during the loop.</p><p>The primary obstacle at the screener stage is managing the sequential nature of the pagination discovery. Because we don&#8217;t possess the <code>total</code> integer until the very first request resolves and the JSON is parsed, the initial discovery phase is linear. However, once the <code>total_pages</code> parameter is acquired, the subsequent page requests become entirely stateless and independent. This sets the theoretical stage for future parallelization. Yet, for this specific screener layer, executing sequential HTTP requests over an established, persistent TLS connection pool is efficient,  completing the initial metadata extraction in a matter of a few seconds, preparing the matrix for the much heavier, threaded Global API processing phase.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lF1e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lF1e!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!lF1e!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!lF1e!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!lF1e!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lF1e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1158490,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/198696914?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!lF1e!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!lF1e!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!lF1e!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!lF1e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70bb06dd-ccb1-4472-841c-512c42ff3531_1774x887.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.amazon.com/Quantitative-Research-Foundations-Quant-Beckman/dp/B0GWGJWDS3&quot;,&quot;text&quot;:&quot;Send me a copy&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.amazon.com/Quantitative-Research-Foundations-Quant-Beckman/dp/B0GWGJWDS3"><span>Send me a copy</span></a></p><h4>Scraping fund positions</h4><p>The screener endpoint provides the fund-level metadata, consisting of basic identifying parameters and historical return vectors. However, a fund&#8217;s surface-level metadata is insufficient for risk management and alpha generation. To construct a  look-through portfolio, assess true factor exposure, or run Barra risk decomposition models, we require the exact equity holdings inside each fund. We need the underlying constituents, and we need them weighted.</p><p>This data requirement introduces a separate, more complex endpoint into our architecture: the Global API (<code>api-global.morningstar.com</code>). Unlike the public screener interface, this endpoint demands an explicit authentication mechanism. We must inject an <code>apikey</code> (it&#8217;s <em>free</em>) header into every request. </p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;b333192c-0263-4705-be1d-e6a043247ebc&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python"># 2) Direct holdings 
APIKEY = "HERE YOUR API KEY"</code></pre></div><p>Furthermore, the endpoint requires the specific <code>SecId</code> extracted from the first phase to be formatted directly into the URL path.</p><p>The primary architectural obstacle is the sheer volume of network requests. The screener API supports bulk pagination; the Global API doesn&#8217;t. If the screener returns an array of 5,000 distinct funds, we must execute 5,000 separate, individual HTTP GET requests to the Global API to retrieve the constituent holdings for each individual fund.</p><p>A standard, sequential execution loop operates at approximately 0.5 seconds per request. This delay is a function of the physical network latency&#8212;the round-trip time between our trading servers and the provider&#8217;s data center, plus the provider&#8217;s internal database query execution time. Executing 5,000 requests sequentially requires 2,500 seconds, equating to over 40 minutes of pure execution time. This is unacceptable for a daily production pipeline that must process data, run optimizations, and generate execution orders before the market open.</p><p>We resolve this processing bottleneck through concurrent execution. We implement a <code>ThreadPoolExecutor</code> from the <code>concurrent.futures</code> module. Because HTTP network requests are I/O-bound tasks&#8212;meaning the CPU sits idle while waiting for the network interface card to receive the inbound packet from the remote server&#8212;the GIL doesn&#8217;t inhibit parallel execution in this specific scenario. The interpreter releases the GIL during standard I/O blocking operations. Therefore, we can launch 20 concurrent threads to process the requests without migrating to a complex multiprocessing architecture.</p><p>We chose thread pooling over an asynchronous event loop (like <code>asyncio</code>) because our existing network infrastructure relies on the <code>requests</code> library and custom <code>urllib3</code> retry adapters. Threaded execution provides the exact same I/O concurrency benefits without requiring a complete rewrite of the underlying synchronous network stack.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;79b6c62e-ef59-4e48-a9e6-117021d75db6&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">import threading
from concurrent.futures import ThreadPoolExecutor, as_completed
import requests
import numpy as np

APIKEY = "HERE YOUR API KEY"
MS_BASE = "[https://api-global.morningstar.com/sal-service/v1/fund/portfolio/holding/v2](https://api-global.morningstar.com/sal-service/v1/fund/portfolio/holding/v2)"
MS_HEADERS = {
    "apikey": APIKEY,
    "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36",
    "Accept": "application/json, text/plain, */*",
}

_thread_local = threading.local()

def _ms_session() -&gt; requests.Session:
    # We must ensure strict thread safety across concurrent network operations.
    s = getattr(_thread_local, "session", None)
    if s is None:
        s = requests.Session()
        s.headers.update(MS_HEADERS)
        # Assuming _make_retry_adapter is defined as in Part 1 for exponential backoff
        # s.mount("https://", _make_retry_adapter())
        _thread_local.session = s
    return s

def fetch_holdings_us_topN(secid: str, country: str = "United States", top: int = 10):
    s = _ms_session()
    url = f"{MS_BASE}/{secid}/data"
    params = {
        "clientId": "MDC",
        "version": "4.71.0",
        "premiumNum": 10000,
        "freeNum": 10000,
    }
    r = s.get(url, params=params, timeout=(4, 25))
    if r.status_code != 200 or not r.content:
        return []
    
    data = r.json()
    page = (data.get("equityHoldingPage") or {})
    hlist = (page.get("holdingList") or [])
    
    out = []
    for h in hlist:
        c = h.get("country") or h.get("countryName")
        if c == country:
            t = h.get("ticker") or h.get("tradingSymbol")
            if t:
                out.append(t)
                if len(out) &gt;= top:
                    break
    return out

def attach_holdings_all(secids, max_workers: int = 20, country: str = "United States", top: int = 10):
    holdings = [None] * len(secids)
    with ThreadPoolExecutor(max_workers=max_workers) as ex:
        futs = {ex.submit(fetch_holdings_us_topN, sid, country, top): i for i, sid in enumerate(secids)}
        for fut in as_completed(futs):
            i = futs[fut]
            try:
                holdings[i] = fut.result()
            except Exception:
                # We enforce strict failure handling to maintain array dimensions.
                holdings[i] = []
    return np.asarray(holdings, dtype=object)</code></pre></div><p>Observe the use of <code>threading.local()</code>. This is an essential architectural detail that prevents systemic failure. We instantiate a unique <code>requests.Session()</code> object for every single active thread. When multiple concurrent connections interact with a single, shared <code>urllib3</code> connection pool, race conditions occur at the socket level, leading to corrupted TCP streams and dropped connections. By isolating the session object to local thread memory storage, we guarantee that each thread maintains its own independent pool of Keep-Alive HTTP sockets. This ensures deterministic network execution.</p><p>We limit <code>max_workers=20</code> as calculated threshold based on the provider&#8217;s implicit rate limits. Exceeding this thread count doesn&#8217;t yield linear performance gains; instead, it triggers the provider&#8217;s Web Application Firewall, which responds with HTTP 429 status codes, forcing our exponential backoff adapter into extended sleep cycles. Twenty workers provide the optimal equilibrium between maximum extraction speed and minimal server-side rejection.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NEvV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03b1e553-4ad7-4237-8d97-521736e8bd81_863x565.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NEvV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03b1e553-4ad7-4237-8d97-521736e8bd81_863x565.png 424w, https://substackcdn.com/image/fetch/$s_!NEvV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03b1e553-4ad7-4237-8d97-521736e8bd81_863x565.png 848w, https://substackcdn.com/image/fetch/$s_!NEvV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03b1e553-4ad7-4237-8d97-521736e8bd81_863x565.png 1272w, https://substackcdn.com/image/fetch/$s_!NEvV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03b1e553-4ad7-4237-8d97-521736e8bd81_863x565.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NEvV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03b1e553-4ad7-4237-8d97-521736e8bd81_863x565.png" width="863" height="565" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/03b1e553-4ad7-4237-8d97-521736e8bd81_863x565.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:565,&quot;width&quot;:863,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NEvV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03b1e553-4ad7-4237-8d97-521736e8bd81_863x565.png 424w, https://substackcdn.com/image/fetch/$s_!NEvV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03b1e553-4ad7-4237-8d97-521736e8bd81_863x565.png 848w, https://substackcdn.com/image/fetch/$s_!NEvV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03b1e553-4ad7-4237-8d97-521736e8bd81_863x565.png 1272w, https://substackcdn.com/image/fetch/$s_!NEvV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F03b1e553-4ad7-4237-8d97-521736e8bd81_863x565.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The next part is to map the extracted data into a NumPy structured array. A structured array allocates a single, contiguous block of memory in C. We define exact byte boundaries for each field in the matrix. When the CPU executes operations on this array, it loads sequential memory blocks directly into the L1/L2 cache, executing instructions with zero pointer-chasing overhead.</p><p>We allocate a 16-character unicode string (<code>U16</code>) for the <code>SecId</code>, a 256-character unicode string (<code>U256</code>) for the <code>Fund</code> name, an 8-byte float (<code>f8</code>) for the return metric, and an object pointer (<code>O</code>) for the variable-length list of constituent stock holdings.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;e107fb74-cdd3-4b92-a987-823131f42cbe&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python"># Execution assembly demonstrating the structured array initialization
import numpy as np

# Assuming secids, names, rets, and stocks are already populated lists/arrays from the extraction phase
# We allocate exactly the required memory footprint before population.
arr = np.empty(len(secids), dtype=[("Id", "U16"), ("Fund", "U256"), ("ReturnM120", "f8"), ("Stocks", "O")])
arr["Id"] = np.asarray(secids, dtype="U16")
arr["Fund"] = np.asarray(names, dtype="U256")
arr["ReturnM120"] = rets
arr["Stocks"] = stocks</code></pre></div><p>We acknowledge the use of the object pointer (<code>"O"</code>) for the stocks column breaks strict C-contiguity for the holding string arrays themselves. However, this is computationally acceptable because our heavy numerical operations&#8212;the sorting and ranking logic&#8212;operate on the <code>f8</code> float array, which remains contiguous and hardware-optimized.</p><p>Furthermore, we must handle missing data points at the numerical level. Web scraped data contains holes; some funds lack a 10-year track record. We temporarily replace <code>NaN</code> values with negative infinity (<code>-np.inf</code>) prior to sorting. Standard sorting functions in C don&#8217;t possess financial logic. Mathematical comparisons against <code>NaN</code> fail silently (<code>NaN &gt; 5</code> evaluates to False, <code>NaN &lt; 5</code> evaluates to False). If we don&#8217;t execute this specific substitution, <code>NaN</code> values sort unpredictably, injecting null pointers into the highest momentum deciles and breaking the downstream portfolio construction models. This substitution ensures that funds lacking complete return histories are forced to the absolute bottom of the generated matrix.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;f3889e17-a97f-4b2c-8eae-f0b4e7af0167&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">def sort_by_return_desc(arr: np.ndarray) -&gt; np.ndarray:
    if arr.size == 0:
        return arr
    r = arr["ReturnM120"]
    
    # Isolate NaN values and push them to the lowest possible finite float boundary (-inf).
    # This prevents incomplete track records from ranking highly in momentum strategies.
    r2 = np.where(np.isfinite(r), r, -np.inf)
    
    # Execute the C-level sort on the substituted float array, and reverse it ([::-1]) for descending order.
    idx = np.argsort(r2)[::-1]
    
    # Return the newly aligned, completely contiguous memory view.
    return arr[idx]
</code></pre></div><p>The final, most complex important barrier in systematic fund scraping is the share class multiplicity problem. Asset managers construct a single underlying portfolio of equities, but they distribute that identical portfolio across dozens of distinct administrative wrappers. They do this to target different regulatory jurisdictions, implement varying management fee structures, and separate retail investors from institutional capital. Consequently, you will see Institutional classes, Retail classes, Accumulating (Acc) classes, Distributing (Inc) classes, GBP hedged variants, and EUR unhedged variants&#8212;all holding the exact same underlying assets in the exact same proportions.</p><p>A standard database unique constraint operating on the <code>SecId</code> is insufficient here because each distinct share class possesses a unique Morningstar <code>SecId</code>. If we include all share classes in a model without aggressive deduplication, we introduce  multicollinearity into the output.</p><p>We must reduce the dataset to a single representative vector per underlying portfolio. We achieve this by cross-referencing two distinct topographical vectors: the exact list signature of the underlying top holdings, and a strict lexical analysis of the fund&#8217;s string name.</p><p>First, we define a tokenization function to strip punctuation and structural noise from the fund name strings. We use regular expressions to explicitly remove parentheses and brackets, as share classes are frequently denoted by suffixes like &#8220;(USD)&#8221; or &#8220;[Acc]&#8221;. Stripping these allows us to isolate the core lexical identity of the fund. We then define an algorithmic function to calculate the strict length of the common prefix between two tokenized arrays.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;240a3ffe-f2e2-45af-8db8-1e0b99289047&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">def _name_tokens(name: str) -&gt; list[str]:
    s = (name or "").strip().lower()
    # Normalize common typographic variations in fund prospectuses
    s = s.replace("&#8211;", "-").replace("&#8212;", "-")
    # Strip isolating punctuation typically used for share class designations
    s = re.sub(r"[()\[\],]", " ", s)
    return [t for t in s.split() if t]

def _common_prefix_len(a: list[str], b: list[str]) -&gt; int:
    n = min(len(a), len(b))
    k = 0
    # Calculate exact sequential token matches from index 0
    while k &lt; n and a[k] == b[k]:
        k += 1
    return k
</code></pre></div><p>The clustering logic dictates a two-factor rule: two rows are identified as overlapping if and only if their top 10 holding tickers match exactly (creating a deterministic tuple signature) AND their fund names share a strong lexical prefix.</p><p>Why both? Relying solely on the holdings signature is dangerous. Two different passive index funds managed by different firms might hold the exact same top 10 mega-cap technology stocks. If we only checked holdings, we would collapse two distinct operational funds into one.</p><p>By enforcing the lexical prefix check, we ensure accuracy. If &#8216;Global Equity Fund Class A USD&#8217; and &#8216;Global Equity Fund Class B EUR&#8217; possess the exact same stocks, their holding tuple signature matches. Their tokenized prefix <code>['global', 'equity', 'fund']</code> also matches based on our defined threshold (e.g., 60% of the token length). Therefore, they are safely clustered together as a single entity.</p><p>Once clustered, we invoke a selection algorithm. We iterate over the array indices within the cluster, evaluate the <code>ReturnM120</code> float vector, and retain the exact index containing the maximum finite return value.</p><p>We select for the maximum 120-month return because older, institutional share classes exhibit longer, uninterrupted historical track records and lower fee drags than newer retail classes. Retaining the asset with the longest valid track record is optimal for backtesting; it maximizes our sample size and statistical significance across different historical market regimes.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;d18486a9-861d-4998-b925-04636ce829fe&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">def _pick_best_index(arr: np.ndarray, idxs: list[int], keep: str = "max_return") -&gt; int:
    if keep == "first":
        return idxs[0]
    
    best = idxs[0]
    best_r = arr["ReturnM120"][best]
    
    for i in idxs[1:]:
        r = arr["ReturnM120"][i]
        r_ok = np.isfinite(r)
        b_ok = np.isfinite(best_r)
        
        # We strictly prioritize finite, measurable returns over NaN or infinite values.
        # If the current best is NaN, any finite return replaces it immediately.
        if (r_ok and not b_ok) or (r_ok and b_ok and r &gt; best_r):
            best = i
            best_r = r
            
    return best

def dedupe_unnecessary_share_classes(arr: np.ndarray, min_prefix_tokens=8, prefix_ratio=0.60, keep="max_return") -&gt; np.ndarray:
    if arr.size == 0:
        return arr
        
    groups: dict[tuple, list[int]] = {}
    unique_empty_keys: list[int] = []
    tokens_cache = [None] * arr.size
    
    for i in range(arr.size):
        tokens_cache[i] = _name_tokens(str(arr["Fund"][i]))
        stocks = arr["Stocks"][i]
        try:
            # Convert the list of tickers into an immutable, hashable tuple for O(1) dictionary lookups
            sig = tuple(stocks) if stocks else tuple()
        except TypeError:
            sig = tuple()
            
        if len(sig) == 0:
            unique_empty_keys.append(i)
        else:
            groups.setdefault(sig, []).append(i)
            
    kept = set(unique_empty_keys)
    
    for sig, idxs in groups.items():
        # Sort by name to guarantee deterministic execution across multiple pipeline runs
        idxs_sorted = sorted(idxs, key=lambda i: arr["Fund"][i])
        clusters: list[list[int]] = []
        reps: list[int] = []
        
        for i in idxs_sorted:
            ti = tokens_cache[i]
            placed = False
            for c_idx, rep_i in enumerate(reps):
                tr = tokens_cache[rep_i]
                cpl = _common_prefix_len(ti, tr)
                
                # Dynamic threshold calculation ensures short names and long names are evaluated fairly
                threshold = max(min_prefix_tokens, int(math.ceil(prefix_ratio * min(len(ti), len(tr)))))
                if cpl &gt;= threshold:
                    clusters[c_idx].append(i)
                    placed = True
                    break
            if not placed:
                reps.append(i)
                clusters.append([i])
                
        for cl in clusters:
            kept.add(_pick_best_index(arr, cl, keep=keep))
            
    kept_idx = np.array(sorted(kept), dtype=int)
    return arr[kept_idx]</code></pre></div><p>So let&#8217;s see what we got from this. Time to test!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!d5Q1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6df8fccb-6566-4d18-ae5f-e07f1bdaa177_989x590.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!d5Q1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6df8fccb-6566-4d18-ae5f-e07f1bdaa177_989x590.png 424w, https://substackcdn.com/image/fetch/$s_!d5Q1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6df8fccb-6566-4d18-ae5f-e07f1bdaa177_989x590.png 848w, https://substackcdn.com/image/fetch/$s_!d5Q1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6df8fccb-6566-4d18-ae5f-e07f1bdaa177_989x590.png 1272w, https://substackcdn.com/image/fetch/$s_!d5Q1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6df8fccb-6566-4d18-ae5f-e07f1bdaa177_989x590.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!d5Q1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6df8fccb-6566-4d18-ae5f-e07f1bdaa177_989x590.png" width="989" height="590" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6df8fccb-6566-4d18-ae5f-e07f1bdaa177_989x590.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:590,&quot;width&quot;:989,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!d5Q1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6df8fccb-6566-4d18-ae5f-e07f1bdaa177_989x590.png 424w, https://substackcdn.com/image/fetch/$s_!d5Q1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6df8fccb-6566-4d18-ae5f-e07f1bdaa177_989x590.png 848w, https://substackcdn.com/image/fetch/$s_!d5Q1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6df8fccb-6566-4d18-ae5f-e07f1bdaa177_989x590.png 1272w, https://substackcdn.com/image/fetch/$s_!d5Q1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6df8fccb-6566-4d18-ae5f-e07f1bdaa177_989x590.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Oh! This looks good to me!</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;cf64e4cd-9820-40e9-b668-ae62bced7618&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Screener Extract: 498 funds in 11.567s | Holdings Intercept: 7.711s | Total Architecture Execution: 19.278s | Matrix Dedupe Reduction: 498 -&gt; 346 strict portfolios
[('F00000S8RT', 'Multipartner SICAV - Konwave Gold Equity Fund C USD', 25.92, list(['AU']))
 ('0P0000OMTB', 'Polar Capital Funds PLC - Polar Capital Global Technology Fund I Income EUR', 25.56, list(['NVDA', 'AVGO', 'AMD', 'META', 'LRCX', 'KLAC', 'LITE', 'COHR', 'SNDK', 'STX']))
 ('F0GBR04H0X', 'Multipartner SICAV - Konwave Gold Equity Fund B USD', 25.38, list(['AU']))
 ('F00000VI1X', 'Bakersteel Global Funds SICAV - Precious Metals Fund D EUR', 24.62, list(['NEM', 'AU', 'CDE']))
 ('F00001S8MC', 'CT (Lux) - Global Technology Class ZE (EUR Accumulation Shares)', 23.5 , list(['BE', 'LRCX', 'NVDA', 'AVGO', 'WDC', 'GOOGL', 'AMAT', 'MSFT', 'MRVL', 'AAPL']))]

Ticker    Count   PctFunds
--------------------------
NVDA        146      59.11
MSFT        132      53.44
AAPL        119      48.18
AVGO        113      45.75
GOOGL       110      44.53
AMZN        110      44.53
META        104      42.11
GOOG         68      27.53
NEM          44      17.81
LLY          40      16.19
MA           36      14.57
LRCX         33      13.36
MU           33      13.36
CRM          29      11.74
TSLA         28      11.34
AMAT         23       9.31
V            22       8.91
CDE          20       8.10
AMD          18       7.29
MRVL         18       7.29
FSLR         18       7.29
DC           16       6.48
PWR          16       6.48
RGLD         15       6.07
NFLX         15       6.07</code></pre></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.quantbeckman.com/p/welcome" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KKRX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d67508e-8262-4388-b414-4324f2b6925e_1569x292.png 424w, https://substackcdn.com/image/fetch/$s_!KKRX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d67508e-8262-4388-b414-4324f2b6925e_1569x292.png 848w, https://substackcdn.com/image/fetch/$s_!KKRX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d67508e-8262-4388-b414-4324f2b6925e_1569x292.png 1272w, https://substackcdn.com/image/fetch/$s_!KKRX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d67508e-8262-4388-b414-4324f2b6925e_1569x292.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KKRX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d67508e-8262-4388-b414-4324f2b6925e_1569x292.png" width="1456" height="271" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5d67508e-8262-4388-b414-4324f2b6925e_1569x292.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:271,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:381253,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/155848302?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d67508e-8262-4388-b414-4324f2b6925e_1569x292.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!KKRX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d67508e-8262-4388-b414-4324f2b6925e_1569x292.png 424w, https://substackcdn.com/image/fetch/$s_!KKRX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d67508e-8262-4388-b414-4324f2b6925e_1569x292.png 848w, https://substackcdn.com/image/fetch/$s_!KKRX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d67508e-8262-4388-b414-4324f2b6925e_1569x292.png 1272w, https://substackcdn.com/image/fetch/$s_!KKRX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d67508e-8262-4388-b414-4324f2b6925e_1569x292.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Okay! No surprises here! This output matrix is formatted, computationally lightweight, and ready to be serialized to a Parquet file or whatelse. The architecture is resolved and ready for daily production scheduling.</p><p>Alright crew&#8212;good session today. Until the next article! And remember, may liquidity is with you! &#128181;&#8203;</p><div><hr></div><p>This is an<strong> invitation-only access</strong> to our <strong>QUANT COMMUNITY</strong>, so we verify numbers to avoid spammers and scammers. Feel free to join or decline at any time. <em>Tap the WhatsApp icon below to join</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://chat.whatsapp.com/ElDI4mIZJXuCOhLFxRi3RC" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nbxE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c743df-ac2e-471c-b4de-0d439ebf4bdb_1280x352.png 424w, https://substackcdn.com/image/fetch/$s_!nbxE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c743df-ac2e-471c-b4de-0d439ebf4bdb_1280x352.png 848w, https://substackcdn.com/image/fetch/$s_!nbxE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c743df-ac2e-471c-b4de-0d439ebf4bdb_1280x352.png 1272w, https://substackcdn.com/image/fetch/$s_!nbxE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c743df-ac2e-471c-b4de-0d439ebf4bdb_1280x352.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nbxE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c743df-ac2e-471c-b4de-0d439ebf4bdb_1280x352.png" width="1280" height="352" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c1c743df-ac2e-471c-b4de-0d439ebf4bdb_1280x352.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:352,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:87001,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://chat.whatsapp.com/ElDI4mIZJXuCOhLFxRi3RC&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/181419543?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c743df-ac2e-471c-b4de-0d439ebf4bdb_1280x352.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!nbxE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c743df-ac2e-471c-b4de-0d439ebf4bdb_1280x352.png 424w, https://substackcdn.com/image/fetch/$s_!nbxE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c743df-ac2e-471c-b4de-0d439ebf4bdb_1280x352.png 848w, https://substackcdn.com/image/fetch/$s_!nbxE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c743df-ac2e-471c-b4de-0d439ebf4bdb_1280x352.png 1272w, https://substackcdn.com/image/fetch/$s_!nbxE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1c743df-ac2e-471c-b4de-0d439ebf4bdb_1280x352.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p><strong>Appendix</strong></p><p>Full script:</p>
      <p>
          <a href="https://www.quantbeckman.com/p/with-code-infra-scraping-financial">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[QUANT LECTURE] Local predictability via divergence ]]></title><description><![CDATA[Market Inefficiencies - Information Theoretic Approach]]></description><link>https://www.quantbeckman.com/p/quant-lecture-divergence-as-the-shape</link><guid isPermaLink="false">https://www.quantbeckman.com/p/quant-lecture-divergence-as-the-shape</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Thu, 19 Feb 2026 14:24:55 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/2b479352-ee10-40ac-9112-d005cba22ac5_1544x1032.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!C7mh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F730e56e3-558d-4c7b-9018-f7da8cc574f6_1456x911.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!C7mh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F730e56e3-558d-4c7b-9018-f7da8cc574f6_1456x911.png 424w, https://substackcdn.com/image/fetch/$s_!C7mh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F730e56e3-558d-4c7b-9018-f7da8cc574f6_1456x911.png 848w, https://substackcdn.com/image/fetch/$s_!C7mh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F730e56e3-558d-4c7b-9018-f7da8cc574f6_1456x911.png 1272w, https://substackcdn.com/image/fetch/$s_!C7mh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F730e56e3-558d-4c7b-9018-f7da8cc574f6_1456x911.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!C7mh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F730e56e3-558d-4c7b-9018-f7da8cc574f6_1456x911.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/730e56e3-558d-4c7b-9018-f7da8cc574f6_1456x911.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:505755,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/188492334?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F730e56e3-558d-4c7b-9018-f7da8cc574f6_1456x911.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!C7mh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F730e56e3-558d-4c7b-9018-f7da8cc574f6_1456x911.png 424w, https://substackcdn.com/image/fetch/$s_!C7mh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F730e56e3-558d-4c7b-9018-f7da8cc574f6_1456x911.png 848w, https://substackcdn.com/image/fetch/$s_!C7mh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F730e56e3-558d-4c7b-9018-f7da8cc574f6_1456x911.png 1272w, https://substackcdn.com/image/fetch/$s_!C7mh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F730e56e3-558d-4c7b-9018-f7da8cc574f6_1456x911.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nSv6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b80301-fea4-451b-9c61-deaa007e477b_1060x766.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nSv6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b80301-fea4-451b-9c61-deaa007e477b_1060x766.png 424w, https://substackcdn.com/image/fetch/$s_!nSv6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b80301-fea4-451b-9c61-deaa007e477b_1060x766.png 848w, https://substackcdn.com/image/fetch/$s_!nSv6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b80301-fea4-451b-9c61-deaa007e477b_1060x766.png 1272w, https://substackcdn.com/image/fetch/$s_!nSv6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b80301-fea4-451b-9c61-deaa007e477b_1060x766.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nSv6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b80301-fea4-451b-9c61-deaa007e477b_1060x766.png" width="1060" height="766" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/96b80301-fea4-451b-9c61-deaa007e477b_1060x766.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:766,&quot;width&quot;:1060,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:135825,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/188492334?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b80301-fea4-451b-9c61-deaa007e477b_1060x766.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nSv6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b80301-fea4-451b-9c61-deaa007e477b_1060x766.png 424w, https://substackcdn.com/image/fetch/$s_!nSv6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b80301-fea4-451b-9c61-deaa007e477b_1060x766.png 848w, https://substackcdn.com/image/fetch/$s_!nSv6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b80301-fea4-451b-9c61-deaa007e477b_1060x766.png 1272w, https://substackcdn.com/image/fetch/$s_!nSv6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96b80301-fea4-451b-9c61-deaa007e477b_1060x766.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized</strong> by clicking on the image below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HTrP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90a15d8-b20b-4248-80fd-84760a112959_1456x971.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HTrP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90a15d8-b20b-4248-80fd-84760a112959_1456x971.png 424w, https://substackcdn.com/image/fetch/$s_!HTrP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90a15d8-b20b-4248-80fd-84760a112959_1456x971.png 848w, https://substackcdn.com/image/fetch/$s_!HTrP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90a15d8-b20b-4248-80fd-84760a112959_1456x971.png 1272w, https://substackcdn.com/image/fetch/$s_!HTrP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90a15d8-b20b-4248-80fd-84760a112959_1456x971.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HTrP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90a15d8-b20b-4248-80fd-84760a112959_1456x971.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a90a15d8-b20b-4248-80fd-84760a112959_1456x971.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:677424,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/188492334?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90a15d8-b20b-4248-80fd-84760a112959_1456x971.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HTrP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90a15d8-b20b-4248-80fd-84760a112959_1456x971.png 424w, https://substackcdn.com/image/fetch/$s_!HTrP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90a15d8-b20b-4248-80fd-84760a112959_1456x971.png 848w, https://substackcdn.com/image/fetch/$s_!HTrP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90a15d8-b20b-4248-80fd-84760a112959_1456x971.png 1272w, https://substackcdn.com/image/fetch/$s_!HTrP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa90a15d8-b20b-4248-80fd-84760a112959_1456x971.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;text&quot;:&quot;INDEX&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.quantbeckman.com/p/welcome"><span>INDEX</span></a></p><div><hr></div><h4><strong>Local predictability via divergence</strong></h4><p>This chapter treats an inefficiency claim as a statement about <em>distributional separation.</em> Fix an outcome variable <em>R</em> and a horizon at which <em>R</em> is measured. The future becomes the probability law of <em>R</em> at decision time. The object of interest is the gap between the baseline future and the state-conditioned future, where <em>X</em> is a declared state variable. A divergence measures this gap by quantifying how much the predictive law of <em>R</em> changes when we move from &#8220;no state&#8221; to &#8220;state <em>x</em>,&#8221; and it keeps the research claim separate from the execution layer that turns structure into PnL.</p><p><strong>What&#8217;s inside:</strong></p><ol><li><p><strong>What divergence is for in trading research. </strong>Divergence serves as a dependence detector that lives in conditional laws, so the claim stays tied to how the future distribution changes across states.</p></li><li><p><strong>Scope and limits of divergence. </strong>The chapter draws a boundary between divergence evidence and realized profit, and it frames the inefficiency claim inside a declared horizon, state region, and environment class.</p></li><li><p><strong>Local divergence maps. </strong>The workflow treats <em>R</em> and <em>X</em> as design objects, then compares <em>P</em>(<em>R</em>|<em>X</em>&#8776;<em>x</em>) to <em>P</em>(<em>R</em>) across state domains to build a field of separations over the state space.</p></li><li><p><strong>Local inefficiency domains. </strong>A local inefficiency corresponds to a state domain that supports a stable statement across repeated visits, with an activation domain and a transition zone where the conditional law returns toward the baseline mixture.</p></li><li><p><strong>Tail divergences. </strong>The chapter introduces tail-focused separation to target structure that lives inside extremes, where distributional shape changes matter most for constraint-relevant outcomes.</p></li><li><p><strong>Divergence stability under perturbation.  </strong>Evidence is checked under perturbations of the measurement lens (domain rules, estimation choices) and recomputed on held-out path segments to verify persistence.</p></li><li><p><strong>Predictability has geometry. </strong>The chapter treats predictability as a geometric object with locality, boundaries, and transitions, so the research claim becomes measurable along the market&#8217;s movement through state regions.</p></li></ol><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!BT0u!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2881c838-6e41-45ef-9c92-af2189789240_1544x1032.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Sample</div><div class="file-embed-details-h2">2MB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/962a9cfc-431f-4ca1-81fc-11ae6febadb2.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/962a9cfc-431f-4ca1-81fc-11ae6febadb2.pdf"><span class="file-embed-button-text">Download</span></a></div></div>
      <p>
          <a href="https://www.quantbeckman.com/p/quant-lecture-divergence-as-the-shape">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[[WITH CODE] Infra: ETL process ]]></title><description><![CDATA[Extract, Transform, Load]]></description><link>https://www.quantbeckman.com/p/with-code-infra-etl-process</link><guid isPermaLink="false">https://www.quantbeckman.com/p/with-code-infra-etl-process</guid><dc:creator><![CDATA[Quant Beckman]]></dc:creator><pubDate>Mon, 09 Feb 2026 12:46:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!AJt2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cedd76e-1949-481c-a904-be1a249336c5_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4zl9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4zl9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 424w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 848w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 1272w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4zl9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png" width="1142" height="716" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:716,&quot;width&quot;:1142,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:496259,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/155848302?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!4zl9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 424w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 848w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 1272w, https://substackcdn.com/image/fetch/$s_!4zl9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62310809-5821-4b17-8996-60bfbd9cd904_1142x716.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p><strong>Table of contents:</strong></p><ol><li><p>Introduction.</p></li><li><p>The role of ETL in the design of trading systems.</p></li><li><p>ETL failure modes and risks.</p></li><li><p>Technical preliminaries.</p></li><li><p>Designing an ETL.</p></li><li><p>Layers, contracts and canonical schema.</p></li><li><p>ETL vs ELT for trading.</p></li><li><p>What breaks ETL in trading systems.</p></li></ol><div><hr></div><p style="text-align: center;">Before you begin, remember that you have an index with the newsletter content <strong>organized </strong>by clicking on &#8220;<em>Read the newsletter index</em>&#8221; in this image.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.quantbeckman.com/p/welcome" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DI2x!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 424w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 848w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 1272w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DI2x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png" width="1040" height="496" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:496,&quot;width&quot;:1040,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:639128,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.quantbeckman.com/p/welcome&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/198696914?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!DI2x!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 424w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 848w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 1272w, https://substackcdn.com/image/fetch/$s_!DI2x!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ae83b52-d512-41ea-bfdc-3fd9171486b1_1040x496.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h4>Introduction</h4><p>We enter the part of the quant stack that drives everything: <em>data</em>. We treat data as the machinery that tells a trading system what the market <em>is</em>&#8212;minute by minute, venue by venue, revision by revision. </p><p>This new serie introduces a sequence of articles on infrastructure&#8212;ETLs, scraping, APIs&#8212;written from the quant-dev perspective: trading systems need <em>repeatable market states</em>. Research needs to recreate yesterday. Live trading needs to ingest today. Both need to refer to the same definitions.</p><p>A familiar pattern shows up in almost every desk, prop shop, or solo setup. Data starts as a handful of scripts, then grows into a maze of<em> just this once</em> fixes: a quick endpoint here, a patched column there, a notebook cell that becomes a dependency because it worked during a good backtest. The system still runs. Results still appear. But the pipeline becomes a moving object&#8212;shifting definitions, shifting assumptions, shifting outputs&#8212;until the only thing that remains stable is confusion.</p><p>That is why ETL deserves a dedicated article. The reason? A pipeline accumulates decisions: <em>what gets stored, what gets normalized, what gets ignored, what gets re-requested, what gets overwritten, what gets trusted&#8230;</em> Those decisions compound, and at some point they dominate the behavior of the entire stack. The strategy stops being the bottleneck. The data becomes the bottleneck.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MKgo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbae6a5a-6f47-45a6-8bd6-ad61df06a9f1_1600x914.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MKgo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbae6a5a-6f47-45a6-8bd6-ad61df06a9f1_1600x914.png 424w, https://substackcdn.com/image/fetch/$s_!MKgo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbae6a5a-6f47-45a6-8bd6-ad61df06a9f1_1600x914.png 848w, https://substackcdn.com/image/fetch/$s_!MKgo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbae6a5a-6f47-45a6-8bd6-ad61df06a9f1_1600x914.png 1272w, https://substackcdn.com/image/fetch/$s_!MKgo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbae6a5a-6f47-45a6-8bd6-ad61df06a9f1_1600x914.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MKgo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbae6a5a-6f47-45a6-8bd6-ad61df06a9f1_1600x914.png" width="1456" height="832" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cbae6a5a-6f47-45a6-8bd6-ad61df06a9f1_1600x914.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:832,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Diagram showing key parts of Extract, Transform, Load (ETL)&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Diagram showing key parts of Extract, Transform, Load (ETL)" title="Diagram showing key parts of Extract, Transform, Load (ETL)" srcset="https://substackcdn.com/image/fetch/$s_!MKgo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbae6a5a-6f47-45a6-8bd6-ad61df06a9f1_1600x914.png 424w, https://substackcdn.com/image/fetch/$s_!MKgo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbae6a5a-6f47-45a6-8bd6-ad61df06a9f1_1600x914.png 848w, https://substackcdn.com/image/fetch/$s_!MKgo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbae6a5a-6f47-45a6-8bd6-ad61df06a9f1_1600x914.png 1272w, https://substackcdn.com/image/fetch/$s_!MKgo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbae6a5a-6f47-45a6-8bd6-ad61df06a9f1_1600x914.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Scraping and APIs deserve equal attention because they are how most modern trading pipelines actually exist in the wild. They impose constraints, quirks, and failure patterns: response truncation, pagination inconsistencies, silent field changes, intermittent outages, caching surprises, and vendor helpfulness.</p><p>The goal across this series is to make data infrastructure feel less like maintenance and more like a controlled instrument. A good pipeline behaves like a well-specified system: deterministic when it should be deterministic, conservative when it must be conservative, and transparent when something deviates. </p><p>Check this paper to know more about ETLs:</p><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail" src="https://substackcdn.com/image/fetch/$s_!ufHw!,w_400,h_600,c_fill,f_auto,q_auto:best,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf9ff437-d834-4834-9618-0c668aad5e7d_447x549.png"></image><div class="file-embed-details"><div class="file-embed-details-h1">Data extraction, Transformation, and Loading process automation </div><div class="file-embed-details-h2">299KB &#8729; PDF file</div></div><a class="file-embed-button wide" href="https://www.quantbeckman.com/api/v1/file/f9f68374-185f-4f2e-810e-7d65e5bef13a.pdf"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://www.quantbeckman.com/api/v1/file/f9f68374-185f-4f2e-810e-7d65e5bef13a.pdf"><span class="file-embed-button-text">Download</span></a></div></div><p>So the promise of this article is concrete. By the end, it becomes natural to answer questions that otherwise stay vague: <em>Where did this feature come from? Which definition did it use? When did it change? Can the dataset be recreated byte-for-byte? What happens when the vendor revises history? How does the system fail when the feed degrades?</em> Those are operational questions, but they decide whether research can be trusted and whether live behavior can be diagnosed.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ruL8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe63263f2-879a-4c14-9023-28891d320bef_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ruL8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe63263f2-879a-4c14-9023-28891d320bef_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ruL8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe63263f2-879a-4c14-9023-28891d320bef_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ruL8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe63263f2-879a-4c14-9023-28891d320bef_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ruL8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe63263f2-879a-4c14-9023-28891d320bef_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ruL8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe63263f2-879a-4c14-9023-28891d320bef_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e63263f2-879a-4c14-9023-28891d320bef_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1597099,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/187194814?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe63263f2-879a-4c14-9023-28891d320bef_1536x1024.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ruL8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe63263f2-879a-4c14-9023-28891d320bef_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ruL8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe63263f2-879a-4c14-9023-28891d320bef_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ruL8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe63263f2-879a-4c14-9023-28891d320bef_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ruL8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe63263f2-879a-4c14-9023-28891d320bef_1536x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>The role of ETL in the design of trading systems</h4><p>Three components are typically treated as <em>core</em> in any trading system: <em>strategy logic, execution, and risk</em>. The ETL process&#8212;Extract, Transform, Load&#8212;is often categorized as a secondary support function. However, this categorization understates the structural role ETL plays in defining the parameters of the trading environment. It is the ETL process that establishes timestamp semantics and interval conventions, just as it defines the mechanics of volume aggregation across venues, determines the handling of missing prints or stale quotes, and establishes the boundaries of the trading day, including the definition of market close during partial sessions or under vendor-specific conventions.</p><p>A weak data pipeline permits a model to stay numerically consistent even when it lacks economic coherence. This failure manifests as an epistemic mismatch. The model trains on information unavailable at the time of execution or on data representations that drift between the training environment and the live feed. Backtests appear profitable but lack causal validity. Live trading degradation follows as a predictable consequence of this architecture.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kvJi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd8b909-b503-4e46-82a8-2fa06b9d6a84_1600x914.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kvJi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd8b909-b503-4e46-82a8-2fa06b9d6a84_1600x914.png 424w, https://substackcdn.com/image/fetch/$s_!kvJi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd8b909-b503-4e46-82a8-2fa06b9d6a84_1600x914.png 848w, https://substackcdn.com/image/fetch/$s_!kvJi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd8b909-b503-4e46-82a8-2fa06b9d6a84_1600x914.png 1272w, https://substackcdn.com/image/fetch/$s_!kvJi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd8b909-b503-4e46-82a8-2fa06b9d6a84_1600x914.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kvJi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd8b909-b503-4e46-82a8-2fa06b9d6a84_1600x914.png" width="1456" height="832" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9fd8b909-b503-4e46-82a8-2fa06b9d6a84_1600x914.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:832,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Extract and Load in the data pipeline&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Extract and Load in the data pipeline" title="Extract and Load in the data pipeline" srcset="https://substackcdn.com/image/fetch/$s_!kvJi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd8b909-b503-4e46-82a8-2fa06b9d6a84_1600x914.png 424w, https://substackcdn.com/image/fetch/$s_!kvJi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd8b909-b503-4e46-82a8-2fa06b9d6a84_1600x914.png 848w, https://substackcdn.com/image/fetch/$s_!kvJi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd8b909-b503-4e46-82a8-2fa06b9d6a84_1600x914.png 1272w, https://substackcdn.com/image/fetch/$s_!kvJi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fd8b909-b503-4e46-82a8-2fa06b9d6a84_1600x914.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Scale makes ETL automation a key pillar. But it is a challenge that requires automating the whole process. That means, new failures. From a quant dev perspective, this presents a tension between three competing criteria: <em>velocity, correctness, and observability</em>. Velocity is necessary because research iteration and feature publication are time-sensitive. Correctness is critical because a single semantic mismatch can introduce systematic lookahead bias without any explicit error in the code. Observability is essential because, without reproducibility and data lineage, it is impossible to distinguish between a failure of strategy logic and a failure of data construction. Once models are trained on warehouse-ready features, the ETL pipeline becomes an implicit component of the model itself. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Zr-N!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Zr-N!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 424w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 848w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 1272w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Zr-N!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png" width="1200" height="610" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:610,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Zr-N!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 424w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 848w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 1272w, https://substackcdn.com/image/fetch/$s_!Zr-N!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffda320ed-0fa5-4984-91de-c590b65319ef_1200x610.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.quantbeckman.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.quantbeckman.com/subscribe?"><span>Subscribe now</span></a></p><h4>ETL failure modes and risks</h4><p>ETL failure modes exist across domains, but in trading they are amplified because signals are marginal and backtests are sensitive to subtle causal violations. It is useful to name the principal failure modes,  as a map from data defects to PnL leakage.</p><ol><li><p><strong>Temporal integrity risk</strong> is the most frequent source of silent contamination. Timezone normalization errors&#8212;exchange time, broker server time, and UTC being conflated&#8212;create misalignment that can masquerade as alpha. Bar timestamp conventions are often ambiguous: some providers label bars by start time, others by end time, and others by a vendor-defined label that is neither. DST discontinuities can duplicate or remove hourly timestamps. APIs frequently return date fields with implicit timezones. Resampling without explicit session calendars can manufacture bars during market closures. None of these defects need an explicit future reference to introduce lookahead, misalignment is sufficient.</p></li><li><p><strong>Market microstructure risk</strong> emerges when sampling and aggregation rules are treated as interchangeable. For example, volume is venue-specific; cross-venue volume is not additive unless definitions match. VWAP computed from incomplete trade prints is not VWAP. OHLC bars from heterogeneous vendors can be numerically similar while being non-equivalent, which means return distributions can look stable while microstructure features drift. Mixing bid/ask and last-trade series destroys interpretability of returns, spread-sensitive features, and execution assumptions. Even quote filtering&#8212;removing stale quotes or enforcing spread constraints&#8212;changes the effective sampling distribution and can alter feature&#8211;target dependence.</p></li><li><p>Firm actions and instrument definition risk is where many useless backtests are born. Splits, dividends, symbol changes, roll schedules for futures, and specification changes in tick size or lot size all require explicit treatment. A toxic pattern is using adjusted close alongside raw open/high/low, which creates a <strong>synthetic object with inconsistent scale.</strong></p></li><li><p><strong>Data leakage risk </strong>is the highest-impact failure mode because it converts structural error into apparent predictive power. Vendor revisions&#8212;late prints, corrected OHLC&#8212;can enter historical features without an <em>as-of </em>policy. Using the close price for signals intended to be decided at open changes the filtration. Filling missing values using future data is leakage by construction. End-of-day fundamentals used for intraday signals without controlling for publication time inject future information. Even innocuous preprocessing, such as z-scoring using full-sample statistics, can leak information when deployed online.</p></li><li><p><strong>Heterogeneity risk </strong>is both schema and semantics. NaN encodings differ across sources (null, zero, empty string). Identical field names can have different meaning, as when volume is shares, contracts, or notional. Data types differ and can change silently (float versus decimal, integer timestamps versus ISO strings). Precision and rounding differences can alter microstructure-sensitive computations and create spurious stability.</p></li><li><p><strong>Operational risk</strong> appears when automation is treated as job finished equals success. Cron jobs can succeed while returning partial data. API rate limits can truncate responses. Network errors can create gaps, retries can create duplicates. Incremental loads can fail to be idempotent. Failures often cluster on holidays, early closes, vendor maintenance windows, and schedule drift that causes overlapping extraction windows.</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nSdA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb58362a-4215-4be5-bf03-771412566ef2_1300x336.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nSdA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb58362a-4215-4be5-bf03-771412566ef2_1300x336.png 424w, https://substackcdn.com/image/fetch/$s_!nSdA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb58362a-4215-4be5-bf03-771412566ef2_1300x336.png 848w, https://substackcdn.com/image/fetch/$s_!nSdA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb58362a-4215-4be5-bf03-771412566ef2_1300x336.png 1272w, https://substackcdn.com/image/fetch/$s_!nSdA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb58362a-4215-4be5-bf03-771412566ef2_1300x336.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nSdA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb58362a-4215-4be5-bf03-771412566ef2_1300x336.png" width="1300" height="336" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fb58362a-4215-4be5-bf03-771412566ef2_1300x336.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:336,&quot;width&quot;:1300,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:277215,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/187194814?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb58362a-4215-4be5-bf03-771412566ef2_1300x336.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nSdA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb58362a-4215-4be5-bf03-771412566ef2_1300x336.png 424w, https://substackcdn.com/image/fetch/$s_!nSdA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb58362a-4215-4be5-bf03-771412566ef2_1300x336.png 848w, https://substackcdn.com/image/fetch/$s_!nSdA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb58362a-4215-4be5-bf03-771412566ef2_1300x336.png 1272w, https://substackcdn.com/image/fetch/$s_!nSdA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb58362a-4215-4be5-bf03-771412566ef2_1300x336.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Heavy transformations performed repeatedly inside modelling loops change the feasible hypothesis class. Recomputing features that should be materialized wastes iteration budget and induces inconsistent definitions when code evolves. Unbounded joins across large fact tables can make the research loop unstable under scaling.</p><h4>Technical preliminaries</h4><p>Trading doesn&#8217;t tolerate imprecise definitions because PnL is sensitive to small causal misalignments. Let <em>P<sub>t</sub></em> denote a price process under an explicit convention (bid, ask, mid, last). Let <em>V<sub>t</sub></em> denote an associated volume process with explicit units (shares, contracts, notional). Let <em>I<sub>t</sub></em> denote the sigma-algebra of information available up to time <em>t</em>. A trading signal <em>S<sub>t</sub></em> must be <em>I<sub>t</sub></em>-measurable.</p><p>An ETL pipeline can be modeled as a composition of maps,</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\mathrm{ETL} = \\mathcal{L} \\circ \\mathcal{T} \\circ \\mathcal{E},&quot;,&quot;id&quot;:&quot;SVAJPUEQTS&quot;}" data-component-name="LatexBlockToDOM"></div><p>where &#949; extracts from raw sources into an event stream, <em>T</em> transforms into conformed representations, and <em>L</em> loads into storage layers (OLTP and DW).</p><blockquote><ul><li><p><strong>Online transaction processing </strong>(OLTP) is a type of database system used in transaction-oriented applications, such as many operational systems. Online refers to the fact that such systems are expected to respond to user requests and process them in real-time (process transactions). The term is contrasted with online analytical processing (OLAP) which instead focuses on data analysis (for example planning and management systems).</p></li><li><p><strong>Data warehouse</strong> (DW), is a system used for reporting and data analysis and is a core component of goberning. Data warehouses are central repositories of data integrated from disparate sources.</p></li></ul></blockquote><p>The critical property is causal admissibility. For any feature <em>F<sub>t</sub></em> used at decision time <em>t</em>, <em>F<sub>t</sub></em>  must be measurable with respect to <em>I<sub>t</sub></em>. ETL violates this property through mechanisms that look operationally reasonable: aggregations that use end-of-window values while decisions occur at window start; imputation via centered filters; backfills that overwrite previously published features without version control; and &#8220;helpful&#8221; resampling rules that use future ticks to fill an OHLC bar.</p><p>This is why causal admissibility must be enforced by automated tests. If the system can&#8217;t prove the property, the property doesn&#8217;t hold operationally.</p><p>To remove ambiguity, define three timelines. Observation time <em>t</em><sup>(</sup><em><sup>e</sup></em><sup>)</sup> (event-time) is when the market produced the observable. Processing time <em>t</em><sup>(</sup><em><sup>p</sup></em><sup>)</sup> is when the system ingested it. Decision time <em>t</em><sup>(</sup><em><sup>d</sup></em><sup>)</sup> is when the strategy commits to an action.</p><p>A bar at index <em>k</em> has an interval [<em>t<sub>k,start </sub>, t<sub>k,end</sub></em>). If a strategy acts at bar open, then <em>t<sub>k</sub></em><sup>(</sup><em><sup>d</sup></em><sup>)</sup> . Features must not depend on events with <em>t</em><sup>(</sup><em><sup>e</sup></em><sup>)</sup>&#8805;<em>t<sub>k,start</sub></em>. </p><p>Before diving into more complex staff, understanding where ETL pipelines typically struggle helps prioritize improvement efforts. Here&#8217;s a breakdown of common bottleneck areas:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!g84_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86bb1e5f-53af-4e16-a56e-44e1763ac3c8_904x422.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!g84_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86bb1e5f-53af-4e16-a56e-44e1763ac3c8_904x422.png 424w, https://substackcdn.com/image/fetch/$s_!g84_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86bb1e5f-53af-4e16-a56e-44e1763ac3c8_904x422.png 848w, https://substackcdn.com/image/fetch/$s_!g84_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86bb1e5f-53af-4e16-a56e-44e1763ac3c8_904x422.png 1272w, https://substackcdn.com/image/fetch/$s_!g84_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86bb1e5f-53af-4e16-a56e-44e1763ac3c8_904x422.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!g84_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86bb1e5f-53af-4e16-a56e-44e1763ac3c8_904x422.png" width="904" height="422" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/86bb1e5f-53af-4e16-a56e-44e1763ac3c8_904x422.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:422,&quot;width&quot;:904,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:61759,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/187194814?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86bb1e5f-53af-4e16-a56e-44e1763ac3c8_904x422.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!g84_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86bb1e5f-53af-4e16-a56e-44e1763ac3c8_904x422.png 424w, https://substackcdn.com/image/fetch/$s_!g84_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86bb1e5f-53af-4e16-a56e-44e1763ac3c8_904x422.png 848w, https://substackcdn.com/image/fetch/$s_!g84_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86bb1e5f-53af-4e16-a56e-44e1763ac3c8_904x422.png 1272w, https://substackcdn.com/image/fetch/$s_!g84_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86bb1e5f-53af-4e16-a56e-44e1763ac3c8_904x422.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>Designing an ETL</h4><p>Every strategy carries implicit assumptions about what constitutes a day, how the open is defined under multi-session trading, which clock governs decisions, what constitutes a trade, for example for a VWAP aggregation, and when information enters <em>I<sub>t</sub></em> (publication timestamps, vendor revisions, and the latency of ingestion itself). ETL either formalizes these assumptions or smuggles them.</p><p>The baseline automation flow is simple and sensible: collect data on a schedule, store it in OLTP, transform and load it into a DW, then use the DW for trading workflows. That pattern improves throughput. The difference from a traditional ETL lies in representing the pipeline as a reproducible computational object with explicit contracts so that performance does not amplify error.</p><p>Bounded complexity matters because a system that can&#8217;t be described will not remain stable. Verifiable correctness matters because a property that can&#8217;t be checked automatically is not a property of the system.</p><p>ETL design can be posed as constrained optimization. Let &#952; parametrize pipeline configuration (batch size, partitioning, retry policy, scheduling, feature versions). Let  <em>D</em>(&#952;) denote the dataset emitted for modelling. We care about generalization performance <em>G</em>(<em>D</em>(&#952;)), latency <em>L</em>(&#952;), cost <em>C</em>(&#952;) (compute, storage, API calls), and data quality risk <em>R</em>(&#952;) (probability-weighted impact of faults). A compact objective can be written as</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\min_{\\theta}\\; \\mathbb{E}\\!\\left[\\operatorname{Loss}\\!\\big(\\operatorname{model}(D(\\theta))\\big)\\right]\n\\;+\\; \\lambda_{1}\\mathcal{L}(\\theta)\\;+\\;\\lambda_{2}\\mathcal{C}(\\theta)\\;+\\;\\lambda_{3}\\mathcal{R}(\\theta),&quot;,&quot;id&quot;:&quot;WZYQAHIUQD&quot;}" data-component-name="LatexBlockToDOM"></div><p>subject to causal admissibility, idempotence, and lineage. The key conceptual shift is that ETL is an optimization problem.</p><p>A useful operational shift is to treat the pipeline as a parameterized program with a semantic version <em>v</em>. The output dataset is then <em>D<sub>v</sub></em>(&#952;). If either <em>v</em> or &#952; changes, you must assume the output is a different dataset, even if schemas appear identical. This rule prevents a large fraction of unreproducible model results.</p><p>Scheduling ETL jobs reduces contention with operational systems. However, smart scheduling goes beyond simple timing:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4qxr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad62d1a-8300-44fc-a72b-1087ff14f0a9_901x261.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4qxr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad62d1a-8300-44fc-a72b-1087ff14f0a9_901x261.png 424w, https://substackcdn.com/image/fetch/$s_!4qxr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad62d1a-8300-44fc-a72b-1087ff14f0a9_901x261.png 848w, https://substackcdn.com/image/fetch/$s_!4qxr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad62d1a-8300-44fc-a72b-1087ff14f0a9_901x261.png 1272w, https://substackcdn.com/image/fetch/$s_!4qxr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad62d1a-8300-44fc-a72b-1087ff14f0a9_901x261.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4qxr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad62d1a-8300-44fc-a72b-1087ff14f0a9_901x261.png" width="901" height="261" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dad62d1a-8300-44fc-a72b-1087ff14f0a9_901x261.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:261,&quot;width&quot;:901,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:33526,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/187194814?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad62d1a-8300-44fc-a72b-1087ff14f0a9_901x261.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4qxr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad62d1a-8300-44fc-a72b-1087ff14f0a9_901x261.png 424w, https://substackcdn.com/image/fetch/$s_!4qxr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad62d1a-8300-44fc-a72b-1087ff14f0a9_901x261.png 848w, https://substackcdn.com/image/fetch/$s_!4qxr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad62d1a-8300-44fc-a72b-1087ff14f0a9_901x261.png 1272w, https://substackcdn.com/image/fetch/$s_!4qxr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdad62d1a-8300-44fc-a72b-1087ff14f0a9_901x261.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4><strong>Layers, contracts and canonical schema</strong></h4><p>A robust architecture is best described as layers governed by explicit contracts. At the perimeter, source connectors interact with APIs, brokers, file drops, and vendor feeds. Their contract is to emit raw events with source metadata, explicit time conventions, and enough information to reproduce the request.</p><p>Raw ingestion into OLTP should be append-heavy and minimally transformative. Its contract is to preserve raw information, enforce uniqueness, and preserve provenance. Canonicalization then converts heterogeneous source representations into a canonical schema by enforcing time normalization, type normalization, and symbol mapping. The DW layer provides partitioned fact tables and dimensions (assets, calendars, sources) with stable semantics optimized for analytical access.</p><p>Above the DW, a feature store publishes versioned feature vectors and tensors consumed by research and live engines. The feature store is the interface that enforces immutability by version and train/live parity. Finally, model inputs and backtest feeds are derived from the feature store as arrays, parquet datasets, or tight queries.</p><p>A canonical schema must minimize semantic ambiguity. At minimum, an asset dimension fixes identifiers, venues, tick sizes, and calendars. A calendar dimension fixes session definitions, holidays, and early closes. A source dimension fixes provider identity, endpoint sampling rules, time conventions, and revision policy. Facts separate raw events from derived bars and derived bars from derived features. This separation prevents circularity and leakage.</p><p>Establishing baseline metrics is essential before implementing optimization strategies. Track these KPIs to measure improvement:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rVJ5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaddcbd-12d4-47cb-9124-069d42520620_896x353.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rVJ5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaddcbd-12d4-47cb-9124-069d42520620_896x353.png 424w, https://substackcdn.com/image/fetch/$s_!rVJ5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaddcbd-12d4-47cb-9124-069d42520620_896x353.png 848w, https://substackcdn.com/image/fetch/$s_!rVJ5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaddcbd-12d4-47cb-9124-069d42520620_896x353.png 1272w, https://substackcdn.com/image/fetch/$s_!rVJ5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaddcbd-12d4-47cb-9124-069d42520620_896x353.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rVJ5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaddcbd-12d4-47cb-9124-069d42520620_896x353.png" width="896" height="353" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9eaddcbd-12d4-47cb-9124-069d42520620_896x353.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:353,&quot;width&quot;:896,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:43328,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.quantbeckman.com/i/187194814?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaddcbd-12d4-47cb-9124-069d42520620_896x353.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rVJ5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaddcbd-12d4-47cb-9124-069d42520620_896x353.png 424w, https://substackcdn.com/image/fetch/$s_!rVJ5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaddcbd-12d4-47cb-9124-069d42520620_896x353.png 848w, https://substackcdn.com/image/fetch/$s_!rVJ5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaddcbd-12d4-47cb-9124-069d42520620_896x353.png 1272w, https://substackcdn.com/image/fetch/$s_!rVJ5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaddcbd-12d4-47cb-9124-069d42520620_896x353.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>A critical design choice is to represent bars with explicit start/end timestamps. Ambiguous labels are a recurring source of leakage.</p><pre><code>CREATE TABLE IF NOT EXISTS fact_bar (
  asset_id           BIGINT NOT NULL,
  ts_start_utc       TIMESTAMPTZ NOT NULL,
  ts_end_utc         TIMESTAMPTZ NOT NULL,
  open               DOUBLE PRECISION,
  high               DOUBLE PRECISION,
  low                DOUBLE PRECISION,
  close              DOUBLE PRECISION,
  volume             DOUBLE PRECISION,
  source_id          TEXT NOT NULL,
  ingest_ts_utc      TIMESTAMPTZ NOT NULL DEFAULT NOW(),
  quality_flags      INTEGER NOT NULL DEFAULT 0,
  PRIMARY KEY (asset_id, ts_start_utc, source_id)
);

CREATE INDEX IF NOT EXISTS idx_fact_bar_end
  ON fact_bar(asset_id, ts_end_utc);</code></pre><p>This schema forces a commitment to interval semantics and prevents a broad class of timestamp-induced lookahead errors.</p><pre><code>CREATE TABLE IF NOT EXISTS feature_vector (
  asset_id            BIGINT NOT NULL,
  ts_utc              TIMESTAMPTZ NOT NULL,
  feature_set_version TEXT NOT NULL,
  f1                  DOUBLE PRECISION,
  f2                  DOUBLE PRECISION,
  f3                  DOUBLE PRECISION,
  quality_flags       INTEGER NOT NULL DEFAULT 0,
  PRIMARY KEY(asset_id, ts_utc, feature_set_version)
);</code></pre><h4>ETL vs ELT for trading</h4>
      <p>
          <a href="https://www.quantbeckman.com/p/with-code-infra-etl-process">
              Read more
          </a>
      </p>
   ]]></content:encoded></item></channel></rss>