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

New signal-to-noise ratio for prices #26

Closed
wants to merge 6 commits into from

Conversation

peterccarl
Copy link

Here's a function for examining trendiness over a timeframe using ATR as a proxy for volatility. I think this fits the package, but let me know if you think it goes elsewhere. pcc

@braverock
Copy link
Collaborator

This may reopen the conversation about moving the OHLC functionality 'upstream' from quantmod to TTR.

This pull request can't be merged as is, because quantmod requires TTR, so this creates a circular dependency.

Also, CRAN only wants you to check and require another package if that package is in Suggests. otherwise they want you to have either put it in Requires or Imports

@peterccarl
Copy link
Author

Sorry, I'll remove those lines since they are unnecessary if the function
is in ttr. Good catch.

postscript: just to be clear, this shouldn't reopen the conversation about OHLC functionality...

On Apr 7, 2016 6:59 AM, "Brian G. Peterson" notifications@github.com
wrote:

This may reopen the conversation about moving the OHLC functionality
'upstream' from quantmod to TTR.

This pull request can't be merged as is, because quantmod requires TTR, so
this creates a circular dependency.

Also, CRAN only wants you to check and require another package if that
package is in Suggests. otherwise they want you to have either put it in
Requires or Imports


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#26 (comment)

@joshuaulrich
Copy link
Owner

Some other items:

  1. ... are not passed to ATR as documented.
  2. The try.xts / reclass paradigm should be used so all time series classes will be supported. See other functions for examples.
  3. lag.xts should be called explicitly in case try.xts fails and HLC is a matrix.

try.xts / reclass paradigm is used so all time series classes will be supported
lag.xts is called explicitly
@peterccarl
Copy link
Author

Fixed, thanks for the pointers.

@joshuaulrich
Copy link
Owner

reclass isn't called before return and quantmod::Cl still creates a circular dependency.

Directly calling for close column rather than using quantmod function
Reclassed result to match input class
@peterccarl
Copy link
Author

Ok, I missed the real circularity you were referring to. I've removed it.

@joshuaulrich
Copy link
Owner

Merged via 990da83.

@joshuaulrich joshuaulrich added the enhancement Enhancement to existing feature label Jul 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants