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

# Construct an optimized portfolio

> Builds portfolio weights by tilting signal scores with a power exponent. An optional risk overlay reduces concentration in highly correlated stocks while keeping the weights close to the signal-driven targets.



## OpenAPI

````yaml /api-reference/openapi-v2.json post /strategies/{strategyId}/optimize
openapi: 3.0.0
info:
  title: Noonum API v2
  version: 2.0.0
  contact:
    name: Noonum Support
    email: hello@noonum.com
  description: >
    Create and manage investment strategies, portfolios, and backtests. The API
    covers the full strategy lifecycle, including creation and editing, the
    archive and revive flow, version submission and run state, result companies,
    evidence, factsheets, exposures, and taxonomy.
servers:
  - url: https://api.noonum.ai/v2
security:
  - bearerAuth: []
tags:
  - name: UserStrategies
    description: Create, read, update, and manage your own investment strategies.
  - name: Helper
    description: >-
      Shared utilities for company lookup and search, objective tooling, and a
      health check.
  - name: Portfolios
    description: Create, read, update, and delete portfolios.
  - name: Backtest
    description: Run a standalone backtest on a portfolio of companies.
paths:
  /strategies/{strategyId}/optimize:
    parameters:
      - name: strategyId
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: UUID of the strategy.
    post:
      tags:
        - UserStrategies
      summary: Construct an optimized portfolio
      description: >-
        Builds portfolio weights by tilting signal scores with a power exponent.
        An optional risk overlay reduces concentration in highly correlated
        stocks while keeping the weights close to the signal-driven targets.
      operationId: app.api.v2.strategies.optimize
      parameters:
        - name: asOfDate
          in: query
          required: false
          description: >-
            The as-of date in `YYYY-MM-DD` format that selects a specific run of
            the version. When omitted, the latest completed run for the version
            is used.
          schema:
            type: string
            format: date
        - name: versionId
          in: query
          required: false
          description: >-
            The version to read. When omitted, the strategy's active version is
            used.
          schema:
            type: string
            format: uuid
        - name: minMarketCap
          in: query
          required: false
          description: Minimum market capitalization a company needs to be included.
          schema:
            type: number
            format: double
            default: 1000000000
        - name: signalType
          in: query
          required: false
          description: Which signal metric to score companies on.
          schema:
            type: string
            enum:
              - linguisticBeta
              - marketBuzz
              - convictionScore
            default: convictionScore
        - name: tiltExponent
          in: query
          required: false
          description: >-
            Power exponent that controls how strongly signal scores affect
            weights. A value of 0 produces equal weights, 1 makes weights
            proportional to score, and higher values concentrate weight in the
            top-scoring companies.
          schema:
            type: number
            format: double
            minimum: 0
            maximum: 10
            default: 1
        - name: maxWeight
          in: query
          required: false
          description: Maximum weight allowed for any single holding.
          schema:
            type: number
            format: double
            minimum: 0
            exclusiveMinimum: true
            maximum: 1
            default: 0.2
        - name: minWeight
          in: query
          required: false
          description: Minimum weight allowed for any single holding.
          schema:
            type: number
            format: double
            minimum: 0
            maximum: 1
            default: 0.005
        - name: riskAdjustment
          in: query
          required: false
          description: >-
            How strongly to diversify by risk. A value of 0 applies pure
            score-tilt weighting with no risk adjustment, and 1 applies the
            maximum adjustment to reduce concentration in correlated stocks. Any
            value above 0 requires price data for the covariance computation.
          schema:
            type: number
            format: double
            minimum: 0
            maximum: 1
            default: 0
        - name: riskFreeRate
          in: query
          required: false
          description: Annual risk-free rate used to compute the Sharpe ratio.
          schema:
            type: number
            format: double
            default: 0.03
        - name: topN
          in: query
          required: false
          description: >-
            Number of top companies by signal score to include. When omitted,
            all qualifying companies are included.
          schema:
            type: integer
            minimum: 2
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              nullable: true
              properties:
                companyIds:
                  type: array
                  description: >-
                    Optional list of company IDs to start from before the other
                    filters are applied.
                  minItems: 0
                  items:
                    type: string
      responses:
        '200':
          description: The constructed portfolio.
          content:
            application/json:
              schema:
                type: object
                description: The constructed portfolio and its summary statistics.
                properties:
                  metadata:
                    type: object
                    description: Summary statistics for the constructed portfolio.
                    properties:
                      numberStocks:
                        description: Number of companies in the portfolio.
                        type: integer
                        example: 50
                      signalType:
                        description: Signal metric used to score companies.
                        type: string
                        enum:
                          - linguisticBeta
                          - marketBuzz
                          - convictionScore
                        example: convictionScore
                      weightedSignalScore:
                        description: Portfolio-weighted average of the signal scores.
                        type: number
                        format: float
                        example: 0.42
                      annualizedReturn:
                        description: Expected annualized return of the portfolio.
                        type: number
                        format: float
                        example: 0.18
                      volatility:
                        description: Annualized volatility of the portfolio.
                        type: number
                        format: float
                        example: 0.09
                      cvar:
                        description: >-
                          Conditional value at risk, the expected loss in the
                          worst-case tail.
                        type: number
                        format: float
                        example: 0.2
                      sharpeRatio:
                        description: >-
                          Sharpe ratio of the portfolio, null when it cannot be
                          computed.
                        type: number
                        format: float
                        nullable: true
                        example: 1.5
                      expectedDailyReturn:
                        description: Expected daily return of the portfolio.
                        type: number
                        format: float
                        example: 0.001
                      maxDrawdown:
                        description: Largest peak-to-trough decline over the period.
                        type: number
                        format: float
                        example: -0.25
                    required:
                      - numberStocks
                      - signalType
                      - weightedSignalScore
                      - annualizedReturn
                      - volatility
                      - cvar
                      - expectedDailyReturn
                      - maxDrawdown
                  portfolio:
                    type: array
                    items:
                      description: >-
                        A company in the constructed portfolio, with its
                        assigned weight.
                      allOf:
                        - type: object
                          description: A company produced by a strategy run.
                          required:
                            - id
                            - symbol
                            - name
                            - isin
                            - exchange
                            - market
                            - sector
                            - industry
                            - marketCap
                            - volAvg
                            - linguisticBeta
                            - marketBuzz
                            - active
                          properties:
                            id:
                              type: string
                              format: uuid
                            symbol:
                              type: string
                              example: TSLA
                            name:
                              type: string
                              example: Tesla, Inc.
                            isin:
                              type: string
                              nullable: true
                            figi:
                              type: string
                              nullable: true
                              description: >-
                                Bloomberg Financial Instrument Global Identifier
                                (FIGI) for the listing.
                            exchange:
                              type: string
                              example: NASDAQ
                            market:
                              type: string
                              nullable: true
                            mic:
                              type: string
                              nullable: true
                              description: >-
                                ISO 10383 operating market identifier code for
                                the listing exchange.
                            sector:
                              type: string
                              nullable: true
                            industry:
                              type: string
                              nullable: true
                            marketCap:
                              type: number
                              nullable: true
                            volAvg:
                              type: number
                              format: float
                              nullable: true
                            linguisticBeta:
                              type: number
                              format: float
                            marketBuzz:
                              type: number
                              format: float
                            reasoning:
                              type: string
                              nullable: true
                              description: >-
                                Why the company was included. Present only when
                                `includeReasoning` is `true`.
                            convictionScore:
                              type: number
                              format: float
                              nullable: true
                              description: >-
                                Conviction score between 0 and 1 that combines
                                market buzz and linguistic beta. A higher score
                                indicates a stronger thematic signal on both
                                dimensions.
                            active:
                              type: boolean
                              description: Whether the company is currently active.
                        - type: object
                          properties:
                            weight:
                              description: The company's weight in the portfolio.
                              type: number
                              format: float
                              example: 0.035
                          required:
                            - weight
                required:
                  - metadata
                  - portfolio
        '400':
          description: The request is invalid or no companies match the filters.
        '404':
          description: The strategy, version, or run results were not found.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API Key
      description: |
        Enter 'Bearer' followed by a space and then your JWT or API Key.
        Example: `Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...`
        or `Bearer YOUR_API_KEY_HERE`

````