<p>Generally, it's a combination of 2 and 3.</p>
<p>You can't predict that a stock will go up and down in cycles. Stock prices move randomly. Let's say you're looking at one stock, and it goes down so your algorithm buys some and waits for it to go back up. What happens if it never goes back up higher than it started as? Then you lost money.</p>
<p>Even worse: Even if it does go back to where it started with, you still lost money. Stocks have an overall upward trend, so you have to make more than a certain amount of money, or otherwise you would've been better off by just buying random stocks!</p>
<p>Why do stock prices move randomly? According to the &quot;Efficient Market Hypothesis&quot;, stocks move randomly because all non-random information is already being exploited by other people (point 3) until it stops being profitable to do so. Thousands of people might get a couple of cents each from the fluctuations.</p>
<p>When something has a regular fluctuation - like ice-cream prices perhaps - there's a reason. Maybe (hypothetically, if ice-cream prices fluctuated a lot) you could make money by buying ice-cream in winter and selling it in summer. You'd have to have a big refrigerated warehouse, and that would be a legitimate way to make money, it wouldn't just be a financial gain.</p>

CC BY-SA 4.0
2020-07-24T22:10:37.597Z
I'm reading up on EMH, (I think got this in high school in a simplified manner). The way I understand it, this would cover both ice cream and stocks, as there exists no information about the ice cream that wouldn't be available to anyone else also, leaving only a refrigeration service, as you said. So I'm looking at basic economic theory, just from another angle, that makes sense. If I understand correctly that also means that some lucky person _could_ be exploiting a predictable fluctuation right now, but only by virtue of the the fact that only they know about it. I'd say it's also 5.
Douwe
CC BY-SA 4.0
2020-07-24T22:33:14.430Z
Yes, my entire line of reasoning reduces neatly to EMH. Thank you.
Douwe
CC BY-SA 4.0
2020-07-24T21:31:01.087Z
2020-07-24T21:31:01.087Z
Criticize SE actions means ban
<p>This sort-of happens when a currency is pegged (or similar). The central bank tries to keep its currency within the band, and it is profitable to trade on that basis.</p>
<p>So long as investors believe that the band can hold, they will keep the price of the currency within that band on their own.</p>
<p>However, if the credibility of the peg is questioned, it can be extremely profitable to position for a move outside the band. You have limited risk if the peg holds, but a large profit if it breaks. (Look up the history of the failure of the Exchange Rate Mechanism (ERM), from which the UK git ejected.)</p>
<p>There is a literature on “self-fulfilling currency runs,” but it would be challenging reading for someone new to the field.</p>

CC BY-SA 4.0
2020-07-24T21:16:14.953Z
2020-07-24T21:16:14.953Z
Brian Romanchuk
<p>I was writing some code akin to a sound limiter when it occurred to me that if you could find something fluctuating in price between two extremes (what and when those extremes would be isn't relevant I think, just the fact that between those extremes there exists a space where the &quot;signal&quot; would always return to) you could theoretically leverage that in a market setting.</p>
<p>If such fluctuations had sine-wave like properties you could write an algorithm that &quot;buys&quot; below zero and &quot;sells&quot; above zero and generate a profit this way. (I'm using quotes because I really don't mean to exclusively ask about financial markets or stocks, just any exchange that fits the description)</p>
<p>This raises some possibilities:</p>
<ol>
<li>I'm the programmers answer to Einstein, I should have kept this to
myself and could have made billions.</li>
<li>The type of predictable fluctuations that are needed do not occur in reality ever. This is feels counter
intuitive to me, stocks go up and down, economies wax and wane?</li>
<li>This actually happens but the fact that it does
&quot;closes the gap&quot; so to speak, i.e. it leads to an equilibrium
because even the tiniest fluctuations are &quot;used up&quot; like this. If
so, is this a principle that has a name I could read up on?</li>
<li>This is, when talking about physical goods, entirely impractical because it
implies storage. Similar constraints exist for other kinds of
markets.</li>
<li>This is something very mundane, I'm just thinking about it
in the wrong way.</li>
<li>Something else?</li>
</ol>
<p>What's going on here?</p>
<p>I've tried finding information on this subject but I'm having a hard time formulating a query. To me, this has all the hallmarks of something that would appear either as a game in game theory or as a problem category in computer science, however it seems to me that it is essentially an economics question, that's why I'm asking it here.<br />
I've also tried asking on another site with an ill conceived practical example, but that never got me past 1, or at least the discussion never really went beyond the practical example.</p>

CC BY-SA 4.0
2020-07-24T20:13:02.253Z
Mostly 3. And 6. money.stackexchange.com has plenty of questions about this. Basically, after it goes down, and you buy, how do you know it will go up again, instead of going down some more?
Criticize SE actions means ban
CC BY-SA 4.0
2020-07-24T20:13:34.133Z
Regarding 4, that's why people trade futures contracts instead of actual goods.
Criticize SE actions means ban
CC BY-SA 4.0
2020-07-24T20:22:17.747Z
@user253751 money.stackexchange was the other site I tried, I got some useful responses but nothing pointing to the fundamentals, the theory underpinning this kind of situations. I reckoned this might be a special case of "timing the market" but should have never mentioned that, because I was told in a thousand ways that you can't. Which I know. The ideal answer to my question would be along the lines of "this is a case of abc theory and you can learn about it by querying xyz".
Douwe
CC BY-SA 4.0
2020-07-24T20:52:23.383Z
@user253751 Also, if you can't be sure the price would go up again, it would squarely fit 2 for this case. But that just covers stocks, casino's, etc. What about things that are predictably more expensive in summer than in winter? Or prices that are actively managed like oil? Do all these examples have their own special explanation of why it wouldn't work or is there a general principle that prohibits all prices of all things to never fluctuate in a predictable manner so that they could be "exploited" by a simple algorithm like this?
Douwe
CC BY-SA 4.0
2020-07-24T21:27:20.807Z
Things that are more expensive in summer than in winter are more expensive in summer than in winter for a reason. You can't buy all the ice cream in winter and then sell it in summer, unless you have a refrigerated warehouse. If you do have one, then you might be able to make some profit, but that's because you're now providing a useful service, not just leveraging fluctuations.  (This is number 4)
Criticize SE actions means ban
CC BY-SA 4.0
2020-07-24T21:27:35.330Z
As for things like stocks, well, they **don't** go up in summer and down in winter.
Criticize SE actions means ban
<game-theory><algorithms>
Generating profit by leveraging fluctuations
Douwe
# Generating profit by leveraging fluctuations

(Asked by: username_0 on 2020-07-24)

I was writing some code akin to a sound limiter when it occurred to me that if you could find something fluctuating in price between two extremes (what and when those extremes would be isn't relevant I think, just the fact that between those extremes there exists a space where the "signal" would always return to) you could theoretically leverage that in a market setting.

If such fluctuations had sine-wave like properties you could write an algorithm that "buys" below zero and "sells" above zero and generate a profit this way. (I'm using quotes because I really don't mean to exclusively ask about financial markets or stocks, just any exchange that fits the description)

This raises some possibilities:

1. I'm the programmers answer to Einstein, I should have kept this to
   myself and could have made billions.
2. The type of predictable fluctuations that are needed do not occur in reality ever. This is feels counter
   intuitive to me, stocks go up and down, economies wax and wane?
3. This actually happens but the fact that it does
   "closes the gap" so to speak, i.e. it leads to an equilibrium
   because even the tiniest fluctuations are "used up" like this. If
   so, is this a principle that has a name I could read up on?
4. This is, when talking about physical goods, entirely impractical because it
   implies storage. Similar constraints exist for other kinds of
   markets.
5. This is something very mundane, I'm just thinking about it
   in the wrong way.
6. Something else?

What's going on here?

I've tried finding information on this subject but I'm having a hard time formulating a query. To me, this has all the hallmarks of something that would appear either as a game in game theory or as a problem category in computer science, however it seems to me that it is essentially an economics question, that's why I'm asking it here.  
I've also tried asking on another site with an ill conceived practical example, but that never got me past 1, or at least the discussion never really went beyond the practical example.

**Tags:** game-theory, algorithms
> **Comments:**
> **username_1**: Mostly 3. And 6. money.stackexchange.com has plenty of questions about this. Basically, after it goes down, and you buy, how do you know it will go up again, instead of going down some more?  
> **username_1**: Regarding 4, that's why people trade futures contracts instead of actual goods.  
> **username_0**: @user253751 money.stackexchange was the other site I tried, I got some useful responses but nothing pointing to the fundamentals, the theory underpinning this kind of situations. I reckoned this might be a special case of "timing the market" but should have never mentioned that, because I was told in a thousand ways that you can't. Which I know. The ideal answer to my question would be along the lines of "this is a case of abc theory and you can learn about it by querying xyz".  
> **username_0**: @user253751 Also, if you can't be sure the price would go up again, it would squarely fit 2 for this case. But that just covers stocks, casino's, etc. What about things that are predictably more expensive in summer than in winter? Or prices that are actively managed like oil? Do all these examples have their own special explanation of why it wouldn't work or is there a general principle that prohibits all prices of all things to never fluctuate in a predictable manner so that they could be "exploited" by a simple algorithm like this?  
> **username_1**: Things that are more expensive in summer than in winter are more expensive in summer than in winter for a reason. You can't buy all the ice cream in winter and then sell it in summer, unless you have a refrigerated warehouse. If you do have one, then you might be able to make some profit, but that's because you're now providing a useful service, not just leveraging fluctuations.  (This is number 4)  
> **username_1**: As for things like stocks, well, they **don't** go up in summer and down in winter.  

---

## 2 answers

### Answer by username_1 on 2020-07-24. Score: 1 | Accepted answer

Generally, it's a combination of 2 and 3.

You can't predict that a stock will go up and down in cycles. Stock prices move randomly. Let's say you're looking at one stock, and it goes down so your algorithm buys some and waits for it to go back up. What happens if it never goes back up higher than it started as? Then you lost money.

Even worse: Even if it does go back to where it started with, you still lost money. Stocks have an overall upward trend, so you have to make more than a certain amount of money, or otherwise you would've been better off by just buying random stocks!

Why do stock prices move randomly? According to the "Efficient Market Hypothesis", stocks move randomly because all non-random information is already being exploited by other people (point 3) until it stops being profitable to do so. Thousands of people might get a couple of cents each from the fluctuations.

When something has a regular fluctuation - like ice-cream prices perhaps - there's a reason. Maybe (hypothetically, if ice-cream prices fluctuated a lot) you could make money by buying ice-cream in winter and selling it in summer. You'd have to have a big refrigerated warehouse, and that would be a legitimate way to make money, it wouldn't just be a financial gain.

> **Comments:**
> **username_0**: I'm reading up on EMH, (I think got this in high school in a simplified manner). The way I understand it, this would cover both ice cream and stocks, as there exists no information about the ice cream that wouldn't be available to anyone else also, leaving only a refrigeration service, as you said. So I'm looking at basic economic theory, just from another angle, that makes sense. If I understand correctly that also means that some lucky person _could_ be exploiting a predictable fluctuation right now, but only by virtue of the the fact that only they know about it. I'd say it's also 5.  
> **username_0**: Yes, my entire line of reasoning reduces neatly to EMH. Thank you.  

---

### Answer by username_2 on 2020-07-24. Score: 1

This sort-of happens when a currency is pegged (or similar). The central bank tries to keep its currency within the band, and it is profitable to trade on that basis.

So long as investors believe that the band can hold, they will keep the price of the currency within that band on their own.

However, if the credibility of the peg is questioned, it can be extremely profitable to position for a move outside the band. You have limited risk if the peg holds, but a large profit if it breaks. (Look up the history of the failure of the Exchange Rate Mechanism (ERM), from which the UK git ejected.)

There is a literature on “self-fulfilling currency runs,” but it would be challenging reading for someone new to the field.


---

