Is this Forex trading algorithm flawed?

82 Views Asked by At

I'll try to explain this the best I can, I'm sorry for my lack of economic concepts and terminology.

There's a Foreign Exchange Market where a trader gets to make predictions about the currency exchange rate at a given point in time, compared to the current rate at the time of making the prediction. (Two possible predictions: Higher or Lower)

The trader makes a certain investment (say USD 1 for example). They win +90% (USD 1.90) if their prediction was correct. They lose their full investment if the prediction was incorrect (USD 1). (At least that's how I understand it works)

Example for USD/CHF Market

Now, since there's two choices only: Since the answers possible would be {Higher, Lower} I'm assuming that (if predictions are completely random) there would be a 50% chance to guess incorrectly (fail), and failing multiple times in a row has a lower and lower chance based on the number of fails.

For example:

  • The chance of failing once 1/(2^1) = 50%
  • The chance of failing twice: 1/(2^2) = 25%
  • The chance of failing thrice: 1/(2^3) = 12.5%
  • The chance of failing four times: 1/(2^4) = 6.25%

etc..

Therefore, if I make sure that my investment each time I fail is increased by the amount lost on previous investments, I get more and more likely to regain all investments previously lost each time I try.

For example:

  • There's a 50% chance to invest USD 1 and fail (For USD 0.90 potential profit)
  • There's a 25% chance to invest USD 2.11 and fail (For USD 1.90 potential profit)
  • There's a 12.5% chance to invest USD 4.46 and fail (For USD 4.01 potential profit)
  • There's a chance of 6.25% chance to invest USD 9.41 and fail (For USD 8.47 potential profit)

etc..

At some point, the chance to fail should be too slim that I'd get all invested amounts back + profit.

I've created a table that describes chances of failure per attempt, as well as money required to recover losses

For me at this point, it seems that this is a guaranteed way to theoretically maintain constant winnings during exchange over extended periods of time.

In order to test my theory, I created a program that randomly generates a choice. Whether to vote Higher or Lower.

I used this program in a simulation on the real USD/CHF market.

The following were the results yielded in ordered sets of consecutive wins/losses and money gained / lost:

  • 9 wins (+8.1)
  • 4 losses (-16.98)
  • 3 wins (+19.67)
  • 1 loss (-1)
  • 2 wins (2.8)
  • 2 losses (-3.11)
  • 1 win (+4.01)
  • 3 losses (-7.57)
  • 1 win (+8.47)
  • 3 losses (-7.57)
  • 1 win (+8.47)
  • 2 losses (-3.11)
  • 1 win (+4.01)
  • 5 losses (-36.84)
  • 1 win (+37.74)
  • 2 losses (-3.11)
  • 2 wins (+4.91)
  • 1 loss (-1)
  • 2 wins (+2.80)
  • 1 loss (-1)
  • 1 win (+1.90)

The average consequent streak length is 2.2857. There have have been USD 80.29 in losses and USD 102.88 in winnings, making a net profit of USD 22.59.

While this did somewhat prove that the algorithm could theoretically maintain a positive net profit, the fact that I've managed to get 9 wins in a row makes me doubtful. The chance I've calculated for that to happen is 0.195313%. Was I really THAT lucky to get 9 wins at the very beginning of my experiment? or is this algorithm flawed?