<rss xmlns:source="http://source.scripting.com/" version="2.0">
  <channel>
    <title>Piero Ocampo</title>
    <link>https://pieroocampo.com/</link>
    <description></description>
    
    <language>en</language>
    
    <lastBuildDate>Fri, 24 Apr 2026 12:04:54 -0400</lastBuildDate>
    <item>
      <title>Vibe Coding my trades</title>
      <link>https://pieroocampo.com/2026/04/24/vibe-coding-my-trades.html</link>
      <pubDate>Fri, 24 Apr 2026 12:04:54 -0400</pubDate>
      
      <guid>http://pieroocampo.micro.blog/2026/04/24/vibe-coding-my-trades.html</guid>
      <description>&lt;p&gt;For a few years, I have been following &lt;a href=&#34;https://themoneyprinter.substack.com/&#34;&gt;Garret Baldwin&amp;rsquo;s Substack&lt;/a&gt; and trading on momentum, but I have always struggled to keep emotions out of my trading. I would exit a position early after a decline, only to see it climb the next day again, or I would stay in a losing trade for too long. So I decided to outsource decision-making to a cold, dead, lifeless Python script.&lt;/p&gt;
&lt;p&gt;Now, I had never used the Schwab (the platform I use) API and SDK for anything, and with a demanding job and 3 kids, I wasn&amp;rsquo;t going to write this thing, but ChatGPT would. Back then, one of the O3 versions was pretty decent at coding, and over a MEX-EWR flight, I had it do the first draft:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Authenticate to Schwab (the model guided me through the whole account setup process)&lt;/li&gt;
&lt;li&gt;Get a new session for my account (it figured out that the API uses a hash of the account, which would have probably taken me hours reading StackOverflow (remember StackOverflow?) and Reddit posts.&lt;/li&gt;
&lt;li&gt;Get the quotes for a list of symbols&lt;/li&gt;
&lt;li&gt;Define the stop (in this version, it was the higher of a 10 exponential moving average and a chandelier stop)&lt;/li&gt;
&lt;li&gt;Create or update the stop market order&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It was pretty cool! It was mesmerizing to have that ready in the span of a 4.5-hour flight! It even used dotenv for the configuration and to keep secrets in a safe spot, and structured the whole repo for me. Of course, these things have gotten so much better in the last year that it&amp;rsquo;s no longer impressive, but back then, that was my aha moment with vibe coding.&lt;/p&gt;
&lt;p&gt;In time, I have been adding some stuff. When Cursor introduced agent mode, I (well, Claude Sonnet) did a whole refactoring. I added three strategies: loss-cutting to limit downside, a break-even conservative stop to keep a tight stop if the ticker doesn&amp;rsquo;t take off, and a chandelier stop to trail winners and not sell too early.&lt;/p&gt;
&lt;p&gt;At this time, my experience has been much better. I know buy (if momentum is green) and run the script daily after the close to update my stops. I also added an export feature to upload the trades to my &lt;a href=&#34;https://login.databricks.com/signup?provider=DB_FREE_TIER&#34;&gt;Databricks Free Edition&lt;/a&gt; account and built a tracking dashboard. Today (on another MEX-EWR flight), I added a giveback percentage feature to limit the profit I give away if a runner that has been running for a while falls too fast, too suddenly.&lt;/p&gt;
&lt;p&gt;The results have been pretty good as the script has improved! Per my Schwab dashboard, my &amp;ldquo;play portfolio&amp;rdquo; (I keep the serious stuff in boring AF index funds) has been beating their &amp;ldquo;Total Return Aggressive&amp;rdquo; benchmark by a solid 40 points, and the S&amp;amp;P 500 by 24. Of course, sample size is one year, results may vary, past results don&amp;rsquo;t guarantee crap, and using it is terrible advice (of the non-financial kind).&lt;/p&gt;
&lt;p&gt;But here is the &lt;a href=&#34;https://github.com/pieroocampo/schwab-trading-automation&#34;&gt;repo&lt;/a&gt;, anyway.&lt;/p&gt;
</description>
      <source:markdown>For a few years, I have been following [Garret Baldwin&#39;s Substack](https://themoneyprinter.substack.com/) and trading on momentum, but I have always struggled to keep emotions out of my trading. I would exit a position early after a decline, only to see it climb the next day again, or I would stay in a losing trade for too long. So I decided to outsource decision-making to a cold, dead, lifeless Python script.

Now, I had never used the Schwab (the platform I use) API and SDK for anything, and with a demanding job and 3 kids, I wasn&#39;t going to write this thing, but ChatGPT would. Back then, one of the O3 versions was pretty decent at coding, and over a MEX-EWR flight, I had it do the first draft:

- Authenticate to Schwab (the model guided me through the whole account setup process)
- Get a new session for my account (it figured out that the API uses a hash of the account, which would have probably taken me hours reading StackOverflow (remember StackOverflow?) and Reddit posts.
- Get the quotes for a list of symbols
- Define the stop (in this version, it was the higher of a 10 exponential moving average and a chandelier stop)
- Create or update the stop market order

It was pretty cool! It was mesmerizing to have that ready in the span of a 4.5-hour flight! It even used dotenv for the configuration and to keep secrets in a safe spot, and structured the whole repo for me. Of course, these things have gotten so much better in the last year that it&#39;s no longer impressive, but back then, that was my aha moment with vibe coding.

In time, I have been adding some stuff. When Cursor introduced agent mode, I (well, Claude Sonnet) did a whole refactoring. I added three strategies: loss-cutting to limit downside, a break-even conservative stop to keep a tight stop if the ticker doesn&#39;t take off, and a chandelier stop to trail winners and not sell too early. 

At this time, my experience has been much better. I know buy (if momentum is green) and run the script daily after the close to update my stops. I also added an export feature to upload the trades to my [Databricks Free Edition](https://login.databricks.com/signup?provider=DB_FREE_TIER) account and built a tracking dashboard. Today (on another MEX-EWR flight), I added a giveback percentage feature to limit the profit I give away if a runner that has been running for a while falls too fast, too suddenly. 

The results have been pretty good as the script has improved! Per my Schwab dashboard, my &#34;play portfolio&#34; (I keep the serious stuff in boring AF index funds) has been beating their &#34;Total Return Aggressive&#34; benchmark by a solid 40 points, and the S&amp;P 500 by 24. Of course, sample size is one year, results may vary, past results don&#39;t guarantee crap, and using it is terrible advice (of the non-financial kind).

But here is the [repo](https://github.com/pieroocampo/schwab-trading-automation), anyway.
</source:markdown>
    </item>
    
    <item>
      <title></title>
      <link>https://pieroocampo.com/2026/01/15/hello-world-firsrt-microblog-post.html</link>
      <pubDate>Thu, 15 Jan 2026 11:11:45 -0400</pubDate>
      
      <guid>http://pieroocampo.micro.blog/2026/01/15/hello-world-firsrt-microblog-post.html</guid>
      <description>&lt;h1 id=&#34;hello-world&#34;&gt;Hello, World&lt;/h1&gt;
&lt;p&gt;Firsrt micro.blog post!&lt;/p&gt;
</description>
      <source:markdown># Hello, World

Firsrt micro.blog post!
</source:markdown>
    </item>
    
  </channel>
</rss>
