A while ago I was wondering how you could decide how much to pay for a cash producing asset. For example, how do you decide how much to pay for a stock (that produces dividends) or an apartment (that produces rental income)?

Investors assess the value of such an asset by using a Discounted Cash Flow (DCF) valuation. The basic idea is that to determine what price you should pay for an asset today, you sum up all the cash the asset will generate over its lifetime. You'll need to discount the cash flows the asset will generate in the future, because of the time value of money, i.e., a dollar now is worth more than a dollar some time in the future.