Please suggest me how to calculate stress accumulation and strain using gps displacements for understanding the occurrence of failure (earthquakes).....
What you're asking for is not a trivial task, but you could have a look at e.g. Stevens & Avouac (2015; doi:10.1002/2015GL064845) and references therein for obtaining moment accumulation rates based on GPS information. This is only one side of the coin however; if you want to understand the occurrence of earthquakes, you also need information about the rheology (mechanics) of a fault
The simple answer to get to strain from displacements is to find the deformation matrix that connects initial to final positions. If you are working in 3D that would be a 3D tensor. If you could assume plane strain the matrix would be simpler. Basically the displacements would be longitudinal and angular and you could go about quantifying those depending on your problem. If your data consist of GPS displacements, it is the longitudinal strain (typically N and E) that is significant and you can look at "baselines" that shorten or extend in the direction that is most important to you. As Stress and Strain tensors are connected through the Rheology tensor, you would need to have information about the rheology of the deforming material to be able to go from strain to stress (as Martijn correctly pointed out above). If the deformation is near surface then elastico-frictional laws typically apply. Other wise you could opt for quasi-plastic or viscoelastic rheologies.
The accumulation of stress is related to blocks movement (plate velocity) if the velocity is observed 2 mm/year and last known event occur 1000 years ago. Then stress build up for 1000 years, and cause a deformation of 2 meter slip along the fault plane. However, you may consider the elastic rebound theory and re-occurrence interval for the strain analysis.
There is grid_strain software availabe , if you write the mail to the responsible professor. They will send to u. if you want to write your own code. I can help u.