July 19, 2013

The Wambooli Tech Stock Index

Filed under: Main — admin @ 12:01 am

Presenting a new feature here at the Wambooli web site, something I’ve been working on for several weeks. It’s the Wambooli Tech Stock Index. Just like the DOW, Nasdaq, and S&P, this vital investment-tracking tool will become a standard for the world when it comes to high tech investing.

Just kidding.

I love to code, so this project was more of an exercise to see if I could make it work. The notion started with my desire to put a stock tickers on the Wambooli main page. I’d just list a few stocks, such as Microsoft, Apple, and Google, and show how they’re doing.

Such a task should be simple, I innocently thought. Stock information and other data is readily available on the web. Various websites provide XML feeds to tap into: You fetch an XML document, then your own page culls through the information and retrieves what it wants.

I’ve done this type of thing before: The PorchCam web page pulls XML information from the government’s National Weather Service web site at http://weather.gov/. You can see the raw feed I use here on Wambooli: http://www.wambooli.com/fun/live/weather.php. From that page, I pluck out the items I want, then I display that info below the PorchCam image.

Like most programmers, because I figure I’ve done it once, I can do it again.

For the XML feed, I chose Google Finance. You can view their raw XML data by clicking this link [dead link], which displays GOOG, Google’s own stock. The XML feed is different from the standard Google Finance page for GOOG, shown here.

It took me a while to figure out how to access the raw feed’s data. (The Chrome web browser displays it well.) But once I did, I figured out how to create a list of “top” tech stocks and pull in a massive feed. I coded it all into a table and displayed it on the Wambooli Stock page.

But I wasn’t happy.

No, I needed an index to track the stocks’ history. That meant brining in a database and historically tracking the Wambooli Tech Stock Index. That part was relatively easy once I figured out how to read the XML feed. To make the number interesting, I added a multiplier so that the starting value of the index was set to 100.

Finally, what’s the point in tracking stocks unless you have a chart? So I coded, from scratch, my own line chart.

I’ve always wanted to go graphics programming, even if it’s simple line-drawing and not a 3D animation of a tank tread crushing a human skull. Working on the chart was interesting, mostly because the chart’s data fluctuates; I had to make all the elements in the chart’s graphic adjustable, depending on how the chart’s line flows. That was a true challenge.

In the end, the Wambooli Tech Stock Index was created, page put up, chart working. I’ve actually ran the page for several weeks now, fine tuning and adjusting elements — and I may continue to do so.

Check out the Wambooli Tech Stock Index here: http://www.wambooli.com/fun/stocks/ [dead link]

2 Comments

  1. I like the concept of having a tech index. Good idea I hope you don’t just leave it as is but continue to broaden with maybe different index comparisons on maybe a running 30 day average. For instance the New York stock exchange and nasdaq etc. Then again I have no idea how overboard you want to go just my 2 cents. 🙂

    Comment by Keith Johnston — July 21, 2013 @ 9:45 pm

  2. Thanks for the suggestions! I like ’em!

    More work…. 🙂

    Comment by admin — July 21, 2013 @ 9:51 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.


Powered by WordPress