Z-Score calculation for a win-loss streak
Z-Score calculation for a win-loss streak
Loading saved threads...
Lyrk · External communityPost link
External question — Quantitative Finance Stack Exchange
Author: Lyrk
Original post: https://quant.stackexchange.com/questions/17851
License: CC BY-SA 3.0 — https://creativecommons.org/licenses/by-sa/3.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I am trying to find the correlation between wins and losses by applying Z-Score according to formula attached below. I put them in an array by assigning 1 to wins and -1s to losers. I am trying to determine if winners follow winners or losers follow losers.
What I wanna ask is before applying Z-Score into this should I remove non-streaks from this array?
(When I include non-streaks I find Z-Score -125 which is not a logical number)
my array=[1,1,-1,1,-1,1,1,1,1,1,-1,1,-1,1...]
The formula of the z-score is
Z=(N*(R-0.5)-P)/((P*(P-N))/(N-1))^(1/2)
N - total number of trades in a series
R - total number of series of profitable and losing trades
P = 2*W*L;
W - total number of profitable trades in the series;
L - total number of losing trades in the series.
Source:
http://www.forextraders.com/forex-money-management/using-the-z-score-to-determine-trade-size.html
Quote
Report
John · External communityPost link
External answer — Quantitative Finance Stack Exchange
Author: John
Original post: https://quant.stackexchange.com/a/17855
License: CC BY-SA 3.0 — https://creativecommons.org/licenses/by-sa/3.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Your source is not particularly clear about why what they're doing is a Z-score. To give some background, what they're doing is calculating $$\frac{R-\mu_{R}}{\sigma_{R}}$$ where R is the number of runs and the mean and standard deviation are of the number of runs. It's really more of a test statistic than a Z-score per se. The denominator in their formula is actually the same standard deviation as is used in the Wald-Wolfowitz runs test but divided by $N$ (which cancels out from the mean). While I get a slightly different result if I calculate the Z-score solely using the Wald-Wolfowitz values for the mean of runs, it is conceptually the same thing.
So back to your question, you're asking if you should remove the streaks from your array before calculating the value. I would emphasize that you should not. The point of the runs test is to test the number of runs. If you remove everything that is not a run, then your test statistic is no longer valid. If you are not getting sensible numbers, there could be an issue with the calculation somewhere. I was getting perfectly sensible numbers when I was testing this.
The benefit of the original approach is that it is very easy to calculate. There are some other options that might be a little more sophisticated and could provide some interesting information. For instance, you could fit a Hidden Markov Model (HMM) that tries to estimate the probability of a win given whether the previous period was a win or not.
Quote
Report
Post Reply
Checking account access…