This is the least affordable homes have been in the nation since at least 2012, according to a new study.