class_docstr: StockPortfolio is the main class of `pyrtfolio` which is going to manage all the introduced stocks.
  
  This class is the one that contains the stocks information and the one that will be used by the user in order to
  generate a custom portfolio. So on, this function implements the methods to calculate all the values required in a
  basic portfolio and, as already mentioned, the method to add stocks.
  
  Attributes:
      stocks (:obj:`list`, protected):
          this list contains all the introduced stocks, which will later be used to generate the portfolio.
      stock_objs (:obj:`list`, protected):
          this list contains all the introduced Stock objects, in order to be able to refresh them.
      data (:obj:`pandas.DataFrame`): it is the generated portfolio, once the addition of every stock is validated.
class_docstr_tok: ["StockPortfolio","is","the","main","class","of","`","pyrtfolio","`","which","is","going","to","manage","all","the","introduced","stocks",".","This","class","is","the","one","that","contains","the","stocks","information","and","the","one","that","will","be","used","by","the","user","in","order","to","generate","a","custom","portfolio",".","So","on",",","this","function","implements","the","methods","to","calculate","all","the","values","required","in","a","basic","portfolio","and",",","as","already","mentioned",",","the","method","to","add","stocks",".","Attributes",":","stocks","(",":","obj",":","`","list","`",",","protected",")",":","this","list","contains","all","the","introduced","stocks",",","which","will","later","be","used","to","generate","the","portfolio",".","stock_objs","(",":","obj",":","`","list","`",",","protected",")",":","this","list","contains","all","the","introduced","Stock","objects",",","in","order","to","be","able","to","refresh","them",".","data","(",":","obj",":","`","pandas.DataFrame","`",")",":","it","is","the","generated","portfolio",",","once","the","addition","of","every","stock","is","validated","."]
docstr: Method to refresh/reload the StockPortfolio information.
  
  This method is used to refresh or reload the StockPortfolio information since the values may have changed
  since the last time the portfolio was generated. So on, this function will return to get the information
  from every Stock listed in the StockPortfolio.
docstr_tok: ["Method","to","refresh\/reload","the","StockPortfolio","information",".","This","method","is","used","to","refresh","or","reload","the","StockPortfolio","information","since","the","values","may","have","changed","since","the","last","time","the","portfolio","was","generated",".","So","on",",","this","function","will","return","to","get","the","information","from","every","Stock","listed","in","the","StockPortfolio","."]
code: def refresh(self):
      """Method to refresh/reload the StockPortfolio information.
  
      This method is used to refresh or reload the StockPortfolio information since the values may have changed
      since the last time the portfolio was generated. So on, this function will return to get the information
      from every Stock listed in the StockPortfolio.
  
      """
      if len(self._stock_objs) > 0:
          self._stocks = list()
          for stock_obj in self._stock_objs:
              info = self.__get_stock_info(stock=stock_obj)
              self._stocks.append(info)
          self.data = pd.DataFrame(self._stocks)
  
file_path: pyrtfolio/pyrtfolio/StockPortfolio.py
imports: from datetime import date
  import investpy
  import pandas
  from pyrtfolio.Stock import Stock
label_desc: Use image node_id 4 for calling the StockPortfolio obj's underlying member method code with example usage: obj.refresh() without return types