Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, TipmyPip, Edgar_Herrera), 804 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Back Test: split-adj only or split+dividend adj prices #477066
05/15/19 00:45
05/15/19 00:45
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
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

Re: Back Test: split-adj only or split+dividend adj prices [Re: SBGuy] #477069
05/15/19 05:34
05/15/19 05:34
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
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.

Re: Back Test: split-adj only or split+dividend adj prices [Re: Petra] #477077
05/15/19 15:28
05/15/19 15:28
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
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).

Re: Back Test: split-adj only or split+dividend adj prices [Re: SBGuy] #477080
05/15/19 16:08
05/15/19 16:08
Joined: Apr 2019
Posts: 20
K
kankan Offline
Newbie
kankan  Offline
Newbie
K

Joined: Apr 2019
Posts: 20
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

Re: Back Test: split-adj only or split+dividend adj prices [Re: kankan] #477082
05/15/19 16:58
05/15/19 16:58
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
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.

Re: Back Test: split-adj only or split+dividend adj prices [Re: SBGuy] #477083
05/15/19 19:46
05/15/19 19:46
Joined: May 2018
Posts: 134
S
SBGuy Offline OP
Member
SBGuy  Offline OP
Member
S

Joined: May 2018
Posts: 134
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.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1