As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Does anyone have any code around calculating a geometric average? I can't seem to find any and there is no prefix operator for this type of calculation.
Please help.
Thanks!
Posts: 19 | Location: Springfield, MA | Registered: May 04, 2004
Me also, so I did a web search. Geometric mean in simple terms, if I interpret correctly. Say you have N values. Get the Product of the values and then take the Nth root of the values.
Say N {1,2,3} product is 1*2*3 = 6 so then you'd have to find what number 'cubed' would give 6.
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
The harmonic mean is always less than the geometric mean, which is always less than the arithmetic mean. geometric mean = (x1 * x2 * x3 * x4 * ...)**(1/n) harmonic mean = 1/ [((1/x1)+(1/x2)+(1/x3)+(1/x4)...)/n] you can use Geometric Mean to calculate average growth rate given compound interest with variable rates. The harmonic mean is the reciprocal of the arithmetic mean of reciprocals. ps: you know that taking a root is the same as exponentiating to its reciprocal, yes? square root of x = x**(1/2) so that's how you do it in focus. where there's a will,....there's a way!
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
I too Googled 'geometric average' (not mean) and found the following definition:
The Geometric Average is the time weighted average compound rate of return. Geometric average is the most common method used to measure and compare investment manager performance for periods over one year.
Thanks everyone for your ideas. I know the formula for the calculations but am having a hard time coming up with how to implement it with a data set of performance results for an investment portfolio.
Thoughts or examples??
Posts: 19 | Location: Springfield, MA | Registered: May 04, 2004
PRODUCT in Excel? Are you sure? It's nowhere near geometric averages (or any other average for that matter ).
From Excel -
If cells A2:C2 contain 5, 15, and 30: PRODUCT(A2:C2) equals 2,250
e.g. 5 * 15 * 30 If this is what you really want then I would probably use FML (SRL, FRL, EMR or whatever it's called nowadays), using a RECAP in the required column / row, as it can be easier to manipulate the cell data than using straight forward reporting.
If this is really what you want then try and build an example using the GGSALES file to show us your report structure and advise where and how your product column should be.
e.g.
TABLE FILE GGSALES SUM CNT.ST AS 'Num of,States' -* Could have used AVE.DOLLARS but it only gives an integer COMPUTE AVG_DOLLARS/D20.2 = SUM.DOLLARS / CNT.ST; AS 'Avg,Dollars' COMPUTE AVG_BUDDOLL/D20.2 = SUM.BUDDOLLARS / CNT.ST; AS 'Avg,Budget,Dollars' COMPUTE PRODUCT/D20.2 = AVG_DOLLARS * AVG_BUDDOLL; FOR REGION 'Midwest' OVER 'Southeast' OVER 'Northeast' OVER 'West' OVER "" END
This message has been edited. Last edited by: <Maryellen>,
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
in focus (1.05+1.06+1.05)**(1/3) is the geometric mean of these return rates. 19% is not, repeat NOT the geometric mean. Its just compounded. Lets make it more interesting 1.05, 1.09, 1.07 The geometric mean is 1.069875 or 6.9875% the aggregate return is 22.4615% the annual average of the aggregate return is ((1.05*1.09*1.07)-1)/3 or 7.4872% There is nothing about the word geometric that applies to your revised question.
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003