-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
GetOptionChain - missing implied volatility? #224
Comments
I had purposefully left out the implied volatility column because it's my opinion that you should calculate it yourself rather than assume Yahoo's calculation is relevant for your situation. Even though I still have that opinion, it probably makes more sense to just return the data as Yahoo sends it. Thoughts? |
Yeah, in fact, I am calculating implied volatility by myslef, but I would like to compare it against implied volatility from Yahoo. Today, I have discovered strange behaviour with function getOptionChain:
test1 result is as expected - data frame with various expiration dates Any ideas why SPY can not open connection? I have tried several tickers and only SPY doesn't work..It looks like that in case SPY, the function has a problem to return more than one expiration... Best regards, |
Hi Josh, I am have been using the getOptionChain on a recurring basis. However, the package drops information regarding the last trade date. Hence, if I download the data on a daily basis, the date during the data was downloaded can be misleading. I was wondering whether it would be possible to keep track of such info? I would appreciate any feedback on this. Cheers, |
Hi @romanlelek, I'm not sure why you would get a 404 error. I wasn't able to try your code when you first encountered the issue, but your second line works now (with updated expiry dates). Hi @simaan84, what would you think of adding an "updated" attribute to the result, similar to what |
Hi @joshuaulrich, well, I have tested it now and it works....strange...maybe Yahoo fixed something on their side. No problem anymore. Best regards, |
Hi @joshuaulrich, I will look into this. Cheers |
I did not get the chance to address above earlier. There seems to be an issue running when it comes to stacking the data in the data.frame I reckon this has to do with the NewToOld function in the source file. I did some adjustment to the code. It seems to run smoothly now. In addition, I added IV and the full variables in the new edit. Let me know what you think. |
I did some changes to the above. There seems to be a trouble with the NewToOld function. In addition, following issue joshuaulrich#224, I editted the code to have the complete list of the original variables. For instance, the following code stacks all contracts in a single data.frame ds <- getOptionChain.yahoo("SPY",NULL) ds <- lapply(ds, function(ds_i) lapply(1:length(ds_i), function(i) data.frame(Type = names(ds_i)[i], ds_i[[i]])) ) ds <- lapply(ds, function(ds_i) do.call(plyr::rbind.fill,ds_i) ) ds <- do.call(plyr::rbind.fill,ds)
I am using the current version in CRAN and just ran into these two problems:
|
Hi,
I have a question, why in function
getOptionChain()
is missing a column with implied volatility? For example:But when I have a look on web:
https://finance.yahoo.com/quote/AAPL/options?p=AAPL
I can see:
Is it possible to add this column too?
Update: I have added the column on my end v, but I think that others would be interested too.
Thank you.
Best regards,
Roman
The text was updated successfully, but these errors were encountered: