Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/smbl64/losing-streak

Calculate the probability of seeing at least X consecutive losing trades within a N-trade period
https://github.com/smbl64/losing-streak

Last synced: 18 days ago
JSON representation

Calculate the probability of seeing at least X consecutive losing trades within a N-trade period

Awesome Lists containing this project

README

        

# Losing streak

A simply Go application to calculate the probability of seeing at least X consecutive losing trades within a N-trade period.

Output with the default parameters:
```
Probability of seeing at least (X) consecutive losing trades within a 50-trade period

2 3 4 5 6 7 8 9 10 11
5% 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0
10% 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0
15% 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 99.9
20% 100.0 100.0 100.0 100.0 100.0 100.0 100.0 99.8 99.1 97.2
25% 100.0 100.0 100.0 100.0 100.0 99.8 98.9 96.2 90.7 82.2
30% 100.0 100.0 100.0 100.0 99.6 97.7 92.2 82.3 69.1 55.0
35% 100.0 100.0 100.0 99.7 97.1 89.0 75.2 58.5 42.6 29.6
40% 100.0 100.0 99.9 97.6 88.4 71.3 51.7 34.6 22.0 13.5
45% 100.0 100.0 98.9 90.7 71.7 49.1 30.3 17.6 9.9 5.4
50% 100.0 99.8 95.2 76.8 50.8 29.2 15.5 7.9 3.9 1.9
55% 100.0 99.0 86.0 57.5 31.3 15.2 7.0 3.1 1.4 0.6
60% 100.0 95.8 70.4 37.7 16.9 7.0 2.8 1.1 0.4 0.2
65% 99.8 87.8 50.9 21.5 7.9 2.8 1.0 0.3 0.1 0.0
70% 99.0 73.1 31.8 10.6 3.2 1.0 0.3 0.1 0.0 0.0
75% 95.8 53.0 16.8 4.4 1.1 0.3 0.1 0.0 0.0 0.0
80% 86.5 32.0 7.2 1.5 0.3 0.1 0.0 0.0 0.0 0.0
85% 67.2 15.0 2.4 0.3 0.1 0.0 0.0 0.0 0.0 0.0
90% 38.9 4.7 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0
95% 11.5 0.6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
```

In the table above you can see that there is a `71.3%` chance of seeing at least 7 consecutive losing trades with a winning rate of 40%.