A method for optimizing and controlling the energy consumption of a building, the method comprising: generating, by a first computing device, a set of thermal response coefficients for the building based on energy characteristics of the building and weather data associated with the location of the building; predicting, by the first computing device, an energy response of the building based on the set of thermal response coefficients and forecasted weather associated with the location of the building; comparing, by the first computing device, the predicted energy response of the building to a predicted energy response of one or more other buildings; ranking, by the first computing device, the predicted energy response of the building based on the comparison; selecting, by the first computing device, minimal energy requirements of the building based on an energy consumption cost associated with the building and a comfort preference provided by an occupant of the building determining, by the first computing device, one or more temperature set points for the building based on the energy response and the minimal energy requirements; and transmitting, by the first computing device, the one or more temperature set points to a thermostat of the building; determining, by a second computing device, one or more temperature set points that change the energy response of the building to use less energy and diverge from the comfort preference; and transmitting, by a second computing device, the determined temperature set points to the thermostat of the building; determining, by a first computing device, a price for energy available to be supplied to the building; determining, by the first computing device, an amount of stored energy associated with the building based on the energy response and the minimal energy requirements, wherein the amount of stored energy is determined at different points during a given time period; and transmitting, by the first computing device, an energy consumption action to the thermostat of the building based on the amount of stored energy and the price for energy. generating, by a first computing device, a set of thermal response coefficients for the building based on energy characteristics of the building and weather data associated with the location of the building; predicting, by the first computing device, an energy response of the building based on the set of thermal response coefficients and forecasted weather associated with the location of the building; comparing, by the first computing device, the predicted energy response of the building to a predicted energy response of one or more other buildings; ranking, by the first computing device, the predicted energy response of the building based on the comparison; selecting, by the first computing device, minimal energy requirements of the building based on an energy consumption cost associated with the building and a comfort preference provided by an occupant of the building determining, by the first computing device, one or more temperature set points for the building based on the energy response and the minimal energy requirements; and transmitting, by the first computing device, the one or more temperature set points to a thermostat of the building; determining, by a second computing device, one or more temperature set points that change the energy response of the building to use less energy and diverge from the comfort preference; and transmitting, by a second computing device, the determined temperature set points to the thermostat of the building; determining, by a first computing device, a price for energy available to be supplied to the building; determining, by the first computing device, an amount of stored energy associated with the building based on the energy response and the minimal energy requirements, wherein the amount of stored energy is determined at different points during a given time period; and transmitting, by the first computing device, an energy consumption action to the thermostat of the building based on the amount of stored energy and the price for energy.