Guest  

Show or hide header
Welcome Guest, posting in this forum require registration.




Forum » Community Development » Indicators » Composite Fractal Efficiency Indicator (DVCFE)

Pages: [1] 2
Author Topic: Composite Fractal Efficiency Indicator (DVCFE)
admin
Administrator
Posts: 1
admin
Post Composite Fractal Efficiency Indicator (DVCFE)
on: November 16, 2009, 14:48

http://www.dvindicators.com/indicators/DVCFE.xls

http://www.dvindicators.com/indicators/DVCFE.pdf

applecore
Member
Posts: 1
applecore
Post Re: Composite Fractal Efficiency Indicator (DVCFE)
on: November 16, 2009, 20:41

David, is this what you are expecting?

Here is how I would start something we may call “system building” from an indicator.

1st step: I check if the given indicator (CFE) would make money for a longer term at all. I did the check with excel (http://efke.hu/se/DVCFE-short.xls). If DVCFE drops below 0 = sell at close. If DVCFE raises above 0 = buy at close.
I made 3 extra columns in the file. “O” tells if we cross 0. (1=the indicator crossed zero) “P” tells if it went above 0 or below 0. (1 means we went below zero, thus we sell at close. -1 means we went above zero, thus we buy at close.) “Q” shows the money flow of our position. (If we buy it is negativ, if we sell it is positive. It is always the double of the close, since we are closing the last open position and opening a new one.) The very first and very last cell of the examined period has to be written by hand. It will be the exact value of the close. Then sum column Q. The result shows how many points would we make.

2nd step: Go further into the trades, if there are some very big winners or losers.
Big losers
a) from 23.05.2008 till 18.07.2008
b) from 13.03.2008 till 21.05.2009
c) from 16.07.2009 till 18.08.2009

and some very nice catch from 22.09.2008 till 18.02.2009. Most of the money was made during this period.

3rd step: How to avoid the big drawdowns?
a) Look for potential filters, like 200MA or RSI33, or HV.
b) Look for more sophisticated entry.
c) Use another kind of or some different exits (stop, trailing stop, time stop, target, etc.)

davidvaradi
Administrator
Posts: 29
davidvaradi
Post Re: Composite Fractal Efficiency Indicator (DVCFE)
on: November 16, 2009, 21:47

Very good work apple,

What do you think needs to be improved to use the CFE for actual trading?
How long are the average trades, and how much do we make on average?
Is the drawdown tolerable for most traders. Does CFE “work” on the Nasdaq/QQQQ , EEM or the Russell.

What do you think is the best way to use CFE? Should we take system signals only or use CFE as a filter for say the DV2 or daily follow through.

thanks a lot for joining the discussion. I will look at the spreadsheet in detail later on tonight.

cheers
dv

aomega
Member
Posts: 8
aomega
Post Re: Composite Fractal Efficiency Indicator (DVCFE)
on: November 17, 2009, 00:02

Hi guys,

I ran this strategy through Amibroker. The strategy was as follows:

//Step 1
PriceChange = abs(Close – Ref(Close, -1));
//Step 2
TenDayPriceChange = Close – Ref(Close, -10);
FirstRatio = (TenDayPriceChange / Sum(PriceChange, 10)) * -1;
//Step 3
TwoFiftyDayPriceChange = Close – Ref(Close, -250);
SecondRatio = (TwoFiftyDayPriceChange / Sum(PriceChange, 250));
//Step 4
Average = (FirstRatio + SecondRatio) / 2;

Buy = Average > 0;
Sell = Average < 0;

//Only used if testing ’stop and reverse’
Short = Sell;
Cover = Buy;

Assuming my interpretation of the indicator is correct, I got the following results on QQQQ from 2001 to present day (Long Only):

Initial capital 1000.00
Ending capital 1068.94
Net Profit 68.94 68.94
Net Profit % 6.89
Exposure % 50.14
Net Risk Adjusted Return % 13.75
Annual Return % 0.69
Risk Adjusted Return % 1.38

All trades 177
Avg. Profit/Loss 0.39
Avg. Profit/Loss % 0.18
Avg. Bars Held 7.89

Max. system % drawdown -52.51 %

I tried with other ETFs, and also with ‘Stop and reverse’ (long and short) and nothing seemed to ‘work’.

I’m not sure if the 10 day and 250 day price change is supposed to be absolute or not.

dha3936420
Member
Posts: 9
dha3936420
Post Re: Composite Fractal Efficiency Indicator (DVCFE)
on: November 17, 2009, 10:28

how about use the composite fractal efficiency ratio as a measure to decide if it should be trend following, or taking small bites in a choppy market:

If (CFE Trending) THEN
buy above CFE MA
sell close below CFE MA
end;

If (CFE Choppy) Then
if (above MA) then
buy DV-2 pull-back, sell target 1 ATR
else (below-MA) then
sell DV-2 rally, cover target 1 ATR
end
end

For example, on the indexes it would probably choose the 1 ATR target approach. On an IBD-100 midcap stock that trends it would choose a trend following approach.

Dave

aomega
Member
Posts: 8
aomega
Post Re: Composite Fractal Efficiency Indicator (DVCFE)
on: November 17, 2009, 13:45

How would you quantify “CFE Trending” and “CFE Choppy”?

davidvaradi
Administrator
Posts: 29
davidvaradi
Post Re: Composite Fractal Efficiency Indicator (DVCFE)
on: November 18, 2009, 01:07

Hi, I tested the CFE without using percentrank on QQQQ for 2400 bars and got a 5.4% cagr. Buys were initiated when CFE>0 and shorts when CFE

Woodshedder
Moderator
Posts: 11
Woodshedder
Post Re: Composite Fractal Efficiency Indicator (DVCFE)
on: November 18, 2009, 03:25

I like apple’s approach and used aomega’s code for a start and added more to it. I used long only. What I get is very interesting. The CAGR is low mainly due to lack of opportunity/exposure, but if additional opportunity/exposure can be added (preferably some less-correlated ETFs) then it could probably be pushed to double-digit CAGR. It also has a high win %.

Here are the stats:

Initial capital 100000.00
Ending capital 164551.81
Net Profit 64551.81
Net Profit % 64.55 %
Exposure % 11.70
Net Risk Adjusted Return % 551.71
Annual Return % 4.26
Risk Adjusted Return % 36.45

—————————————
All trades 425
Avg. Profit/Loss 151.89
Avg. Profit/Loss % 0.85
Avg. Bars Held 6.97

—————————————
Winners 313 (73.65 %)
Total Profit 126975.19
Avg. Profit 405.67
Avg. Profit % 2.27
Avg. Bars Held 5.16
Max. Consecutive 30
Largest win 3878.40
# bars in largest win 2

—————————————
Losers 112 (26.35 %)
Total Loss -62423.38
Avg. Loss -557.35
Avg. Loss % -3.10 %
Avg. Bars Held 12.03
Max. Consecutive 6
Largest loss -3396.80
# bars in largest loss 29

—————————————
Max. trade drawdown -4212.90
Max. trade % drawdown -21.43 %
Max. system drawdown -24340.20
Max. system % drawdown -16.53 %
Recovery Factor 2.65
CAR/MaxDD 0.26
RAR/MaxDD 2.20
Profit Factor 2.03
Payoff Ratio 0.73
Standard Error 5783.82
Risk-Reward Ratio 0.78
Ulcer Index 1.88
Ulcer Performance Index -0.60
Sharpe Ratio of trades 1.46
K-Ratio 0.0491

—————————————-

And here is the code.
I ran it over 3000 bars, on a watchlist of SPY, IWM, QQQQ, VEU, EEM, GLD, DBC. I added basic position sizing.
***I did run an optimization over the entry and exit thresholds using CAR/MDD for the fitness function*** These results are NOT from using the optimal settings, but rather the settings that appeared the most robust on a 3D optimization graph.

//Step 1
PriceChange = abs(Close-Ref(Close, -1));
//Step 2
TenDayPriceChange = Close-Ref(Close, -10);
FirstRatio = (TenDayPriceChange / Sum(PriceChange, 10)) * -1;
//Step 3
TwoFiftyDayPriceChange = Close-Ref(Close, -250);
SecondRatio = (TwoFiftyDayPriceChange / Sum(PriceChange, 250));
//Step 4
Average = (FirstRatio + SecondRatio) / 2;

function PercentRank( Data, Periods ) //Ramon's PercentRank function
{
    Count = 0;

    for ( i = 1; i < Periods + 1 ; i++ )
    {
        Count = Count + IIf ( Ref( Data, 0 ) > Ref( Data, -i ), 1, 0 );
    }

    return 100 * Count / Periods;
}

RankPeriods = Param( "PercentRank Lookback Periods", 252, 5, 500, 5 );
CFE = PercentRank( Average, RankPeriods );
PosQty=7; // maximum of 7 positions
SetOption("InitialEquity", 100000);
SetTradeDelays( 0, 0, 0, 0 );  // all trades on the close
SetOption("MaxOpenPositions", PosQty);
PositionSize=-100/PosQty;  // all positions sized equally
Ent=Optimize("Ent", 75, 5, 90, 5); // Entry threshold of 75
Ext=Optimize("Ext", 65, 5, 90, 5); // Exit threshold of 65

Entry=Ref(CFE,-1) < Ent AND CFE > Ent; // Entry cross above threshold
Exit=Ref(CFE,-1) > Ext AND CFE < Ext;  // Exit cross below threshold

Buy=Entry;
Sell=Exit;
BuyPrice=Close;
SellPrice=Close;

Trader, Trading System Developer, Musician/Recording Engineer

graves
Member
Posts: 5
graves
Post Re: Composite Fractal Efficiency Indicator (DVCFE)
on: November 18, 2009, 07:58

Thanks for sharing.

Wood just a tip:
if you use the code icon you can use anything + it’s easier to read the code…

This is an example:
<>  <> < < >>>>>>>
/\[][]/\
Woodshedder
Moderator
Posts: 11
Woodshedder
Post Re: Composite Fractal Efficiency Indicator (DVCFE)
on: November 18, 2009, 09:59

***Edit*** Got it working. Thanks Corey! You must have spaces around the greater/less-than symbols.

Graves, I tried more than 3 times to use the code tool, and each time it deleted my greater-than and less-than signs even when embedded within the code tool, and it would cut off the last two lines of code.

I literally tried it 3 different times and it did the same thing each time.

I’m not sure what the problem is. Maybe David or Corey has an answer?

Regards,
Wood

Trader, Trading System Developer, Musician/Recording Engineer

Pages: [1] 2
Forum Server by: Vast HTML, Version: 1.3
Page loaded in: 0.139 seconds.

Posting code in forum: Place any code between the code tags (using this button: ) and place a space after any < symbol, otherwise it will be read as HTML and most likely cut off the rest of the post. Or code can be uploaded to the DV Indicators Google Group and linked to in the forum post (example).

Sorry, comments are closed for this page.