Net Present Value (NPV) is defined as the sum of the present values of the individual cash flows.
Solely relying on NPV will not address the overall loss or gain of actually executing a technology initiative. Many times internal rate of return is used as a complement to NPV when attempting to better understand a percentage gain relative to the investments made for a project.
What about adjusting for risk by adding a premium to the discount rate? A bank may certainly charge a higher rate of interest for a riskier project, but that does not mean this is a valid NPV approach to adjusting for risk. If some risk is incurred leading to a loss, then a discount rate in the NPV will reduce the impact of the loss below its accurate financial cost. You might want to consider a risk approach that requires identifying and valuing risks explicitly and thus explicitly calculating the cost of financing any/all losses incurred.
What happens when the amount of cash (inflow minus outflow) is generally negative late in a project (e.g., a custom component(s) Service-Level Agreement is offered (and must be paid) just prior to project sign-off)? The company owes money, so a high discount rate is overly idealistic. A reasonable solution for consideration is to calculate the cost of financing a situation such as the one described above.