A series of 4 applets are used to display market data.  They are: TransactionTicker, simpleQuote, TickerPortfolio and TablePortfolio.


A series of 4 applets are used to display market data.  They are: TransactionTicker, simpleQuote, TickerPortfolio and TablePortfolio.

TransactionTicker displays continuously updated stock trade transactions and closing data as a simple text ticker tape. This applet exists on the home and market information pages.

simpleQuote displays continuously updated quote data for a single stock. This applet exists on each companies listed company page.

TickerPortfolio displays continuously updated quote data for a group of stocks and indices as a ticker tape with company symbols and stock quote data. This applet exists on the Your Portfolio ticker popup window.

TablePortfolio dipslays continuously updated quote data for a group of stocks and indices as a table. This applet exists on the Your Portfolio list popup window.

These applets are implemented in multiple classes.  They are: TransactionTicker, simpleQuote, TickerPortfolio, TablePortfolio, Portfolio, Quotes and URLFile. TransactionTicker, TickerPortfolio, TablePortfolio and simpleQuote implements each respected applet. Portfolio provides the basic algorithym outline and methods to read stock portfolio data from applet parameters, displaying quote data, and refreshing quote data. Quotes retrieves configuration parameters and quote data from the CGI servers. URLFile retrieves a URL specified file from the server.

These classes use static members to minimize server access for images and quotes data.  Class static data fields remember their values outside the lifespan of their object, until the browser window is closed.  The TransactionTicker could not have been implemented without this feature.  Configuration parameters, images or quote data may not be reloaded when loading an HTML page.  If a problem occurs and a required image was not correctly retrieved from the server, the only way to clear some error conditions is to close all browser windows and open a new window.

The applets are displayed and manipulated using HTML pages throughout the site. TransactionTicker is displayed on home.html and marketinfo/marketinfo.html. simpleQuote is display on listed company pages found in listed. TickerPortfolio is displayed on portfolio/ticker.html.TablePortfolio is displayed on portfolio/list.html. Portfolio stock data is edited using portfolio/edit.html and stored in cookies to be read by portfolio/ticker.html and portfolio/list.html when displaying TablePortfolio and TickerPortfolio. Registration can be skipped using the URL portfolio/portfolio.html?edit.html. Left frame pages are throughout the site that read cookie data to link to registration page, your portfolio edit page or to display the popup windows.

Additional HTML pages are used for development and debugging. MarketTestPage.html displays all applets for development testing. portfolio/readCookies.html displays the current cookie settings. portfolio/delCookies.html clears the current cookie settings.

Cookie reading and setting is completed by javaScript on the HTML pages.  Cookies are created for registered flag; stock portfolio list; indices list; and popup window attributes of url, name, and features.  The cookie names are registered, indices, portfolio, typeURL, typeNAME, and typeFEATURES.  Here is the cookie code.

function getCookie(name){ 
	var cname = name + "="; 
	var dc = document.cookie; 
	if (dc.length > 0) { 
		begin = dc.indexOf(cname); 
		if (begin != -1) { 
			begin += cname.length; 
			end = dc.indexOf(";", begin); 
			if (end == -1) 
				end = dc.length; 
			return unescape(dc.substring(begin, end)); 
	return null; 

function setCookie(name, value, expires, path, domain, secure) { 
	document.cookie = name + "=" + escape(value) + ((expires == null) ? "" : "; expires=" +  expires.toGMTString()) + ((path==null) ? "" : "; path = " + path) + ((domain== null) ? "" :  "; domain = " + domain) + ((secure =   = null) ? "" :  "; secure"); } function delCookie (name,path,domain){ if (getCookie(name)) { document.cookie =    name + "=  " + ((path == null) ? "" : "; path=" + path) + ((domain == null) ? "" : "; domain = " + domain)+ "; expires = Thu, 01-Jan-70 00:00:01 GMT";}
function writeCookies(url,name,features) { 
    var portfolioValue = ""; 
    var indiceValue= ""; 
    var typeURL= "/portfolio" + "/" + url;
// 60 is  
	max symbols  that 
	3 elements  per 
	for(var loop =               
	 0;  loop <  60; loop++) 
		portfolioValue += document.portfolioform.elements[loop].value + "|"; 
	// these indice setting are also in ticker.html and list.html 
		indiceValue += "DJI;Dow Jones Industrial;http://www2.nyse.com/marketinfo/marketinfo.html?dji.html|"; 
		indiceValue += "INX;S&P 500;http://www2.nyse.com/marketinfo/marketinfo.html?inx.html|"; 
		indiceValue += "NYA.X;NYSE Composite;http://www2.nyse.com/marketinfo/marketinfo.html?nya.html|"; 
		indiceValue += "IUX;Russell 2000;http://www2.nyse.com/marketinfo/marketinfo.html?iux.html|"; 
		indiceValue += "COMPX;Nasdaq Composite;http://www2.nyse.com/marketinfo/marketinfo.html?compx.html|"; 
	//set to expire on December 31, 2010 at 11:59:59 
	var expiration = new Date(); 
	expiration.setTime(1293857999084); setCookie("portfolio", portfolioValue, expiration, "/"); 

	setCookie("indices", indiceValue, expiration, "/"); 
	setCookie("typeURL", typeURL, expiration, "/"); 
	setCookie("typeNAME", name, expiration, "/"); 
	setCookie("typeFEATURES", features, expiration, "/"); 

function readCookies() { 
	var registered = getCookie("registered"); 
	var portfolio = getCookie("portfolio"); 
	var indices = getCookie("indices");

Server middleware is used to get stock data. Transaction ticker data is obtained from IDD's siac_tape program that continuously runs on each CGI server generating transaction data and market status files. Quote data is retrieved from quoteLookup, a URL invoked CGI program available on each CGI server. The actual URL used to access each data file is a configuration parameter. The URL to view each are: http://cgi.nyse.com/data/status.dat, http://cgi.nyse.com/data/closing.dat, http://cgi.nyse.com/data/trans.dat and http://cgi.nyse.com/cgi-bin/quoteLookup.cgi?tickers=IBM.

A configuration file is used to define configuration parameters for retrieving quote data. The configuration file consists of a list of name value pairs and is read by Quotes. The configuration file resides in the codebase directory with the class files. The configuration parameters for accessing siac_tape data are:

  • status = ../data/status.dat
  • closing = ../data/closing.dat
  • trans = ../data/trans.dat

    Configuration parameter for accessing quote data is:

  • quoteLookup = http://cgi.nyse.com/cgi-bin/quoteLookup.cgi?tickers =

    Configuration parameter for accessing ticker images is:

  • imagesListed = http://cgi.nyse.com/images/listed/tic-

    Configuration parameters for loading quick quote data in browser window are:

  • tickerLoad = http://www2.nyse.com/marketinfo/marketinfo.html?sym=
  • browserWindowName = "NYSE"

    A configuration file can be defined specifically for unit testing without integrating into the rest of the system, it only needs to reside with the class files in the codebase.

    Procedure to test integrated functionallity on site

  • 1. close all open browser windows
  • 2. open a browser window
  • 3. go to the home page and verify TransactionTicker applet working
  • 4. go to market information page
  • 5. select your portfolio registering and entering portfolio data if required or selecting edit on the popup window
  • 6. display your portfolio popup window as ticker and verify TickerPortfolio applet working
  • 7. select edit on the popup window
  • 8. display your portfolio popup window aslist and verify TablePortfolio applet working
  • 9. go to home page and get quick quote for a stock symbol
  • 10. on quotes result page select 'More Company Info' and verify simpleQuote applet working

    Proceedure to update applets on site using

  • 1. copy the java classes to a temporary directory
  • 2. successfully compile them using javac *.java
  • 3. copy the successfully compiled classes to /www/a/docs/java on 250
  • 4.set the host file on the machine used to test applets from a browser with set cgi.nyse.com to
  • 5. confirm integrated functionallity on site
  • 6. ftp to from
  • 7. within ftp cd to /www/a/docs/java and enter the ftp commands prompt, hash, mput *.class
  • 8. wait for replication and verify classes on each CGI server