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

[R-Forge #5959] getOptionChain is not working anymore #27

Closed
joshuaulrich opened this issue Jan 31, 2015 · 0 comments
Closed

[R-Forge #5959] getOptionChain is not working anymore #27

joshuaulrich opened this issue Jan 31, 2015 · 0 comments
Assignees
Labels

Comments

@joshuaulrich
Copy link
Owner

Submitted by: Brian Wagener
Assigned to: Joshua Ulrich
R-Forge link

I'm guessing that Yahoo changed something today, such that the parsing no longer works. The source of the problem is the line opt <- opt[grep('Expire at',opt)], which 'Expire at' no longer shows up in page. But since there is no results opt becomes empty, and is what is parsed.

Followups:

Date: 2014-12-13 01:12
Sender: Joshua Ulrich
Partially fixed in r625.

Date: 2014-10-28 12:41
Sender: Joshua Ulrich
To respond to your comments:

  1. Thanks for the feedback.
  2. That was intentional (and fairly inconsequential, the name is easy to change).
  3. I'm aware of this functionality, but didn't get that far in my prototyping. I'm not sure your proposed solution will work in all cases (Exp may be Date, POSIXt, character, etc?).
  4. I'm also aware of this functionality, but didn't get that far in my prototyping.

Thanks for the feedback! And patches are most welcome.

Date: 2014-10-28 12:32
Sender: Brian Wagener
So a few comments:

  1. I don't have a problem with requiring XML, def makes code cleaner and easier to address any further changes yahoo will make.
  2. previous method was called getOptionChain() yours is called getOptions()
  3. Yours doesn't allow for getting any of the expiration dates which are now in Unix date. This is what works for me: as.numeric(as.POSIXct(Exp, format='%Y-%m-%d',tz='GMT'))
  4. Another part to figure out is previously if setting Exp=NULL, then it would get all the expiration dates.

Date: 2014-10-26 00:06
Sender: Joshua Ulrich
I've attached a potential solution (getOption.R), but I'm hesitant to add a dependency on XML. Adding it as a Suggests might be a viable alternative. I'd also appreciate feedback because I'm not familiar with how the function is supposed to work.

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

No branches or pull requests

1 participant