Demand response as a distributed resource has proved its significant potential for power systems. It is capable of providing flexibility that, in some cases, can be an advantage to suppress the unpredictability of distributed generation. The ability for participating in demand response programs for small or medium facilities has been limited; with the new policy regulations this limitation might be overstated. The prosumers are a new entity that is considered both as producers and consumers of electricity, which can provide excess production to the grid. Moreover, the decision-making in facilities with different generation resources, energy storage systems, and demand flexibility becomes more complex according to the number of considered variables. This paper proposes a demand response optimization methodology for application in a generic residential house. In this model, the users are able to perform actions of demand response in their facilities without any contracts with demand response service providers. The model considers the facilities that have the required devices to carry out the demand response actions. The photovoltaic generation, the available storage capacity, and the flexibility of the loads are used as the resources to find the optimal scheduling of minimal operating costs. The presented results are obtained using a particle swarm optimization and compared with a deterministic resolution in order to prove the performance of the model. The results show that the use of demand response can reduce the operational daily cost.