out of sample calculation code