Can we use webpage, to download curent price?

Discussion in 'Data Sets and Feeds' started by jk90029, Feb 8, 2016.

  1. Dear-

    We all know how to download the 15-min delayed prices, as follows by R.

    install.packages("quantmod")
    library(quantmod)


    NY <- new.env()
    tickers <-c("^DJI","^GSPC", "^FTSE" , "MSFT")
    getSymbols(tickers,from="2016-01-01")
    NY$MSFT

    Unfortunately, NOT possible to feed 1-min delayed, with above method.

    *****************************************

    However, we all now that we can see 1-min price at yahoo/finance at
    http://finance.yahoo.com/q?s=MSFT&ql=1

    Furthermore we can see the html source of the MSFT screen, by clicking right mouse, such as
    view-source:http://finance.yahoo.com/q?s=MSFT&ql=1

    *****************************************
    My question is how we can feed the current (<= 1-min delayed) price of MSFT based on the above webpage.
    Since we ALREADY SEE the 1-min price BY OUR EYE, I guess our computer can does it automatically for us.
    If so, we can program to deliver current price of our watchlist (such as 300 equities), from 300 pieces of yahoo webpage to our local PC.

    Is it called parsing or other kind of name?

    Specifically speaking, suppose c:\watch.csv has dimension 300 by 1 and hope c:\watchresult.csv changes every minute, with dimension 300 by 2.
    Of course first column is price, and second column is its time.
     
    Last edited: Feb 8, 2016
  2. This is easily done with for instance Python and the BeautifulSoup package - you can schedule a task from within Python or launch a Python script through a cron job on a Linux environment. HOWEVER - you get what you pay for. This is free and in practice you'll have massive headache with yahoo or msft changing the layout on the page, their server being occasionally unavailable, etc. I would strongly advise against this for live trading, instead open an account at IB, fund it (10k min I think) and pay for some market data (10-50 used a month depending on what you want) and you'll have a clean API to use.
     
    debitspread likes this.
  3. 1) My primary tool is R instead of Python (beautifiSoup). Usually no good to depend on ONLY ONE tool so that we prepare a second tool for alternative way.

    2) Already opened IB with a year of trading experience. No experience API yet.
    Also willing to pay at least $10/month with data feeding and appropriate code provided by IB.
    My personal logic for entry/exit does NOT require tick/second feeding, but 1-min or 5-min feeding is fine.
     
    Last edited: Feb 8, 2016
  4. on 2/ You'd need to create your own IB code I'm afraid - there are various options and various support forums / groups, there definitely is an entry cost but it's worth it in the end as it opens up so many other possibilities.
     
  5. Probably you mean I need to spend a week of labour to learn the IB API language myself, or spend hundreds of dollars to find a tutor who works for me.

    Furthermore, IB aware this kind of entry cost.

    My alternative suggestion can be such as paying 36 months ($360 for $10/Month) upfront to IB, with their code given to me. If rejected by IB, I won't use IB any more.

    My friend may help me to retrieve equity prices by yahoo webpage too.
     
  6. jharmon

    jharmon

    Data feeds are a lot more than scraping a web page and getting a result. Data vendors spend a lot of effort in making their systems reliable.

    Rolling your own mechanism with a stack of single points of failure means your reliability is going to suffer. How would your trading system handle that? On a day with rapid movements, how would your trading system handle a broken data feed? Losses on that day might dwarf dozens of years of data feed fees.

    If you can't afford a quality data feed to support your trading, you can't afford to trade.

    if you can't code it up or can't afford to pay someone to do it, you can't afford to trade.

    Do you really have enough capital to trade?
     
    d08 likes this.
  7. Personally my logic does not require tick/second, but just 1-min or 5-min prices.
    Roughly speaking, about 20 BUY orders are placed a lot under the MKT price at 9 AM, expecting 2~5 are executed until 4 PM in 240 day average.

    The above situation (input.csv and output.csv) is not a RARE case, so that each vendor should provide a sample code, to a customer paying a year of fee upfront.
    In case the vendor does NOT provide R/Python code, I won't pay any dime to the vendor without hassle.
     
    Last edited: Feb 9, 2016
  8. I'm sure the brokers are fighting over your business...
     
  9. My English is no good. Please tell me easily.
     
  10. jharmon

    jharmon

    Trust me, they don't want your business.
     
    #10     Feb 9, 2016
    d08 likes this.