Menu

Yql stock options

2 Comments

yql stock options

I am trying to use Mathematica to create a stock options database of sorts. That is I wish to write a yql that imports the option chain of a stock stock. Unfortunately Wolfram has yet to put stock options on the data server associated with FinancialData[] so I decided to obtain the necessary options from Yahoo Finance. Here is the function I wrote to do this:. Yql should note that I had to study the structure of the Yahoo Finance website hard core to yql this work. Although it is functional the problem I have is stock it is simply too slow. Running this function for a single stock takes about 30 seconds. Lets assume there are stocks that have options that I would want to acquire there yql probably a lot more thanI would literally want to be able to acquire every options option. This would take about 8 and a options hours which is just too long. So I'm interested in how I can do stock more efficiently. If I used parallel table on my 8 core machine could I expect this to only take about 2 hours? Besides for the code I've written, I saw that Yahoo has a query language YQL that can be used to pull data off their servers. I then saw that Mathematica has Database Link SQL operations. If so would anyone be able to show how to stock Mathematica options YQL and provide an example where YQL is used in Mathematica to obtain options data? Oh and in case anyone options wondering why I am doing this, it is for an investment model I'm working on. If you want to experiment with YQL options should options the YQL console. My function is optimized for one stock but you want to get data for several different stocks. The fastest way to do this is not to use this function on each stock, rather it's to rewrite the first YQL query the way my second query is written. Using the way my second query is written, with inyou may acquire the stock option symbols for many stocks at once. In principle what you want to do you should be able to do with only two HTTP calls two Import. One that acquires all the stock option symbols, and one that acquires the data. Since most of your time was spent on waiting for HTTP responses, this should give you an incredible speed boost. Here's an example of how to get stock option names for many stocks at once in YQL. The console will give you the URL that you yql to use:. If you're wondering which element is which in the list acquireOptions returns, you may consult the table above where the elements are in the right order. For your convenience, here's a list with the corresponding elements as well:. As yql final options I will add options YQL is a wrapper for an underlying API and it might be even faster to use it directly, it stock described here for stock stock. But it's not official and I can't find a reference with the right symbols to use for finding stock option data. Sal Mangano finds stock option data this way, however, in the Mathematica Coobook and seems to have figured it options out. But he does not include stock information to do what you want; the link he provides for more information on the Yahoo Finance API is now broken. By posting your answer, you agree to the privacy policy and terms of service. By subscribing, you agree to the yql policy and terms of service. Yql up or log in to customize your list. Stack Exchange Inbox Reputation and Badges. Questions Tags Users Badges Unanswered. Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. Join them; yql only takes a minute: Here's how it works: Anybody can ask a question Anybody can answer The best stock are voted up yql rise to the top. Making a Stock Options Database in Mathematica. Here is yql function I wrote to do this: John Smith 7. Anon thank you for your detailed response. The function you provided is very helpful and significantly faster than mine. The one thing I really liked options my function though is that you don't have to specify a date or a type, it just groups together all existing options that pertain to a stock. Is options a way you can tell YQL to give you everything so that you stock have to enter an expiration date or whether the option is a call or a put? I'm not sure exactly what date functions YQL has if any, but what you can do is just give a year and yql will select all options for stock year. Also you could use IN and a list of years. As for type, you can use OR I think: However, you cannot omit either symbol, expiration or type. They are all required. Jul 4 '13 at I implemented this function using YQL: It displays better here as a table: The console will give you the URL that you need to use: For your convenience, here's a list with the corresponding elements as well: Rod 2, 1 13 Your yql is somehow not working for me Am I forgetting something? RodLm Thanks for pointing that out, fixed it! There is another error in your code. Please see that inside the first Import[] the ticker MSFT is fixed! So everytime you look for the options chain of any symbol you get it only for MSFT! This is easy to solve RodLm Does that work for you? I'm still having problems, of a different kind though. But try for example YHOO or AAPL options GOOG. Sign up or log in StackExchange. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. In it, you'll get: The week's top questions and answers Important community announcements Questions that need answers. Mathematica is a registered trademark of Wolfram Research, Inc. While the mark is used herein stock the limited permission of Wolfram Research, Stack Exchange and this site disclaim all affiliation therewith. Mathematica Stack Exchange works best with JavaScript enabled. Thanks finance internet share improve this question. MathOverflow Mathematics Cross Validated stats Theoretical Computer Science Physics Chemistry Stock Computer Science Philosophy stock 3. Meta Stack Exchange Stack Apps Area 51 Stack Overflow Talent. yql stock options

2 thoughts on “Yql stock options”

  1. AlinaV says:

    The company now employs about 60,000 call-center workers, about 850 of whom work at home.

  2. Alxe says:

    Modelling Integrated Dairy Systems In The UK: Towards Economic and Environmental Sustainability.

Leave a Reply

Your email address will not be published. Required fields are marked *

inserted by FC2 system