Calc total profit out of percentage returns in a columns

Hi,

I’m currently trying to calc a total profit out of a starting value (e.g. $ 10.000) combined with a column where a percentage return value exists for every day in the data set (time series).

In Excel this is pretty easy but in KNIME I struggle to find a solution. Data looks like this:

Date ROI [%] Total Profit
03.01.21 01:00 10000
05.01.21 01:00 16.8 11680
07.01.21 01:00 7.3 12532.64
09.01.21 01:00 1.2 12683.03168
11.01.21 01:00 -14.5 10843.99209
13.01.21 01:00 12.3 12177.80311
15.01.21 01:00 36.8 16659.23466
17.01.21 01:00 1.8 16959.10088

How can I do this calculation in KNIME?

Hi @dev_python , you can use the Moving Aggregation node for this.

I put something together for you.

Input:
image

Output:
image

The generated numbers are the same as what you calculated.

Workflow looks like this:
image

Here’s the workflow: Calc total profit out of percentage.knwf (10.7 KB)

5 Likes

Thank you! Exactly what I was looking for!

1 Like

No problem @dev_python , happy to help.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.