{
  "tool": "msc-investment-management.modified_dietz",
  "name": "Modified Dietz return (CDU-BUS-INV-900)",
  "answers": "When the portfolio was not valued at each flow, what return does the Modified Dietz method approximate?",
  "degree": {
    "id": "competency:msc-investment-management",
    "code": "CDU-BUS-INV-900",
    "name": "MSc Investment Management",
    "version": "1.0.0"
  },
  "reference": "Dietz, P. O. (1966) Pension Funds: Measuring Investment Performance; GIPS 2020 — an approximation of the time-weighted return for sub-periods between valuations",
  "endpoint": "/faculty/msc-investment-management/modified_dietz",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "beginningValue",
      "endingValue",
      "flows",
      "flowTiming"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "beginningValue": {
        "type": "number",
        "description": "Market value at the start",
        "minimum": 0.01
      },
      "endingValue": {
        "type": "number",
        "description": "Market value at the end",
        "minimum": 0
      },
      "flows": {
        "type": "array",
        "description": "External flows in the period (negative = withdrawal)",
        "items": {
          "type": "number"
        }
      },
      "flowTiming": {
        "type": "array",
        "description": "When each flow happened, as the fraction of the period elapsed (0–1)",
        "items": {
          "type": "number"
        }
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "netFlows",
      "weightedFlows",
      "modifiedDietz"
    ],
    "properties": {
      "netFlows": {
        "type": "number",
        "description": "Σ flows"
      },
      "weightedFlows": {
        "type": "number",
        "description": "Σ (1 − timing)·flow"
      },
      "modifiedDietz": {
        "type": "number",
        "description": "The return"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "beginningValue": 1000000,
    "endingValue": 1180000,
    "flows": [
      100000,
      -50000
    ],
    "flowTiming": [
      0.25,
      0.75
    ]
  }
}