Friday, February 16, 2018

Comparing Classical and Non-Parametric Tests with Outliers




The Classical  t-test versus the Wilcoxon Rank Sum Test

Question:   In a previous post, I discussed differences in sales growth for 35 growth firms and 35 value firms.  

Previous Post is Here:


The raw data used to construct the statistics presented in this post can be found in a financial data spreadsheet found here.


Use the data to conduct the classical t-test of the null hypothesis that the mean sales growth variable for the growth firms is not equal to the mean sales growth value for the value firms.

Use the data to conduct the Wilcoxon Rank Sum test for differences in the rank sums of the two samples.


Why do the test results differ so starkly?

Analysis:   The t-statistic from the classical test on difference between mean sales growth for the two funds is t =   0.6580.   The p-value for the two-tailed alternative is Pr(|T| > |t|) = 0.5128.

We fail to reject the null hypothesis of identical means at any commonly accepted level of significance.

The chart below gives rank sum and expected rank sum for the two populations.




Fund
Sample Sizer
Observed Rank
Exepected Rank
Difference
Growth
35
1437.5
1242.5
195
Value
35
1047.5
1242.5
-195


The difference between actual and expected rank (195)  is divided by the standard error (85.1)  calculated in STATA to get a z-score of 2.3 and a p-value of 0.02.

Implications:   The classical t-test indicates the differences between means of revenue growth rates for growth and value funds are NOT significant. 

The non-parametric Wilcoxon Rank Sum Test finds differences in the populations are highly significant.


The outliers in both samples is the reason why classical tests fail to find a significant relationship between revenue growth of growth and value funds.

Saturday, February 10, 2018

Annual Rate of Return and Holding Periods for Day Traders



Annual Rate of Return and Holding Periods for Day Traders


This question is question 16 in my excel finance function tutorial.   For the complete tutorial go here.



Question:   A person makes several stock purchases and places a stop-loss order at 96 percent of the purchase price and a sell a limit order at 104 percent of the purchase price.

Create a table that calculates the average annual return on the transaction for various holding periods under the assumption that a stock price either increases or decreases 4 percent?

What are the limitations of using average annual rate of return statistics to measure day-trading returns?

What do these statistics suggest about the risk of day trading?

Calculation of Relationship of Annual Rate of Return on Holding Periods:


Average Annual Rate of Return Statistics For Day Traders
Holding Period
Beginnning Date
End Date
Beginning Price
End Priice
XIRR
Four Percent Gain
1
1/1/18
1/2/18
-100
104
164880228.8%
2
1/1/18
1/3/18
-100
104
128305.7%
3
1/1/18
1/4/18
-100
104
11713.8%
4
1/1/18
1/5/18
-100
104
3483.4%
5
1/1/18
1/6/18
-100
104
1651.6%
6
1/1/18
1/7/18
-100
104
986.9%
7
1/1/18
1/8/18
-100
104
673.0%
8
1/1/18
1/9/18
-100
104
498.6%
9
1/1/18
1/10/18
-100
104
390.7%
10
1/1/18
1/11/18
-100
104
318.5%
11
1/1/18
1/12/18
-100
104
267.4%
12
1/1/18
1/13/18
-100
104
229.7%
13
1/1/18
1/14/18
-100
104
200.8%
14
1/1/18
1/15/18
-100
104
178.0%
15
1/1/18
1/16/18
-100
104
159.7%
Four Percent Loss
1
1/1/18
1/2/18
-100
96
-100.0%
2
1/1/18
1/3/18
-100
96
-99.9%
3
1/1/18
1/4/18
-100
96
-99.3%
4
1/1/18
1/5/18
-100
96
-97.6%
5
1/1/18
1/6/18
-100
96
-94.9%
6
1/1/18
1/7/18
-100
96
-91.7%
7
1/1/18
1/8/18
-100
96
-88.1%
8
1/1/18
1/9/18
-100
96
-84.5%
9
1/1/18
1/10/18
-100
96
-80.9%
10
1/1/18
1/11/18
-100
96
-77.5%
11
1/1/18
1/12/18
-100
96
-74.2%
12
1/1/18
1/13/18
-100
96
-71.1%
13
1/1/18
1/14/18
-100
96
-68.2%
14
1/1/18
1/15/18
-100
96
-65.5%
15
1/1/18
1/16/18
-100
96
-63.0%



Methodological Note:  The annual rate of return statistics for the various holding periods are calculated by inputting the cash flow range and the date range into the XIRR function.


Financial Discussion:

People who day trade can quickly report a large negative or positive annual returns.

In most cases the average annual return is not useful because the actual loss or gain is at most 4 percent and the money  will sit idly unless the trader quickly takes a new position

Do stop loss orders make sense?

The stop loss order assures that the maximum loss is 4 percent.  A trader takes all gains when there is a 4 percent increase in value and does not sell the losers she will end up with a portfolio of losers.

However, in many cases, a stock that falls 4 percent in value is a better value than when it was originally purchased.

Day trading is a tough game.