This paper studied the cost allocation for the unfunded liability in a defined benefit pension scheme incorporating the stochastic phenomenon of its returns. In the recent literature represented by Cairns and Parker [Insurance: Mathematics and Economics 21 (1997) 43], Haberman [Insurance: Mathematics and Economics 11 (1992) 179; Insurance: Mathematics and Economics 13 (1993) 45; Insurance: Mathematics and Economics 14 (1994) 219; Insurance: Mathematics and Economics 14 (1997) 127], Owadally and Haberman [North American Actuarial Journal 3 (1999) 105], the fund level is modeled based on the plan dynamics and the returns are generated through several stochastic processes to reflect the current realistic economic perspective to see how the contribution changed as the cost allocation period increased. In this study, we generalize the previous constant value assumption in cost amortization by modeling the returns and valuation rates simultaneously. Taylor series expansion is employed to approximate the unconditional and conditional moments of the plan contribution and fund level. Hence the stability of the plan contribution and the fund size under different allocation periods could be estimated, which provide valuable information adding to the previous works.