class_docstr: Stock is a support class of `pyrtfolio` which validates the Stocks before adding them to StockPortfolio.
  
  This class is a support class to validate the Stocks before finally adding them to the portfolio created in
  StockPortfolio since the historical data of the introduced Stock needs to be retrieved and, so on, it will error
  if the introduced Stock is not valid.
  
  Attributes:
      stock_symbol (:obj:`str`): symbol of the Stock that is going to be added to the StockPortfolio.
      stock_country (:obj:`str`): country from where the specified stock_symbol is, so to validate it.
      purchase_date (:obj:`str`):
          date when the shares of the introduced stock were bought, formatted as dd/mm/yyyy.
      num_of_shares (:obj:`int`): amount of shares bought of the specified Stock in the specified date.
      cost_per_share (:obj:`float`): price of every share of the Stock in the specified date.
      valid (:obj:`boolean`): either True or False if the Stock is valid or not, respectively.
class_docstr_tok: ["Stock","is","a","support","class","of","`","pyrtfolio","`","which","validates","the","Stocks","before","adding","them","to","StockPortfolio",".","This","class","is","a","support","class","to","validate","the","Stocks","before","finally","adding","them","to","the","portfolio","created","in","StockPortfolio","since","the","historical","data","of","the","introduced","Stock","needs","to","be","retrieved","and",",","so","on",",","it","will","error","if","the","introduced","Stock","is","not","valid",".","Attributes",":","stock_symbol","(",":","obj",":","`","str","`",")",":","symbol","of","the","Stock","that","is","going","to","be","added","to","the","StockPortfolio",".","stock_country","(",":","obj",":","`","str","`",")",":","country","from","where","the","specified","stock_symbol","is",",","so","to","validate","it",".","purchase_date","(",":","obj",":","`","str","`",")",":","date","when","the","shares","of","the","introduced","stock","were","bought",",","formatted","as","dd\/mm\/yyyy",".","num_of_shares","(",":","obj",":","`","int","`",")",":","amount","of","shares","bought","of","the","specified","Stock","in","the","specified","date",".","cost_per_share","(",":","obj",":","`","float","`",")",":","price","of","every","share","of","the","Stock","in","the","specified","date",".","valid","(",":","obj",":","`","boolean","`",")",":","either","True","or","False","if","the","Stock","is","valid","or","not",",","respectively","."]
docstr: This is the init method of Stock class which is launched every time the user instances it.
  
  This method is the init method of this class, Stock, and its main function is to init all the attributes
  contained in it, as previously defined when the function `add_stock()` was called from StockPortfolio. The
  specified values in this class are going to be accessed through the self operator whenever the validation
  function is called, since it is the main function of this class, validating Stocks.
  
  Args:
      stock_symbol (:obj:`str`): symbol of the Stock that is going to be added to the StockPortfolio.
      stock_country (:obj:`str`): country from where the specified stock_symbol is, so to validate it.
      purchase_date (:obj:`str`):
          date when the shares of the introduced stock were bought, formatted as dd/mm/yyyy.
      num_of_shares (:obj:`int`): amount of shares bought of the specified Stock in the specified date.
      cost_per_share (:obj:`float`): price of every share of the Stock in the specified date.
docstr_tok: ["This","is","the","init","method","of","Stock","class","which","is","launched","every","time","the","user","instances","it",".","This","method","is","the","init","method","of","this","class",",","Stock",",","and","its","main","function","is","to","init","all","the","attributes","contained","in","it",",","as","previously","defined","when","the","function","`","add_stock","(",")","`","was","called","from","StockPortfolio",".","The","specified","values","in","this","class","are","going","to","be","accessed","through","the","self","operator","whenever","the","validation","function","is","called",",","since","it","is","the","main","function","of","this","class",",","validating","Stocks",".","Args",":","stock_symbol","(",":","obj",":","`","str","`",")",":","symbol","of","the","Stock","that","is","going","to","be","added","to","the","StockPortfolio",".","stock_country","(",":","obj",":","`","str","`",")",":","country","from","where","the","specified","stock_symbol","is",",","so","to","validate","it",".","purchase_date","(",":","obj",":","`","str","`",")",":","date","when","the","shares","of","the","introduced","stock","were","bought",",","formatted","as","dd\/mm\/yyyy",".","num_of_shares","(",":","obj",":","`","int","`",")",":","amount","of","shares","bought","of","the","specified","Stock","in","the","specified","date",".","cost_per_share","(",":","obj",":","`","float","`",")",":","price","of","every","share","of","the","Stock","in","the","specified","date","."]
code: def __init__(
      self,
      stock_symbol,
      stock_country,
      purchase_date,
      num_of_shares,
      cost_per_share,
  ):
      """This is the init method of Stock class which is launched every time the user instances it.
  
      This method is the init method of this class, Stock, and its main function is to init all the attributes
      contained in it, as previously defined when the function `add_stock()` was called from StockPortfolio. The
      specified values in this class are going to be accessed through the self operator whenever the validation
      function is called, since it is the main function of this class, validating Stocks.
  
      Args:
          stock_symbol (:obj:`str`): symbol of the Stock that is going to be added to the StockPortfolio.
          stock_country (:obj:`str`): country from where the specified stock_symbol is, so to validate it.
          purchase_date (:obj:`str`):
              date when the shares of the introduced stock were bought, formatted as dd/mm/yyyy.
          num_of_shares (:obj:`int`): amount of shares bought of the specified Stock in the specified date.
          cost_per_share (:obj:`float`): price of every share of the Stock in the specified date.
  
      """
      self.stock_symbol = stock_symbol
      self.stock_country = stock_country
      self.purchase_date = purchase_date
      self.num_of_shares = num_of_shares
      self.cost_per_share = cost_per_share
  
      self.valid = False
  
imports: import datetime
  import investpy
label_desc: Use image node_id 1 to create a new Stock object from inherited base classes: object with example: obj = Stock(stock_symbol, stock_country, purchase_date, num_of_shares, cost_per_share)