Buying and selling price

How to get the buying and selling price of a stock in order to calculate the totalReturns in the function mainCalculateSingleReturn()?

Hey, did you read the TODO’s carefully, clearly it is mentioned. What is buy price and sell price.

You need to use the getter methods exposed by the TiingoCandle class in which you mapped your API response with

Low and high are buying and selling price?

Please read the TODO
Its specifically mentioned
Everything is clearely written

In TODO, formuale of totalReturns is given. There is no definition of buying and selling price.

Check the whole file.
You will see it

ohh. got it. thanks.

Buy is open value and Sell is close value of the end date. Now in order to get these values you can use the getters specified in the TiingoCandle.java file. Hope this solves your query :slight_smile: