Optimization of Dynamic Portfolio Insurance Model