Hub
Pricing About
WorkflowWorkflow

Financial _ R Script _ XNPV - XIRR Calculation

R ScriptJrvFinanceXNPVXIRR
gonhaddock profile image
Draft Latest edits on 
Nov 27, 2021 9:32 PM
Drag & drop
Like
Download workflow
Workflow preview
Workflow created for the KNIME forum ... https://forum.knime.com/t/r-script-calculate-npv-irr-and-xnpv-xirr-workflows/37634 DESCRIPTION: The challenge in this project was to calculate in KNIME, XNPV and XIRR for spaced cash flows; these incomes do not need to occur at regular intervals, then a time vector reference is needed. R Script is the approach selected for this challenge, by using the R jrvFinance packace's algorithms. The code is not sensitive to column names; however the second column feeding the 'Tabe to R' has to be Time in 'Decimal Years' (Numeric), and 'Dates' has to be placed in the first column. "This R package implements the basic financial analysis functions similar to (but not identical to) what is available in most spreadsheet software." (Jayanth Varma @ https://github.com/jrvarma/jrvFinance) A cross-check of the workflow results vs function implemented in Google Sheets is available at Links section in this description; returning a XNPV difference in the range of ~10E-4. These differences may occur because of the Time conversion. For any comment or bug realted to the workflow, please do not hesitate to leave your comment. DISCLAIMER: The sharing of knowledge in KNIME Hub by using these examples and models, have only demonstration purposes in the advantage of the KNIME community. These are meant to clarify theoretical background of mentioned subjects in caption. I will not be held responsibility for any damages arising from the use of these models in your investment/valuation related work, without taking formal advise.

External resources

  • Cross Check Results vs Google Sheets Function
  • GitHub jrvarma / jrvFinance
Loading deploymentsLoading ad hoc jobs

Used extensions & nodes

Created with KNIME Analytics Platform version 4.4.2
  • Go to item
    KNIME Base nodesTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.4.2

    knime
  • Go to item
    KNIME Interactive R Statistics IntegrationTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.4.2

    knime
  • Go to item
    KNIME JavasnippetTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.4.2

    knime
  • Go to item
    KNIME Math Expression (JEP)Trusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.4.0

    knime

Legal

By using or downloading the workflow, you agree to our terms and conditions.

KNIME
Open for Innovation

KNIME AG
Talacker 50
8001 Zurich, Switzerland
  • Software
  • Getting started
  • Documentation
  • Courses + Certification
  • Solutions
  • KNIME Hub
  • KNIME Forum
  • Blog
  • Events
  • Partner
  • Developers
  • KNIME Home
  • Careers
  • Contact us
Download KNIME Analytics Platform Read more about KNIME Business Hub
© 2025 KNIME AG. All rights reserved.
  • Trademarks
  • Imprint
  • Privacy
  • Terms & Conditions
  • Data Processing Agreement
  • Credits