---
title: "Money-Weighted Portfolio"
method: POST
path: "/portfolios/transformation/money-weighted"
tags: ["Portfolio Transformation"]
---

# Money-Weighted Portfolio

`POST /portfolios/transformation/money-weighted`

Compute money-weighted portfolio values from portfolio values and portfolio contributions/withdrawals.

References
* Carl R. Bacon, Practical Portfolio Performance Measurement and Attribution

## Request body

- object
  - `portfolios` object[], required
    - `portfolioValues` object[], required — portfolioValues[t] contains portfolio value information at the date t
      - `date` string, required — The date corresponding to the date t in format YYYY-MM-DD; all dates are distinct
      - `portfolioValue` number, required — The value of the portfolio at the date t, excluding any potential contribution or withdrawal possibly made at the same date
    - `portfolioContributions` object[] — portfolioValues[t] contains portfolio contributions information at the date t
      - `date` string, required — The date corresponding to the date t in format YYYY-MM-DD; all dates are distinct; the date must be found in the array portfolioValues
      - `contributionAmount` number, required — The amount contributed to the portfolio at the date t
    - `portfolioWithdrawals` object[] — portfolioValues[t] contains portfolio withdrawals information at the date t
      - `date` string, required — The date corresponding to the date t in format YYYY-MM-DD; all dates are distinct; the date must be found in the array portfolioValues
      - `withdrawalAmount` number, required — The amount withdrew from the portfolio at the date t
  - `moneyWeightedReturnComputationMethod` 'irr' | 'modifiedDietz' — The method to compute the portfolios money-weighted return

## Response `200`

OK

- object
  - `portfolios` object[], required
    - `portfolioValues` object[], required — portfolioValues[t] contains money-weighted portfolio value information at the date t
      - `date` string, required — The date corresponding to the date t in format YYYY-MM-DD; all dates are distinct
      - `portfolioValue` number, required — The money-weighted value of the portfolio at the date t

---

[API](https://skmtc.net/portfoliooptimizer/apis/portfolio-optimizer.md) · [All operations](https://skmtc.net/portfoliooptimizer/apis/portfolio-optimizer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portfoliooptimizer/portfolio-optimizer/revisions/dee9caba1913/schema)
