Van Tharp's SQN (system quality number) - Psychology and Money Management | futures io social day trading
futures io futures trading


Van Tharp's SQN (system quality number)
Updated: Views / Replies:16,649 / 27
Created: by caprica Attachments:5

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 5  
 
Thread Tools Search this Thread
 

Van Tharp's SQN (system quality number)

  #11 (permalink)
Fiddler
Nashville, TN
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IB
Favorite Futures: NQ ES
 
Posts: 468 since Feb 2011
Thanks: 323 given, 542 received

@Big Mike

I am attaching your requested optimizer type. The new score considers Max Profit, SQN, Trades per Day, and the ratio of Long Profit to Short Profit.

There is one variable in there for the Long/Short Profit that is easy to change. I was not sure how sensitive you wanted this metric to be. I left comments in explaining.

//This value represents the floor to a divisor representing long short profit split
//0.1 = (60/40 split = 50/50 split = 40/60 split) performance would be halved at (70/30, 30/70)
//For a value of 0.05 (55/45 split = 50/50 split = 45/55 split)
//performance would be halved at (60/40, 40/60)
double rngLongShortBalance = 0.1;
//Actual calculation so that you can see what I am dividing by in the final output.
double rngLSbalance = Math.Max(rngLongShortBalance, Math.Abs(0.5 - (totLongProfit / totProfit)));

Basically, I thought you could use that variable to to set your own acceptable range outside of which there are reductions in the final score.

Otherwise the final score looks like this:

(SQN * Max Profit * Trades per Day) / (Long Short Ratio derivative)

To install place attached file in:
NinjaTrader7\bin\Custom\Type
Open Ninja Trader editor and compile any indicator or strategy

I am also going to take a look at the idea you mentioned about variation around a smooth upward sloping profit line as a possible improvement to the SQN number. Right now I can't visualize if that is going to be an improvement or end up causing problems somewhere.

Attached Files
Register to download File Type: cs SQNlsprofitbalancetraderate.cs (3.8 KB, 80 views)
Reply With Quote
The following 3 users say Thank You to Luger for this post:
 
  #12 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,171 received


Luger View Post
@Big Mike

I am attaching your requested optimizer type. The new score considers Max Profit, SQN, Trades per Day, and the ratio of Long Profit to Short Profit.

There is one variable in there for the Long/Short Profit that is easy to change. I was not sure how sensitive you wanted this metric to be. I left comments in explaining.

//This value represents the floor to a divisor representing long short profit split
//0.1 = (60/40 split = 50/50 split = 40/60 split) performance would be halved at (70/30, 30/70)
//For a value of 0.05 (55/45 split = 50/50 split = 45/55 split)
//performance would be halved at (60/40, 40/60)
double rngLongShortBalance = 0.1;
//Actual calculation so that you can see what I am dividing by in the final output.
double rngLSbalance = Math.Max(rngLongShortBalance, Math.Abs(0.5 - (totLongProfit / totProfit)));

Basically, I thought you could use that variable to to set your own acceptable range outside of which there are reductions in the final score.

Otherwise the final score looks like this:

(SQN * Max Profit * Trades per Day) / (Long Short Ratio derivative)

To install place attached file in:
NinjaTrader7\bin\Custom\Type
Open Ninja Trader editor and compile any indicator or strategy

I am also going to take a look at the idea you mentioned about variation around a smooth upward sloping profit line as a possible improvement to the SQN number. Right now I can't visualize if that is going to be an improvement or end up causing problems somewhere.

You rock!

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #13 (permalink)
Fiddler
Nashville, TN
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IB
Favorite Futures: NQ ES
 
Posts: 468 since Feb 2011
Thanks: 323 given, 542 received


I am attaching the Perfect Equity Curve (PEC) variants as well.

PEC
PEC * Max Profit
(PEC * Max Profit * Trades per Day) / (Long Short ratio derivative)

I would stay with the SQN and variants. The PEC versions truly do favor smoother curves at the expense of many other considerations. This ended up mostly an academic exercise, and I am posting just for anyone that is curious. Though I guess it could be used to check a smaller optimization field once the larger population has been narrowed down.

For example, I optimized one variable on my bot with just PEC. Usually the top few choices run from 58k-63k profit. Pure PEC gave me 22k for the first three, then got to some in the mid to upper 50k.

Attached Files
Register to download File Type: cs PEC.cs (2.2 KB, 63 views)
Register to download File Type: cs PECmaxprofit.cs (2.4 KB, 50 views)
Register to download File Type: cs PEClsprofitbalancetraderate.cs (3.9 KB, 46 views)
Reply With Quote
The following 4 users say Thank You to Luger for this post:
 
  #14 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,171 received


Luger View Post
I am attaching the Perfect Equity Curve (PEC) variants as well.

PEC
PEC * Max Profit
(PEC * Max Profit * Trades per Day) / (Long Short ratio derivative)

I would stay with the SQN and variants. The PEC versions truly do favor smoother curves at the expense of many other considerations. This ended up mostly an academic exercise, and I am posting just for anyone that is curious. Though I guess it could be used to check a smaller optimization field once the larger population has been narrowed down.

For example, I optimized one variable on my bot with just PEC. Usually the top few choices run from 58k-63k profit. Pure PEC gave me 22k for the first three, then got to some in the mid to upper 50k.

Thanks for this. What kind of sample size and trade frequency did you use in your test? I can imagine the fewer the trades, the more this will not make any sense.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #15 (permalink)
Fiddler
Nashville, TN
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IB
Favorite Futures: NQ ES
 
Posts: 468 since Feb 2011
Thanks: 323 given, 542 received

It was small numbers compared to what I know you are planning...lol

Range was from 60 to 170 trades for those weird results. The PEC results in general, even for the variants, are certainly much more rigid than SQN. Instead of comparing to trade results to average profit and compiling, you are comparing current cumulative profit to where current cumulative profit should be based on average profit (average profit * trade number) and compiling. Effectively the variance can accrue trade to trade.

Reply With Quote
 
  #16 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,171 received


Luger View Post
I am attaching the Perfect Equity Curve (PEC) variants as well.

PEC
PEC * Max Profit
(PEC * Max Profit * Trades per Day) / (Long Short ratio derivative)

I would stay with the SQN and variants. The PEC versions truly do favor smoother curves at the expense of many other considerations. This ended up mostly an academic exercise, and I am posting just for anyone that is curious. Though I guess it could be used to check a smaller optimization field once the larger population has been narrowed down.

For example, I optimized one variable on my bot with just PEC. Usually the top few choices run from 58k-63k profit. Pure PEC gave me 22k for the first three, then got to some in the mid to upper 50k.

So far the PEC model seems to be performing very well. I am still wet behind the ears when it comes to Ninja and C#, I am having to re-learn stuff all over again after being out of it for years. But it seems that your code works. Once I get some more complex strategies converted, I'll know for sure

In my testing, the PEC model produces quicker [genetic time] and more desirable results than the other SQN types you provided.

Looking forward to it, and really want to thank you again.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #17 (permalink)
Elite Member
Newcastle, Australia
 
Futures Experience: Intermediate
Platform: Multicharts 8 - Full Version
Broker/Data: IB
Favorite Futures: SPI,FTSE100, 6E, 6A
 
Posts: 285 since Oct 2010
Thanks: 108 given, 177 received

Hi
Im very interested in this topic but Im a multicharts user.
Would you have this code in a pseudo form so that I can generate easylanguage code?

Regards,
Neil.

Reply With Quote
 
  #18 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,171 received


NW27 View Post
Hi
Im very interested in this topic but Im a multicharts user.
Would you have this code in a pseudo form so that I can generate easylanguage code?

Regards,
Neil.

The source was posted already, MultiCharts uses C# for its optimizer type thing (whatever it is called). They don't document anything, so good luck finding the right keywords. It is not EasyLanguage.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #19 (permalink)
Elite Member
Cincinnati Ohio
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Futures Broker
Favorite Futures: AUD
 
Silver Dragon's Avatar
 
Posts: 1,597 since Feb 2011
Thanks: 3,859 given, 3,318 received


Luger View Post
I am attaching the Perfect Equity Curve (PEC) variants as well.

PEC
PEC * Max Profit
(PEC * Max Profit * Trades per Day) / (Long Short ratio derivative)

I would stay with the SQN and variants. The PEC versions truly do favor smoother curves at the expense of many other considerations. This ended up mostly an academic exercise, and I am posting just for anyone that is curious. Though I guess it could be used to check a smaller optimization field once the larger population has been narrowed down.

For example, I optimized one variable on my bot with just PEC. Usually the top few choices run from 58k-63k profit. Pure PEC gave me 22k for the first three, then got to some in the mid to upper 50k.

@Luger

Trying to understand the code; What does this part of the code do?

SD

 
Code
for (n = 0; n < Strategy.Parameters.Count; n++)
		{
		if ("SQNMinTrades".CompareTo(Strategy.Parameters[n].Name) == 0)
			{
				minTrades = (int)Strategy.Parameters[n].Value;
				break;
			}

nosce te ipsum

You make your own opportunities in life.
Reply With Quote
 
  #20 (permalink)
Fiddler
Nashville, TN
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IB
Favorite Futures: NQ ES
 
Posts: 468 since Feb 2011
Thanks: 323 given, 542 received



Silver Dragon View Post
@Luger

Trying to understand the code; What does this part of the code do?

SD

 
Code
for (n = 0; n < Strategy.Parameters.Count; n++)
		{
		if ("SQNMinTrades".CompareTo(Strategy.Parameters[n].Name) == 0)
			{
				minTrades = (int)Strategy.Parameters[n].Value;
				break;
			}

It was in the original SQN code so I left it. If there are less than 30 trades, then SQN returns zero due to too small of a sample. I think that part also checks the number of parameters in the strategy and if there are more than 30, then that number becomes the floor.

I could be totally wrong. It would be nice to have someone who is a better coder to evaluate that section because it may just be wasting cpu cycles.

Reply With Quote
The following user says Thank You to Luger for this post:

Reply



futures io > > > Van Tharp's SQN (system quality number)

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

Dec 7

Linda Bradford Raschke: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Van Tharp Books Dusty909 Psychology and Money Management 22 August 15th, 2016 12:57 PM
Van Tharp's Max Expectancy caprica Psychology and Money Management 31 January 22nd, 2015 12:55 PM
Position Sizing by Van Tharp Laserdan Psychology and Money Management 21 July 8th, 2011 11:37 AM
System Quality Number for MC? WayneA EasyLanguage Programming 5 July 21st, 2010 09:09 AM
What Type Trader Are You? - more from Van Tharp Trader.Jon Psychology and Money Management 0 November 12th, 2009 09:47 AM


All times are GMT -4. The time now is 11:08 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, 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
Page generated 2017-11-23 in 0.15 seconds with 20 queries on phoenix via your IP 54.80.60.91