I didn't write out enough to fully explain the idea. Here is the wiki page where you can find the details: https://en.wikipedia.org/wiki/Stochastic_discount_factor