<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ruslan Dubas on Medium]]></title>
        <description><![CDATA[Stories by Ruslan Dubas on Medium]]></description>
        <link>https://medium.com/@ruslandubas2013?source=rss-5b821918be53------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*IXjLTpzOQkpzC7rB.jpg</url>
            <title>Stories by Ruslan Dubas on Medium</title>
            <link>https://medium.com/@ruslandubas2013?source=rss-5b821918be53------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 07:40:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ruslandubas2013/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[An 84% Win Rate and Still Losing Money: Why I Built a Public Record for Stock Predictions]]></title>
            <link>https://medium.com/@ruslandubas2013/an-84-win-rate-and-still-losing-money-why-i-built-a-public-record-for-stock-predictions-ffcc62a81131?source=rss-5b821918be53------2</link>
            <guid isPermaLink="false">https://medium.com/p/ffcc62a81131</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[systems-thinking]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[stock-market-tips]]></category>
            <dc:creator><![CDATA[Ruslan Dubas]]></dc:creator>
            <pubDate>Tue, 18 Aug 2026 19:14:15 GMT</pubDate>
            <atom:updated>2026-08-18T19:14:15.691Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sPq2rPGcffaXQW7BVCFrbw.png" /></figure><h4>It started with failing, repeatedly</h4><p>A friend introduced me to prop trading firms — pass their evaluation, trade<br>their capital. I failed the tests. Not once: many times, and always the same<br>way. Emotional overtrading. I knew the rules; I broke them anyway. The<br>problem wasn’t my analysis. It was my hands.</p><p>So I did what a developer does when the problem is human: I tried to remove the human. I would build a trading bot.</p><h4>Seven months of humility</h4><p>I expected the hard part to be code. It wasn’t. Over seven months I tried<br>strategy after strategy before converging on something specific: small-cap<br>stocks, a holding period of up to five days, a 5.5% profit target, a 25%<br>stop loss.</p><p>I funded a live account with $500 — a constraint that is itself a challenge.<br>Under the pattern day trader rule, accounts under $25,000 are limited to<br>three day trades a week, so I pivoted to a cash account and built the system<br>around settlement mechanics instead of fighting them.</p><p>And then the market taught me the lesson this whole article is about.</p><h4>The math that humbles you</h4><p>Look at that configuration again: win 5.5%, lose 25%. Each loss erases about<br>four and a half wins. Run the arithmetic and the breakeven win rate is<br>25 ÷ (25 + 5.5) ≈ 82%.</p><p>My live account’s win rate today is 83.9% — 99 winners out of 118 resolved<br>trades. By most people’s intuition, an 84% win rate is a money machine. Mine is a coin toss with extra steps: 83.9% against a breakeven of 82% is a<br>sliver of edge that fees, slippage, and one bad fill can erase. The account<br>is down $60 from where it started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*zvXkVRJaTx_gidZddN5F0w.png" /></figure><p><em>An 83.9% win rate, $60 underwater. Win rate without context is a story, not a statistic.</em></p><p>That was the insight I couldn’t unlearn: win rate, alone, is close to<br>meaningless. What matters is win rate relative to what your win/loss<br>sizes require — and almost nobody who posts their results tells you the<br>second number.</p><p>Two more tuition payments along the way: paper and live accounts diverge on identical trades — fills you get on paper simply don’t happen in a real<br>queue — and a brief experiment with put options ended after two trades and<br>roughly $150 in losses. Some lessons are cheap only in hindsight.</p><p>The system did stabilize. From a low of $338 on May 8th, the account has<br>climbed back to $439 over three months of live, rule-bound, emotionless<br>trading. Not riches — discipline, finally, enforced by code.</p><h4>The record I wanted to read</h4><p>Somewhere in month six, I went looking for reputable signal providers — <br>people whose predictions I could learn from or verify. What I found instead<br>was an industry of screenshots. Track records that start after the losses.<br>Winners posted, losers deleted. Ten accounts run in parallel and only the<br>lucky one shown. There was no way to tell skill from survivorship — because nothing prevented editing the past.</p><p>I couldn’t find a record I trusted. So I built the thing I wanted to read.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*_h8i4Q3vrOrgIA90pA3v8w.png" /><figcaption><a href="http://quantrank500.com/"><em>quantrank500.com</em></a><em> — locked before the open, settled by the market, impossible to edit.</em></figcaption></figure><p><strong>QuantRank500</strong> is a free, open-source public record of stock predictions.<br>It works like this:</p><p>- You lock a prediction before the market opens. Until 9:30 AM ET, only its<br> cryptographic fingerprint is public — the content is sealed, so nobody can<br> claim a call after the move.<br>- At the open it’s revealed and becomes a limit order. The market fills it<br> or doesn’t. Both are recorded.<br>- Settlement is automatic, against exchange trade records. Stop, target, or<br> expiry — nobody reports their own results.<br>- Nothing can be edited or deleted. Wins, losses, and the entries the market<br> never touched stay on the record, forever.</p><p>Everyone competes with the same simulated **$500 account** — the same stake I started with, because that number keeps everyone honest about scale. And the scoreboard ranks by a conservative lower bound of profit factor, not win rate — because I learned the hard way what an 84% win rate is worth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*JbodGoMSHXpDCUTSNWRF2A.png" /><figcaption><em>A record on the sandbox. Note the second row: every profile shows the number most track records hide — the breakeven win rate its style requires, next to the actual.</em></figcaption></figure><p>Survivorship is public, too: the site shows how many identities ever posted<br>against how many survived to a ranked record. The graveyard doesn’t<br>disappear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*uag7W_lkBE5MvmsMGNPt9A.png" /><figcaption><em>The scoreboard: ranked by the lower bound of profit factor, with survivorship stated at the bottom — how many started vs. how many survived.</em></figcaption></figure><p>No accounts, no emails, no ads, no data sales. The ledger is public domain<br>and the code is open source.</p><h4>The first user is the machine that started all this</h4><p>There’s a symmetry I enjoy: the ledger’s very first record — prediction #1 — <br>was posted by my trading bot, automatically, from the same signal engine<br>that trades my live account. It committed a long position in Nokia the night<br>before, sealed, revealed at the open, now waiting for the market’s verdict.<br>My real account holds the same position. One of us is on the permanent<br>record.</p><h4>Three takeaways</h4><p>1. <strong>Win rate lies without its context.</strong> The only honest question is<br> whether your win rate clears the breakeven your win/loss sizes demand.<br> Mine clears it by 1.9 points. That gap is the entire business.<br>2. <strong>Paper is not live.</strong> Simulated fills are optimistic in ways you only<br> discover with real money in a real queue. Any record built purely on<br> simulation should say so.<br>3. <strong>Trust requires records that can’t be edited.</strong> Not screenshots, not<br> self-reports — precommitment and automatic settlement. If the past is<br> editable, it isn’t a track record; it’s marketing.</p><h4><strong>Take a look — and criticize it</strong>.</h4><p>That’s genuinely the request: <a href="https://quantrank500.com/">quantrank500.com</a>, with a sandbox to play in at <a href="https://demo.quantrank500.com/">demo.quantrank500.com</a> and the code at <a href="https://github.com/quantrank500">github.com/quantrank500</a>. Where would this mislead you? What would a record need before you’d trust it?</p><p>Thanks for reading. You can find my full portfolio at <a href="https://ruslandubas.com/">ruslandubas.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ffcc62a81131" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Location, Location, Location: Predicting Real Estate Profitability with R and 634GB of Florida Tax…]]></title>
            <link>https://medium.com/@ruslandubas2013/location-location-location-predicting-real-estate-profitability-with-r-and-634gb-of-florida-tax-f7a6c72b5e8b?source=rss-5b821918be53------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7a6c72b5e8b</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[real-estate]]></category>
            <category><![CDATA[predictive-modeling]]></category>
            <category><![CDATA[r]]></category>
            <dc:creator><![CDATA[Ruslan Dubas]]></dc:creator>
            <pubDate>Thu, 30 Oct 2025 20:32:19 GMT</pubDate>
            <atom:updated>2025-10-30T20:32:19.060Z</atom:updated>
            <content:encoded><![CDATA[<h3>Location, Location, Location: Predicting Real Estate Profitability with R and 634GB of Florida Tax Data</h3><h3>From Zillow’s $300M+ Loss to a Personal Data Challenge</h3><p>Like many, I was curious when Zillow announced it was quitting the “iBuyer” (instant buying) business in 2021. On the surface, buying and quickly reselling homes seemed like a profitable, data-driven business. Their failure, which resulted in over $328 million in losses, made me wonder: just how hard is it to predict if a home sale will be profitable?</p><p>This curiosity sparked a personal project. I wanted to see if I could use public data to build a model that could answer a simple question: <strong>“If a single-family home is bought and resold within the same calendar year, will it generate a profit or a loss?”</strong></p><p>To answer this, I turned to the Florida Department of Revenue (FDOR) and my own data engineering and machine learning toolkit. The full code and data are available on my GitHub: <a href="https://github.com/RusUsf/FDOR_Data_and_Models.git">FDOR_Data_and_Models</a>.</p><p>For a full walkthrough, you can also watch my project presentation:</p><p><a href="https://www.google.com/search?q=https://www.youtube.com/watch%3Fv%3Dq313-EOkkJs">USF Data Analytics Meetup — March 2025</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*W64Ngo3o3uU9doCAtpGhuA.jpeg" /></figure><h3>The Data: A 634 GB Beast</h3><p>The foundation for this project was 10 years of Assessment Tax Rolls from the FDOR. This dataset is massive and complex:</p><ul><li><strong>Size:</strong> 634 GB</li><li><strong>Scope:</strong> All 67 Florida counties</li><li><strong>Files:</strong> Over 700 separate raw files</li><li><strong>Records:</strong> 10+ million property parcels</li></ul><h3>The First Challenge: Just Getting the Data In</h3><p>Before any analysis, I had to solve a data engineering puzzle. The data was spread across 700+ files. My tool of choice, SQL Server, has an import wizard that only handles <em>one file at a time</em>. Importing each file manually would have taken forever.</p><p>The solution? A little command-line automation.</p><ol><li>I used a command-line script to batch-unzip all 700+ files.</li><li>I then used another command to <strong>append</strong> all the files for a single year into one large, consolidated file.</li><li>This turned 700+ files into just 11 (one for each year + a guide), which I could then efficiently import into a SQL Server database.</li></ol><p>With the data finally in one place, the real analysis could begin.</p><h3>The Analysis: SQL, R, and Machine Learning</h3><p>My goal was to predict a binary outcome: <strong>Profit (0) or Loss (1)</strong>. The data was highly imbalanced — as you might expect, most quick resales were profitable.</p><p>After using SQL to explore the data and identify iBuyers like OpenDoor and Offerpad, I moved to R to build the predictive models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*HFAvlHO-2nt0x7NdjxGRUQ.jpeg" /></figure><h3>Model 1: Logistic Regression (The Baseline)</h3><p>I started with a Logistic Regression model to get a baseline. The performance was poor, barely beating the 83% accuracy I’d get by just guessing “profit” every time.</p><p>However, it gave me my first and most important clue. When I looked at the factors that <em>did</em> matter, one stood out above all others. It wasn’t the property size, age, or condition. It was <strong>geographic location</strong>, which I had engineered into a “subdivision risk score.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*VanP-RelJ4Y-bqcUu5O0Ug.jpeg" /></figure><h3>Model 2: Random Forest (The Heavy Hitter)</h3><p>To build a more powerful model and handle the imbalanced data, I used a Random Forest algorithm combined with <strong>SMOTE</strong> (Synthetic Minority Over-sampling Technique). SMOTE helps the model learn by creating “synthetic” examples of the minority class (in this case, “Losses”).</p><p>This model performed much better, especially on <strong>Recall</strong>, which is the metric we care about most here. It was able to correctly identify 70% of the high-risk “Loss” properties.</p><p>And what was the most important feature? Once again, by a huge margin, it was the <strong>location risk score</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*X4MzPNsY_63YRp8-mvFQ2w.jpeg" /></figure><h3>My Key Findings (and Why Zillow Failed)</h3><p>This project was a fantastic learning experience, and it left me with three main takeaways.</p><ol><li><strong>Location is King.</strong> My models confirmed the old real estate adage. The single strongest predictor of a quick-flip profit or loss isn’t the house itself; it’s the neighborhood it’s in.</li><li><strong>This is a Genuinely Hard Problem.</strong> Even with 10 years of data, predicting the profitability of a single transaction is incredibly difficult. My models show that while you can flag risk, you can’t perfectly predict the market.</li><li><strong>Domain Expertise is Irreplaceable.</strong> Zillow’s failure shows that a “data-only” approach is flawed. As their own reports mentioned, they were trying to incorporate “pricing specialists” and “agents.” This highlights a key lesson: the best results come from combining powerful technical analysis with human, on-the-ground domain expertise.</li></ol><p>In the end, I may not have built a “get-rich-quick” algorithm, but I did prove how complex this business problem is and gained a new appreciation for the power of location.</p><p>Thanks for reading! Feel free to explore the <a href="https://github.com/RusUsf/FDOR_Data_and_Models.git">project on GitHub</a> and connect with me on <a href="https://www.linkedin.com/in/ruslan-dubas-861a7799/">LinkedIn</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*0mM9TlgXq-pfJhH6CkVTvw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7a6c72b5e8b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Database-First Clean Architecture: Automate Your .NET CA/CQRS Setup with PowerShell]]></title>
            <link>https://medium.com/@ruslandubas2013/database-first-clean-architecture-automate-your-net-ca-cqrs-setup-with-powershell-ba598aec30f7?source=rss-5b821918be53------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba598aec30f7</guid>
            <dc:creator><![CDATA[Ruslan Dubas]]></dc:creator>
            <pubDate>Mon, 20 Oct 2025 01:10:44 GMT</pubDate>
            <atom:updated>2025-10-20T01:10:44.104Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Database-First Clean Architecture: Automate Your .NET CA/CQRS Setup with PowerShell</strong></h3><p>The <strong>Clean Architecture (CA)</strong> is a beautiful, testable, and maintainable structure. But let’s be honest: setting up a new CA project is a repetitive nightmare.</p><p>If you’ve ever found yourself creating the same boilerplate files — <strong>Queries</strong>, <strong>Commands</strong>, <strong>Validators</strong>, and <strong>Controllers</strong> — over and over, you know the frustration. This repetitive work isn’t just boring; it’s an open invitation for <strong>“fat-finger mistakes”</strong> that waste hours of your time.</p><p>If you prefer a <strong>database-first</strong> approach, the problem is even worse. You have to manually connect your generated EF Core entities to the strict layers of your CA solution and then build the entire CQRS scaffolding on top.</p><p>That’s the problem I set out to solve. I wanted to eliminate the setup friction and generate a <strong>production-ready Clean Architecture API</strong> directly from an existing SQL Server or PostgreSQL database with a single command.</p><p>The result is the <strong>CA.ApiGenerator PowerShell Module</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*bpaLc_i5iun0GlfPZUmZbQ.png" /></figure><p><strong>The Problem with Traditional Scaffolding</strong></p><p>Why don’t standard tools work for a serious CA project?</p><ol><li><strong>Boilerplate Hell:</strong> For every single table in your database, you need at least five to ten new files:</li></ol><ul><li>Get[Entity]ListQuery</li><li>Get[Entity]ListQueryHandler</li><li>Create[Entity]Command</li><li>Create[Entity]CommandValidator</li><li>[Entity]Configuration (for EF mapping)</li><li>…and so on.</li></ul><ol><li><strong>The “Fat Controller” Trap:</strong> Default Microsoft scaffolding tools dump all logic into massive, untestable API controllers. This violates the <strong>Single Responsibility Principle</strong> and destroys the integrity of the CA pattern you’re trying to achieve.</li><li><strong>The Code-to-Database Disconnect:</strong> If your database is the source of truth, you need a reliable way to reflect that schema into your domain and application layers without endless manual effort.</li></ol><p><strong>Introducing CA.ApiGenerator: Your .NET Automation Engine</strong></p><p>The <strong>CA.ApiGenerator</strong> module orchestrates the best tools in the .NET ecosystem to deliver a complete, ready-to-run solution.</p><p>It is built on top of <strong>Jason Taylor’s fantastic Clean Architecture Template</strong> (ca-sln), adding a layer of database-first intelligence and automation.</p><p><a href="https://github.com/jasontaylordev/CleanArchitecture">https://github.com/jasontaylordev/CleanArchitecture</a></p><p><strong>How the Magic Happens:</strong></p><p>The module performs several complex steps behind the scenes:</p><ol><li><strong>Solution Creation:</strong> It generates the foundational CA solution structure using ca-sln.</li><li><strong>EF Core Scaffolding:</strong> It points Entity Framework Core at your database connection string and scaffolds the entities and the DbContext.</li><li><strong>Entity Migration:</strong> It intelligently moves the generated EF entities and configurations out of the Infrastructure layer and into the correct <strong>Domain</strong> and <strong>Application</strong> layers, a crucial step for true Clean Architecture.</li><li><strong>CQRS Generation:</strong> Using custom, text-interpolated templates, it generates the full suite of <strong>MediatR (CQRS) files</strong> for common operations (Get List, Get By Id, Create, Update, Delete) for every entity.</li><li><strong>Validation &amp; API:</strong> It wires up the <strong>FluentValidation</strong> rules and generates clean, thin <strong>API Controllers</strong> that simply pass commands and queries to MediatR.</li></ol><p>The end result is not just <em>code</em>, it’s <strong>correctly structured, high-quality code</strong> that adheres to proven best practices.</p><p><strong>Quick Start: Generate Your API in Seconds</strong></p><p>Forget the hours of setup. Here is the entire process to go from an empty console to a full API solution:</p><p><strong>Step 1: Get the Tools</strong></p><p>You need the .NET SDK and PowerShell. Then install the required templates and the module:</p><p>PowerShell</p><p># Install Jason Taylor’s CA Template (the foundation)</p><p>dotnet new install Clean.Architecture.Solution.Template</p><p># Install the CA.ApiGenerator module</p><p>Install-Module -Name CA.ApiGenerator</p><p>Import-Module CA.ApiGenerator</p><p><strong>Step 2: Run the Command</strong></p><p>Provide your connection string and a name for your new project. The module handles both <strong>SQL Server</strong> and <strong>PostgreSQL</strong>.</p><p>PowerShell</p><p>New-CAApiSolution `</p><p>-ConnectionString “Server=localhost;Database=MyExistingDb;Integrated Security=true;” `</p><p>-ProjectName “SalesManagementAPI”</p><p><strong>Step 3: Celebrate!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*44bwpo0dYOQrdpV_e15wmQ.png" /></figure><p>You now have a fully functional, database-first Clean Architecture API with CQRS logic automatically scaffolded for every table in your database. All that’s left is to run the project and add your custom business logic inside the newly generated Command/Query Handlers.</p><p><strong>Important Requirement: Plural Table Names</strong></p><p>There is one key requirement driven by the tooling used for entity generation:</p><p>⚠️ <strong>IMPORTANT</strong>: All database tables <strong>MUST</strong> use plural names (e.g., Customers, not Customer).</p><p>This is because the underlying EF Core tools expect plural table names and automatically singularize them for the C# entity classes (Customer class). This ensures proper naming conventions throughout the solution.</p><p><strong>Take It for a Spin and Contribute</strong></p><p>This module has been a passion project to scratch my own developer itch, and I’m thrilled to share it with the .NET community. I’ve already gotten my first 11 downloads, and I’m eager for your feedback!</p><p>The <strong>CA.ApiGenerator</strong> is open source. I encourage you to install it, try it against your existing databases, and let me know how it can be improved.</p><p><strong>Find the project on GitHub and the PowerShell Gallery:</strong></p><ul><li><a href="https://github.com/RusUsf/CA.ApiGenerator.git">https://github.com/RusUsf/CA.ApiGenerator.git</a></li><li>Install-Module -Name CA.ApiGenerator</li></ul><p>Stop writing boilerplate code, and start focusing on your actual business logic!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba598aec30f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>