How to pass calculate Extrapolated Annualized Return test case

Actually, I am confused how to pass calculateExtrapolatedAnnualizedReturn() this test case and where we have to call getstokequotes ???

Hey @Jitender, See you just have to follow instruction and todo’s given. When you’re able to write whole logic and code in module 3. And getting error in calculateExtrapolatedAnnualizedReturn() Just use debugger for it. To track your logic and find where is the problem.

Why should i ask these types of questions if todo’s are clear. In the test file as well i am not getting what that test file are going to check amd how.

See, You’re test files are using Mockito, which is like mocking your API calls (NOT actually calling it). It then just sending PortfolioTrade list list in calculate Annualized return upto some date (end date). And then uses Assertions.assertEquals() to check your output with Actual output. It actually doesn’t extrapolate anything it’s just checking data between 2019-01-02 and 2019-12-12. See test files present in Portfolio folder.

What should i return in that function?

Annualized Return list of every portfolio trade

Then how it will check for get stocks

Calculate ExtrapolatedAnualizedReturn Test Cases means that you have not implemented your calculation logic properly can you check again?
You can refer to this FAQ
https://forum.crio.do/t/extrapolated-annualized-return-test-case-fails/8062/2