Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to calculate Annualized Rate of Return

yalteryx
6 - Meteoroid

Hello Community,

 

I am looking to calculate annualized rate of return in Alteryx.  I have been able to calculate cumulative returns using the 'Multi-Row Formula' Tool but need help getting to the last step for annualized returns (if i have monthly returns for 2 years for example - the formula changes after the 2018 year-end).

 

The formula used in excel is {=PRODUCT(C$2:C14+1)^(12/COUNT(C$2:C14))-1}

Need help calculating this one in Alteryx.

 

Below is an example and how it is calculated in Excel spreadsheet (fictitious account/numbers used).

 

Account NumberDateGross ReturnCumulative Gross ReturnAnnualized Gross ReturnCumulative Excel FormulaAnnualized Excel Formula
1231/31/2018-0.963%-0.963%-0.96%  
1232/28/2018-1.131%-2.084%-2.08%  
1233/31/20180.588%-1.508%-1.51%  
1234/30/2018-0.488%-1.989%-1.99%  
1235/31/20180.491%-1.507%-1.51%  
1236/30/2018-0.039%-1.546%-1.55%  
1237/31/20180.247%-1.303%-1.30%  
1238/31/20180.501%-0.808%-0.81%  
1239/30/2018-0.345%-1.150%-1.15%  
12310/31/2018-1.089%-2.227%-2.23%  
12311/30/20180.307%-1.927%-1.93%  
12312/31/20181.572%-0.385%-0.38%{=PRODUCT($C$2:C13+1)-1}{=PRODUCT(C$2:C13+1)-1}
1231/31/20191.785%1.393%1.28%{=PRODUCT($C$2:C14+1)-1}{=PRODUCT(C$2:C14+1)^(12/COUNT(C$2:C14))-1}
1232/28/20190.106%1.500%1.28%{=PRODUCT($C$2:C15+1)-1}{=PRODUCT(C$2:C15+1)^(12/COUNT(C$2:C15))-1}
1233/31/20192.010%3.540%2.82%  
1234/30/20190.092%3.635%2.71%  
1235/31/20191.423%5.110%3.58%  
1236/30/20191.500%6.687%4.41%  
1237/31/20190.283%6.988%4.36%  
1238/31/20192.325%9.476%5.58%  
1239/30/2019-0.173%9.286%5.21%  
12310/31/20190.271%9.582%5.12%  
12311/30/20190.020%9.604%4.90%  
12312/31/20190.127%9.743%4.76%  

 

Thanks, any help would be greatly appreciated!

 

 

4 REPLIES 4
AbhilashR
15 - Aurora
15 - Aurora

@yalteryx - attached solution is an implementation of your formula. Not my best approach but the solution does work:)

 

Please mark this post as solution accepted if it satisfies your requirement.

 

yalteryx
6 - Meteoroid

Hi @AbhilashR Thanks for your prompt response! 

 

The calculations work great and certainly applies to the data set I provided.  However if I wanted to make it dynamic as opposed to hard coding the date, would that be possible? For example instead of using a ">12-31-2018" to apply the annualized calculation, is there a formula we can leverage based on "# of records or count > 12" per account?  

 

Thanks for your assistance!

AbhilashR
15 - Aurora
15 - Aurora

Hi @yalteryx, I was somewhat curious to know if my solution would work for you or not, thank you for getting back to me! As for making the criteria more dynamic with something like counter < 12, you certainly can. I have modified my previous workflow and attached here. Let me know if this works.

yalteryx
6 - Meteoroid

tweaked it a little so it can handle multiple accounts and larger sets of data but it works for us! Thank you!

Labels