
{"id":4580,"date":"2023-04-13T08:50:22","date_gmt":"2023-04-13T08:50:22","guid":{"rendered":"https:\/\/prosperity.newai.com.au\/?p=4580"},"modified":"2025-04-13T10:45:12","modified_gmt":"2025-04-13T10:45:12","slug":"profit-leakage-analysis-why-my-algorithm-missed-700-points-of-potential-gains","status":"publish","type":"post","link":"https:\/\/prosperity.newai.com.au\/index.php\/2023\/04\/13\/profit-leakage-analysis-why-my-algorithm-missed-700-points-of-potential-gains\/","title":{"rendered":"Profit Leakage Analysis: Why My Algorithm Missed 700 Points of Potential Gains"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"4580\" class=\"elementor elementor-4580\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-1418a44 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"1418a44\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e333797\" data-id=\"e333797\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7234710 elementor-widget elementor-widget-text-editor\" data-id=\"7234710\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.6.7 - 03-07-2022 *\/\n.elementor-widget-text-editor.elementor-drop-cap-view-stacked .elementor-drop-cap{background-color:#818a91;color:#fff}.elementor-widget-text-editor.elementor-drop-cap-view-framed .elementor-drop-cap{color:#818a91;border:3px solid;background-color:transparent}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap{margin-top:8px}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap-letter{width:1em;height:1em}.elementor-widget-text-editor .elementor-drop-cap{float:left;text-align:center;line-height:1;font-size:50px}.elementor-widget-text-editor .elementor-drop-cap-letter{display:inline-block}<\/style>\t\t\t\t<p>Today I focused on comparing my performance against other market participants in bananas trading to identify improvement opportunities. Here&#8217;s my analysis approach:<\/p><p><b>1. Profit Tracking Methodology:<\/b><\/p><p>\u2981 For all market trades reported by exchange:<br \/>PnL = abs((trade_price &#8211; fair_price) * quantity)<\/p><p>\u2981 For my own trades:<br \/>PnL = (fair_price &#8211; trade_price) * quantity<\/p><p>\u2981 Plotted cumulative sums of both PnLs<\/p><p>Key Finding: My algorithm missed ~700 in potential profits based on the gap between these curves.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-50929b5 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"50929b5\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-31236bb\" data-id=\"31236bb\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c598fb4 elementor-widget elementor-widget-image\" data-id=\"c598fb4\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.6.7 - 03-07-2022 *\/\n.elementor-widget-image{text-align:center}.elementor-widget-image a{display:inline-block}.elementor-widget-image a img[src$=\".svg\"]{width:48px}.elementor-widget-image img{vertical-align:middle;display:inline-block}<\/style>\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"893\" height=\"459\" src=\"https:\/\/prosperity.newai.com.au\/wp-content\/uploads\/2025\/04\/5-2.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/prosperity.newai.com.au\/wp-content\/uploads\/2025\/04\/5-2.jpg 893w, https:\/\/prosperity.newai.com.au\/wp-content\/uploads\/2025\/04\/5-2-300x154.jpg 300w, https:\/\/prosperity.newai.com.au\/wp-content\/uploads\/2025\/04\/5-2-768x395.jpg 768w\" sizes=\"auto, (max-width: 893px) 100vw, 893px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-11342eb elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"11342eb\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-929b117\" data-id=\"929b117\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-35c1876 elementor-widget elementor-widget-text-editor\" data-id=\"35c1876\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><b>2. Market Trade Breakdown:<\/b><\/p><p>I categorized missed opportunities into two types:<\/p><p>\u2981 Type 1: Trades executed outside my bid-ask spread (or exactly at my quotes)<\/p><p>Related to those mysterious &#8220;phantom trades&#8221; from previous research<\/p><p>Currently unsolvable until we crack that anomaly<\/p><p>\u2981 Type 2: Trades executed within my spread when position limit wasn&#8217;t full<\/p><p>Caused by having too wide bid-ask spreads<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-9e997ac elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"9e997ac\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-19a7dff\" data-id=\"19a7dff\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4abf6f9 elementor-widget elementor-widget-image\" data-id=\"4abf6f9\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"885\" height=\"464\" src=\"https:\/\/prosperity.newai.com.au\/wp-content\/uploads\/2025\/04\/5-3.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/prosperity.newai.com.au\/wp-content\/uploads\/2025\/04\/5-3.jpg 885w, https:\/\/prosperity.newai.com.au\/wp-content\/uploads\/2025\/04\/5-3-300x157.jpg 300w, https:\/\/prosperity.newai.com.au\/wp-content\/uploads\/2025\/04\/5-3-768x403.jpg 768w\" sizes=\"auto, (max-width: 885px) 100vw, 885px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-198741c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"198741c\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-85c76df\" data-id=\"85c76df\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3a02074 elementor-widget elementor-widget-text-editor\" data-id=\"3a02074\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><b>3. Optimization Attempt:<\/b><\/p>\n<p>Narrowed my bid-ask spreads to capture more Type 2 trades<\/p>\n<p>Result:<br>Reduced Type 2 missed trades (success)<br>But overall profits decreased because other trades became less profitable<\/p>\n<p>Similar pattern observed in pearls trading<\/p>\n<p><b>Conclusion: <\/b>There&#8217;s a delicate balance between:<br>\u2714 Capturing more trades by tightening spreads<br>\u2714 Maintaining profit margins on executed trades<\/p>\n<p>The 700 gap suggests I need smarter dynamic spread adjustment rather than simple narrowing.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Today I focused on comparing my performance against other market participants in bananas trading to identify improvement opportunities. Here&#8217;s my analysis approach: 1. Profit Tracking Methodology: \u2981 For all market trades reported by exchange: PnL = abs((trade_price &#8211; fair_price) * quantity) \u2981 For my own trades: PnL = (fair_price &#8211; trade_price) * quantity \u2981 Plotted [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4537,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[],"class_list":["post-4580","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-2023r0"],"acf":[],"_links":{"self":[{"href":"https:\/\/prosperity.newai.com.au\/index.php\/wp-json\/wp\/v2\/posts\/4580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prosperity.newai.com.au\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prosperity.newai.com.au\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prosperity.newai.com.au\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prosperity.newai.com.au\/index.php\/wp-json\/wp\/v2\/comments?post=4580"}],"version-history":[{"count":14,"href":"https:\/\/prosperity.newai.com.au\/index.php\/wp-json\/wp\/v2\/posts\/4580\/revisions"}],"predecessor-version":[{"id":4596,"href":"https:\/\/prosperity.newai.com.au\/index.php\/wp-json\/wp\/v2\/posts\/4580\/revisions\/4596"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prosperity.newai.com.au\/index.php\/wp-json\/wp\/v2\/media\/4537"}],"wp:attachment":[{"href":"https:\/\/prosperity.newai.com.au\/index.php\/wp-json\/wp\/v2\/media?parent=4580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prosperity.newai.com.au\/index.php\/wp-json\/wp\/v2\/categories?post=4580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prosperity.newai.com.au\/index.php\/wp-json\/wp\/v2\/tags?post=4580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}