Register at https://www.alphavantage.co/ and get a free api key. Replace XXX with your api key in stock.py, line 16: api_key = 'XXX' Run stock.py, the stock price historical data will be updated automaitcally. As an example, historical price curve fitting code can be found at function "dome_follower" in stock.py