Thermomechanical properties of Ni57Mn21Al21Si1 melt-spun ribbons were studied as functions of temperature and applied stress. A one-time plastic deformation of the ribbons in the martensitic state brings about a two-way shape memory effect which is highly stable against number of thermocycling and is reproducible at least up to 1000 thermocycles. Influence of internal stresses on martensitic transformations was described theoretically in the terms of minimum conditions for Gibbs potential and it was shown that both internal axial stress induced by the axial deformation and internal pressure introduced during thermocycling of the alloy specimen are important for the appearance of two-way shape memory effect.