"use strict";

const request = require("./util").request;

function getRiskFreeRateFromYahoo(callback) {

    // US Treasury Bonds Rates 3 Month
    const url = "https://query1.finance.yahoo.com/v8/finance/chart/%5EIRX";

    request({
        url
    }, (err, response, body) => {
        let res,
            rf;

        if (!err) {
            res = JSON.parse(body);
            rf = res.chart.result[0].indicators.quote[0].close[0];
        }

        callback(err, rf);
    });
}
exports.getRiskFreeRateFromYahoo = getRiskFreeRateFromYahoo;

@@ -406,36 +406,31 @@
 %5B0%5D.
-indicators.quote%5B0%5D.close%5B0%5D
+meta.regularMarketPrice
 ;%0A  

Fix Risk Free Rate