> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tilt.pro/llms.txt
> Use this file to discover all available pages before exploring further.

# Scenario Portfolio Analysis



## OpenAPI

````yaml POST /api/v1/backchannel/risk/scenario_portfolio_analysis
openapi: 3.0.3
info:
  title: Backchannel API
  version: 1.0.0
  description: >-
    API for integrating Tilt market intelligence capabilities, including
    scenarios, topics, company news, company search, and risk analysis.
servers:
  - url: https://tilt.io
    description: Production
security:
  - apiKeyAuth: []
paths:
  /api/v1/backchannel/risk/scenario_portfolio_analysis:
    post:
      tags:
        - Risk
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScenarioPortfolioRequest'
      responses:
        '200':
          description: AI-generated scenario tree with portfolio impact analysis
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioPortfolioResponse'
      security:
        - apiKeyAuth: []
components:
  schemas:
    ScenarioPortfolioRequest:
      type: object
      properties:
        scenario_description:
          type: string
        portfolio_weights:
          type: object
          additionalProperties:
            type: number
          description: >-
            Portfolio weights keyed by tilt_id or CUSIP. Mixed identifiers are
            allowed; CUSIPs are resolved to tilt_ids server-side.
        as_of_date:
          type: string
          nullable: true
          pattern: ^\d{4}-\d{2}-\d{2}$
        search_for_context:
          type: boolean
          default: true
        include_security_details:
          type: boolean
          default: true
        aggregate_scenarios:
          type: boolean
          default: false
      required:
        - scenario_description
        - portfolio_weights
    ScenarioPortfolioResponse:
      type: object
      properties:
        success:
          type: boolean
        scenario_description:
          type: string
        as_of_date:
          type: string
        scenario_tree:
          type: array
          items:
            type: object
            additionalProperties:
              nullable: true
        leaf_scenarios:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/ScenarioPortfolioLeafResult'
        scenario_level_results:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/ScenarioPortfolioLevelResult'
        expected_portfolio_return_pct:
          type: number
        portfolio_summary:
          type: object
          additionalProperties:
            nullable: true
        context_articles:
          type: array
          nullable: true
          items:
            type: string
        context_article_ids:
          type: array
          nullable: true
          items:
            type: string
        warnings:
          type: array
          nullable: true
          items:
            type: string
        cache_hit:
          type: boolean
        generated_at:
          type: string
      required:
        - success
        - scenario_description
        - as_of_date
        - scenario_tree
        - expected_portfolio_return_pct
        - portfolio_summary
        - generated_at
    ScenarioPortfolioLeafResult:
      type: object
      properties:
        path:
          type: array
          items:
            type: string
        joint_probability_pct:
          type: number
        title:
          type: string
        description:
          type: string
        macro_shocks:
          nullable: true
        portfolio_expected_return_pct:
          type: number
        portfolio_return_pct:
          type: number
          nullable: true
        contribution_to_expected_return_pct:
          type: number
        top_movers:
          type: array
          items:
            $ref: '#/components/schemas/ScenarioPortfolioSecurityDetail'
          description: >-
            Top security movers for this leaf. Entries include cusip when SIG
            can resolve one.
        security_details:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/ScenarioPortfolioSecurityDetail'
          description: >-
            Per-security breakdown for this leaf when include_security_details
            is true. Entries include cusip when SIG can resolve one.
      additionalProperties:
        nullable: true
    ScenarioPortfolioLevelResult:
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        probability_pct:
          type: number
        portfolio_return_mean_pct:
          type: number
        portfolio_return_std_pct:
          type: number
        macro_shocks:
          type: array
          items:
            type: object
            additionalProperties:
              nullable: true
        sub_scenario_count:
          type: integer
        top_movers:
          type: array
          items:
            $ref: '#/components/schemas/ScenarioPortfolioSecurityDetail'
          description: >-
            Top security movers for the aggregate scenario. SIG may omit cusip
            on aggregate scenario-level rows.
        security_details:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/ScenarioPortfolioSecurityDetail'
          description: >-
            Per-security aggregate breakdown when include_security_details and
            aggregate_scenarios are true. SIG may omit cusip on aggregate
            scenario-level rows.
      additionalProperties:
        nullable: true
    ScenarioPortfolioSecurityDetail:
      type: object
      properties:
        tilt_id:
          type: string
        cusip:
          type: string
          nullable: true
          description: >-
            CUSIP for this security when SIG can resolve one. Aggregate
            scenario-level rows may omit this field.
        ticker:
          type: string
          nullable: true
        company_name:
          type: string
          nullable: true
        weight:
          type: number
        expected_return_pct:
          type: number
        contribution_to_portfolio_pct:
          type: number
        factor_contributions:
          type: object
          additionalProperties:
            type: number
      required:
        - tilt_id
        - weight
        - expected_return_pct
        - contribution_to_portfolio_pct
      additionalProperties:
        nullable: true
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````