Equity Curve Trading - Work Around
|January 24th, 2016, 07:12 PM||#1 (permalink)|
Futures Experience: Advanced
Platform: Multicharts + Tradestatio
Favorite Futures: CL
Posts: 4 since Oct 2015
Thanks: 0 given, 0 received
Equity Curve Trading - Work Around
After doing an extensive search on the topic, I see lots of people looking for ways to use equity curves however I don't see anyone actually using them.
I use equity curve trading and I've found it fruitful in my higher volume (75 - 100 trades/month) intraday systems. I use the MC Portfolio Trading with ~30 symbols for my strategy. How I use the equity curve slope is I created a custom routine that calculates the slope of the equity curve based on the last X number of trades.
One problem I've found with using the built in equity curve (net profit)in TS/MC is it generates the equity curve based on the last X number of days. I found it is much more fruitful to use the equity curve based on the last X number of trades and pull the slope off the equity curve using a regression. The is the code in the main strategy for generating the equity curve data:
condition1 = Array_setmaxindex(a_NetPL,LRSlopeLen);
oLRSlope( 0 ),
oLRAngle( 0 ),
oLRIntercept( 0 ),
oLRValueRaw( 0 ) ;
TotTds = TotalTrades;
If TotTds > TotTds then begin
For value1 = LRSlopeLen downto 2 begin
a_NetPL[value1] = a_NetPL[value1-1];
a_NetPL = (PreviousEquity - netprofit)/EquityScaler;
If TotTds >= LRSlopeLen then Value1 = LinRegArray( a_NetPL, LRSlopeLen, 0, oLRSlope, oLRAngle, oLRIntercept, oLRValueRaw ) ;
oLRSlope = oLRSlope / RSize;
It then pitches it to the Money Management Script (MMS) in the portfolio trader and it adjusts the position size based on the slope of the equity curve (using some other data in the MMS). The Money Management Script code snippet for that is:
for idx = 0 to portfolioStrategies -1 begin
TargetRank[idx] = pmms_get_strategy_named_num(idx, "TargetRank");
EquitySlope[idx] = pmms_get_strategy_named_num(idx, "EquityCurveSlope");
// Adjust position size based on equity slope
AdjustedPositionSize[idx] = 1.25;
If EquitySlope[idx] >= .150 then AdjustedPositionSize[idx] = 1.5;
If EquitySlope[idx] <= .075 and EquitySlope[idx] > -.075 then AdjustedPositionSize[idx] = .75;
If EquitySlope[idx] <= -.075 then AdjustedPositionSize[idx] = 0;
// Send the adjusted position size back to the strategy
pmms_set_strategy_named_num( idx, "PosSizeScaler", AdjustedPositionSize[idx] );
In the MMS script, the equity curve is broken down into four buckets that are of equal size (there about the same number of trades in each bucket). In the bottom bucket with the equity curve < -.075, I don't trade that symbol in the portfolio. In the code snippet, it adjusts the position size in this bucket to 0.
The problem is if the symbol is prevented from trading once the equity curve slope falls below -.075 in my example, the symbol will no longer trade. The impression I was under was that the strategy operated in it's own existance separate from the actions of the MMS. If the strategy generates a buy/sell order, inside the strategy, it counts that trade as if it was placed. However this apparently isn't how it works.
The MMS acts as a firewall to allow/deny/increase/decrease the order before it goes to market. However the netprofit variable in the strategy is effected based on the MMS allowing/denying the trade. If the strategy places a buy/sell order and the MMS prevents it, the order is not realized in the netproft variable in the strategy.
As a work around, I allow it to trade 1 share (stocks) of the symbol. The EquityScaler variable adjusts the equity curve so it's adjusted with a neutral position size. For example, if the base position size is 1.0 and the MMS script adjusts the position size up to 1.5x, when the equity curve is recalculated, it adjusts the profit of the trade by 1/1.5. If it only trades 1 share, the code adjusts the equity curve to simulate the profit based on trading a normal position size.
It works however my geek brain would sleep better at night if I can come up with a way to keep it from placing an order for 1 share when I really don't want to take the trade.
Last edited by The9000; January 24th, 2016 at 07:21 PM.