Using Gemini 2.5 As A Persona-Based News Recommender Service: An Investment Advisor On How To Make Money

Continuing our series in persona-based news recommenders, we're going to follow the same workflow of our end-to-end recommender service, but this time look for investment opportunities in the current economic landscape. We'll ask Gemini 2.5 Pro to process a day of global news coverage monitored by GDELT and compile a summary report of recommendations for a typical American investor as to where to invest their retirement and other funds to maximize investment gains right now. We then use Gemini 2.0 Flash to generate a header image for our report to lend it a visual. Overall, the report identifies key trends in yesterday's global headlines, including AI and Bitcoin, though the extremely small context window of current large models means we have to whittle down the 363,000 potentially relevant headlines to just 3,000 to fit them into Gemini's 1M token context window.

We'll follow the same procedure for downloading the GDELT Article List (GAL) files for the given day, which include the title, URL and metadata extended description sentence (via embedded OpenGraph or Schema.org metadata) for each article:

read -p "Enter date (YYYYMMDD): " date_str; test -z "$date_str" && exit 1; for h in {0..23}; do for m in {0..59}; do curl -fsO "https://storage.googleapis.com/data.gdeltproject.org/gdeltv3/gal/${date_str}$(printf "%02d" $h)$(printf "%02d" $m)00.gal.json.gz"; done; done
>20250513
time gunzip *.gz

Let's modify our grep filtering request:

I have a JSON-NL file where each row is a JSON record of a news article with just its title and URL in all the languages of the world. I want you to give me a case-insensitive grep that will return just the rows most likely to be about investment and the financial markets that would be of use to someone trying to decide where to invest their money right now. Make it work for all major languages of the world that might be talking about those topics.

This yields:

time cat *.json | grep -i -E '\b(invest(s|ments?|ing|or|ition|ir|ieren|i[cç]i[oó]n(es)?|imento)?|financ(e|ial|iamiento|i[eè]re?s?|as|iell|iero)|econo(my|mic|m[ií]a|misch|mie)|stock(s)?|share(s)?|aktie(n)?|ac[cç][oó](n|es)?|value|papel(es)?|t[íi]tulo(s)?|market(s)?|mercado|march[eé](s)?|markt|b[oö]rs(e|a)|bolsa|bi[rż][zż]a|exchange|trad(e|ing|er|en)|handel|comercio|capital|asset(s)?|activo(s)?|verm[öo]gen|fund(s)?|fonds?|fondo|mutual|hedge|bond(s)?|anleihe|obligation|bono(s)?|debenture|equit(y|ies)|eigenkapital|patrimonio|rendement|yield|rinden|rentabilidad|dividend(s|o|e)?|portfolio| cartera|broker(age)?|makler|corredor(a|aje)?|forex|currency|divisas|w[äa]hrung|moneda|crypto|bitcoin|ethereum|altcoin|stablecoin|token|NFTs?|IPO|ICO|ETF|recession|inflation|deflation|zins(en)?|interest\s+rate(s)?|tasa\s+de\s+inter[eé]s|taux\s+d(\x27|’)int[eé]r[eê]t|federal\s+reserve|fed\b|ECB|banque\s+centrale|central\s+bank|banco\s+central|zentralbank|bull(\smarket)?|bear(\smarket)?|quantitative\s+easing|QE\b|tapering|fiscal|monetary|policy|earnings|ganancias|beneficio|gewinn|profit|unternehmensanleihen|staatsanleihen|treasur(y|ies)|gilts|bunds|growth|wachstum|crecimiento|analyse|analysis|outlook|forecast|prediction|prognose|previsi[oó]n|recommendation|rating|buy|sell|hold|kaufen|verkaufen|halten|acheter|vendre|comprar|vender)\b' > FILTERED.JSON

Unfortunately, this returns 363,091 results totaling more than 270MB – vastly exceeding the limits of Gemini.

Let's have it rework the grep filter to be far more specific:

Rewrite that grep to make it very narrowly focused on economic investments and the markets – try to minimize the false positive rate to match only highly relevant articles.

This yields:

time cat *.json | grep -E -i '\b(invest(ments?|ing|or|ition|ir|ieren|i[cç]i[oó]n(es)?|imento|asi)|equity|equities|stock(s)?|share(s)?|aktie(n)?|ac[cç][oó](n|es)?|ações|bond(s)?|anleihe|obligation|bono(s)?|treasur(y|ies)|gilts|bunds|fonds?|fund(s)?|fondo|mutual\s+fund|hedge\s+fund|ETF(s)?|ETC(s)?|ETN(s)?|IPO|SPAC|brokerage|corretaje|maklergeschäft|portfolio|cartera|portafoglio|portefeuille|dividend(s|o|e|os|es)?|rendite|yield|rendimiento|rentabilidad|rendement|capital\s+markets?|mercado\s+de\s+capita(l|is)|marché\s+des\s+capitaux|kapitalmarkt|financial\s+instrument(s)?|instrumento\s+financiero|instrument\s+financier|finanzinstrument|b[oö]rs(e|a)|bolsa|stock\s+exchange|trading\s+platform|bourse\s+de\s+valeurs|bolsa\s+de\s+valores|wertpapierbörse|asset\s+allocation|asset\s+management|verm[öo]gensverwaltung|gesti[oó]n\s+de\s+activos|gestion\s+d\x27actifs|financial\s+advisor|conseiller\s+financier|asesor\s+financiero|finanzberater|wealth\s+management|forex|FX\b|foreign\s+exchange|mercado\s+de\s+divisas|marché\s+des\s+changes|devisenhandel|crypto\s+invest|bitcoin\s+price|ethereum\s+price|altcoin\s+invest|S&P\s*500|Dow\s+Jones|NASDAQ|FTSE\s*100|DAX\b|Nikkei|Hang\s+Seng|blue\s+chip|small\s+cap|mid\s+cap|large\s+cap|growth\s+stock|value\s+stock|bull\s+market|bear\s+market|market\s+sentiment|quantitative\s+easing|QE\b|interest\s+rate\s+hike|interest\s+rate\s+cut|tapering|federal\s+reserve\s+meeting|ECB\s+meeting|monetary\s+policy\s+statement|fiscal\s+stimulus\s+package|earnings\s+report|profit\s+warning|M&A|mergers?\s+and\s+acquisitions|private\s+equity|venture\s+capital)\b' > FILTERED.JSON

This reduces the matches to 30,736 articles totaling 24MB – still far above Gemini's limits, so we'll just limit ourselves to the first 3,000 results and extract the combined title + description field and the URL:

head -3000 FILTERED.JSON > FILTERED.JSON.tmp
time jq -cR 'split("\n") | map(select(length > 0) | fromjson? | {url, text: (.title + ". " + .desc)})' FILTERED.JSON.tmp > 20250513-INVESTMENT.JSON

Loading this into Gemini consumes 361K tokens to which we'll add this prompt:

Attached is a JSON list of news articles from around the world in various languages. Each line is an article and includes two fields: "url" that is the URL of the article and "text" which is the title and a brief description of the article. You are an ordinary American trying to decide where to put your retirement and other money right now to make as much money as possible during the current economic environment. For each article below, identify the ones that are relevant in any way to your job. Ignore all articles that are not relevant to your job. Output a 3-paragraph top-level summary in English that summarizes the major trends, events, stories from all of the relevant articles that summaries how a typical American can make the most money right now and then offer direct advice on where to invest based on the information in these articles. Follow that with a three-page high-level overview with additional detail and include at least one url from one of the relevant articles for each of the themes/trends/events/stories you include as a reference that best summarizes or represents that theme/trend/event/story.

This yields the following report (note the strange vertical text in the middle):

Okay, as an ordinary American looking to make the most of my retirement and other savings in this current economic climate, the news presents a mix of immediate opportunities and lingering uncertainties.

The biggest immediate story is the 90-day trade truce between the U.S. and China, which has caused a significant surge in stock markets (Dow, S&P 500, Nasdaq). This suggests a "risk-on" sentiment, where investors are more willing to buy stocks, particularly those that were previously depressed by trade war fears, like tech and shipping. This truce, however, is temporary, and the underlying tensions and potential for tariffs to snap back or new ones to emerge mean that this optimism could be short-lived. Therefore, while there's a window for growth, caution and diversification are paramount.

Several key trends are also evident. Artificial Intelligence (AI) continues to be a hot sector, with companies like Nvidia, Palantir, and SoundHound AI making headlines for positive developments and stock surges. This indicates strong growth potential. Cryptocurrency, particularly Bitcoin, is also in the news, with Coinbase's inclusion in the S&P 500 marking a milestone for the asset class's mainstream acceptance, though it remains a speculative investment. Conversely, traditional safe-haven assets like gold have seen a dip as market optimism rose. The U.S. Treasury is also raking in record customs duties from existing tariffs, which, while a revenue source, also highlights the costs businesses are bearing. President Trump is also actively seeking massive foreign investment from regions like the Middle East, which could further stimulate certain sectors of the U.S. economy if successful.

Given this, my advice would be to adopt a balanced approach. The current market rally spurred by the trade truce offers a short-term opportunity to capitalize on growth in equities, especially in technology (AI-related stocks and potentially broader tech affected by tariff relief) and industrial/shipping sectors that benefit from smoother trade. However, because of the truce's temporary nature, it's crucial not to over-leverage. A diversified portfolio remains key. Consider well-established U.S. companies, including those in the S&P 500. For those with a higher risk tolerance, a small, speculative position in Bitcoin could be considered, given its increasing institutional adoption. Dividend-paying stocks can offer a more stable return component. Given the drop in gold, it might be a contrarian buying opportunity for long-term diversification against future uncertainties. Avoid chasing quick, high returns from unverified sources, as "fake trading apps" are a risk. The focus should be on quality companies, potential growth sectors like AI, and maintaining a hedge against renewed trade tensions or economic slowdowns.

High-Level Overview: Investment Strategy in the Current Economic Environment

Page 1: Current Market Drivers & Investment Opportunities

The current investment landscape is heavily influenced by recent geopolitical and economic developments, creating specific short-term opportunities while highlighting ongoing trends.

U.S.-China Trade Truce and Market Reaction:
The most significant recent event is the announcement of a 90-day trade truce between the United States and China, leading to a temporary reduction in high tariffs. This news has been met with considerable optimism in the financial markets, evidenced by a substantial surge in major U.S. stock indexes like the Dow Jones Industrial Average, S&P 500, and Nasdaq. Sectors particularly sensitive to trade tensions, such as technology and shipping, have seen notable rallies. This "risk-on" sentiment suggests an immediate window for potential gains in equities that were previously undervalued due to trade war fears.

Supporting Article: https://mynews4.com/news/nation-world/dow-surges-1160-points-as-us-china-announce-90-day-trade-truce-fueling-market-optimism-president-donald-trump-tariff-talks-stock-market-nasdaq-recession-chinese-goods ("Dow surges 1,160 points as US-China announce 90-day trade truce, fueling market optimism.")

The Ascendance of Artificial Intelligence (AI) as a Key Investment Theme:
Artificial Intelligence continues to be a dominant growth narrative. Several articles point to strong performance and strategic developments in AI-related companies. For instance, SoundHound AI (SOUN) experienced a significant stock surge, Nvidia is involved in high-level discussions regarding AI and trade, and Palantir's stock movements are also noted. Google is also mentioned as testing AI agents for developers. This consistent stream of positive news underscores AI's transformative potential across various industries, making it a compelling area for investment, either through individual tech stocks or specialized AI-focused ETFs.

Supporting Article: https://www.wealthdaily.com/why-soundhound-ai-inc-soun-surged-2261-key-drivers-behind-the-rally/ ("Why SoundHound AI Inc (SOUN) Surged 22.61%: Key Drivers Behind the Rally.")

Cryptocurrency: Bitcoin's Momentum and Growing Mainstream Acceptance:
The cryptocurrency market, particularly Bitcoin, continues to make headlines. Bitcoin has seen significant price movements, touching levels around $106,000, prompting discussions of profit-taking. More structurally important is Coinbase, a major cryptocurrency exchange, becoming the first crypto-focused company to join the S&P 500 index. This is a significant milestone, indicating increasing institutional acceptance and integration of digital assets into the traditional financial system. While still a speculative asset class, its growing legitimization makes it a consideration for a small portion of a diversified, risk-tolerant portfolio.

Supporting Article: https://www.upi.com/Top_News/US/2025/05/12/coinbase-sp-500-crypto/7141747091794/ ("Coinbase to join S&P 500 as shares soar in after-hours trading – UPI.com.")

Foreign Investment Initiatives and U.S. Economic Stimulus:
There are notable efforts to attract foreign investment into the U.S. The SelectUSA Investment Summit is underway, and President Trump is reportedly seeking
1
𝑡
𝑟
𝑖
𝑙
𝑙
𝑖
𝑜
𝑛
𝑖
𝑛
𝑖
𝑛
𝑣
𝑒
𝑠
𝑡
𝑚
𝑒
𝑛
𝑡
𝑠
𝑓
𝑟
𝑜
𝑚
𝑆
𝑎
𝑢
𝑑
𝑖
𝐴
𝑟
𝑎
𝑏
𝑖
𝑎
𝑑
𝑢
𝑟
𝑖
𝑛
𝑔

𝑖
𝑠
𝑀
𝑖
𝑑
𝑑
𝑙
𝑒
𝐸
𝑎
𝑠
𝑡
𝑡
𝑟
𝑖
𝑝
.
𝐴
𝑑
𝑑
𝑖
𝑡
𝑖
𝑜
𝑛
𝑎
𝑙
𝑙
𝑦
,
𝑙
𝑎
𝑟
𝑔
𝑒
𝑐
𝑜
𝑟
𝑝
𝑜
𝑟
𝑎
𝑡
𝑖
𝑜
𝑛
𝑠
𝑙
𝑖
𝑘
𝑒
𝐶
𝑀
𝐴
𝐶
𝐺
𝑀
𝐺
𝑟
𝑜
𝑢
𝑝
(
1trillionininvestmentsfromSaudiArabiaduringhisMiddleEasttrip.Additionally,largecorporationslikeCMACGMGroup(
20 billion in U.S. maritime economy) and Anheuser-Busch ($300 million in U.S. facilities) are making significant domestic investments. These inflows of capital can stimulate economic growth and benefit various U.S. industries.

Supporting Article: https://lasvegassun.com/news/2025/may/12/trump-starts-his-foreign-trip-with-a-crush-of-prob/ ("Trump starts his foreign trip with a crush of problems — and outsized certainty he has the answers. President Donald Trump is on his way to the Middle East, where he had intended to focus on pressing wealthy Gulf nations to pour billions in new investment into the United States")

Page 2: Navigating Risks and Long-Term Strategic Considerations

While short-term opportunities exist, a prudent investor must also consider underlying risks and plan for the long term.

Lingering Tariff Uncertainty and Potential for Renewed Volatility:
The 90-day trade truce is a temporary reprieve, not a permanent resolution. Articles highlight that the 30% tariff rate (down from 145% on some goods) is "still a big deal" and that uncertainty persists. Businesses, like a small family health products business in Boise, continue to express frustration over the impact of tariffs. This underlying uncertainty means that markets could face renewed volatility if negotiations falter or if tariffs are reimposed or new ones introduced after the 90-day period. This underscores the need for a resilient portfolio that can weather potential trade-related shocks.

Supporting Article: https://www.msnbc.com/katy-tur/watch/-this-is-not-normal-u-s-china-agree-to-90-day-tariff-pause-but-30-is-still-a-big-deal-239409221705 ("‘This is not normal’: U.S.,China agree to 90-day tariff pause but 30% is ‘still a big deal’.")

The Role of Traditional Assets: Gold, Bonds, and Dividends:
With the "risk-on" sentiment fueled by the trade truce, traditional safe-haven assets like gold have seen their prices fall. This inverse relationship is typical; as investors seek higher returns in equities, they move away from assets perceived as safer but lower-yielding. However, the persistent trade uncertainty and forecasts of a mild recession (as noted for Hawaii) suggest that gold could still play a valuable role as a long-term hedge in a diversified portfolio. Similarly, dividend-paying stocks (like those in the IDX High Dividend20, though this is an Indonesian index, the concept is universal) can provide a steady income stream and potentially more stability during market fluctuations. U.S. Treasury yields jumped, suggesting the Fed might not cut rates as deeply, which could make bonds relatively more attractive than if deep cuts were expected.

Supporting Article: https://www.richmond-news.com/national-business/stocks-surge-on-us-china-trade-truce-while-gold-plummets-10646352 ("Stocks surge on U.S.-China trade truce, while gold plummets.")

Real Estate Investment Considerations:
Several articles touch upon real estate as an investment, specifically mentioning options like buying duplexes or foreclosed homes in Texas. These are presented as ways to acquire property potentially below market value, offering both a place to live and an investment. While not directly tied to the macroeconomic news, real estate can be a component of a diversified investment strategy, offering potential for rental income and capital appreciation. However, like any investment, it requires careful research and understanding of local market conditions and potential pitfalls.

Supporting Article: https://www.realtynow.com/buy-home/rent-or-buy-a-duplex-for-sale-weighing-the-options ("Rent or buy a duplex for sale? Weighing the options.")

Caution Against Speculation and Market Glitches:
The allure of quick profits can lead to pitfalls. One article explicitly warns about fake trading apps, highlighting the importance of due diligence and using reputable platforms. Furthermore, technical issues can arise even with established brokerages, as seen with Fidelity customers experiencing glitches and being locked out during the tariff relief rally. This serves as a reminder that even well-laid investment plans can face unforeseen technical hurdles and that chasing hype without proper research can be detrimental.

Supporting Article: https://www.investmentnews.com/equities/fidelity-glitches-lock-users-out-of-us-china-tariff-relief-rally/260480 ("Fidelity glitches lock users out of US-China tariff relief rally.")

Page 3: Actionable Advice and Strategic Portfolio Allocation

Based on the current environment, a strategic approach to investing retirement and other funds is essential to maximize returns while managing risk.

Embrace Equities, But with a Diversified Approach:
The U.S.-China trade truce has clearly ignited a stock market rally. This presents an opportunity for growth in U.S. equities. Consider broad market exposure through S&P 500 index funds or ETFs. Given the temporary nature of the truce, avoid over-concentration in any single stock or sector. Diversification across various sectors can help mitigate risks if trade tensions re-emerge.

Supporting Article (General Market Rally): https://www.ktvh.com/politics/economy/s-p-500-surges-2-7-after-the-us-and-china-announce-a-90-day-truce-in-their-trade-war ("Dow leaps 1,100 points and S&P 500 rallies 3.3% following a 90-day truce in the US-China trade war.")

Focus on Growth Sectors, Especially AI:
Artificial Intelligence (AI) stands out as a significant long-term growth area. Investing in established technology companies with strong AI divisions (e.g., Nvidia, Google-parent Alphabet mentioned in the context of AI development) or AI-focused ETFs could yield substantial returns. The defense sector also shows activity with Foreign Military Sales investments, which may benefit related publicly traded companies.

Supporting Article (AI/Nvidia): https://www.deraktionaer.de/artikel/aktien/nvidia-entscheidung-nach-boersenschluss-huang-trifft-trump-20374144.html ("Nvidia: Entscheidung nach Börsenschluss? Huang trifft Trump.")

Consider a Small, Speculative Allocation to Bitcoin:
With Coinbase's S&P 500 inclusion and ongoing market discussion, Bitcoin is becoming more mainstream. For investors with a high-risk tolerance and as part of a well-diversified portfolio, a small allocation (e.g., 1-5% of the speculative portion of a portfolio) to Bitcoin could be considered. It's volatile, so be prepared for significant price swings.

Supporting Article (Bitcoin activity): https://investasi.kontan.co.id/news/bitcoin-sentuh-us106000-senin-125-waspadai-aksi-ambil-untung-sebelum-rekor-baru ("Bitcoin Sentuh US$106.000 Senin (12/5), Waspadai Aksi Ambil Untung Sebelum Rekor Baru.")

Maintain Some Defensive Assets:
Given the lingering uncertainties, especially around trade, holding some defensive assets is prudent. Gold, despite its recent dip, can act as a hedge against inflation and market volatility. High-quality bonds may also offer stability, particularly as the Federal Reserve's future interest rate policy remains a key watchpoint. Dividend-paying stocks can also provide a cushion through regular income.

Supporting Article (Buffett's General Wisdom, often implies value/stability): https://internasional.kontan.co.id/news/bukan-saham-atau-emas-inilah-investasi-terbaik-menurut-warren-buffett ("Bukan Saham atau Emas, Inilah Investasi Terbaik Menurut Warren Buffett.")

Long-Term Perspective for Retirement Funds:
For retirement accounts, maintain a long-term perspective. While current events create short-term opportunities, the core of a retirement portfolio should be built on consistent, diversified investments in quality assets. Avoid making drastic changes based on short-term news cycles. Rebalance periodically to maintain your desired asset allocation. Consider tax-advantaged accounts and be mindful of taxation on investments, such as potential changes to private equity taxation.

Supporting Article (Taxation/Long-term considerations): https://www.heritage.org/taxes/report/beware-taxation-private-equity-partnerships ("Beware of Taxation of Private Equity Partnerships.")

By balancing opportunistic investments in growth areas like AI and tariff-sensitive stocks with a diversified, long-term strategy that includes defensive assets, an ordinary American can navigate the current economic environment to seek maximum returns while managing inherent risks.

Now let's ask for an illustrative header image prompt to use with Gemini 2.0 Flash's image generation capability (Gemini 2.5 Pro does not support native image generation):

Give me a textual prompt that could be used to generate an image that summarizes this report to be used as the cover page image. It should be cinematic and beautiful but also convey the overall findings of the report above.

This yields:

Cinematic, beautiful cover page image. A gleaming, modern suspension bridge (symbolizing the US-China trade truce) extends towards a vibrant, futuristic cityscape (representing market optimism and economic growth, S&P 500/Dow Jones) bathed in the warm light of a rising or setting sun (golden hour). Subtle, aurora-like data streams and glowing neural network patterns (AI, tech, crypto like Bitcoin) flow alongside the bridge and illuminate parts of the city. In the far distance, beyond the city, a hint of calm but watchful clouds or a slightly misty horizon (lingering uncertainty, need for caution/diversification). The overall mood is hopeful and dynamic, yet grounded and strategic. High-angle, slightly wide shot capturing an epic scale. Photorealistic with a touch of ethereal glow, intricate details, and dramatic lighting. No text.

Gemini 2.0 Flash Image Generation yields:

Using the same prompt with ChatGPT 4o yields: