I installed and loaded "FinCal" package in r. When I give command "hpr2bey(hpr=0.34345,t= 7)" I got the following answer.
t = number of months remaining until maturity,
hpr = holding period return.
hpr2bey(0.34345,7)
[1] 0.5759305
I don't understand how is that computed in 'FinCal' package in r?
Would any member explain this answer?
First of all you convert the period yield for 7 months into an equivalent yield for 6 months (semi-annual).
$$i_6=(1+i_7)^{\frac67}-1$$
$$i_6=(1+0.34345)^{\frac67}-1\approx 0.28796526$$
Finally you double this yield: $2\cdot i_6=0.57593052$. This is the bond equivalent yield (bey) for bonds, which have two semi-annual coupon payments.