Best fitnes Function for TradeStation Optimnization? - futures io
futures io



Best fitnes Function for TradeStation Optimnization?


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one SEGroup with 2 posts (3 thanks)
    2. looks_two MasterYan with 2 posts (0 thanks)
    3. looks_3 kevinkdog with 1 posts (3 thanks)
    4. looks_4 Aurac with 1 posts (0 thanks)
    1. trending_up 1,335 views
    2. thumb_up 7 thanks given
    3. group 7 followers
    1. forum 6 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Best fitnes Function for TradeStation Optimnization?

(login for full post details)
  #1 (permalink)
MasterYan
San Francisco, CA
 
 
Posts: 25 since Jul 2016
Thanks: 11 given, 4 received

Best fitness function for TradeStation Optimization?

Reply With Quote

Can you help answer these questions
from other members on futures io?
how to avoid these type of trades in algo
NinjaTrader
pay for programmer coding a custom indicator
Traders Hideout
Unable to choose strategy from chart - NT8
The Elite Circle
TO ALL
Traders Hideout
DAX UP GAP
Emini and Emicro Index
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Spoo-nalysis ES e-mini futures S&P 500
61 thanks
Why dont people trade 150 ES contracts?
38 thanks
Any long term success stories from funded traders in the …
26 thanks
How to work on strategy
26 thanks
How to avoid wiping out the accounts?
18 thanks
 
(login for full post details)
  #2 (permalink)
 Billiwon 
Los Angeles, California
 
Experience: Intermediate
Platform: NinjaTrader, TradeStation
Trading: Index futures, etc.
 
Posts: 26 since Aug 2014
Thanks: 30 given, 12 received


MasterYan View Post
Best fitness function for TradeStation Optimization?

TS Index, which roughly measures reward to risk.

Reply With Quote
The following user says Thank You to Billiwon for this post:
 
(login for full post details)
  #3 (permalink)
 SEGroup 
Kalamazoo MI
 
Experience: Advanced
Platform: MultiCharts
Trading: Futures
 
Posts: 4 since Feb 2013
Thanks: 0 given, 1 received


Use one of these, depending upon your trading objectives. No one "best" fitness function.

TS (TradeStation) Index

A fitness function that maximizes the Net Profit and Winners while minimizing Intraday Drawdown. It calculates the Net Profit * NumWinTrades / AbsValue (Maximum Intraday Drawdown).

Expectancy Score (Van Tharp)

A fitness function that measures Expectancy x Opportunity. Based on a calculation by Van K. Tharp.

Expectancy = (AW x PW + AL x PL) / |AL|
(expected profit per dollar risked)
AW = average winning trade (excluding largest win)
PW = probability of winning : PW = (Winning trades-1) / NST
AL = average losing trade (negative, excluding scratch losses)
|AL| = absolute value of AL
PL = probability of losing (PL = {non-scratch losses} / NST)

Opportunity = NST / StudyDays
NST = {total trades} - {scratch trades} - 1

*In other words, NST = non-scratch trades during the period under test (a scratch trade loses commission + slippage or less) minus 1
StudyDays = calendar days of history being tested

Pessimistic Return on Capital (PROC)

A fitness function that represents a very conservative value for Return on Capital (ROC). It calculates the AvgWin*(NumWinTrades) - SquareRoot(NumWinTrades))+AvgLoss*(NumLossTrades + SquareRoot
(NumLossTrades))) / Capital.
NumWinTrades = number of winning trades, NumLossTrades = number of losing trades, AvgWin = GrossProf/NumWinTrades, and AvgLoss = GrossLoss/NumLossTrades.

Perfect Profit Correlation (PPC)

Calculates the correlation of the actual equity curve vs. a "perfect" curve as if the strategy was able to buy every bottom and sell every top. The genetic optimizer will target an equity curve, that closely matches
a "perfect" equity curve.

Return of Maximum Drawdown

Calculates the ratio between the net profit and maximum drawdown. This provides the best selection of the set of input parameters that maximizes net profit,
but at the same time minimizes the maximum drawdown. This is similar to the TradeStation index above.

Total Net Profit / Maximum Drawdown

Hope that helps.

Reply With Quote
The following 3 users say Thank You to SEGroup for this post:
 
(login for full post details)
  #4 (permalink)
MasterYan
San Francisco, CA
 
 
Posts: 25 since Jul 2016
Thanks: 11 given, 4 received


SEGroup View Post
Use one of these, depending upon your trading objectives. No one "best" fitness function.

TS (TradeStation) Index

A fitness function that maximizes the Net Profit and Winners while minimizing Intraday Drawdown. It calculates the Net Profit * NumWinTrades / AbsValue (Maximum Intraday Drawdown).

Expectancy Score (Van Tharp)

A fitness function that measures Expectancy x Opportunity. Based on a calculation by Van K. Tharp.

Expectancy = (AW x PW + AL x PL) / |AL|
(expected profit per dollar risked)
AW = average winning trade (excluding largest win)
PW = probability of winning : PW = (Winning trades-1) / NST
AL = average losing trade (negative, excluding scratch losses)
|AL| = absolute value of AL
PL = probability of losing (PL = {non-scratch losses} / NST)

Opportunity = NST / StudyDays
NST = {total trades} - {scratch trades} - 1

*In other words, NST = non-scratch trades during the period under test (a scratch trade loses commission + slippage or less) minus 1
StudyDays = calendar days of history being tested

Pessimistic Return on Capital (PROC)

A fitness function that represents a very conservative value for Return on Capital (ROC). It calculates the AvgWin*(NumWinTrades) - SquareRoot(NumWinTrades))+AvgLoss*(NumLossTrades + SquareRoot
(NumLossTrades))) / Capital.
NumWinTrades = number of winning trades, NumLossTrades = number of losing trades, AvgWin = GrossProf/NumWinTrades, and AvgLoss = GrossLoss/NumLossTrades.

Perfect Profit Correlation (PPC)

Calculates the correlation of the actual equity curve vs. a "perfect" curve as if the strategy was able to buy every bottom and sell every top. The genetic optimizer will target an equity curve, that closely matches
a "perfect" equity curve.

Return of Maximum Drawdown

Calculates the ratio between the net profit and maximum drawdown. This provides the best selection of the set of input parameters that maximizes net profit,
but at the same time minimizes the maximum drawdown. This is similar to the TradeStation index above.

Total Net Profit / Maximum Drawdown

Hope that helps.


Wow! Thanks!
What fitness function are you using?

Reply With Quote
 
(login for full post details)
  #5 (permalink)
 SEGroup 
Kalamazoo MI
 
Experience: Advanced
Platform: MultiCharts
Trading: Futures
 
Posts: 4 since Feb 2013
Thanks: 0 given, 1 received

It depends on the strategy, the markets traded, the resolution and your trading objectives. It is not a one size fits all. You can run each one and see how the performance plays out. Each fitness function will usually prove a different set of optimum settings and results.

Reply With Quote
 
(login for full post details)
  #6 (permalink)
 kevinkdog   is a Vendor
 
 
Posts: 3,133 since Jul 2012
Thanks: 1,666 given, 6,207 received

I've never found an "optimum" fitness function in all the research I have done. Most people search for the perfect fitness function just like they focus on the perfect indicator, perfect strategy, etc.

Looking for the best with anything in trading is almost never the best going forward.

Follow me on Twitter Reply With Quote
The following 3 users say Thank You to kevinkdog for this post:
 
(login for full post details)
  #7 (permalink)
 Aurac 
London+United Kingdom
 
Experience: Advanced
Platform: eSignal
Broker: InteractiveBrokers
Trading: If it moves...
 
Aurac's Avatar
 
Posts: 46 since Jan 2013
Thanks: 49 given, 84 received


MasterYan View Post
Wow! Thanks!
What fitness function are you using?

It does depend on the strategy in a general sense.
There are only 2 fitness functions worth utilizing in TradeStation in this order for breakout/momentum trading:
1. Trade Station Index
2. Net Profit

For other strategies you will need contributions from someone who has done the hard yards to figure what works for them like kevindog.
That's my 2 eurocents.
L

Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Best fitnes Function for TradeStation Optimnization?


Last Updated on October 18, 2021


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
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.
no new posts