This paper aims to value deposit insurance when the asset allocations of the bank's deposit invest the loans and the stocks under a stochastic interest rate setting. We derive a closed-form formula on the premium of the deposit insurance while considering early closure, capital forbearance, financial leverage and moral hazard. Moreover, we investigate the impacts of the bank's asset allocation, early closure and capital forbearance on premiums of deposit insurance. Finally, several numerical experiments are conducted to analyze the source of premiums, to compare to Merton's deposit insurance put (1997), and to explore the way that the bank's maintain ratio, debt-to-asset ratio, portfolio shares of risky assets and moral hazard from banks and depositors affect premiums.