Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/smbl64/losing-streak
- Owner: smbl64
- License: mit
- Created: 2021-12-28T10:31:35.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-28T10:38:55.000Z (almost 3 years ago)
- Last Synced: 2024-12-01T00:49:34.984Z (22 days ago)
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 period2 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%.