TradersStudio®

  • Register
  • Login
  • My Account
  • Home
  • Store
  • Products
    • TradersStudio®® Turbo 800% faster
    • TradersStudio®® Turbo Upgrade
    • TradersStudio®® Professional
    • Trend Harmony
  • Free Demo
  • Why TradersStudio®
  • Blog
  • Tutorials
  • Traders Resources
    • Equity Curve Feedback
    • Stock and ETF Trading Systems
    • Walk Forward Testing in TradersStudio®®
  • Contact Us

Equity Curve Feedback

November 8, 2014 by

TradersStudio has many powerful features which allow system developers to test advance trading system concepts easily. One of these concepts equity curve feedback uses the two sets of “virtual backtesters” is built in TradersStudio. Let’s look at the following trivial system.


‘ Simple Channel Breakout System

‘ TradersStudio® copyright© 2004-2011, All rights reserved


Sub CHANBREAKOUT (SLen)
    Dim MinMove
    MinMove=GetActiveMinMove()
    Buy(“ChanBuy”,1,Highest(High,SLen,0)+MinMove,Stop,Day)
    Sell(“ChanSell”,1,Lowest(Low,SLen,0)-MinMove,Stop,Day)
End Sub

Let’s now apply this system to the following market names given with their symbols:

  1. Cotton #2 (CT)
  2. CrudeOil Electronic (ZU)
  3. Mini NASDAQ (EN)
  4. EuroCurr Composite (FN)
  5. Corn Electronic (ZC)
  6. Copper Electronic (ZK)
  7. Palladium Electronic (ZA)
  8. Tbonds Composite (US)
  9. Rough Rice Elect (ZR)
  10. Nat. Gas Electronic (ZN)
  11. Canadian $$ Composite (CN)
  12. Orange Juice (JO)
  13. Lumber (LB)

 

We will deduct $25.00 for commission and $75.00 for slippage. We are going to use a lookback length of 20 bars and apply this to daily data. A 20 day breakout is the standard length in 4 weeks time and does not require optimization. Our results are as follows:

Summary Report for Session Consolidated 6/22/1999 to 10/21/2011

Performance Summary: All Trades

 

Total Net Profit

$494,147.17

Open Position P/L

$55,532.43

Gross Profit

$2,091,150.73

Gross Loss

($1,597,003.56)

 

Total # of trades

1120

Percent Profitable

37.05%

Number winning trades

415

Number Losing Trades

705

 

Largest winning trade

$101,860.00

Largest Losing Trade

($19,650.00)

Average winning trade

$5,038.92

Average Losing Trade

($2,265.25)

Ratio avg. win/avg. loss

2.22

Avg. Trade (win & loss)

$441.20

 

Max consec. winners

8

Max consec. losers

14

Avg. # bars in winners

57

Avg. # bars in losers

20

 

Max intraday drawdown

($112,246.82)

Max # contracts held

1

Profit Factor

1.31

Yearly return on account

35.70%

Account size required

$112,246.82

 

 

This is a “simple channel breakout system”. Let’s suppose we want to filter our simple channel breakout system and only take trades based on recent system performance. Since, you can’t filter a system based on its own trades, so you need to have two parallel copies of the system running. In TradersStudio, we have three in-built backtesters which makes it easy to develop trading strategies using equity curve feedback.

The Buy, Sell, Exitlong, and ExitShort commands show up in the performance reports. We also have a complete separate set of functions to access our statistics namely, VirtualBuy, VirtualSell, VirtualExitlong, and VirtualExitshort which produces a set of commands to access the full statistics, and yet not affect our backtested results.

Let’s look at an example using these basic features.

Sub VirFunctionTest(SLen)
    Dim MinMove
    MinMove=GetActiveMinMove()
    Buy(“ChanBuy”,1,Highest(High,SLen,0)+MinMove ,Stop,Day)
    Sell(“ChanSell”,1,Lowest(Low,SLen,0)-MinMove,Stop,Day)
    VirtualBuy(“ChanBuy”,1,Highest(High,SLen,0)+MinMove ,Stop,Day)
    VirtualSell(“ChanSell”,1,Lowest(Low,SLen,0)-MinMove,Stop,Day)

    Print FormatDateTime(Date)
    Print “VirBarsSinceEntryPlus”
    Print VirBarsSinceEntryPlus(“”)
    Print “VirBarsSinceExitPlus”
    Print VirBarsSinceExitPlus(“”)

    Dim ad
    ad =virMPEPrice(“chanbuy”)
    Print “virMPEPrice with chanbuy = “, ad

    ad =VirMEaPrice(“chanbuy”)
    Print “virMPEPrice with chanbuy = “, ad
    ad =VirMarketPositionPlus(“chanbuy”)
    Print VirGetPerformance(“NetProfit”)

    Print VirGetSysPerformance(“LN”,0)
    Print VirGetSysPerformance(“SN”,0)
    Print “VirMarketPositionPlus with chanbuy = “, ad
End Sub

This example shows our simple channel breakout system along with the clone set of virtual buy and sells. We also show the statistics to access these virtual statistics.

Let’s now apply this technology into a real system example as below.

‘ Simple Channel Breakout System

‘ TradersStudio® copyright© 2004-2011, All rights reserved


Sub CHANBREAKOUTFeedback (SLen,EQLB,EQMult)
    Dim MinMove
    Dim virprofit As BarArray
    Dim virlongprofit As BarArray
    Dim virshortprofit As BarArray
    MinMove=GetActiveMinMove()

    If (BarNumber<500 Or virlongprofit-virlongprofit[EQLB]>-EQMult*Average(Range,EQLB,0)*bigpointvalue) Then
        Buy(“ChanBuy”,1,Highest(High,SLen,0)+MinMove ,Stop,Day)
    End If

    If (BarNumber<500 Or virshortprofit-virshortprofit[EQLB]>-EQMult*Average(Range,EQLB,0)*bigpointvalue) then
        Sell(“ChanSell”,1,Lowest(Low,SLen,0)-MinMove,Stop,Day)
    End if

    VirtualBuy(“ChanBuy”,1,Highest(High,SLen,0)+MinMove ,Stop,Day)
    VirtualSell(“ChanSell”,1,Lowest(Low,SLen,0)-MinMove,Stop,Day)

    ExitShort(“SX”,”ChanSell”,1,Highest(High,SLen,0)+MinMove ,Stop,Day)
    ExitLong(“LX”,”ChanBuy”,1,Lowest(Low,SLen,0)-MinMove,Stop,Day)

    virprofit=VirGetPerformance(“NetProfit”)
    virlongprofit=VirGetSysPerformance(“LN”,0)
    virshortprofit=VirGetSysPerformance(“SN”,0)
End Sub

 

The VirtualBuy and VirtualSell use one of our virtual backtesters. We then use our VirGetSysPerformance function to get the current net profit long, short and both. This system waits for 500 bars, so that we have enough data for the equity curve feedback to mean something. We use the virtual equity to filter our long and short trades. We are using the difference in long equity to filter long trades. We don’t need to have positive change in equity to allow trades but just have losses limited to the negative which is some multiple of the average range in dollars. The same is true for the short side. We are using the following parameters for our system:
CHANBREAKOUTFEEDBACK(20, 80, 3)

This means we are using a 20 bar breakout, an 80 bar difference in equity and the equity difference must be greater than (3*Average(Range,80,0)*bigpointvalue) to allow trades. This filtering does help performance

Summary Report for Session: 06/22/1997 to 10/21/2011

Performance Summary: All Trades

 

Total Net Profit

$566,544.77

Open Position P/L

$48,327.43

Gross Profit

$2,050,675.87

Gross Loss

($1,484,131.10)

 

Total # of trades

1113

Percent Profitable

36.84%

Number winning trades

410

Number Losing Trades

703

 

Largest winning trade

$101,860.00

Largest Losing Trade

($19,650.00)

Average winning trade

$5,001.65

Average Losing Trade

($2,111.14)

Ratio avg. win/avg. loss

2.37

Avg. Trade (win & loss)

$509.02

 

Max consec. winners

8

Max consec. losers

13

Avg. # bars in winners

58

Avg. # bars in losers

21

 

Max intraday drawdown

($99,645.90)

Max # contracts held

1

Profit Factor

1.38

Yearly return on account

39.68%

Account size required

$99,645.90

 

 

We can see that the profits increased by 15% while the drawdown decreased by about the same amount.

Please note that, I am not declaring the above to be the ultimate system and equity curve filtering strategy. This is just a simple example of this technology and to show how easy it is to implement this technology in TradersStudio.

Click below for white paper on using equity curve feedback.

Equity Curve Feedback.pdf

HYPOTHETICAL DISCLAIMER:
NOTICE: HYPOTHETICAL PERFORMANCE RESULTS HAVE MANY INHERENT LIMITATIONS, SOME OF WHICH ARE DESCRIBED BELOW. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT/SYSTEM WILL OR IS LIKELY TO ACHIEVE PROFITS OR LOSSES SIMILAR TO THOSE SHOWN. IN FACT, THERE ARE FREQUENTLY SHARP DIFFERENCES BETWEEN HYPOTHETICAL PERFORMANCE RESULTS AND THE ACTUAL RESULTS SUBSEQUENTLY ACHIEVED BY ANY PARTICULAR TRADING PROGRAM. ONE OF THE LIMITATIONS OF HYPOTHETICAL PERFORMANCE RESULTS IS THAT THEY ARE GENERALLY PREPARED WITH THE BENEFIT OF HINDSIGHT. IN ADDITION, HYPOTHETICAL TRADING DOES NOT INVOLVE FINANCIAL RISK, AND NO HYPOTHETICAL TRADING RECORD CAN COMPLETELY ACCOUNT FOR THE IMPACT OF FINANCIAL RISK IN ACTUAL TRADING. FOR EXAMPLE, THE ABILITY TO WITHSTAND LOSSES OR TO ADHERE TO A PARTICULAR TRADING PROGRAM IN SPITE OF TRADING LOSSES ARE MATERIAL POINTS WHICH CAN ALSO ADVERSELY AFFECT ACTUAL TRADING RESULTS. THERE ARE NUMEROUS OTHER FACTORS RELATED TO THE MARKETS IN GENERAL OR TO THE IMPLEMENTATION OF ANY SPECIFIC TRADING PROGRAM WHICH CANNOT BE FULLY ACCOUNTED FOR IN THE PREPARATION OF HYPOTHETICAL PERFORMANCE RESULTS AND ALL OF WHICH CAN ADVERSELY AFFECT ACTUAL TRADING RESULTS. TRADING INVOLVES RISK OF LOSS AND IS NOT SUITABLE FOR EVERYONE.

nike air max weiß nike air max weiß

Trade Like The Pros

Did you find this tutorial interesting? These tutorials require TradersStudio to run.

TradersStudio Bundle
TradersStudio Bundle: Turbo + Genetic Optimizer



TradersStudio Bundle
CSI Data


Download the Demo

Interested in trying TradersStudio? Please download our demo and take TradersStudio out for a 30-day test drive!

Site Menu

  • Home
  • Store
  • Products
    • TradersStudio®® Turbo 800% faster
    • TradersStudio®® Turbo Upgrade
    • TradersStudio®® Professional
    • Trend Harmony
  • Free Demo
  • Why TradersStudio®
  • Blog
  • Tutorials
  • Traders Resources
    • Equity Curve Feedback
    • Stock and ETF Trading Systems
    • Walk Forward Testing in TradersStudio®®
  • Contact Us

Copyright © 2014-2015 TradersStudio, Inc. All rights reserved. TradersStudio® is a registered trademark of TradersStudio, Inc.

No portion of this site may be copied without the express permission of the author.