What exactly is the formula for less than a year?

I did read the article.

so for less than a year the formula is just the rate of return absolute itself right?
now there is a test case called testCalculateAnnualizedReturnGoogl which gives values 1054.00, 1348.00 as buy and sell respectively . if we apply the formula (sell_value - buy_value) / buy_value we get 0.2789373814 manually . Why is it expecting 0.298?

No, the year can be less than 1 too. Think in terms of number of days.

Which formula do i use when i think in number of days?
if i use
Annualised return = ((1 + Absolute Rate of Return) ^ (365/no. of days)) – 1
then (365/ a number less than 365) will results in a huge power.

Have you tried it? :slight_smile:
It won’t cause any errors. The power will be huge only if days are very very less.

Okay what just happened . :open_mouth: . Thank you!

If it works, please do mark it as answer and close the topic.