NexusFi: Find Your Edge


Home Menu

 





Best fitnes Function for TradeStation Optimnization?


Discussion in EasyLanguage Programming

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




 
Search this Thread

Best fitnes Function for TradeStation Optimnization?

  #1 (permalink)
MasterYan
San Francisco, CA
 
Posts: 30 since Jul 2016
Thanks Given: 13
Thanks Received: 4

Best fitness function for TradeStation Optimization?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Are there any eval firms that allow you to sink to your …
Traders Hideout
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
ZombieSqueeze
Platforms and Indicators
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
 
  #2 (permalink)
 Billiwon 
Los Angeles, California
 
Experience: Intermediate
Platform: TradeStation
Trading: Index futures, etc.
Posts: 53 since Aug 2014
Thanks Given: 93
Thanks Received: 26


MasterYan View Post
Best fitness function for TradeStation Optimization?

TS Index, which roughly measures reward to risk.

Reply With Quote
Thanked by:
  #3 (permalink)
 SEGroup 
Kalamazoo MI
 
Experience: Advanced
Platform: MultiCharts
Trading: Futures
Posts: 11 since Feb 2013
Thanks Given: 0
Thanks Received: 6


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
  #4 (permalink)
MasterYan
San Francisco, CA
 
Posts: 30 since Jul 2016
Thanks Given: 13
Thanks Received: 4


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
  #5 (permalink)
 SEGroup 
Kalamazoo MI
 
Experience: Advanced
Platform: MultiCharts
Trading: Futures
Posts: 11 since Feb 2013
Thanks Given: 0
Thanks Received: 6

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
  #6 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,647 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338

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
Thanked by:
  #7 (permalink)
 
Aurac's Avatar
 Aurac 
London+United Kingdom
 
Experience: Advanced
Platform: eSignal
Broker: InteractiveBrokers
Trading: If it moves...
Posts: 50 since Jan 2013
Thanks Given: 90
Thanks Received: 93


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




Last Updated on October 18, 2021


© 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