---
title: "Factor Exposures"
method: POST
path: "/portfolios/analysis/factors/exposures"
tags: ["Portfolio Analysis"]
---

# Factor Exposures

`POST /portfolios/analysis/factors/exposures`

## Request

- Base URL: `https://api.portfoliooptimizer.io/v1`
- URL: `https://api.portfoliooptimizer.io/v1/portfolios/analysis/factors/exposures`
- Auth: API key in header `X-API-Key`

Compute the exposures of a portfolio to a set of factors, using a returns-based linear regression analysis.

References
* [Measuring Factor Exposures: Uses and Abuses, Ronen Israel and Adrienne Ross, The Journal of Alternative Investments Summer 2017, 20 (1) 10-25](https://jai.pm-research.com/content/20/1/10.short)

## Request body

- union
  - object
    - `factors` object[], required
      - `factorReturns` number[], required: factorReturns[t] is the return of the factor at the time t; all the factorReturns arrays must have the same length, equal to the common length of the portfolioReturns arrays
    - `portfolios` object[], required
      - `portfolioReturns` number[], required: portfolioReturns[t] is the return of the portfolio at the time t; all the portfolioReturns arrays must have the same length, equal to the common length of the factorReturns arrays
  - object
    - `factors` object[], required
      - `factorReturns` object[], required: factorReturns[t] is the return of the factor at the time t
        - `date` string, required: The date corresponding to the date t in format YYYY-MM-DD; all dates must be distinct
        - `return` number, required: The return of the factor at the date t
    - `portfolios` object[], required
      - `portfolioReturns` object[], required: portfolioReturns[t] is the return of the portfolio at the time t
        - `date` string, required: The date corresponding to the date t in format YYYY-MM-DD; all dates must be distinct
        - `return` number, required: The return of the portfolio at the date t; only used in the regression analysis if the return's date is present in all the factorReturns arrays
  - object
    - `factorModel` 'capmFactorModel' | 'famaFrenchThreeFactorModel' | 'famaFrenchCarhartFourFactorModel' | 'famaFrenchFiveFactorModel', required: The factor model to use, within the region specified in factorModelRegion; not all factor models are available in all regions
    - `factorModelRegion` 'us' | 'developedMarkets' | 'emergingMarkets', required: The region of the factor model specified in factorModel
    - `portfolios` object[], required
      - `portfolioReturns` object[], required: portfolioReturns[t] is the return of the portfolio at the time t
        - `date` string, required: The date corresponding to the date t in format YYYY-MM-DD
        - `return` number, required: The return of the portfolio at the date t; only used in the regression analysis if the return's date is present in all the internal factor model factors

## Response `200`

OK

- union
  - object
    - `portfolios` object[], required
      - `portfolioAlpha` number, required: The portfolio alpha, which correponds to the portion of the portfolio returns that cannot be explained by the portfolio factor exposures
      - `portfolioBetas` number[], required: The portfolio betas, which correspond to the portfolio factor exposures
      - `portfolioRSquared` number, required: The portfolio R^2, which indicates how much of the variability in the portfolio returns can be explained by the portfolio factor exposures; generally, the higher the R^2 the better the portfolio factor exposures explain the portfolio returns
  - object
    - `portfolios` object[], required
      - `portfolioAlpha` number, required: The portfolio alpha, which correponds to the portion of the portfolio returns that cannot be explained by the portfolio factor exposures
      - `portfolioBetas` number[], required: The portfolio betas, which correspond to the portfolio factor exposures
      - `portfolioRSquared` number, required: The portfolio R^2, which indicates how much of the variability in the portfolio returns can be explained by the portfolio factor exposures; generally, the higher the R^2 the better the portfolio factor exposures explain the portfolio returns
      - `portfolioReturns` number, required: The number of portfolio returns used in the regression analysis
      - `portfolioReturnsDates` object, required: The oldest and latest dates of the portfolio returns used in the regression analysis
        - `earliestPortfolioReturnDate` string, required: The date of the earliest portfolio return used in the regression analysis, in format YYYY-MM-DD
        - `latestPortfolioReturnDate` string, required: The date of the most recent portfolio return used in the regression analysis, in format YYYY-MM-DD
      - `portfolioFactorsNames` string[]: The names of the the factors used in the regression analysis, in case of an internal factor model

---

[API](https://skmtc.dev/portfoliooptimizer/apis/portfolio-optimizer.md) - [All operations](https://skmtc.dev/portfoliooptimizer/apis/portfolio-optimizer/llms.txt) - [OpenAPI document](https://skmtc.dev/portfoliooptimizer/apis/portfolio-optimizer/revisions/9d075aa717bf?raw)
