I am modeling the minute prices of stocks and I obtain the data using the alpaca_trade_api
from Python:
api = tradeapi.REST(api_key, secret_key, 'https://paper-api.alpaca.markets')
data = api.get_barset('AAPL', 'minute', end=datetime.datetime(2020, 11, 5, 10, 00, 0, 0,
timezone('US/Eastern')).isoformat(), limit=1)
However, the data is not adjusted on splits or dividends, and it will screw up the models if the splits or dividends occur (i.e. stock prices will have a very sharp increase or decrease). Is there a good way to obtain the adjusted price automatically?