anders.com: projects: mockMarket: demo
a web brokerage house simulator
[ home ]
[ anders ]
[ resume ]
[ choppers ]
[ projects ]
  [ netatalk ]
  [ route66 ]
  [ javascript ]
  [ webgallery ]
  [ mockMarket ]
  [ merits ]
  [ dailyBulletin ]
  [ panacea ]
[ words ]
[ pictures ]
[ movies ]
[ contact ]
there are 5 support scripts written in perl which are run by cron jobs.

once every 5 minutes during the trading day the transactionEngine runs and finds all open orders. it goes through each of these open orders, gets the current stock price, and processes the trade. (either filling or denying it.)

also once every 5 minutes the updateQuotes script runs. it gets a list of all the stock symbols currently in the system and updates each one so that as users view their portfolios, they see current numbers.

each night the deleteUnusedSymbols script is run which deletes all the stock symbols in the local database that are not held in portfolios. this is done so the symbols table doesn't mushroom into an enormous mess of symbols nobody cares about.

after the deleteUnusedSymbols script runs, the checkSplits script is run. this script goes through each of the symbols in the sysbols table and checks to see if the stock symbol split during the day. if so, it will go through all portfolios that own that symbol and adjust the quantity apropriatly.

after the two previous scripts have run, the updateWorth script gets run. updateWorth goes through each portfolio and calculates the "end of day" portfolio net worth. this value is used while calculating the top ten lists on the login page.

that's the end of the demo. please email me at the address at the bottom of this page with any comments or questions you might have.

[ <- previous ] [ finish -> ]