{
  "tool": "msc-investment-management.time_weighted_return",
  "name": "Time-weighted return (GIPS) (CDU-BUS-INV-900)",
  "answers": "What is the time-weighted return across these sub-periods, removing the effect of the client’s own flows?",
  "degree": {
    "id": "competency:msc-investment-management",
    "code": "CDU-BUS-INV-900",
    "name": "MSc Investment Management",
    "version": "1.0.0"
  },
  "reference": "GIPS for Firms (2020): time-weighted returns with the portfolio valued at each large external cash flow; sub-period returns geometrically linked; no annualisation under one year",
  "endpoint": "/faculty/msc-investment-management/time_weighted_return",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "values",
      "flows",
      "years"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "values": {
        "type": "array",
        "description": "Market value at each valuation date, start to end",
        "items": {
          "type": "number"
        }
      },
      "flows": {
        "type": "array",
        "description": "External flow just after each valuation except the last (negative = withdrawal)",
        "items": {
          "type": "number"
        }
      },
      "years": {
        "type": "number",
        "description": "Length of the whole period in years",
        "minimum": 0.0001,
        "maximum": 100
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "subPeriodReturns",
      "twr",
      "annualisedReturn"
    ],
    "properties": {
      "subPeriodReturns": {
        "type": "array",
        "description": "Each sub-period return (6 dp)",
        "items": {
          "type": "number"
        }
      },
      "twr": {
        "type": "number",
        "description": "Linked time-weighted return"
      },
      "annualisedReturn": {
        "type": "number",
        "description": "Annualised when the period is at least a year; otherwise null"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "values": [
      1000000,
      1050000,
      1200000,
      1180000
    ],
    "flows": [
      0,
      100000,
      -50000
    ],
    "years": 1
  }
}