Skip to content

Octagon Stock Data Agent

Model Name: octagon-stock-data-agent

Specialized agent for stock market data and equity investment analysis.

Capabilities

  • Analyze stock price movements
  • Track trading volumes and patterns
  • Monitor market trends
  • Evaluate valuation metrics
  • Assess technical indicators
  • Compare stock performance against benchmarks

Use Cases

The Stock Data Agent is best for:

  • Stock market research
  • Equity analysis
  • Trading pattern identification
  • Performance benchmarking
  • Identifying price catalysts

Example Queries

  • "How has Apple's stock performed compared to the S&P 500 over the last 6 months?"
  • "Analyze the trading volume patterns for Tesla stock before and after earnings releases"
  • "What were the major price movements for NVIDIA in 2023 and what were the catalysts?"

Code Examples

Python
response = client.responses.create(
    model="octagon-stock-data-agent",
    input="How has Apple's stock performed compared to the S&P 500 over the last 6 months?",
    stream=True
)
JavaScript
const response = await client.responses.create({
  model: "octagon-stock-data-agent",
  input: "How has Apple'\''s stock performed compared to the S&P 500 over the last 6 months?",
  stream: true
});
cURL
curl -X POST https://api.octagonagents.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-octagon-api-key" \
  -d '{
    "model": "octagon-stock-data-agent",
    "input": "How has Apple'\''s stock performed compared to the S&P 500 over the last 6 months?",
    "stream": true
  }' \
  --no-buffer

Note: The availability of these fields may vary depending on the specific Polygon.io API endpoints and subscription tiers you are using. Some fields may require premium access or might not be available for all securities.

How to Create Effective Prompts for Stock Data Analysis

When querying stock data, consider these strategies:

  1. Specify precise time ranges: Include exact date ranges to limit the data scope.

    • Example: "Analyze AAPL price movement between January 1, 2023 and March 15, 2023."
  2. Indicate data granularity: Specify whether you need tick-by-tick, minute, hour, day, or other timeframes.

    • Example: "Extract hourly volume data for TSLA during market hours on February 14, 2024."
  3. Clarify the metrics needed: Be specific about which data points you're interested in.

    • Example: "Calculate the average daily trading range for NVDA over the past 30 trading days."
  4. Request comparative analysis: Ask for comparisons between securities or time periods.

    • Example: "Compare the daily VWAP for AMZN, GOOG, and META during the last earnings season."
  5. Define visualization preferences: Specify chart types or visualization needs.

    • Example: "Generate a candlestick chart with 50-day and 200-day moving averages for SPY."
  6. Focus on specific events: Target data around particular market events.

    • Example: "Analyze the trading volume pattern for MSFT in the 48 hours following their Q4 earnings announcement."
  7. Include technical indicators: Specify which technical analysis metrics to calculate.

    • Example: "Calculate and plot the RSI, MACD, and Bollinger Bands for AMD over the past 3 months."
  8. Request pattern identification: Ask for detection of specific price or volume patterns.

    • Example: "Identify any instances of gap up openings followed by price reversals for COIN in 2023."

Stock Data Available Fields

Market Data (Real-time & Historical)

FieldDescription
OpenOpening price for the specified time period
HighHighest price reached during the specified time period
LowLowest price reached during the specified time period
CloseClosing price for the specified time period
VolumeNumber of shares traded during the specified time period
VWAPVolume Weighted Average Price
TimestampExact time of the data point
After HoursAfter-hours trading price
Pre-marketPre-market trading price
Adjusted CloseClose price adjusted for splits and dividends
Trade CountNumber of individual trades executed
Tick SizeMinimum price movement increment
Weighted AverageWeighted average price based on specified criteria
SpreadDifference between ask and bid prices
Number of TradesCount of executed trades within the time period

Technical Indicators

FieldDescription
Simple Moving Average (SMA)Average price over a specified number of periods
Exponential Moving Average (EMA)Weighted moving average giving more importance to recent prices
Relative Strength Index (RSI)Momentum oscillator measuring speed and change of price movements
Moving Average Convergence Divergence (MACD)Trend-following momentum indicator
Bollinger BandsVolatility bands placed above and below a moving average
Average True Range (ATR)Market volatility indicator
On-Balance Volume (OBV)Volume-based momentum indicator
Stochastic OscillatorMomentum indicator comparing closing price to price range
Fibonacci RetracementPotential support/resistance levels based on Fibonacci sequence
Ichimoku CloudCollection of indicators showing support/resistance, momentum, and trend direction
Volume ProfileDistribution of volume at different price levels
Money Flow Index (MFI)Volume-weighted RSI
Average Directional Index (ADX)Trend strength indicator

Volatility Metrics

FieldDescription
Historical VolatilityStandard deviation of price changes over a specified period
Implied VolatilityMarket's forecast of likely movement derived from options prices
Average True Range (ATR)Average of true ranges over specified time period
BetaMeasure of stock's volatility compared to the overall market
Volatility SurfaceThree-dimensional plot of implied volatility across strike prices and expirations
Volatility SmilePattern of implied volatility across different strike prices
Volatility Term StructurePattern of implied volatility across different expiration dates
Volatility SkewDifference in implied volatility between out-of-money options
CBOE Volatility Index (VIX) DataMarket's expectation of 30-day forward-looking volatility
Realized VolatilityActual historical volatility over a specific period
Volatility RatioComparison of short-term to long-term volatility

Price Pattern Analysis

FieldDescription
Gap Up/DownPrice difference between previous close and current open
Support LevelsPrice levels where downward trends tend to pause
Resistance LevelsPrice levels where upward trends tend to pause
Price ChannelsParallel lines that contain price movement
Chart PatternsIdentified patterns such as head and shoulders, double tops, etc.
Trend LinesLines connecting price highs or lows to identify trends
Breakout/Breakdown PointsPrices at which security moves outside established patterns
Pivot PointsCalculated levels used to determine potential support/resistance
Price ReversalsPoints where price trend changes direction
Average Daily RangeAverage price movement within a trading day
Volume SpikesUnusual increases in trading volume
Price MomentumRate of acceleration in price movement
Consolidation ZonesAreas where price moves sideways within a range

Company Reference Data

FieldDescription
TickerStock trading symbol
Company NameLegal name of the company
ExchangeStock exchange where the security is listed
IndustryPrimary industry classification
SectorBroader market sector classification
Market CapTotal market value of outstanding shares
Shares OutstandingTotal number of shares issued by the company
FloatNumber of shares available for public trading
Primary ExchangeMain exchange where the stock is listed
CurrencyCurrency in which the stock is traded
CountryCountry where the company is headquartered
CIKCentral Index Key (SEC identifier)
FIGIFinancial Instrument Global Identifier
ISINInternational Securities Identification Number
CUSIPCommittee on Uniform Security Identification Procedures identifier

Corporate Actions

FieldDescription
DividendsCash payments distributed to shareholders
Stock SplitsDivision of existing shares into multiple shares
Reverse SplitsConsolidation of shares to form fewer, higher-priced shares
SpinoffsCreation of independent company through distribution of shares
Mergers & AcquisitionsInformation about corporate combinations
Rights OfferingsIssuance of rights to purchase additional shares
Symbol ChangesUpdates to ticker symbols
IPO DateInitial public offering date
Delisting EventsRemoval from trading on an exchange
Name ChangesChanges to company name
Dividend Ex-DateDate when shares begin trading without dividend rights
Dividend Record DateDate determining which shareholders receive dividends
Dividend Payment DateDate when dividends are actually paid
Split RatioRatio for stock splits (e.g., 2:1, 3:1)

Stock Fundamentals

FieldDescription
Market CapitalizationTotal market value of a company's outstanding shares
P/E RatioPrice to Earnings ratio
EPSEarnings Per Share
Dividend YieldAnnual dividend payments as percentage of share price
52-Week HighHighest price in the past 52 weeks
52-Week LowLowest price in the past 52 weeks
Average VolumeAverage daily trading volume
BetaMeasure of volatility compared to the market
Price-to-Book RatioShare price divided by book value per share
Debt-to-Equity RatioTotal liabilities divided by shareholders' equity
Return on EquityNet income divided by shareholders' equity
Profit MarginNet profit as a percentage of revenue
Revenue GrowthYear-over-year increase in company revenue
Earnings GrowthYear-over-year increase in company earnings