Fun brain teaser.
I am making calls to an API where I am limited to my calls.
I have a dataset that contains 471 unique equities, each equity has between 12 and 16 dates.
In total there are 741 unique dates.
The data set is 7536 rows.
Each call I can put in as many tickers and as many dates. However, I am limited to 5000 rows per call.
I am also limited to 80 calls for the month.
Which algorithm does the least calls but includes all dates and tickers in the whole data set?
Example of one call. Pull data for AAPL, MSFT, IBM on "2019-01-01, 2018-01-01". Would return 6 rows. AAPL data for 2019-01-01 and 2018-01-01, MSFT data for both dates and IBM data for both dates.
I uploaded the data set with tickers and dates. I believe I have to do an iterative process but I thought I'd ask here for fun while I work on a for loop.
p.s. I'll also share data set with the first person to solve(if solvable)!
I am making calls to an API where I am limited to my calls.
I have a dataset that contains 471 unique equities, each equity has between 12 and 16 dates.
In total there are 741 unique dates.
The data set is 7536 rows.
Each call I can put in as many tickers and as many dates. However, I am limited to 5000 rows per call.
I am also limited to 80 calls for the month.
Which algorithm does the least calls but includes all dates and tickers in the whole data set?
Example of one call. Pull data for AAPL, MSFT, IBM on "2019-01-01, 2018-01-01". Would return 6 rows. AAPL data for 2019-01-01 and 2018-01-01, MSFT data for both dates and IBM data for both dates.
I uploaded the data set with tickers and dates. I believe I have to do an iterative process but I thought I'd ask here for fun while I work on a for loop.
p.s. I'll also share data set with the first person to solve(if solvable)!