Recently one of us derived the action of modified gravity consistent with the holographic and new-agegraphic dark energy. In this paper, we investigate the stability of the Lagrangians of the modified gravity as discussed in (Setare in Int J Mod Phys D 17:2219, 2008; Setare in Astrophys Space Sci 326:27, 2010). We also calculate the statefinder parameters which classify our dark energy model.