This project is an advanced version of a monthly stock tipping competition that I run on my vBulletin powered stock market forum.
Currently, the competition allows forum members to select one stock per month. The entries are posted in a thread and I enter the stock and the entry price manually into a MYSQL database. Each day a cron job runs a script that updates the price of each stock in the competition according to Yahoo Finance CSV data. There is a competition page on the site that displays each entrant's user name, their stock, its entry price and the percentage gain or loss.
This project involves allowing each entrant to select three stocks rather than one, to automate the entry process (there is some basic entry criteria) and to add some very basic administrative functions. I would also require the permanent storage in a MYSQL database of each month's competition statistics.
This is a very detailed version of the project I am looking to have coded:
Every month I run a stock tipping competition. You can see the competition leaderboard here: <[url removed, login to view]>
Each month, during the last week of the month, I start a thread where people post their entries and then on the last day of the month I close the thread, collate the entries and enter them into a MYSQL database manually. I enter the name of the entrant, the stock they selected and the entry price (entry price is the closing price on the last trading day of the month). Then once a day, an update script runs that updated their gain/loss. All of the stock price data is sourced from Yahoo Finance CSV data.
What I want to do is expand the competition and automate the process. I want each entrant to select three stocks, rather than one, and I want them to be able to enter the stocks themselves on a entry page so I do not have to manually collate the data myself.
The following is how I see the competition entry flowchart:
1. Entrant goes to entry page where it welcomes them by their forum user name and invites them to enter the ASX code of three stocks.
2. Are stocks valid entries? If so, continue to 3. If not, return to 1.
3. Have the same three stocks been entered before? If not, continue to 4. If so, return to 1 with error message that that combination of three stocks has already been selected.
4. Are any of the stock prices lower than $[url removed, login to view] (1 cent)? If no, continue to 5. If yes, return to 1 with an error message that stocks need to be more than $[url removed, login to view] to be eligibile
5. Enter the user name and three stocks into the database.
That takes care of the entries. However, keep in mind that this entry process happens while the current month's competition is still running so the database will need to contain the entries for the current competition as well as the entries for the following month's competition.
After the close of trading on the last day of the month, the entry price for each of the entries needs to grabbed from the Yahoo Finance CSV data. This can be done via the manual running of a script, perhaps as an admin function?
Every day after the close of trading, the current price of each stock must be updated so an up to date gain/loss percentage for each entrant can be displayed on the leaderboard page. There is a script that currently does this via a cron job for one stock per entrant that I'm sure can be modified to update three stocks per entrant.
I would also require that the results of all monthly competitions would be stored in the database so forum members can browse through old competitions at will.
There would be a few administrative functions such as the manual opening and closing of the competition and the ability to manually add or remove entrants. The competition would close automatically at a predetermined time but I would like to have the option to close it manually.
All the current scripts would be provided to the coder as a basis to work from.