I've been doing some research into the S&P PE Ratios and the correlation to the performance of the stock market. I'm looking for a place that I can test some of my theories out. For instance, If I were to purchase and S&P index fund when the PE ratio reached a certain value and sell when it reached a different value, what would the outcome be. I've seen that Investopedia has a simulator but it only allows you to play the game moving forward not historically. Any resources would be great.
This site should help you to accomplish what you are looking for: https://www.quantopian.com