Calculating the Shiller PE Ratio (aka cyclically adjusted price to earnings ratio). The calculation is similar to the traditional PE ratio, however uses the simple average of the earnings over past 5 years (default is 5, can choose different) adjusted for inflation (default is the Australian CPI index however a different index can be used in the input).