Closed happydasch closed 2 years ago
Are we saying that the user should be able to call the data for a backtest without any dates? Would it be preferable to make the user input dates?
I tried to keep it close to other feeds which work without a fromdate but was also unsure about that. Usually what happens without fromdate is fetching latest data.
I like this and there was an error in the original code as well. I think this line can be simplified:
else:
# use a date far away for fromdate if not provided
period1 = (date(1980, 1, 1) - posix).total_seconds()
to
period1 = 0
No point calculating the integer difference to 1980. Just go back to posix, which when subtracting itself, would be zero.
i will squash the commits but am having a problem with some data files.
I created a new pull request with just the files needed to be committed and closed this one. I have some issues with two data files being shown as modified when doing a clean git check out.
YahooDinanceData fromdate, todate fix
both params are needed in request. added default values if dates not provided, fixed also wrong todate check