- ago
QUOTE:
The only way to seriously qualify and optimize any system is through its System Quality Number (SQN). I advice you to refer to Van Tharp for reference on the subject.

Assuming a set of N trades (N>30 for being statistically significant), SQN is defined as follow:

SQN= Squareroot(N) * Average (of the N Profit&Loss) / Std dev (of the N Profit&Loss).

The large the N, the more trading opportunities you have.
The large the average P&L, the better you are obviously.
The smaller the Std dev (P&L), the more regular are your results and the smaller are the drawdowns.

Note here that if you optimize for the largest SQN, you maximize in fact the product N*average P&L and you minimize the Std dev (P&L) and the drawdowns at the same time.

This is exactly what all good traders should be looking for their system.

Has anyone used software with this metric for optimization? If so, what are your thoughts? Thanks!

Vince
2
1,937
10 Replies

Reply

Bookmark

Sort
- ago
#1
On a related note, SQN will not be added to the WL7 visualizers due to legal challenges:
https://wl6.wealth-lab.com/Forum/Posts/Van-Tharp-SQN-Number-33723
0
- ago
#2
This metric is just Average(r) / StandardError(r).

With r being the set of single returns in percent.

A very common formula.

I can't see how such a formula can lead to "legal issues".

(see Wikipedia Standard Error: https://en.wikipedia.org/wiki/Standard_error)
2
- ago
#3
We did some custom programming a decade ago and there were four variations of the SQN formula so it's not that simple. But simple indeed.

Well, time flies fast. It appears that the SQN trademark has been cancelled, opening up for its unrestricted implementation:

https://trademarks.justia.com/778/35/sqn-77835393.html
https://trademarks.justia.com/766/86/sqn-76686077.html
0
- ago
#4
QUOTE:
This metric is just Average(r) / StandardError(r)....
A very common formula.
I totally agree. One can't patent it. But you can still trademark a name for it. You can trademark anything that doesn't violate another trademark or something in the public domain.

The trick is to go ahead and implement it in Wealth-Lab, but under a "generic" name. For example, let's consider the drug epinephrine, which is trademarked as adrenaline. If I publish a paper, I'll have to use the generic name epinephrine. But if the English drug company advertises the same drug on TV, they will say adrenaline. And that's why every drug on the market has both a generic name (which is in the public domain) and a trademarked name.

QUOTE:
and there were four variations of the SQN formula
I don't know about variations, but probably one of these four is the "generic name" which is in the public domain. Wealth-Lab needs to publish under the generic name like everyone else does.

Any cease and desist letter from an attorney will be to stop using the trademarked name, but you can still publish and use the work under its generic name, which is in the public domain.

Someone needs a new patent attorney.
2
mjj38
- ago
#5
Some discussion on SQN:

https://evilspeculator.com/follow-up-questions-on-system-development/

http://jonathankinlay.com/2018/09/money-management-the-good-the-bad-and-the-ugly/

Dug up my old WL6 tweaked version of SQN:
I filtered strategies with less than 20 trades (not statistically relevant), cap the # of trades factor at 100 per year to cap the impact of trade volume and lastly to set a floor on the std dev of profits (to give reasonable expectation of volatility for those strategies that look too good to be true!)

CODE:
public double Sqn { get { var answer = 0d; // minimum of 20 trades if (NumOfTrades >= 20) { var years = _backTestPeriod.Days / 356.25; // cap trades at 100 per year var numer = Math.Min(10, Math.Sqrt(years > 0 ? NumOfTrades / years : 0d)); // floor at 38.2% of AvgProfit var denom = Math.Max(StdDevOfProfits, AvgProfit * 0.382); answer = denom > 0 ? numer * AvgProfit / denom : 0d; } return answer; } }


0
mjj38
- ago
#6
While we are at it ...

CODE:
public double RinaIndex { get { var denom = AvgDrawDown * PctTimeInMarket; return denom > 0 ? SelectNetProfit / denom : 0d; } } public double RinaIndexMod { get { // Take the Minimum of SNP and NP var numer = Math.Min(SelectNetProfit, NetProfit); var denom = AvgDrawDown * PctTimeInMarket; var rina = denom > 0 ? numer / denom : 0d; // Minimum Number of Trades return NumOfTrades >= 10 ? rina : -1d; } }
0
- ago
#7
Thanks mjj3!

Vince
0
Glitch8
 ( 10.62% )
- ago
#8
Off topic but speaking of metrics, the next build will allow you to choose which metrics columns to show in optimizations and the new rankings tool, amongst all ScoreCards, and control their order. You can finally show mixed ScoreCard metrics columns in an optimization and show just the columns you want!
3
- ago
#9
Thanks Glitch! That is good news.

Vince
1
mjj38
- ago
#10
Now that is awesome!
1

Reply

Bookmark

Sort