Book Image

WebGL HOTSHOT

By : Mitch Williams
Book Image

WebGL HOTSHOT

By: Mitch Williams

Overview of this book

Table of Contents (17 chapters)
WebGL HOTSHOT
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Presenting comparative data


To compare the performance of various stocks, we need an equal starting point. However, each stock has its own starting price. Thus, we need to adjust the data so that each begins at the same point.

Comparing the performance of six stocks from September to mid-October, 2013

Engage thrusters

We will not know the starting point until we read in the entire file, which in our case is the past 30 days. Once we read in all 30 closing prices for each of our stocks, we will divide all 30 daily closing prices by the first day's closing price. That sets our first day's closing price equal to 1. This means that all the stocks we compare will have the same starting point. Every closing price thereafter will be a percent change. However, stock prices vary daily by about 1 percent or less. Such a chart will look almost flat. Therefore, we multiply each value by a multiplier that will accentuate the daily closing stock price. In this example, we multiply each value by 50 so that...