NexusFi: Find Your Edge


Home Menu

 





What should be the next step in my backtesting??


Discussion in Emini and Emicro Index

Updated
      Top Posters
    1. looks_one budfox with 40 posts (2 thanks)
    2. looks_two treydog999 with 21 posts (25 thanks)
    3. looks_3 tellytub with 6 posts (4 thanks)
    4. looks_4 Fat Tails with 2 posts (1 thanks)
      Best Posters
    1. looks_one Ming80 with 2.5 thanks per post
    2. looks_two treydog999 with 1.2 thanks per post
    3. looks_3 shodson with 1 thanks per post
    4. looks_4 tellytub with 0.7 thanks per post
    1. trending_up 16,458 views
    2. thumb_up 41 thanks given
    3. group 9 followers
    1. forum 76 posts
    2. attach_file 4 attachments




 
Search this Thread

What should be the next step in my backtesting??

  #61 (permalink)
 budfox 
Toronto
 
Experience: Beginner
Platform: Sierra
Broker: MB
Trading: ES
Posts: 313 since Jun 2013

Hi Guys,


so I have completed my manual backtesting of 101 trades


First sample is from 1 Jan - 23 April 2014.

Second OS is from 1 Aug - Oct 30 2014 .

My first question is should I add the begining equity amount to the end of the first sample?

ie if the ending equity balance at 23 April was $5.00 should I add it to 1 August and start the second sample with $5.00? and build on that?


(My opening balance for my second sample was set to $1 , commissions was set to .0019 (based on the spread charged by AAAfx at the time I started the backtest)



Here are my stats (calculated based all the trades in both samples):
  • Win Ratio 41%
  • Loss Ratio 59%
  • Ave Win = .0013 (EUR/USD)
  • Ave Loss = .0008
  • N = 101
  • Max DD = 89%




Please let me know if I am not following proper backtesting procedure.


Would you trade this model (in conjunction with another pair using the same model (Portfolio Backtesting)?

What other metrics would you require when deciding to implement this model?

Thank You to those that responded, have a great weekend!










@Farmer George



@Hulk @kevinkdog @tellytub @Ming80 @treydog999 @bobwest @sam028


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
NexusFi Journal Challenge - May 2024
Feedback and Announcements
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
48 thanks
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
  #62 (permalink)
 
treydog999's Avatar
 treydog999 
seoul, Korea
 
Experience: Intermediate
Platform: Multicharts
Broker: CQG, DTN IQfeed
Trading: YM 6E
Posts: 897 since Jul 2012
Thanks Given: 291
Thanks Received: 1,039


budfox View Post
Hi Guys,


so I have completed my manual backtesting of 101 trades


First sample is from 1 Jan - 23 April 2014.

Second OS is from 1 Aug - Oct 30 2014 .

My first question is should I add the begining equity amount to the end of the first sample?

ie if the ending equity balance at 23 April was $5.00 should I add it to 1 August and start the second sample with $5.00? and build on that?


(My opening balance for my second sample was set to $1 , commissions was set to .0019 (based on the spread charged by AAAfx at the time I started the backtest)



Here are my stats (calculated based all the trades in both samples):
  • Win Ratio 41%
  • Loss Ratio 59%
  • Ave Win = .0013 (EUR/USD)
  • Ave Loss = .0008
  • N = 101
  • Max DD = 89%




Please let me know if I am not following proper backtesting procedure.


Would you trade this model (in conjunction with another pair using the same model (Portfolio Backtesting)?

What other metrics would you require when deciding to implement this model?

Thank You to those that responded, have a great weekend!










@Farmer George



@Hulk @kevinkdog @tellytub @Ming80 @treydog999 @bobwest @sam028


If this is a walk forward testing model yes you should carry your previous P/L and current position inventory with you. Honestly your max DD is too high, 89% is really bad. When you take this to monte carlo you will bust out almost guaranteed.

Reply With Quote
Thanked by:
  #63 (permalink)
 budfox 
Toronto
 
Experience: Beginner
Platform: Sierra
Broker: MB
Trading: ES
Posts: 313 since Jun 2013



treydog999 View Post
If this is a walk forward testing model yes you should carry your previous P/L and current position inventory with you. Honestly your max DD is too high, 89% is really bad. When you take this to monte carlo you will bust out almost guaranteed.

Hi Trey,

No this was not walkforward testing (not quite sure how you define it), but like I said in the previous post two individual samples (of 50 trades each), First sample = Jan 1 - April 23, 2nd sample = 1 Aug - Oct 30 2014 .

The second sample was my "out of sample" sample.

So you still want me to add my closing account balance from April 23 to the opening balance at 1 Aug? (if this is the case I dont think I will have such a huge drawdown)


What do you mean by 'previous P/L and current position inventory with you' sorry it sounds interesting but do not understand the fancy jargon.


2. What is the purpose of monte carlo?

Started this thread Reply With Quote
  #64 (permalink)
 
shodson's Avatar
 shodson 
OC, California, USA
Quantoholic
 
Experience: Advanced
Platform: IB/TWS, NinjaTrader, ToS
Broker: IB, ToS, Kinetick
Trading: stocks, options, futures, VIX
Posts: 1,976 since Jun 2009
Thanks Given: 533
Thanks Received: 3,709


budfox View Post
[COLOR="RoyalBlue"][SIZE="4"]Hi Guys,
so I have completed my manual backtesting of 101 trades

I would study your equity graph (if you have one) and honestly consider if you can stomach the ups and downs of your account's journey. See this example.



Along those lines I like to find streaks (both winning and losing) to prepare myself what kind of emotional turmoil I may have to endure during a long losing streak. With a 41% win rate you're likely to have longer losing streaks than winning streaks.

Also, are you considering slippage? And, depending on the strategy, your actual fill prices may not be what an actual market will give you, or you may not get filled at all but your model assumes you always get filled. This can change things dramatically.

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #65 (permalink)
 budfox 
Toronto
 
Experience: Beginner
Platform: Sierra
Broker: MB
Trading: ES
Posts: 313 since Jun 2013


shodson View Post
I would study your equity graph (if you have one) and honestly consider if you can stomach the ups and downs of your account's journey. See this example.



Along those lines I like to find streaks (both winning and losing) to prepare myself what kind of emotional turmoil I may have to endure during a long losing streak. With a 41% win rate you're likely to have longer losing streaks than winning streaks.

Also, are you considering slippage? And, depending on the strategy, your actual fill prices may not be what an actual market will give you, or you may not get filled at all but your model assumes you always get filled. This can change things dramatically.


How would I factor in slippage in my model?

(I am manually backtesting)

Thanks shodson!

Started this thread Reply With Quote
  #66 (permalink)
 
treydog999's Avatar
 treydog999 
seoul, Korea
 
Experience: Intermediate
Platform: Multicharts
Broker: CQG, DTN IQfeed
Trading: YM 6E
Posts: 897 since Jul 2012
Thanks Given: 291
Thanks Received: 1,039


budfox View Post
Hi Trey,

No this was not walkforward testing (not quite sure how you define it), but like I said in the previous post two individual samples (of 50 trades each), First sample = Jan 1 - April 23, 2nd sample = 1 Aug - Oct 30 2014 .

The second sample was my "out of sample" sample.

So you still want me to add my closing account balance from April 23 to the opening balance at 1 Aug? (if this is the case I dont think I will have such a huge drawdown)


What do you mean by 'previous P/L and current position inventory with you' sorry it sounds interesting but do not understand the fancy jargon.


2. What is the purpose of monte carlo?

1) Well walk forward testing is defined by Robert Pardo in his book The Evaluation and Optimization of Trading Strategies. But back to my statement. If Sample 1 is your in sample, and Sample 2 is your out of sample then NO you do not add your equity from 1 period to the next. Sample 2 starts again at initial equity.

If it was walk forward, and Sample 1 was the first testing window and parameter set and Sample 2 was the second testing window and parameter set, then yes you would add the equity from the first period to the second.

2) In short, Monte Carlo is a stress testing method and through sampling without replacement allows you to generate confidence intervals for trading statistics like MaxDD, Net Profit, avg trade value etc... It is basically a type of statistical bootstrap. I will not delve any deeper since there are actually many methods that can use this type of testing. But on futures.io (formerly BMT) trade resampling without replacement is the most common.

If you are having trouble with my "jargon" and the definitions here. I suggest you watch some of kevin daveys webinars I am pretty sure he covers this material. As well as pick up a few algorithmic trading / development books. Not to be a ball buster but most of this is extremely common and essential to building and testing good systems.


In regards to including slippage into your model which was posted above. I take the average spread or the max spread (if i am playing more conservative) and subtract that from every transaction/trade. That will help make your tests more realistic. So you have your spread sheet of trades, look at the maximum spread your broker has and subtract that from every trade and recalculate your stats. Thats a worst case scenario when you have to get out in high volatility, this is especially true in spot OTC FX. spreads can be in excess of 10-15 pips and your stops may trigger doing those times. So it should be built in. At worst you underestimate your profit, but its better to do that than under estimate your risk and exposures.

Reply With Quote
Thanked by:
  #67 (permalink)
 budfox 
Toronto
 
Experience: Beginner
Platform: Sierra
Broker: MB
Trading: ES
Posts: 313 since Jun 2013


treydog999 View Post
1) Well walk forward testing is defined by Robert Pardo in his book The Evaluation and Optimization of Trading Strategies. But back to my statement. If Sample 1 is your in sample, and Sample 2 is your out of sample then NO you do not add your equity from 1 period to the next. Sample 2 starts again at initial equity.

If it was walk forward, and Sample 1 was the first testing window and parameter set and Sample 2 was the second testing window and parameter set, then yes you would add the equity from the first period to the second.

2) In short, Monte Carlo is a stress testing method and through sampling without replacement allows you to generate confidence intervals for trading statistics like MaxDD, Net Profit, avg trade value etc... It is basically a type of statistical bootstrap. I will not delve any deeper since there are actually many methods that can use this type of testing. But on futures.io (formerly BMT) trade resampling without replacement is the most common.

If you are having trouble with my "jargon" and the definitions here. I suggest you watch some of kevin daveys webinars I am pretty sure he covers this material. As well as pick up a few algorithmic trading / development books. Not to be a ball buster but most of this is extremely common and essential to building and testing good systems.


In regards to including slippage into your model which was posted above. I take the average spread or the max spread (if i am playing more conservative) and subtract that from every transaction/trade. That will help make your tests more realistic. So you have your spread sheet of trades, look at the maximum spread your broker has and subtract that from every trade and recalculate your stats. Thats a worst case scenario when you have to get out in high volatility, this is especially true in spot OTC FX. spreads can be in excess of 10-15 pips and your stops may trigger doing those times. So it should be built in. At worst you underestimate your profit, but its better to do that than under estimate your risk and exposures.

Hi Trey,

@treydog999 @sam028

What if I tested the same model with the same parameters (during the same timeframe) on the ES or GBP/USD......would you estimate or expect similar metrics?

Thanks, I will read Pardo's book. and I nearly done the lynda course, sort of went through all the lectures but not entirely understanding everything.

Have a good day,

BF
@Farmer George


@Hulk @Ming80 @bobwest @sam028

Started this thread Reply With Quote
  #68 (permalink)
 
treydog999's Avatar
 treydog999 
seoul, Korea
 
Experience: Intermediate
Platform: Multicharts
Broker: CQG, DTN IQfeed
Trading: YM 6E
Posts: 897 since Jul 2012
Thanks Given: 291
Thanks Received: 1,039


budfox View Post
Hi Trey,

@treydog999 @sam028

What if I tested the same model with the same parameters (during the same timeframe) on the ES or GBP/USD......would you estimate or expect similar metrics?

Thanks, I will read Pardo's book. and I nearly done the lynda course, sort of went through all the lectures but not entirely understanding everything.

Have a good day,

BF
@Farmer George


@Hulk @Ming80 @bobwest @sam028

I would not expect similar metrics. There is a caveat, that is that this system was developed from stage 1 with the intent to trade multiple instruments or a basket of instruments. Then you would want to see similiar metrics but you may not actually have that result.

Reply With Quote
  #69 (permalink)
 budfox 
Toronto
 
Experience: Beginner
Platform: Sierra
Broker: MB
Trading: ES
Posts: 313 since Jun 2013

Hello Trey @treydog999


I was reading Pardo's book and he is giving the formula for standard error:



I am wondering how do you determine what the Standard deviation value is to plug in ?



ie. Std Error = ? / SQRT (100)


I know STDDEV is the SQRT of the variance.........but what value to use in the numerator?


Thanks


@Fat Tails

Started this thread Reply With Quote
  #70 (permalink)
 
treydog999's Avatar
 treydog999 
seoul, Korea
 
Experience: Intermediate
Platform: Multicharts
Broker: CQG, DTN IQfeed
Trading: YM 6E
Posts: 897 since Jul 2012
Thanks Given: 291
Thanks Received: 1,039



budfox View Post
Hello Trey @treydog999


I was reading Pardo's book and he is giving the formula for standard error:



I am wondering how do you determine what the Standard deviation value is to plug in ?



ie. Std Error = ? / SQRT (100)


I know STDDEV is the SQRT of the variance.........but what value to use in the numerator?


Thanks


@Fat Tails

It depends on what statistic your trying to find the std error of. For example you want to find the standard error of your average trade. Take the StdDev of all of your trades / sqrt(nTrades). This can be used as a std error approximation for pretty much anything, assuming a normal distribution.

Reply With Quote




Last Updated on December 1, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts