Thursday, July 3, 2014

Javascript Function To calculate Real Rate Of Return

//Function To calculate Real Rate Of Return
function RROR(futureinflationrate, futurerfrexpected) {
    var result;
    futureinflationrate = eval(futureinflationrate / 100);
    futurerfrexpected = eval(futurerfrexpected / 100);
    result = eval((100 * (1 + futurerfrexpected) - 100 * (1 + futureinflationrate)) / (100 * (1 + (futureinflationrate * 100) / 100)) * 100);
    return result;
}
//end Of RROR

No comments:

Post a Comment