How do I multiply points in a series?

Asked by Marcus Holmgren

I have a data serie that is the quota of current balance of an account, divided be the last known value. For example: 1.01, 0.99, 1.01, 1.00, 1.00, 1,02 etc

I want to multiply all points in the serie to get a compounded graph, but I just cant figure out how to do that?

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
Marcus Holmgren
Solved:
Last query:
Last reply:
Revision history for this message
Denis Zhdanov (deniszhdanov) said :
#1

You need to multiply values to some constant? Just use scale() function - https://graphite.readthedocs.io/en/latest/functions.html#graphite.render.functions.scale

Revision history for this message
Marcus Holmgren (muzzle75) said :
#2

No, I need to multiply all points in the serie with each other

Revision history for this message
Denis Zhdanov (deniszhdanov) said :
#3

Ah, OK. Unfortunately, it's quite a rare operation in time series analysis, so, IIRC no such function exist in Graphite.

Revision history for this message
Marcus Holmgren (muzzle75) said :
#4

Thank you for your help! Actually I just managed to modify the Integral function in functions.py to multiply instead of summarize, so I think it should work now.

Revision history for this message
Denis Zhdanov (deniszhdanov) said :
#5

Yes, that should work, indeed!