Global warming is one of the most threatening occurrences of the twenty-first century, harmfully impacting the lives of many of the creatures on this planet. Renewable energy resources, therefore, are becoming more favorable each and every day due to being emission free and environmentally friendly, in addition to being abundantly free. One of the downfalls of these resources, however, is their dependency on natural weather conditions and their stochastic behavior. Therefore, first, it is essential to have the ability to forecast the demand and generation of the grid, in order to be able to prepare for situations that can be predicted; and second, it is beneficial to install and utilize energy storage systems in order to have the ability to store the excess energy generated by the resources and save it for times when the demand is at its peak as well as critical situations that lead to the shortage of renewable resources. This dissertation focuses on forecasting demand and generation of a smart microgrid and evaluating the cost efficiency of utilizing energy storage resources, based on real time data. Such data are employed to assess the performance, demonstrate the effectiveness and verify the reliability of the proposed optimization and forecasting methods. The different forecasting methods used are: Auto-Regressive Integrated Moving Average (ARIMA), Support Vector Machines (SVM), Polynomial Regression, and Neural Networks (NN). The accuracy of the obtained models and the forecast values for demand, costs, irradiance, and generated power are evaluated using Mean Absolute Percentage Error (MAPE) and Mean Squared Error (MSE). Furthermore, this dissertation proposes a long term planning optimization and expansion for a smart microgrid, in order to achieve optimal power flow and increased reliability and flexibility for the grid. The objective is to minimize the cost of installing renewable energy resources, such as Photo-Voltaic (PV) solar panels, as well as energy storage systems (Lithium-ion and Vanadium Redox Flow batteries), in addition to cost of operation over the following 20 years. Index Terms— Smart Microgrid, Energy Storage, Energy Management, Optimization, Demand Response, Renewable Energy Resources, Mixed-integer Second Order Cone Programming.