Hi Everyone,
I'm having trouble marrying the earnings date data from my csv with my stock data. I've set up a test algorithm that buys a stock 4 days before earnings and sells the day after earnings (it's not something i'd actually use).
The problem I'm having is that when looping through each stock, the earnings data isn't matching up with each stock. Instead, each stock is using the last known earnings data that gets pulled in.
Any suggestions on how to fix? (Also, does anyone have suggestions on how I can have the code read just the earnings date from the csv and then calculate the 4 days before and 1 day after? I manually entered the extra dates in the csv.)
Thanks for any help!