Quantamental LLM Primer 101: Crowdsource Alpha Capture Portfolio with ChatGPT (Part 1)
Prompt Engineering ChatGPT to Summarize Stock Market Sentiment Globally
Oct 10, 2024
EXECUTIVE SUMMARY
Ingest/Summarize Reports: Upload 30+ reports in batches. For each report, catalog key information (title, source, date) and summarize the outlook on equities, risk factors, sector performance, and regional forecasts.
Synthesize and Analyze Data: After summarizing all reports, identify common themes, such as equities trends, sector performance, quantitative risk factors, and regional forecasts. Highlight both consensus views and contrarian perspectives.
Compose Outlook: Use synthesized research to compose Q4 2024 stock market outlook, with sections on consensus market sentiment, key risks, contrarian views, and regional outlooks, attributing insights to respective sources.
Methodology and Risks with LLMs such as ChatGPT:
This report is constructed by re-writing the outputs from several AI-driven consolidated insights and iterating with an AI-assisted Prompt-Engineering tool. Iterating with concise prompt instructions enables the AI to consistently emphasize qualitative fundamental analysis.
Leveraging powerful tools such as ChatGPT requires vigilance, and quality controls are required to ensure the insights that the AI derives are reliable.
Throughout the process, several AI mistakes were caught and corrected because the AI provides unstable, non-deterministic, or incorrect results.
Below the report, we include detailed step-by-step prompts to provide to ChatGPT. Separating the process into concise steps reduces some risks that the AI will "hallucinate" and provide non-sensical, and/or inconsistent results.
Q4 2024 Stock Market Outlook Report
Executive Summary
The Q4 2024 Stock Market Outlook provides valuable insights into opportunities and risks across global markets. By focusing on Quantitative Factor Investing across regions and sectors, key trends and risks emerge. Strategies related to value, momentum, and quality play critical roles, with technology and AI sectors continuing to dominate, albeit with some risks.
Quantitative Factor, Market, Region and Sector Outlooks
LLM Prompting with ChatGPT (Leveraging the Prompt Engineer Tool)
Task: Ingest, Catalog, & Summarize Reports on Q4 2024 Stock Market Outlook
The following section provides the prompts to provide to the AI following several iterations through the analysis and ultimately re-written with the Prompt Engineering Tool.
Objective: You are tasked with creating a comprehensive catalog of reports summarizing the Q4 2024 stock market outlook. The focus should be on equities, quantitative risk factors, sector performance, and regional forecasts. Additionally, consider key developments such as the central bank stimulus measures from the US and China, and geopolitical risks, including the Iran-Israel conflict. The goal is to synthesize the agreements across reports and highlight contrarian views, while ensuring proper attribution to all sources.
AI Instructions:
Report Ingestion:
You will summarize and catalog reports. The total number of reports may vary over time.
I will upload the reports in batches (10 at a time). Start by summarizing key points from each report, focusing on equity forecasts, risk factors, sectoral performance, and regional outlooks. Be sure to include the source and date for each summary.
This process will continue as I upload more reports, and the total number of reports to be cataloged will be open-ended.
Catalog Structure:
For each report, provide the following:
Title: The report's title.
Source: The institution or analyst publishing the report.
Date: Date of publication.
Summary: A 2-3 sentence overview highlighting the key insights related to equities, risk factors, sector performance, and regional outlooks.
Synthesis and Analysis:
Once all available reports are summarized, create a synthesis of the key themes, focusing on:
Equities: Identify common forecasts for Q4 2024, focusing on any consensus (bullish, bearish, neutral).
Quantitative Risk Factors: Extract and analyze risk factors such as interest rates, inflation, etc. Highlight any variances across sources.
Sectoral Forecasts: Break down the sectoral outlooks, identifying sectors expected to outperform or underperform, and note areas of disagreement.
Regional Forecasts: Summarize the regional outlooks, focusing on the impact of US-China stimulus measures and geopolitical risks (e.g., Iran-Israel conflict).
Detailed Breakdown:
Quantitative Risk Factors: Provide an analysis of how risk factors, including interest rates, inflation, and others, will affect equities.
Sectoral Performance: Break down sectoral forecasts, focusing on areas of agreement or disagreement among the reports.
Regional Analysis: Summarize regional outlooks for North America, Europe, Asia-Pacific, and other key regions, noting the influence of central bank stimulus and geopolitical tensions.
Contrarian Views:
Identify and highlight any contrarian views. Focus on reports where predictions diverge significantly from the consensus regarding equities, sector performance, risk factors, or regional outlooks.
Attribution:
Attribute all data and insights to their respective sources. Ensure references to central bank policies or geopolitical events are clearly attributed to specific reports.
Final Consolidation:
Once all current reports are processed, provide a consolidated outlook for Q4 2024, synthesizing the key points on equities performance, quantitative risks, sectoral forecasts, and regional analyses.
Ensure the final summary incorporates all available reports, offering a holistic view.
Final Report Writing Prompt:
Using the synthesized outlooks and contrarian views, write a comprehensive Q4 2024 stock market outlook report with the following sections:
Introduction: Introduce the purpose of the report and the total number of reports analyzed.
Consensus Market Outlook: Summarize the general consensus for equities, sectors, and regional forecasts, identifying key agreements.
Contrarian Perspectives: Highlight any contrarian views and how they might affect the market outlook.
Key Risks: Provide an analysis of the risks identified, including macroeconomic, geopolitical, and sector-specific risks.
Conclusion: Offer a final consolidated outlook, summarizing areas of opportunity and caution. Attribute insights to their respective sources.
Output Requirements:
Word Document: Provide a link to download the final Q4 2024 stock market outlook report in Word format.
Excel File: Provide a download link to all tables, charts, and summaries in Excel format.
Sample Output Structure:
Catalog Entry:
Report Title: Global Equities Q4 2024 Outlook
Source: JP Morgan
Date: September 2024
Summary: This report forecasts moderate growth in global equities, driven by continued resilience in US technology and emerging market equities. It highlights inflationary pressures as a key risk, with interest rates expected to remain elevated through the quarter.
Quantitative Risk Factors:
Interest Rate Impact: Consensus expects elevated interest rates (4-5%) to suppress equity gains, especially in interest-sensitive sectors like financials. Goldman Sachs predicts a potential rate cut by the Federal Reserve if growth slows.
Inflation: Most reports expect inflation to stabilize at 3-4%, easing pressure on consumer goods. However, Barclays warns of potential inflation spikes due to supply chain issues.
Sectoral Forecasts:
Technology: Strong consensus that technology will outperform, with AI and cloud computing leading growth. However, Bank of America raises concerns about potential overvaluation in the sector.
Energy: Bullish sentiment driven by oil price hikes following the Iran-Israel conflict. HSBC offers a contrarian view, suggesting that renewable energy could face setbacks if oil prices remain volatile.
Regional Analysis:
North America: US equities are expected to benefit from robust corporate earnings in technology and healthcare sectors. Federal Reserve policies are a potential wild card.
Europe: Caution prevails in European markets due to slower economic growth and rising energy costs.
Asia-Pacific: Chinese equities are poised for growth due to stimulus measures aimed at boosting domestic consumption.
Geopolitical and Stimulus Impact:
Oil Prices: Agreement that tensions between Iran and Israel could push oil prices above $100, affecting global equity markets, especially energy stocks.
US-China Stimulus: Broadly seen as positive for equities, particularly in emerging markets reliant on Chinese demand. Deutsche Bank projects this will benefit infrastructure and consumer-driven sectors.
Thanks for reading! This post is public so feel free to share it.