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

# Black-Litterman Posterior Returns & Weights

> Computes posterior (updated) returns by combining market equilibrium with investor views using Bayesian inference. Returns optimal portfolio weights based on the posterior distribution.

**Use Cases:**
- Incorporating proprietary views into portfolio construction
- Blending quantitative signals with market equilibrium
- Creating more stable, diversified portfolios than MVO
- Tactical asset allocation with strategic baseline

**Mathematical Background:**
Posterior returns: E[R] = [(τΣ)^-1 + P^T Ω^-1 P]^-1 [(τΣ)^-1 Π + P^T Ω^-1 Q]

Where Π is equilibrium returns, P is the picking matrix, Q is views, and Ω is view uncertainty.

**Credits:** 5 per request [Tier: PRO, Credits: 5]



## OpenAPI

````yaml api-specs/portfolio.json post /quantlib/portfolio/black-litterman/posterior
openapi: 3.1.0
info:
  title: FinceptQuantLib API - Portfolio
  description: >-
    Portfolio optimization and risk management module for institutional-grade
    portfolio construction, analysis, and monitoring. Includes mean-variance
    optimization, Black-Litterman, risk parity, and comprehensive risk metrics.


    **Tier:** Pro (5 credits per request)


    **Key Features:**

    - Mean-variance optimization (minimum variance, maximum Sharpe, target
    return)

    - Efficient frontier construction with tangency portfolio identification

    - Black-Litterman model for Bayesian view incorporation

    - Risk parity strategies (ERC, HRP, inverse volatility)

    - Comprehensive risk metrics (VaR, CVaR, tracking error, information ratio)

    - Advanced portfolio analytics (risk contribution, drawdown,
    diversification)
  version: 3.0.0
  contact:
    name: Fincept API Support
    url: https://fincept.in
servers:
  - url: https://api.fincept.in
    description: Fincept API Production Server
security:
  - APIKeyHeader: []
tags:
  - name: quantlib-portfolio
    description: Portfolio optimization and risk management endpoints
    x-displayName: Portfolio
paths:
  /quantlib/portfolio/black-litterman/posterior:
    post:
      tags:
        - quantlib-portfolio
      summary: Black-Litterman Posterior Returns & Weights
      description: >-
        Computes posterior (updated) returns by combining market equilibrium
        with investor views using Bayesian inference. Returns optimal portfolio
        weights based on the posterior distribution.


        **Use Cases:**

        - Incorporating proprietary views into portfolio construction

        - Blending quantitative signals with market equilibrium

        - Creating more stable, diversified portfolios than MVO

        - Tactical asset allocation with strategic baseline


        **Mathematical Background:**

        Posterior returns: E[R] = [(τΣ)^-1 + P^T Ω^-1 P]^-1 [(τΣ)^-1 Π + P^T
        Ω^-1 Q]


        Where Π is equilibrium returns, P is the picking matrix, Q is views, and
        Ω is view uncertainty.


        **Credits:** 5 per request [Tier: PRO, Credits: 5]
      operationId: bl_posterior
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - covariance_matrix
                - market_caps
              properties:
                covariance_matrix:
                  type: array
                  items:
                    type: array
                    items:
                      type: number
                  description: Asset covariance matrix (annualized)
                  example:
                    - - 0.04
                      - 0.006
                      - 0.008
                      - 0.01
                    - - 0.006
                      - 0.09
                      - 0.012
                      - 0.015
                    - - 0.008
                      - 0.012
                      - 0.0625
                      - 0.018
                    - - 0.01
                      - 0.015
                      - 0.018
                      - 0.16
                market_caps:
                  type: array
                  items:
                    type: number
                  description: Market capitalizations for each asset
                  example:
                    - 5000000000
                    - 3000000000
                    - 2000000000
                    - 1000000000
                risk_aversion:
                  type: number
                  description: Market risk aversion parameter
                  default: 2.5
                  example: 2.5
                views:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - absolute
                          - relative
                        description: >-
                          View type: 'absolute' for single asset return view,
                          'relative' for relative performance view
                      asset:
                        type: integer
                        description: Asset index for absolute view (0-based)
                      asset_long:
                        type: integer
                        description: Long asset index for relative view
                      asset_short:
                        type: integer
                        description: Short asset index for relative view
                      value:
                        type: number
                        description: >-
                          Expected return (absolute) or outperformance
                          (relative)
                      confidence:
                        type: number
                        description: >-
                          View confidence level (0.0 to 1.0). Higher values mean
                          stronger conviction.
                        minimum: 0
                        maximum: 1
                        default: 0.5
                  description: >-
                    List of investor views to incorporate. Can be empty for pure
                    equilibrium.
                  nullable: true
                  example:
                    - type: absolute
                      asset: 0
                      value: 0.09
                      confidence: 0.7
                    - type: relative
                      asset_long: 1
                      asset_short: 2
                      value: 0.03
                      confidence: 0.6
      responses:
        '200':
          description: Black-Litterman posterior successfully computed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      posterior_returns:
                        type: array
                        items:
                          type: number
                        description: >-
                          Updated expected returns incorporating views
                          (annualized)
                        example:
                          - 0.085
                          - 0.12
                          - 0.098
                          - 0.142
                      optimal_weights:
                        type: array
                        items:
                          type: number
                        description: Optimal portfolio weights based on posterior returns
                        example:
                          - 0.32
                          - 0.28
                          - 0.25
                          - 0.15
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/InsufficientCreditsError'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  responses:
    UnauthorizedError:
      description: Authentication information is missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Invalid API key
    InsufficientCreditsError:
      description: Insufficient API credits
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Insufficient credits. This endpoint requires 5 credits.
    ValidationError:
      description: Request validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: array
                items:
                  type: object
                  properties:
                    loc:
                      type: array
                      items:
                        type: string
                    msg:
                      type: string
                    type:
                      type: string
          example:
            detail:
              - loc:
                  - body
                  - expected_returns
                msg: field required
                type: value_error.missing
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Get your key at
        https://api.fincept.in/auth/register

````