Wharton marketing professor J. Scott Armstrong has been working on forecasting elections since 2004.