Gamestudio Links
Zorro Links
Newest Posts
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/21/19 14:59
Alarm whenever logged out from Broker
by chsmac85. 08/21/19 14:36
What are you working on?
by 3run. 08/21/19 13:28
file_write var array ?
by laz. 08/20/19 17:18
Updating Assets<Brokername
>.csv

by Sabre. 08/20/19 15:40
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 Now
8 registered members (RealSerious3D, 3run, AndrewAMD, Southqvist, kankan, 3 invisible), 640 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
GorgonzolaBYTE, Southqvist, tawin, Raedwulf, Sabre
18270 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: 65
S
SBGuy Offline OP
Junior Member
SBGuy  Offline OP
Junior Member
S

Joined: May 2018
Posts: 65
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: 250
Austria
Petra Offline
Member
Petra  Offline
Member

Joined: Apr 2008
Posts: 250
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: 65
S
SBGuy Offline OP
Junior Member
SBGuy  Offline OP
Junior Member
S

Joined: May 2018
Posts: 65
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 Online
Newbie
kankan  Online
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: 65
S
SBGuy Offline OP
Junior Member
SBGuy  Offline OP
Junior Member
S

Joined: May 2018
Posts: 65
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: 65
S
SBGuy Offline OP
Junior Member
SBGuy  Offline OP
Junior Member
S

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


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

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

Powered by UBB.threads™ PHP Forum Software 7.7.1