This script can be used to calculate lifetime value of a customer (time frame is in months). I've also generated some plots such as the one below (used for a lifetime value analysis with time frame in weeks)
Further work might include segmentation of customers and analysis on their lifetime value.
