Back to Overview

Custom Analysis

Flexible AI research with structured output

Response: 30-90 seconds Cached for 7 days

What It Does

The Custom Analysis API is your Swiss Army knife for financial research. Ask any question, analyze any combination of assets, and get responses in your preferred format. The AI automatically determines the best approach based on your input.

Unlimited Questions

Any financial analysis you can imagine

Auto

Smart Detection

AI chooses optimal analysis type

{...}

Structured Output

Define exact response schema

Analysis Types

Stock Analysis

Provide symbols
{
  "symbols": ["AAPL", "MSFT", "GOOGL"],
  "prompt": "Compare AI strategies"
}

Multi-stock analysis with custom focus areas.

  • • Sector comparisons
  • • Thematic research
  • • Peer analysis

Portfolio Analysis

Provide composition
{
  "portfolio_composition": [
    {"symbol": "SPY", "percentage": 60},
    {"symbol": "AGG", "percentage": 40}
  ],
  "prompt": "Risk assessment"
}

Comprehensive portfolio evaluation.

  • • Risk metrics
  • • Diversification analysis
  • • Optimization suggestions

Market Analysis

Prompt only
{
  "prompt": "Fed policy impact on tech sector"
}

Macro and thematic research.

  • • Economic analysis
  • • Sector trends
  • • Market dynamics

Output Formats

JSON Schema

Guaranteed structure

{
  "type": "json_schema",
  "schema": {
    "type": "object",
    "title": "RiskAnalysis",
    "properties": {
      "summary": {"type": "string"},
      "risks": {
        "type": "array",
        "items": {"type": "string"}
      },
      "score": {"type": "number"}
    },
    "required": ["summary", "risks"]
  }
}

JSON

Flexible structure

{
  "type": "json"
}

Markdown

Formatted text

{
  "type": "markdown"
}

Tip: Use json_schema when you need guaranteed field structure for automation. Use json for flexibility, markdown for reports.

JSON Schema Requirements
  • • Root must have "type": "object"
  • • Include "title" (any descriptive string)
  • • Define "properties" with proper type declarations
  • • Arrays need "items" with type definition
  • • List mandatory fields in "required" array

Advanced Examples

Sector Rotation Analysis

{
  "symbols": ["XLK", "XLF", "XLE", "XLV", "XLI"],
  "prompt": "Which sectors will outperform in rising rate environment?",
  "output_format": {
    "type": "json_schema",
    "schema": {
      "type": "object",
      "title": "SectorRotation",
      "description": "Sector performance rankings",
      "properties": {
        "rankings": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "sector": {"type": "string"},
              "thesis": {"type": "string"},
              "confidence": {"type": "number"}
            },
            "required": ["sector", "thesis", "confidence"]
          }
        },
        "rationale": {"type": "string"}
      },
      "required": ["rankings", "rationale"]
    }
  }
}

Custom Risk Assessment

{
  "portfolio_composition": [
    {"symbol": "TSLA", "percentage": 25},
    {"symbol": "NVDA", "percentage": 25},
    {"symbol": "META", "percentage": 25},
    {"symbol": "AMZN", "percentage": 25}
  ],
  "prompt": "Identify top 3 portfolio risks and mitigation strategies",
  "data": {
    "client_risk_tolerance": "moderate",
    "investment_horizon": "5 years"
  }
}

Pro Tips

💡

Be specific: Detailed prompts yield better analysis. Include timeframes, metrics, and focus areas.

💡

Use the data field: Include custom metrics, recent events, or client context for personalized analysis.

💡

Schema design: Put important fields first in json_schema - the AI builds context sequentially.

💡

Batch wisely: Analyze up to 10 symbols together for better comparative insights.

Ready to Start?