Selma uses the Cape Ratio to work this out. The Cape Ratio is the price divided by the avg. 10 years of earnings adjusted for inflation. You can see more about CAPE here.