How can I represent sequential data on the growth of an investment such that calculating the mean, and other statistical formulae still work?

24 Views Asked by At

I have a sequence of figures representing the price of oil, and want to pretend I invested in it, and then calculate my mean investment growth per day, and also do various things like test the statistical significance of the sample.

Perhaps the dataset looks as follows:

$10 $20 $10 $20 $10

I'm not interested in the absolute price, and I need to abstract that away (I'm testing the ROI of an investment strategy, and therefore absolute figures irrelevant), so instead I represent the above data as such:

1 2 0.5 2 0.5

Every number in that second set represents in decimal how the price moved. It's essentially "today's price ÷ yesterday's price." You can run any amount of capital through sequence, and it'll tell you what you would have made if you'd stayed in the market for oil.

On average, we've made a 0% ROI, therefore the number should be 1.

Except it isn't. Sum(1, 2, 0.5, 2, 0.5) ÷ 5 = 1.2, wrongly implying I made 20%. Obviously I can just multiply all the numbers together, but that's not how the formula for mean, or standard deviation, or confidence intervals work.

The problem here is the decreases in price are not equal in magnitude to similar sized increases in price.

Is there some form I can use to represent this price movement in a way that I can still calculate mean, and so on. Such that halving is worth the exact opposite of doubling, and so on?

Is it something to do with logarithms perhaps?

(I'm a programmer, and therefore terrible at math, hence the sketchy description. Sorry).