Program 1. Computing the using the general formula (26) restart: Digits:=8: N:=10: K:=floor(N/2): t:=1: r[0]:=1: kappa:=1: theta:=0.45: sigma:=1: A:=exp(1)**(-kappa*t)*r[0]+theta*(1-exp(1)**(-kappa*t)): B:=sigma*exp(1)**(-kappa*t): expect:=evalf(add(binomial(N,j)*A**(K-2*j)*B**(2*j)* ((1/(2*kappa))*(exp(1)**(2*kappa*t)-1)),j=0..K)); M. A. Jafari et al. The Moments for Solution of the Cox-Ingersoll-Ross Interest Rate Model. Journal of Finance and Economics, 2017, Vol. 5, No. 1, 34-37. doi:10.12691/jfe-5-1-4 © The Author(s) 2015. Published by Science and Education Publishing.