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: This is the init method of StockPortfolio class which is launched every time the user instances it.
  
  This method is the init method of this class, StockPortfolio, and its main function is to init all the
  attributes contained in it. Every time this class is instanced, the attributes values are restored and, so on,
  the portfolio's data is lost if existing for that instance. This class does not take any parameters since 
  they are filled once the class is instanced.
docstr_tok: ["This","is","the","init","method","of","StockPortfolio","class","which","is","launched","every","time","the","user","instances","it",".","This","method","is","the","init","method","of","this","class",",","StockPortfolio",",","and","its","main","function","is","to","init","all","the","attributes","contained","in","it",".","Every","time","this","class","is","instanced",",","the","attributes","values","are","restored","and",",","so","on",",","the","portfolio","'s","data","is","lost","if","existing","for","that","instance",".","This","class","does","not","take","any","parameters","since","they","are","filled","once","the","class","is","instanced","."]
code: def __init__(self):
      """This is the init method of StockPortfolio class which is launched every time the user instances it.
  
      This method is the init method of this class, StockPortfolio, and its main function is to init all the
      attributes contained in it. Every time this class is instanced, the attributes values are restored and, so on,
      the portfolio's data is lost if existing for that instance. This class does not take any parameters since
      they are filled once the class is instanced.
  
      """
      self._stocks = list()
      self._stock_objs = list()
      self.data = None
  
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 1 to create a new StockPortfolio object from inherited base classes: object with example: obj = StockPortfolio()