{
  "tool": "mba.npv_irr",
  "name": "NPV, IRR and payback (CDU-BUS-MBA-900)",
  "answers": "Is a stream of cash flows worth the investment at a discount rate, what return does it earn, and when does it pay back?",
  "degree": {
    "id": "competency:mba",
    "code": "CDU-BUS-MBA-900",
    "name": "Master of Business Administration",
    "version": "1.0.0"
  },
  "reference": "NPV at the discount rate; IRR by bisection; simple payback on cumulative cash",
  "endpoint": "/faculty/mba/npv_irr",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "cashflows"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "cashflows": {
        "type": "array",
        "description": "Cash flows by period, first is the investment (negative), e.g. -1000, 300, 400, 500",
        "items": {
          "type": "number"
        }
      },
      "discountRate": {
        "type": "number",
        "description": "Discount rate per period, 0–1",
        "minimum": 0,
        "maximum": 1,
        "default": 0.12
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "npv",
      "irr",
      "paybackPeriods",
      "accept"
    ],
    "properties": {
      "npv": {
        "type": "number",
        "description": "Net present value at the discount rate"
      },
      "irr": {
        "type": "number",
        "description": "Internal rate of return per period (null when none)"
      },
      "paybackPeriods": {
        "type": "number",
        "description": "Periods until cumulative cash turns positive (null when never)"
      },
      "accept": {
        "type": "boolean",
        "description": "NPV > 0"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "cashflows": [
      -5000,
      2000,
      2500,
      3000
    ]
  }
}