I am unable to pass this test case. I have done the following steps:
- found the purchase value using tiingo and purchaseDate and stored it in a ArrayList.
- Found the endDate price of each stock and stored it in a second array, if the price is not available for endDate then the date just before the endDate for which the price is available has been used.
- Applied the formula on the values obtained from each of the array.
- Stored it in a third array and finally sorted the list in decreasing order.
I have been facing this issue since the last two days. Please help.