Proactive Energy Optimization in Residential Buildings with Weather and Market Forecasts