Gamestudio Links
Zorro Links
Newest Posts
Specular Shader
by Dooley
Yesterday at 18:17
is 3dgs byDirextX or Opengl?
by Dooley
Yesterday at 18:09
Tensorflow and Python 32 bit
by jcl
Yesterday at 13:28
New Zorro version 2.12
by jcl
05/21/19 17:23
Mixed frequency history (M1+D)
by jcl
05/20/19 12:21
This is my fault-tolerant ATR indicator for you
by OptimusPrime
05/18/19 16:35
missing trade variables
by AndrewAMD
05/18/19 12:37
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online
5 registered (kvm, Michael_Schwarz, Ayumi, Dooley, 1 invisible), 519 Guests and 1 Spider online.
Key: Admin, Global Mod, Mod
Newest Members
Reza65, Pritamchakra, h4h4rd, ccm, Pippo
18224 Registered Users
Topic Options
Rate This Topic
#477066 - 05/15/19 02:45 Back Test: split-adj only or split+dividend adj prices
SBGuy Offline
Junior Member

Registered: 05/27/18
Posts: 60
Backtest results between my split-only adjusted historical EOD price vs. split+dividend adjusted prices are a drastic 25%! split+dividend being the higher performing one.

My script is based on various price indicators, so should I trust one result more than the other? While 25% looks great on paper, I'm beginning to think that split-only price maybe more representative of actual live price feed.

Any thoughts?

Thanks

Top
#477069 - 05/15/19 07:34 Re: Back Test: split-adj only or split+dividend adj prices [Re: SBGuy]
Petra Offline
Member

Registered: 04/04/08
Posts: 231
I think split-only is not very realistic because dividend unadjusted prices rise before the dividend date and drop afterwards and this gives artifacts in the backtest.

Top
#477077 - 05/15/19 17:28 Re: Back Test: split-adj only or split+dividend adj prices [Re: Petra]
SBGuy Offline
Junior Member

Registered: 05/27/18
Posts: 60
But dividend payments are not actually reflected on the actual price-curve. Meaning, if a stock closed at $10 with a $1 dividend, the dividend-adjusted closed is $9, but the actual price of the stock if I want to buy it at 3:59PM EST is still $10, not $9.

It seems to me that if I use a div-adjusted price history, that price curve is NOT real, it is calculated. I only benefit from the div-adj price if I actually hold the trade through dividend date. Otherwise, entry and exist signals that are not reflective of what's actually happening on the tape -- for example, a positie close for the day vs. a negative close (because of dividend adjustment).

Top
#477080 - 05/15/19 18:08 Re: Back Test: split-adj only or split+dividend adj prices [Re: SBGuy]
kankan Offline
Newbie

Registered: 04/14/19
Posts: 13
By using the dividend-adjusted prices you are potentially calculating in a dividend distribution profit which you may not be actually getting (for the stocks you purchased on the ex-dividend date).

So, this is what you should ideally do:

- DO adjust for splits
- DO adjust for special dividends (sometimes special dividends are used for settling spin-offs etc... and this can create large gaps in price similar to a split)
- DON'T adjust for regular dividends
- DO account for regular dividends in your trade profit calculations. If you held a position in the stock before the ex-div date, the loss in share price from the dividend distribution will be returned to you as a dividend). However, if you buy the stock on the ex-dividend date, you will not be getting the dividend but the share price will obviously affect you by the dividend amount... this could be your difference that you saw (though 25% seems quite large).

Three easy ways out:
(1) use split-adjusted data only... yielding you a somewhat pessimistic result
(2) just don't trade on ex-dividend dates
(3) close your trades before the day is over

Top
#477082 - 05/15/19 18:58 Re: Back Test: split-adj only or split+dividend adj prices [Re: kankan]
SBGuy Offline
Junior Member

Registered: 05/27/18
Posts: 60
Thanks kankan. I think you're right about using split-adjusted only.

I'm not concern about a bit more pessimistic backtest results. I'm more concerned about which dataset produces results similar to real life. I would like the extra 25% profit, but I don't think it'll happen in live trading simply because dividend adjust closed are not on the tape before the market closes whem my script does its thing.

I think dividends-adj prices can and will produce false trading signals for indicators are price based.

Thanks for helping me think this through.

If others disagree, I'd like to hear your thoughts.

Top
#477083 - 05/15/19 21:46 Re: Back Test: split-adj only or split+dividend adj prices [Re: SBGuy]
SBGuy Offline
Junior Member

Registered: 05/27/18
Posts: 60
Looks like the solution to this discrepancy is to use price() instead of priceClose() for my price indicators...as suggested by the manual :-)

https://zorro-project.com/manual/en/price.htm

This brings the 2 results to be about the same, instead of 25% off.

Top



Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de