Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Building GenAI Applications. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

Prompt Engineering Guide for Traders and Investors – Part 1

2 min read

What is Prompt Engineering?

Prompt engineering is the art of crafting effective inputs for AI models like ChatGPT, Google Gemini, Claude, Grok, Mistral, Deepseek, and Qwen to receive precise and actionable outputs. For traders and investors, this skill is crucial in leveraging AI to enhance decision-making, streamline research, and simplify complex data interpretation.

In essence, prompt engineering helps traders communicate efficiently with AI, ensuring that they get useful insights without unnecessary noise.

Understanding AI Models with and Without Internet Access

Not every Large Language Model (LLM) has direct internet access. At this point, models like Claude Sonnet 3.7 do not have internet access, while models such as ChatGPT, Google Gemini, Grok, and Deepseek come with internet search features, allowing real-time market insights. Traders and investors should be mindful of this distinction when choosing an AI assistant for market analysis.

Basics of Prompting

Prompting involves structuring queries in a way that ensures AI understands and delivers the most relevant response. For traders, this means asking AI in a way that focuses on specific markets, trends, and stock-related data.

For example: I want a summary of the top 5 gainers in the Indian Stock Market today. Provide company names, percentage change, and sector.

Instead of a vague request like: Tell me about the stock market today.

A well-structured prompt refines AI output, making it actionable.

Zero-Shot Prompting

Zero-shot prompting is asking AI a question without providing prior context. This works well for quick lookups and generic queries.

Example: What is the latest news affecting Reliance Industries (NSE: RELIANCE) today?

The AI fetches the most relevant data available, making it an excellent tool for traders who need quick updates on market-moving events.

Few-Shot Prompting

Few-shot prompting involves giving the AI a few examples to refine its response.

Example: Here are two examples of how I want stock summaries:

  1. TCS: IT giant, strong revenue growth, up 2% today.
  2. HDFC Bank: Leading private bank, stable performance, down 1%. Now summarize Infosys and ICICI Bank in a similar format.

This ensures the AI delivers responses in a specific structure, improving usability.

Chain of Thoughts Prompting

This method encourages AI to break down its reasoning before answering.

Example: Analyze Tata Steel’s stock performance in the last month. Break it down into:

  1. Price movement trend
  2. Volume trends
  3. Major news/events
  4. Institutional activity

By structuring the prompt this way, traders can get an insightful breakdown rather than a single-line response.

Tree of Thoughts Prompting

This is useful for complex decision-making, where multiple scenarios are involved.

Example: Evaluate the potential impact of the upcoming RBI interest rate decision on:

  1. Banking sector stocks
  2. Realty sector stocks
  3. Mid-cap stocks

This method allows AI to explore different angles of a given scenario, helping traders make more informed decisions.

Meta Prompting

Meta prompting is about guiding the AI to improve itself.

Example: You are an AI trained for traders and investors. When I ask about stock analysis, structure the response with:

  1. Stock overview
  2. Recent performance
  3. Market sentiment
  4. Expert opinions

Now analyze HDFC Bank (NSE: HDFCBANK) and Apple Inc. (NASDAQ: AAPL) based on this structure.

This ensures consistency in AI responses, making analysis faster and more structured.

Prompting with Files, Images, and Text Combinations

AI can process attachments, including PDFs, spreadsheets, and images.

Attaching Files

Example: Analyze the attached Excel file containing historical stock data of Infosys and identify patterns in monthly returns.

Attaching Images

Example: Interpret the attached candlestick chart of Tesla (NASDAQ: TSLA) and summarize potential support and resistance levels.

Combining Text, Files, and Images

Example: Using the attached financial report PDF and the candlestick chart, summarize the potential upside for HUL (NSE: HINDUNILVR) in the next quarter.

How Prompt Engineering Helps Traders

  1. Market Insights: Traders can get real-time news, stock summaries, and sentiment analysis quickly.
  2. Technical Analysis: AI can interpret chart patterns and summarize key takeaways.
  3. Stock Screening: Instead of manually searching for stocks, AI can filter stocks based on specific conditions.
  4. Earnings Reports Summaries: AI can analyze earnings calls and highlight key takeaways in seconds.
  5. Macro Analysis: AI can provide insights on how global events impact specific stocks or sectors.

Example Use Cases in Indian and US Stock Markets

Indian Stock Market Example:

Prompt: List five stocks from the NSE that have seen a surge in trading volume today and provide possible reasons.

US Stock Market Example:

Prompt: Which NASDAQ stocks have shown a bullish trend this week with strong earnings results?

By mastering prompt engineering, traders can use AI to enhance their research, improve decision-making, and stay ahead in the markets without relying solely on traditional news sources or manual analysis.

Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Building GenAI Applications. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More