CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 66 % of retail investor accounts lose money when trading CFDs with this provider. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money.

Advanced Darwin Filtering Tool

Advanced Darwin Filtering Tool

My motivation to make this filtering tool into a complete product (web app) died a sad death - not an unusual occurrence. I truly HATE making user interfaces - I had finished writing the main filtering part in C almost 3 weeks ago, but couldn’t bring myself to do any work on UI and client handling. So I am just going to put out the “unfinished” product. It is still quite useful/usable - but using it isn’t a breeze. I don’t think I will be making a UI for this anytime soon (I cannot stress enough how much I hate UI making). Enough blabbering!!! :dizzy_face: DOWNLOAD HERE

Once Rules/Never Rules

That’s right. We got rules again. Rules are evaluated with an AND expression. Once rules will select a darwin if they match at least ONCE, never rules will select a darwin if they NEVER match.

There is a rules file. First two lines are Once Rules Lower Bound and Upper Bound respectively - Next two lines are Never Rules Lower and Upper Bound respectively. The rules file is called currentTest.csv.

You can edit this this file in Excel or any text editor, BUT REMEMBER, if you edit it in EXCEL, add an apostrophe before TIMESTAMPS, otherwise excel will round that value. Remember not to change format of the file, keep saving as CSV.

Here is how the file looks

In the downloaded zip file, you will find already compiled executables for windows and linux platforms - if you don’t want to open them (bad security, don’t open random executables) I included the C code. You can compile it yourself.

How do I use this thing - Example

Timestamps require epoch timestamps in milliseconds. You can convert your chosen timestamps to epoch time at

Once Rules

  • Select Darwins from period Dec 20, 2017 - Dec 31, 2017
  • At least 50% total return (Quote > 150)
  • EX = 10
  • Dscore > 70
  • Max Drawdown > -20 (between 0 and -20)
  • At least 365 days of history

Never Rules

  • Filter during Jan 1, 2017 - Dec 31, 2017 Peiod
  • When EX = 10, Dscore NEVER falls below 55

Working with results
After entering rules, you save the rules file, and run the executable. It will filter the darwins according to your specifications. Next up, let us assume we wish to construct a portfolio and “forward test” these darwins.

  • Some Darwins are/were dead/inactive, but they will still keep showing up in the results. We need to manually filter them out. For this example, we will look at the Dec 2, 2017-Dec 31-2017 period, and see if any activity is present in Darwins, then eliminate non-active Darwins. Here is how

Forward Test

Now that we got our results, and cleaned them up of inactive Darwins (in this case STV is not inactive, so maybe looking at wider range of activity is warranted) let us run a forward test

  • Buy at 2018-01-01
  • Exit if Dscore < 55

OUCH. Clearly, extremely simplistic selection based purely on Dscore and some few other criteria are ineffective for portfolio creation.

Final Words

I realize that using this might prove challenging if you don’t have much experience with computer related stuff. Give it a try, and if you get stuck, write here with screenshots, I will try to lend a hand.

Important: Close your results file before running filter program. Otherwise it can’t write to an open file.


Oh, and also please share any interesting findings! Don’t forget, rules use AND expression while being evaluated. For more complex rules, run multiple tests and use their results intersection/union.

@CavaliereVerde, @NemesisCraze here it is! Hopefully you both can easily figure out how to use it :frowning: It is just messy and tedious, but still should not be overly complicated.


Just downloaded, i will go crazy with it :smiley:

Why haven’t you converted miilis to normal humans time?
it is just a formula no UI…


One word: laziness :sob:


Another example

  • Look at before end of 2017
  • Returns exceed 150% at some point (Quote > 250)
  • At least 15 Period history
  • After EX = 10, Dscore NEVER falls below 65 (This means at least 3 periods of 65+ DScore history)

Results: JMC, KNJ, MFB, SCS, STV, THA -> KNJ, MFB are inactive, thus remains JMC, SCS, STV, THA
We simulate them for 2018 and get ->

Heh, quite amusing! I quite like this never rule. You can find darwins that NEVER fall below a certain level, and then perform manual analysis from thereon.

Important Close your results file before running filter program. Otherwise it can’t write to an open file.


Yes but no big surprises…
JMC has a terrible divergence
STV THA and SCS have all their fantastic return done in their private migrated (selected?) part…

1 Like

Yup :smiley: That is why I found those results amusing. The reason I was in love with THA was because of these preliminary findings. THA is legit, and always maintains a high dscore. I had not imagined that divergence would have been that painful though. Anyways, many central banks will be making non-auto monetary policy decisions from here on, end of cheap money era is upon us. So Maybe THA will still be worth holding regardless.

Also, ERQ apparently also always maintains a high dscore. Good to know.

1 Like

he always has high DScore even after a poor year because he trades very unfrequently and has long DPeriods, but as investors we consider annualized return, not 12dperiods return…
We still live in years not dperiods… :smiley: :smiley:

1 Like

I know that “falling in love” with anything, be they darwins, trade ideas and whatever else is terribly detrimental to profits… but I do it anyway :smiley: Unfortunate side effects of being human I suppose. Brains are riddled with irrationalities, and KNOWING them still does not make them go away easily.


As a long time investor of THA (all of 2017 I had only THA in my portfolio more or less and thats the main reason I took darwinex more seriously) I have to say that I dont believe in it as much as I used to. I added it again in my portfolio recently but the divergence experienced in the first part of 2018 made me sell it after serious losses and I wont forget it.

So I am watching JIR hoping that the “economic news darwin” spot of my portfolio be shared someday…

1 Like

Just tested the 27 darwins with a dscore higher than 75 at the beginning of 2018 .
Forward result so far is -5% :expressionless:
Predictive power of DScore is poor


That’s why I think NEVER rules will be most useful. Never LA < 5 for example might help us find solid non loss averse Darwins, Never RS < 5, etc.

Also, you should look at performance of various brackets of Dscore to truly gauge it’s predictiveness. If market conditions have been terrible, and high Dscore loses less than lower Dscore, it still has some predictiveness, I think

1 Like

I still think that market should not be so terrible for 20+ darwins if the selection is not biased.

I think it all comes down to lack of diversification tbh. 20 Darwins aren’t really 20 unrelated assets

1 Like

DScore 60 and 24 DPeriods seems one of the best results without using the “never” rule .
Long trackrecord is a good replacement for the missing equity… :wink:


I compiled a list of all Darwins with equity > 0 alongside their VARS. You can download the file HERE.

The idea is to look at Equity * Var value to see the underlying risk! Equities > 10k have been redacted to 10k. If Darwinex gives OK, I will publish unredacted list.

@GAlbano76 @JJENSLOPFAM @CavaliereVerde @asder34 @NemesisCraze and others, I believe you might find this useful.

EDIT: Note, those values are estimates (very close estimates, less than 2.5% difference from actual values)! Should be close enough for analytical purposes.


I think you have to wait til monday for that :wink:

1 Like

Yeah, that is why I am posting redacted one right now. I think there was an oversight with the api.

1 Like

I don’t understand, I see equity and var for every darwin, where is the estimated or calculated value?

The equity and var you see is estimated! Api does not provide those values, but allows you to filter by those values. I filter by, say, equity 100-105, and estimate it as equity 102.5