Create a PHP script (or other server side script) to query ASX trading data held in zip files in DropBox

Færdiggjort Opslået Mar 8, 2016 Betalt ved levering
Færdiggjort Betalt ved levering

1. Closing data for ASX stocks is stored (on a calendar year basis) in zip files in a DropBox folder. Naming convention: "[login to view URL]", [login to view URL]" etc. Earliest data is 2011 (i.e. "[login to view URL]") up to March 2016 (i.e. "[login to view URL]").

2. The user will periodically upload new ASX closing price data (e.g. monthly). For 2016, the new file ("[login to view URL]") will replace the old file of same name. The new file will include the trading days since the last upload. Eventually, the data for 2016 will be completed (post 31 Dec 2016) and the same process would then be undertaken for 2017.

3. Each zip file contains a comma delimitered text file for each trading day that sets out the ASX code. The naming convention is "[login to view URL]". E.g. all ASX trades on 6 January 2016 would be in text file: "[login to view URL]" in the zip file: "[login to view URL]". No text files exist for non-trading days.

4. Each company is a line on the text file. The format for each line on the text file is: Stock Code, Open, High, Low, Close, Volume. For example, trading in Cardno Limited (ASX:CDD) on 5 January 2016 would appear as follows: "[login to view URL],20160105,1.2,1.2,1.14,1.185,752060". ".AX" means that the stock is quoted on ASX and can be ignored. I am only interested in searching a company's ordinary shares, rather than options etc. Limit in this way by filtering out any ASX code of more than three characters. For example, in the example below (which shows trading data from 5 January 2016), only the line item for [login to view URL] is relevant.

[login to view URL],20160105,0.009,0.009,0.008,0.008,2278891

[login to view URL],20160105,0.003,0.003,0.003,0.003,0

5. Searching data - a simple HTML interface with the following options to filter queries:

(a) Data range to sample. This should be from 1 Jan 2011 through to today. The search would only be run over this date range. I appreciate that as the archive grows execution time could become an issue, but I don't expect the user to be searching beyond a 5 year timeframe in any event. Also, this will not be an application that is available to the public, so the script will only be run by one user at a time.

(b) Select a % price fall over a specified trading period. User would select % fall and no. of trading days. For example, a user might select 25% fall over a 5 trading day period. In that case, the PHP script is to look at closing price only (open, high and low prices can be ignored). In that case, the script would check closing price on each day against closing price on the day 5 trading days after. If the fall is equal to or greater than the % specified by the user, it is a hit (e.g. Trading Day 0 closing price = $1.00; Trading Day 5 closing price = $0.60; this would be a hit). Trading days are days on which some trading volume occurred. For example, the following entry (on 6 January 2016) indicates that there was no trading in the company on that day, so another day would be added to the comparison dataset (in the example above, assuming only one trading day has no volume, then the price check would roll to Trading Day 6).

[login to view URL],20160106,0.16,0.16,0.16,0.16,0

(c) For any price hit, the user may elect to compare the closing price on Trading Day 0 (in the example above) against the closing price in either 3, 6 or 12 months time and if the closing price in that later period is greater than the closing price on Trading Day 0, then the company is excluded from the results (i.e. the only results would be those where the price did not recover in that period. The HTML page might be a simple check box which, if selected, gives the user the option to select 3, 6 or 12 months for the comparison.

6. The output would be a simple HTML page that identifies the code of the company and all of the trading data for that company over the relevant period in 5(b) above.

A couple of diligent freelancers have identified the following issues: (1) DropBox will not allow remote server side scripting to execute - accordingly, the bes that can be done with DropBox is to interact with the API to download the zip files; (2) there may be performance issues with the recursive searches required through a large number of text files. In response to each point: (1) the zip files can be located on the server on which the script will execute (i.e. no need to integrate with DropBox); (2) if you think performance is an issue when you see the text files (there will be about 250 text files per zip file (year) each with about 2,500 lines, so for a five year search the scrip will be running through about 3.125 million lines of text) then an alternative is to write the script to upload to extract the relevant data from the text files into a mySQL database and run the queries over the database. The script to import the data into the database will need to handle the updated files described (see item 2 in my original brief). The majority of freelancers are posting without understanding the project. In fact, one two so far appear to understand in detail what is required. If you want to be selected you need to identify in your communication to me that you understand the project.

The following database structure would work:

CREATE TABLE asx_code (
asx_code_id int NOT NULL AUTO_INCREMENT,
asx_code varchar(3) NOT NULL,
CONSTRAINT asx_code_pk PRIMARY KEY (asx_code_id)
);

CREATE TABLE price_volume_data (
price_volume_id int NOT NULL AUTO_INCREMENT,
asx_code_id int NOT NULL,
trading_day_id int NOT NULL,
open_price decimal(8,4) NOT NULL,
high_price decimal(8,4) NOT NULL,
low_price decimal(8,4) NOT NULL,
close_price decimal(8,4) NOT NULL,
volume bigint NOT NULL,
CONSTRAINT price_volume_data_pk PRIMARY KEY (price_volume_id)
);

CREATE TABLE trading_day (
trading_day_id int NOT NULL AUTO_INCREMENT,
trading_day date NOT NULL,
CONSTRAINT trading_day_pk PRIMARY KEY (trading_day_id)
);

MySQL PHP Python

Projekt ID: #9877938

Om projektet

6 bud Remote projekt Aktiv Mar 14, 2016

Tildelt til:

entrepreneur2000

Hello, I specialize in building solutions for stock markets and trading. Here are few examples of my recently completed jobs on this subject: [login to view URL] [login to view URL] Flere

$999 AUD in 9 dage
(171 bedømmelser)
8.2

6 freelancere byder i gennemsnit $598 timen for dette job

MplussoftIndia

Hi Mate, I have read your project description very carefully and understood your requirements. I can create PHP script to query ASX trading data that are held in zip files in dropbox. I have understood the listed requ Flere

$526 AUD in 10 dage
(69 bedømmelser)
7.3
anuyadav1

i can write this script in python. .

$277 AUD in 4 dage
(83 bedømmelser)
6.2
dejanvesic

Hello. Is it option to use python 3.x script and instead html page for input, just command-line? e.q. Data range / percentage / price fall / price hit? Result would be the same (simple html page). If that is Flere

$444 AUD in 7 dage
(31 bedømmelser)
5.1
AshrafSabryM

Greetings, First, I salute you for the level of detailing in which you specified your requirements. I became really frustrated of buyers who just say "I want a website/app programmed". Then, I want to comment abo Flere

$340 AUD in 10 dage
(42 bedømmelser)
4.9