Finally, Something Visual!

by Kevin on June 7, 2010

Well, I know I said last September about adding something to visually display data. What can I say, I’m lazy.

Now, I FINALLY added a very basic  Prime Rate Indicator chart. I was originally doing some pretty cool stuff with Flash, but with all of the static between Apple and Adobe (and the fact that it won’t render on my phone) – I decided to try something using plain old javascript. I found a pretty cool jQuery plugin called Flot (rhymes with plot) and even though I’m not a jQuery/javascript guru, I was able to hack something together.

Screenshot 1 of Zweig Model Graph

Screenshot 1 of Zweig Model Graph

The vertical gray bands represent the time that the model is on a buy signal (based on the indicator customizations available at the top of the form. The two lines show the value of two hypothetical $10,000 investments – with one following a buy-and-hold strategy, and the other being invested only when the Model is on a buy signal (which is why it’s flat during the sell periods).

There is a table above the graph that shows the numeric value of each investment, along with the date. It also shows the difference between the two values… the scaling on the graph doesn’t really make the differences as obvious (or glaring) as I’d like – so I added that to help quantify the situation.

Finally, you’re able to zoom in and out of the data. You do this by dragging the cursor over a range of data in the graph, while holding down the left-mouse button. This is pretty cool as it enables you to look more closely into the data… for instance you’ll see that the indicator pretty much failed in February of 1998 and is now significantly behind the buy-and-hold strategy. When you zoom-in, the information table able will tell you the date range that you are zoomed in on. You can continue to zoom-in more finely, and if you want to zoom back out, just click the (you guessed it) ‘zoom out’ button.

I need to work on dynamically scaling the y-axis so that when you’re looking at past periods, the differences between the two graphs are more pronounced. That’ll be my next update once I get a response from the developer on how to do it :).

[Update: I ‘fixed’ this… now instead of just selecting x-axis data, you can draw a box around the section you are interested in, and it’ll zoom in scaling both axes appropriately. Not sure if I like it – may need to add a panning option.]

One big thing: because this is javascript, all of the rendering is done in the browser. In testing this on Internet Explorer, Chrome, and Firefox, I noticed that Chrome has a massive edge on performance. The table-updating and zooming are in real-time, with NO lag. IE sucked the worst – with delays in responsiveness that were downright maddening. I kept jiggling the mouse thinking something had locked up. It makes me sad because I am a huge Microsoft fan (zm.com is all written using Microsoft tools)… but IE is just a dog here. Do yourself a favor and get Chrome. Firefox was somewhere in the middle… nowhere near as bad as IE, but not as responsive as Chrome.

[UPDATE 3/25/2011: OK, I just installed Internet Explorer 9 – and holy moly, it’s MUCH improved – may even be better than Chrome from a performance standpoint. Nice job, Microsoft!]

Ok, now it’s your turn. What did I not get right here? How can I make it better? What should I do next?

{ 9 comments… read them below or add one }

slyng July 18, 2010 at 8:28 PM

Interesting site (added to my RSS Feed). I’ve always been a fan of the Zweig models and heard that they didn’t do as well after his book was published. In any case, I was curious if you plan on modeling the “Super-Model” (i think that is what it was called) that combines many of the elements from this and a few of his other models.

Kevin July 19, 2010 at 7:58 AM

Slyng –

Good morning! I’ve been a little frustrated with the lack of interest in seeing additional indicators. I originally put this together over a few weeks (mostly nights and weekends) – with the intention of adding a new indicator every few weeks until finishing with the Super Model. In order to do that, I need to complete (in no particular order):

  • Fed Indicator
  • Installment Debt Indicator
  • 4% Model

Once those are done, I just need to implement the logic to aggregate the values of the four indicators into the Super Model.

The Installment Debt and 4% Model Indicators are easy – it’s the Fed Indicator that causing me some pain… if anyone can assist in gathering the correct data for each of the Discount Rate and Reserve Requirements – I would greatly appreciate it. I have access to the DR data, but cannot for the life of me find solid Reserve Requirements.

If I can’t get the Reserve Requirements data, I’ll release the Fed Indicator taking only Discount Rate data into consideration.

Slyng – thanks for pushing! Given your request, I’ll work on getting the Fed out within a week or so. From there, the other two will move very quickly.

Any other suggestions for improvement?

Regards,
Kevin

slyng July 20, 2010 at 11:12 AM

I may be able to get you some of this data (with a little digging). What email address should I send the excel files to?

Dan Morris August 27, 2010 at 11:54 AM

Kevin,

I’ve built a Super Model (hoping its correct!) and have used the Reserve Requirements data found at http://www.federalreserve.gov/monetarypolicy/reservereq.htm

My data is that the the Reserve Requirement dropped 4% on 12/20/07 (which put a 2 in the reserve requirement box of my spreadsheet). On 6/20/08, the first point dropped off, having aged 6 months. On 12/20/08 the last point aged off. On 1/1/09 the Fed raised the Reserve Requirement to 1.1%. On 7/1/09 the point aged off. On 12/31/09 the Fed raised the Reserve Requirement to 3%. On June 30, 2010 it aged off. Right now I show a zero on my spread sheet for the Fed Reserve Requirement.

If you would like a copy of my Excel file let me know.

And, it goes without saying, that I am very impressed with your site. Thanks!

Sarah September 29, 2010 at 6:29 PM

You website is really interesting. I’m excited for much more.

Arno van der Maarel October 22, 2010 at 10:36 AM

Dear Sir,

Can you send me a copy of the Zweig Super Model?

Thanks!

Jeff Bethel February 23, 2011 at 6:26 PM

Great site, wish it were updated more, just discovered Zweig’s book and I can’t seem to put it down. Looking for help to find additional information, maybe a working model, better than the one I am scraping together.
Thanks,
Jeff

Robb Schaefer March 31, 2011 at 8:02 PM

Hi There,

I am trying to construct the supermodel going back to 2000. I am making an error somewhere because I am getting some serious negative returns over my buy/sell signal periods. The only part of the super model that seems to be working is the 4% model. Can anyone help me check to see if the data I am using for my Fed Funds Rate, CID, and Prime Rate is actually accurate? I would greatly appreciate any help and it was a great chart to see that the Prime Indicator is in fact lagging buy/hold

Thanks,

Robb

Geoff November 11, 2011 at 6:43 PM

Can someone kindly send me the super model indicator. Also, if anyone would like to keep in more constant communication, such as e-mail or a chat group please e-mail me at gctrader89@g….com (gmail).

Leave a Comment

Previous post:

Next post: