Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It seems initGap has a forward looking bias for the SAR indicator #23

Open
ivannp opened this issue Jan 20, 2016 · 3 comments
Open

It seems initGap has a forward looking bias for the SAR indicator #23

ivannp opened this issue Jan 20, 2016 · 3 comments

Comments

@ivannp
Copy link

ivannp commented Jan 20, 2016

If I am reading the code correctly, it's sd over the Hi - Lo series. That's forward looking in a way.

@joshuaulrich
Copy link
Owner

It is forward-looking. But it's better than the prior setting, which was always 0.01. That didn't work well for data that tended to have smaller changes (e.g. foreign exchange). I'm open to alternatives.

@ivannp
Copy link
Author

ivannp commented Jan 31, 2016

It seems stockcharts.com use something like previous day low. That seems reasonable. One can always throw away a few days and use the computed sd. A third one is to do some magic using HLC from one day to come up with some sd approximation.

I was looking at the code just as a reference while implementing something similar. Otherwise I might have coded one of the above alternatives.

@HFDave
Copy link

HFDave commented Jun 18, 2016

I was wondering about the same "issue" and dumb enough to overlook the ahead looking in the code.

http://stackoverflow.com/questions/37745430/r-parabolic-sar-and-look-ahead-bias/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants