function ytmcalc(){var principal=document.getElementById('principal').value;var mvalue=document.getElementById('mvalue').value;var rate=document.getElementById('rate').value;var ci=document.getElementById('ci').value;var time=document.getElementById('time').value;var irate=document.getElementById('rate').value /(ci*100);var pvalue;if(time < 12/ci) pvalue=0; else pvalue=document.getElementById('principal').value *irate; var yield;yield=((pvalue) * (1)* (Math.pow((1+irate),((time)*ci/12))-1*1)/(irate))+document.getElementById('principal').value*1-mvalue * 1;document.getElementById('yield').value=Math.round (yield*100)/100;document.getElementById('mv').value=Math.round ((yield *12*100 /(time *mvalue))*100)/100+' %';document.getElementById('ayield').value=Math.round(((pvalue) * (1)* (Math.pow((1+irate),((12)*ci/12))-1*1)/(irate))*100)/100;document.getElementById('apyield').value=Math.round((((pvalue) * (1)* (Math.pow((1+irate),((12)*ci/12))-1*1)/(irate))*100/mvalue)*100)/100+' %';} // Widget Code by https://karvitt.com/widgets/

Welcome to calculate yield

A resource to calculate bond and equity yields

Leave a Reply

Your email address will not be published. Required fields are marked *