How can I represent sequential data on the growth of an investment such that calculating the mean, and other...












0












$begingroup$


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).










share|cite|improve this question









$endgroup$












  • $begingroup$
    Do you want your mean for your example to be something like $$14$ or $1.4$? Or something like $1$?
    $endgroup$
    – Henry
    Jan 7 at 13:37










  • $begingroup$
    I want the mean to be the mean gain per sample, whether that's an increase or a decrease, and agnostic to the principle initally invested. So accross 5 days I might be able to say "market gained 5% per day", or "lost 20% per day".
    $endgroup$
    – Duncan Marshall
    Jan 7 at 14:32










  • $begingroup$
    So in your example, do you want to say the mean growth rate was $0%$ because the end point was the same as the starting point?
    $endgroup$
    – Henry
    Jan 7 at 14:45












  • $begingroup$
    Yes. On average, the price of oil grew 0%.
    $endgroup$
    – Duncan Marshall
    Jan 7 at 15:54










  • $begingroup$
    I think with your representation the only meaningful is to multiply to obtain the relation between initial and current capital. A sum won't give you a meaningful result since, as you said, every number represents a relation and $frac{a}{b}+frac{c}{d}neq frac{a+c}{b+d}$.
    $endgroup$
    – James
    Jan 7 at 16:07


















0












$begingroup$


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).










share|cite|improve this question









$endgroup$












  • $begingroup$
    Do you want your mean for your example to be something like $$14$ or $1.4$? Or something like $1$?
    $endgroup$
    – Henry
    Jan 7 at 13:37










  • $begingroup$
    I want the mean to be the mean gain per sample, whether that's an increase or a decrease, and agnostic to the principle initally invested. So accross 5 days I might be able to say "market gained 5% per day", or "lost 20% per day".
    $endgroup$
    – Duncan Marshall
    Jan 7 at 14:32










  • $begingroup$
    So in your example, do you want to say the mean growth rate was $0%$ because the end point was the same as the starting point?
    $endgroup$
    – Henry
    Jan 7 at 14:45












  • $begingroup$
    Yes. On average, the price of oil grew 0%.
    $endgroup$
    – Duncan Marshall
    Jan 7 at 15:54










  • $begingroup$
    I think with your representation the only meaningful is to multiply to obtain the relation between initial and current capital. A sum won't give you a meaningful result since, as you said, every number represents a relation and $frac{a}{b}+frac{c}{d}neq frac{a+c}{b+d}$.
    $endgroup$
    – James
    Jan 7 at 16:07
















0












0








0


0



$begingroup$


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).










share|cite|improve this question









$endgroup$




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).







linear-algebra statistics






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 7 at 12:42









Duncan MarshallDuncan Marshall

1




1












  • $begingroup$
    Do you want your mean for your example to be something like $$14$ or $1.4$? Or something like $1$?
    $endgroup$
    – Henry
    Jan 7 at 13:37










  • $begingroup$
    I want the mean to be the mean gain per sample, whether that's an increase or a decrease, and agnostic to the principle initally invested. So accross 5 days I might be able to say "market gained 5% per day", or "lost 20% per day".
    $endgroup$
    – Duncan Marshall
    Jan 7 at 14:32










  • $begingroup$
    So in your example, do you want to say the mean growth rate was $0%$ because the end point was the same as the starting point?
    $endgroup$
    – Henry
    Jan 7 at 14:45












  • $begingroup$
    Yes. On average, the price of oil grew 0%.
    $endgroup$
    – Duncan Marshall
    Jan 7 at 15:54










  • $begingroup$
    I think with your representation the only meaningful is to multiply to obtain the relation between initial and current capital. A sum won't give you a meaningful result since, as you said, every number represents a relation and $frac{a}{b}+frac{c}{d}neq frac{a+c}{b+d}$.
    $endgroup$
    – James
    Jan 7 at 16:07




















  • $begingroup$
    Do you want your mean for your example to be something like $$14$ or $1.4$? Or something like $1$?
    $endgroup$
    – Henry
    Jan 7 at 13:37










  • $begingroup$
    I want the mean to be the mean gain per sample, whether that's an increase or a decrease, and agnostic to the principle initally invested. So accross 5 days I might be able to say "market gained 5% per day", or "lost 20% per day".
    $endgroup$
    – Duncan Marshall
    Jan 7 at 14:32










  • $begingroup$
    So in your example, do you want to say the mean growth rate was $0%$ because the end point was the same as the starting point?
    $endgroup$
    – Henry
    Jan 7 at 14:45












  • $begingroup$
    Yes. On average, the price of oil grew 0%.
    $endgroup$
    – Duncan Marshall
    Jan 7 at 15:54










  • $begingroup$
    I think with your representation the only meaningful is to multiply to obtain the relation between initial and current capital. A sum won't give you a meaningful result since, as you said, every number represents a relation and $frac{a}{b}+frac{c}{d}neq frac{a+c}{b+d}$.
    $endgroup$
    – James
    Jan 7 at 16:07


















$begingroup$
Do you want your mean for your example to be something like $$14$ or $1.4$? Or something like $1$?
$endgroup$
– Henry
Jan 7 at 13:37




$begingroup$
Do you want your mean for your example to be something like $$14$ or $1.4$? Or something like $1$?
$endgroup$
– Henry
Jan 7 at 13:37












$begingroup$
I want the mean to be the mean gain per sample, whether that's an increase or a decrease, and agnostic to the principle initally invested. So accross 5 days I might be able to say "market gained 5% per day", or "lost 20% per day".
$endgroup$
– Duncan Marshall
Jan 7 at 14:32




$begingroup$
I want the mean to be the mean gain per sample, whether that's an increase or a decrease, and agnostic to the principle initally invested. So accross 5 days I might be able to say "market gained 5% per day", or "lost 20% per day".
$endgroup$
– Duncan Marshall
Jan 7 at 14:32












$begingroup$
So in your example, do you want to say the mean growth rate was $0%$ because the end point was the same as the starting point?
$endgroup$
– Henry
Jan 7 at 14:45






$begingroup$
So in your example, do you want to say the mean growth rate was $0%$ because the end point was the same as the starting point?
$endgroup$
– Henry
Jan 7 at 14:45














$begingroup$
Yes. On average, the price of oil grew 0%.
$endgroup$
– Duncan Marshall
Jan 7 at 15:54




$begingroup$
Yes. On average, the price of oil grew 0%.
$endgroup$
– Duncan Marshall
Jan 7 at 15:54












$begingroup$
I think with your representation the only meaningful is to multiply to obtain the relation between initial and current capital. A sum won't give you a meaningful result since, as you said, every number represents a relation and $frac{a}{b}+frac{c}{d}neq frac{a+c}{b+d}$.
$endgroup$
– James
Jan 7 at 16:07






$begingroup$
I think with your representation the only meaningful is to multiply to obtain the relation between initial and current capital. A sum won't give you a meaningful result since, as you said, every number represents a relation and $frac{a}{b}+frac{c}{d}neq frac{a+c}{b+d}$.
$endgroup$
– James
Jan 7 at 16:07












0






active

oldest

votes












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3064967%2fhow-can-i-represent-sequential-data-on-the-growth-of-an-investment-such-that-cal%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3064967%2fhow-can-i-represent-sequential-data-on-the-growth-of-an-investment-such-that-cal%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wiesbaden

Marschland

Dieringhausen