<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Andrea Gelmini</title>
    <description>The latest articles on DEV Community by Andrea Gelmini (@andreagelmini).</description>
    <link>https://dev.to/andreagelmini</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F323855%2F83f6edb9-0712-48bd-adaf-657d944d1402.jpeg</url>
      <title>DEV Community: Andrea Gelmini</title>
      <link>https://dev.to/andreagelmini</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/andreagelmini"/>
    <language>en</language>
    <item>
      <title>I Challenged 5 AIs to Build Income Portfolios with ETFs. Here's What They Came Up With.</title>
      <dc:creator>Andrea Gelmini</dc:creator>
      <pubDate>Mon, 03 Nov 2025 12:27:35 +0000</pubDate>
      <link>https://dev.to/andreagelmini/i-challenged-5-ais-to-build-income-portfolios-with-etfs-heres-what-they-came-up-with-34h8</link>
      <guid>https://dev.to/andreagelmini/i-challenged-5-ais-to-build-income-portfolios-with-etfs-heres-what-they-came-up-with-34h8</guid>
      <description>&lt;p&gt;As developers, we love data and automation. So, I ran an experiment: what if we could use the analytical power of LLMs to build strategic investment portfolios?&lt;/p&gt;

&lt;p&gt;I fed data from 15 carefully selected dividend-paying ETFs to 5 different AIs (Qwen, Gemini 2.5, ChatGPT, Deepseek, Claude 4.5) and gave them a clear mission: create 5 distinct portfolios for real-life financial goals.&lt;/p&gt;

&lt;p&gt;The goals ranged from generating a sustainable income stream for early retirement (FIRE) to creating a high-yield portfolio for a young professional.&lt;/p&gt;

&lt;p&gt;The results were fascinating. For instance, for the "Early Retirement" goal, most AIs leaned heavily on low-volatility, high-dividend ETFs like &lt;strong&gt;HDLV (Invesco S&amp;amp;P 500 High Dividend Low Volatility)&lt;/strong&gt; and stable Euro High Yield bonds.&lt;/p&gt;

&lt;p&gt;Here’s a snapshot of the portfolio suggested by Gemini 2.5 Pro for the "Anticipated Tranquility" objective:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;30% JNKE (SPDR Bloomberg Euro High Yield Bond)&lt;/li&gt;
&lt;li&gt;30% STHY (PIMCO US Short-Term High Yield)&lt;/li&gt;
&lt;li&gt;25% HDLV (Invesco S&amp;amp;P 500 High Dividend Low Volatility)&lt;/li&gt;
&lt;li&gt;15% GLDV (SPDR S&amp;amp;P Global Dividend Aristocrats)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The logic is clear: a solid base of bonds for steady income, complemented by high-quality, low-volatility stocks.&lt;/p&gt;

&lt;p&gt;Each AI showed a unique "strategic personality." Some were more risk-averse, others more aggressive. This experiment isn't about replacing human judgment but enhancing it with powerful analytical tools.&lt;/p&gt;

&lt;p&gt;If you're curious to see all 5 AI-generated portfolios and dive deeper into the strategic thinking behind them, check out the full analysis on my blog.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://agconsulting.altervista.org/portafogli-di-etf-a-distribuzione-2025/" rel="noopener noreferrer"&gt;https://agconsulting.altervista.org/portafogli-di-etf-a-distribuzione-2025/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>I built a small tool to analyze ETFs and realized the best code is a checklist</title>
      <dc:creator>Andrea Gelmini</dc:creator>
      <pubDate>Fri, 24 Oct 2025 14:04:45 +0000</pubDate>
      <link>https://dev.to/andreagelmini/i-built-a-small-tool-to-analyze-etfs-and-realized-the-best-code-is-a-checklist-1jg2</link>
      <guid>https://dev.to/andreagelmini/i-built-a-small-tool-to-analyze-etfs-and-realized-the-best-code-is-a-checklist-1jg2</guid>
      <description>&lt;p&gt;As a developer, my first instinct is to solve problems by writing code.&lt;/p&gt;

&lt;p&gt;Recently, I decided to clean up my ETF portfolio. I was drowning in data and, I have to admit, I didn't even remember buying some of them. My first thought was immediate: "I'll build a tool for this."&lt;/p&gt;

&lt;p&gt;First roadblock: there are no free APIs to query for this data (if you know of any, please leave a comment!). So, I fell back on good old-fashioned scraping. Nothing fancy: just some vanilla JS, a bit of HTML, and I put together a script to fetch data from an analysis portal via ISIN, cache the results for 24 hours, and display the key metrics.&lt;/p&gt;

&lt;p&gt;But the fun part—the real challenge—wasn't the code. It was defining the validation logic.&lt;/p&gt;

&lt;p&gt;What makes an ETF a "good" choice? I realized I was essentially building a checklist.&lt;/p&gt;

&lt;p&gt;For example, a crucial check is the fund's domicile. A simple &lt;code&gt;if (domicile === 'Ireland' || domicile === 'Luxembourg')&lt;/code&gt; can have a massive impact on your net returns, thanks to tax treaties on US dividends (15% tax vs. 30%). Another key factor is the TER (Total Expense Ratio). My logic had to red-flag any ETF with a &lt;code&gt;TER &amp;gt; 0.3%&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In the end, the tool was just a nice bonus. The real treasure was the 7-point checklist I created to power its logic. I've now expanded that logic into a full guide, explaining the "why" behind each critical point.&lt;/p&gt;

&lt;p&gt;If you want to get past the "how" and truly understand the "why" of choosing the right ETF, you can &lt;a href="https://agconsulting.altervista.org/come-scegliere-etf-guida-investire/" rel="noopener noreferrer"&gt;read the full post here&lt;/a&gt;. The tool is included.&lt;/p&gt;

</description>
      <category>programming</category>
    </item>
    <item>
      <title>Fixing Symfony CORS OPTIONS Errors: A Pro-Tip on Event Listeners (No Bundle Needed!)</title>
      <dc:creator>Andrea Gelmini</dc:creator>
      <pubDate>Wed, 22 Oct 2025 12:37:48 +0000</pubDate>
      <link>https://dev.to/andreagelmini/fixing-symfony-cors-options-errors-a-pro-tip-on-event-listeners-no-bundle-needed-1klj</link>
      <guid>https://dev.to/andreagelmini/fixing-symfony-cors-options-errors-a-pro-tip-on-event-listeners-no-bundle-needed-1klj</guid>
      <description>&lt;p&gt;Hey #Symfony developers and #webdev community!&lt;/p&gt;

&lt;p&gt;Are you constantly battling those frustrating Access-Control-Allow-Origin CORS errors, especially when dealing with OPTIONS preflight requests from your frontend? You're not alone! The common pitfall is that OPTIONS requests often arrive without any payload or route parameters, causing Symfony's router (and especially #[MapRequestPayload]) to fail before CORS headers can be applied.&lt;/p&gt;

&lt;p&gt;Instead of reaching for a heavy bundle, here's a professional, lightweight solution: an Event Listener.&lt;/p&gt;

&lt;p&gt;By implementing a CorsSubscriber on the KernelEvents::REQUEST event with a high priority (e.g., 9999), you can intercept all OPTIONS requests right at the start of the Symfony lifecycle. This listener can then construct an immediate HTTP 200 response, inject the necessary Access-Control-Allow-* headers, and prevent further processing (like routing or DTO mapping). This approach ensures your API sends the correct CORS signals to the browser, unblocking your frontend operations.&lt;/p&gt;

&lt;p&gt;It's a clean, performant, and framework-native way to achieve full CORS compliance.&lt;/p&gt;

&lt;p&gt;For a full code example, detailed explanation, and best practices, check out the complete guide on my site: &lt;a href="https://agconsulting.altervista.org/symfony-cors-risolvere-errore-options/" rel="noopener noreferrer"&gt;https://agconsulting.altervista.org/symfony-cors-risolvere-errore-options/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>symfony</category>
      <category>backend</category>
      <category>php</category>
    </item>
  </channel>
</rss>
