The Trade Encouragement Factor, TEF, and Money Management, MM() - page 2

 
ubzen:

engcomp: Now go and pick the WORST period. If you still get positive TEF instead of negative, you have hit pay-dirt.

I tried to find the worse period by looking at the report form 1999-now. I actually did find that time in December of 1999 when it lost 10 trades in a row. So instead of writing down the results of 20 trades and averaging them, I decided I'll let the back-tester do the work by enter that time frame. However, the results were totally positive and different and I should have expected that because my system looks at history sometimes to determine the direction of a new trade.

However, I decided to just keep going 2 weeks back from recent times until I found really bad result. I didn't have to look too far. From 6/6/2010 to 6/20/2010. It generated 22 trades, here are the results :(

win% 36
AvgWin 52
AvgLoss 65
Real_R 0.8
Zero_R 1.777777778
Safe_R 3.846153846
TEF -0.472727273

What you should do now is this:

Look at the twenty trades just before the start of the bad stage and see what the TEF was at that point, i.e. how many lots you would have traded based on TEF

Then go forward one trade at a time, dropping trade #21, and see at what point TEF would have avoided the loss.

At the end of the bad period, TEF would keep you away from a potentially good trade.

Keep going forward one trade at a time to see at what point TEF would let you trade again.

 
Errr, At what point does TEF let me stop trading? By default the system starts with 0.1 lots and that's the minimum I can go. I doubt It'll bump the lots up within 40 trades. I guess, I can solve that by starting with $10,000 instead of $5,000 would you recommend that? Or also, I could take 4% risk instead of the 1.3% risk by default.
 
ubzen:
Errr, At what point does TEF let me stop trading? By default the system starts with 0.1 lots and that's the minimum I can go. I doubt It'll bump the lots up within 40 trades. I guess, I can solve that by starting with $10,000 instead of $5,000 would you recommend that? Or also, I could take 4% risk instead of the 1.3% risk by default.

ubzen, I just emailed a revised version of the TEF spreadsheet.

Overwrite the data of the first twenty lines with the data prior to a bad period.

This sets up the initial TEF value.

Then keep adding trade data and copy the formula line down. The TEF will be updated automatically.

I am very curious how this works out for you.

 

For the Period of 5/23/2010---7/08/2010. 4% risk. Starting with lot size 0.20. This is 2 weeks before the bad period. Also include the good 2 weeks after. The results below shows the first 23 Trades. I'm gonna follow-up as trades are added. I'm Guessing we're looking for when TEF hits Negative? Posting this in case moving the formulas screws my spreadsheet. Of-course I have a copy however attached is a text file which should give you some data in the mean-time in case I'm doing it wrong.

 

 

count    win     loss           win%    AvgWin          AvgLoss         Real_R          Zero_R          Safe_R          TEF             TSSF
1        $40.00                 27      623             155             4.019354839     2.703703704     5.882352941     0.413902585     0.683290323
                 $192.00        40      799             307             2.602605863     1.5             3.333333333     0.60142138      0.780781759
1        $40.00                 95      10              150             0.066666667     0.052631579     1.176470588     0.012488522     0.056666667
1        $259.00                68      100             53              1.886792453     0.470588235     1.724137931     1.129755144     1.094339623
                 $192.00                                                                
1        $230.00                                                                        
1        $44.40                                                                         
1        $100.00                        Instructions                                            
                 $35.60                 For winning trades, put a 1 in cell A the win amount in cell B and leave cell C blank                                           
1        $100.00                        For losing trades, leave cells A and B blank and put the loss in cell C                                         
                 $100.00                Drag the row of formulas to the last row of data                                                
                 $77.60                                                                 
1        $100.00                                                                        
                 $74.00                                                                 
                 $90.00                                                                 
                 $75.60                                                                 
1        $40.00                                                                         
                 $74.60                                                                 
1        $100.00                                                                        
                 $90.00         50       $52.67          $50.07         1.051927302     1               2.5             0.034618201     0.420770921
1        $259.40                50       $63.64          $50.07         1.271020571     1               2.5             0.180680381     0.508408228
                 $48.00         50       $63.64          $42.87         1.484487987     1               2.5             0.322991991     0.593795195
                 $126.00        45       $61.64          $49.17         1.253609925     1.222222222     2.857142857     0.019198303     0.438763474
count    win     loss           win%     AvgWin          AvgLoss        Real_R          Zero_R          Safe_R          TEF             TSSF

Files:
results_1.txt  17 kb
 
ubzen:

For the Period of 5/23/2010---7/08/2010. 4% risk. Starting with lot size 0.20. This is 2 weeks before the bad period. Also include the good 2 weeks after. The results below shows the first 23 Trades. I'm gonna follow-up as trades are added. I'm Guessing we're looking for when TEF hits Negative? Posting this in case moving the formulas screws my spreadsheet. Of-course I have a copy however attached is a text file which should give you some data in the mean-time in case I'm doing it wrong

Beautiful, ubzen

I am counting down twenty trades and see that the TEF is 0.034...

Assume that this means we won't take the next trade (a reasonable assumption).

As a result, we missed a profit of $259.40, which boosted the TEF to 0.18, not enough to take the next trade, saving us a loss of $48.

But now the TEF is 0.32... (because a big loss at #21 dropped off) so we take the trade and lose $126.

You have created a beautiful demonstration of the vagaries of forex. Thank you.

 
engcomp:

Beautiful, ubzen

I am counting down twenty trades and see that the TEF is 0.034...

Assume that this means we won't take the next trade (a reasonable assumption).

As a result, we missed a profit of $259.40, which boosted the TEF to 0.18, not enough to take the next trade, saving us a loss of $48.

But now the TEF is 0.32... (because a big loss at #21 dropped off) so we take the trade and lose $126.

You have created a beautiful demonstration of the vagaries of forex. Thank you.


And thank you too. I'll be working on trying to program/test a modified version of this into some money management function kinda like you and WHRoeder. Thank you too WHRoeder for sharing your code. I like the emphasis on free-margin, I'll be sure to keep an hawk-eye on that from now on. 

 

What I have in mind is: Because my sub-systems have different magic#'s, maybe it'll work better searching for 20 trades on X magic# in history. If the TEF is below 0.5 then trade that sub-system with minimum lots regardless of account size. That way I can skip the complications of learning to program Dummie orders for use in future calculations. Also, I wouldn't have to mis-out on orders which may generate a profit. To summarize, this approach feels like the classic bet less as you lose and more as you win. This is what money management is all about. :) 

 
engcomp:
I notice that you put a period in some variable names. Does that do anything special or is it just a name like any other?

Dots are just like underscores.

My pattern: global variables have dots. Captialized with dots are externals. Mostly the dots are used in C++'s object.member style (TSSF, TSSF.max)

No dots are local variables. I use underscores as spaces for all caps constants (OP_BUY)

 
WHRoeder:

Dots are just like underscores.

My pattern: global variables have dots. Captialized with dots are externals. Mostly the dots are used in C++'s object.member style (TSSF, TSSF.max)

No dots are local variables. I use underscores as spaces for all caps constants (OP_BUY)

Thank you for the explanation. Sounds like a good scheme one should adopt.