Nantes Paradox Market

    xnpv

    1.0.0 • Public • Published

    you can use package as following: -

    import XNPV from 'xnpv'; import moment from 'moment';

    let cashflows = [0,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000]; let dates = []; dates.push(moment('22-01-2021','DD-MM-YYYY')); let date = moment('28-01-2021','DD-MM-YYYY')

    //you can give Date objects as well

    while(dates.length<13){ dates.push(date.clone()); date = date.add(1,'M'); } if rate is 22% you can pass it as 0.22 console.log(XNPV(0.22,cashflows,dates))

    Keywords

    Install

    npm i xnpv

    DownloadsWeekly Downloads

    1

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    1.21 kB

    Total Files

    3

    Last publish

    Collaborators

    • dev.amandeep