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.

Quick Post - Please Poke around, full post coming later - Portfolio+[Buy and Sell] Ruleset Backtester

Hi!

I made a portfolio/ruleset backtester. I am in a bit of a hurry, so I will make a full post in the unrestricted section later, maybe tomorrow. The thing is HERE

Quick guide -> Buy/Sell rules work like darwinex filters, you enter lower/upper bounds, and if ALL OF THEM match, darwins are bought and sold. Default values are -Infinity for lower bound, +Infinity for upper bound. If you leave sell rules empty, it will match all points, so darwins will never actually remain in the portfolio - so if you don’t have exit rules, just set lower bound for EX to 11 - since Experience never reaches 11, bought darwins won’t be sold.

Max 60 Darwins supported. Cant test periods starting before 2010-01-01.
NO CONCURRENCY, MAX 1 USER AT A TIME. If server is busy, just click and wait, it will do the thing in due time.

Tell me what you think!
BYe

9 Likes

WOW impressive!
This is what investors need!
:+1:

Thanx a lot!

3 Likes

I had the back end ready 3 weeks ago. I was bashing my head against my desk for last 3 weeks trying to create web based UI to remove intertia against usage. I’m glad you like it.

4 Likes

KVL
PFZ
PUZ
NTI
LZL
MYQ

From 2017-11-19 to 2018-11-19
Return 12% DD 3.6%
:sunglasses:

2 Likes

This is amazing! But… I can’t make it work! Can you or @CavaliereVerde give me some parameters to start? TIA

2 Likes

Grazie! :slight_smile:
Ok, now with EX=11 in the sell side we can reproduce a buy and hold portfolio… but I still can’t use the other parameters…

1 Like

If you try the parameters in the initial post you can buy at 70 and sell at 65 , but only within the list of darwins that you provide.
BTW buy and hold with custom dates is what i was waiting for! :slight_smile:

3 Likes

Also I had hoped that including high watermark commission might make the backtest results more realistic. Though it is calculated daily, not on a 3 month rolling basis like darwinex. Implementing that would have been too difficult.

Be warned that data isn’t pulled from Darwinex when tests are run. Rather everything is downloaded to my server over the weekends. Pulling from Darwinex Everytime would have been too slow.

I will of course clarify all the details once i write a full post

2 Likes

It is perfect as is! :sunglasses:
Fees don’t make the difference (as rebates) .

With your tool we can discover the real long term decorrelation!
I would add only the calculation of stagnation.

1 Like

Now we can see what those past Darwina results/performances were much easily as well. Next up, finish the thing that finds Darwins that fit the criteria, find high Dscore darwins of the past and see how they performed - that would be great.

2 Likes


:smile_cat:

2 Likes

@GAlbano76

KVL
PFZ
PUZ
NTI
LZL
MYQ
ERQ
BSL
DCD

This is even better :wink:
everyone within my live portfolio…

1 Like

I was wondering why you didn’t entered BSL the first time :sweat_smile: I’m a bit “wild” but at the end I deliver the performance!

1 Like

If any errors occur, you should see a text above the button. Please let me know. If non deliberate (such as testing before beginning of 2010, or writing nonexistent darwins), I gotta fix before opening up to more ppl. Writing robust code is annoying as hell

1 Like

I think that there can be some existing darwin that don’t have quotes so an error occur… try TAK amd FTA

I’ve tried crash list + your portfolio * 2 (to weight the same that the crashed darwin…18 vs 18) :slight_smile:

HBU
XYT
YVG
JZH
XXW
XIN
VQG
RWL
SRK
RCA
XYT
YVG
JZH
XXW
XIN
VQG
RWL
RIH

KVL
PFZ
PUZ
NTI
LZL
MYQ
ERQ
BSL
DCD
KVL
PFZ
PUZ
NTI
LZL
MYQ
ERQ
BSL
DCD

The results are interesting… very…

1 Like

Noted, THX. I’ll check it out.

Reminder again, only 1 user at a time is processed. Alas, I didn’t know this particular limitation when I started this project. So enter your inputs, click the button and wait, it would be enqueued and processed im sequential manner

2 Likes

I suggest writing SHOW at the end of your darwins to ensure that no funny business is happening.

All darwins are assumed to be invested at the start date, even if their history starts later. Until their history starts, they look like making no returns, and equally weigh on portfolio

Edit: Hmm, that invested bar makes things confusing. I mean that capital is allocated to Darwins at the start date, but not invested into (buying) darwins. Returns are calculated off of the initial allocated capital, as they should be. Capital will simply be idle until darwins history starts

2 Likes

SHOW is awesome! Thanks a lot for this simulator! Now I will try to understand how to use the other parameters… like… if I want to simulate to BUY the darwin only if over 60 of Dscore and to SELL it if it goes below 55 what I have to do? (I have tried what I thought to be the right think to do but nothing happened).

2 Likes