Reply

What is your minimum number of trades per year?

4 replies

C C

Customer, bbp_participant, community, sq-ultimate, 13 replies.

Visit profile

2 years ago #277033

Hi, I would like to ask a question about what the minimum number of trades should be in order to evaluate the statistical significance of the trading system. What is your minimum number of trades per year that a trading system must have in the IS sample? Valid in both Futures and Forex. Thank you

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

2 years ago #277074

Hello,

it is strictly related to strategy logic. It can be as low as 8 trades per year for strategies trading certain special occasions like US FOMC statements or similar. Still the strategy can be good over years. From the purely statistical point of view it is preferred to see at least hundreds if not thousands of trades.. The more the better for sure

0

C C

Customer, bbp_participant, community, sq-ultimate, 13 replies.

Visit profile

2 years ago #277080

In statistics it is believed that a certain degree of significance is valid if the test is applied to a sufficiently large data set, otherwise the positive results obtained could lead to positive evaluations but which in reality are not reliable.
I think it is important before creating strategies with software like SQ, it is important to define the number of samples (trade) necessary for a correct reliability of the performances and related metrics. Some believe that to help us research the minimum number of trades, we can rely on the Cochran Formula:
n = (Z) ^ 2 (p) (q) / (e) ^ 2
n = minimum number of trades,
Z = Z score (variable based on Confidence level% example 95%)
p = currently known result (for example 50% win rate for the strategy)
e = margin of error (for example 5%).

On this information I have created 2 snippets on the basis that, the sample number should consider both the number of data of the IS period, and the winning percentage that the system develops.
Alternatively, even just one of these.

I am attaching the codes created to be imported with CodeEditor:
1) CochranTotalDataDays.java
provides a fixed number of trades based on the length of the IS period, taking into consideration a probability that the market is 50% Long and 50% Short and with a confidence level of 95% and a margin of error of 5%;

2) CochranFormula.java
like the previous one but considering the probability of winning of the trading system.

They are currently being evaluated by inserting one or the other snippet within the “Filter generated initial population” function as follows:
“# of trade> = CochranTotalDataDays”.
Max generation = 100
Population size = 100
crossover = 93%
mutation = 30%
Migrate every x generation = 87
Rate = 6%
Islands = 10

I plan to further customize the code by changing the confidence level (eg from 80% to 95%) and the margin of error.
let me know what you think or how to improve.
Greetings

2

eastpeace

Customer, bbp_participant, community, sq-ultimate, 305 replies.

Visit profile

2 years ago #277410

C C

Good idea, CC

And no attachment file here yet.

0

James Menefee

Subscriber, bbp_participant, customer, community, 4 replies.

Visit profile

1 year ago #281398

What I do is calculate the population size from the time frame i’m using in the chart and then use that population size to give me a sample size with 95% confidence level.

Invariably the sample size nearly always comes out to around to about 400 trades in 15 years.  That’s about 2.2 trades per month, and would give you about 26 trades per year, or once per week.

If I were using 4h bars for the last 10 years, it would be:

6 bars per day, 21 days per month, 12 months per year, 10 years or 15,120 total population size.  I throw it in my sample size calculator, and it says 376 trades for 95% confidence or 638 trades for 99% confidence.

 

0

Viewing 4 replies - 1 through 4 (of 4 total)