Depending on your provider, but there could be an "Adjusted Close" (Yahoo has it) which includes stock splits and dividends. I tried a few backtesting libraries, thought backtesting.py[1] was easy to work with and straight to the point.
Thanks. I've heard that yahoo finance historical price data is usually pretty accurate, but can get it wrong sometimes. Is there a better source for price data, or is yahoo finance good enough in your experience?
Good enough for daily time-frames, and since you don't have to pay.