Find Jobs
Hire Freelancers

create a linux script to output a price file from two input files

$30-5000 USD

완료함
게시됨 11년 이상 전

$30-5000 USD

제출할때 지불됩니다
Project: create a linux script to output a price file from two input files. A linux script to create (output) a spread file given two financial markets price series (inputs). This should be either a perl or shell (bash) script. ## Deliverables Project: create a linux script to output a price file from two input files. A linux script to create (output) a spread file given two financial markets price series (inputs). This should be either a perl or shell (bash) script. Command line options: 1- spread_method (1,2) # subtraction or ratio 2- starting_value (10000) # for spread method 1, amount to add to every result, for example, 10,000 3- list\_of\_spreads (/home/mt/lists/[login to view URL]) # text file with 2 markets per line seperated by a comma 4- input_dir (/data/input/files) # (full path directory of input files) 5- output_dir (/data/output/files) # (full path where to write output files) output name format: [login to view URL] Example: The Corn-Wheat spread (input is [login to view URL], [login to view URL]; output as [login to view URL]). (In some cases the input extension could be .TXT or .txt) 6- high\_low\_check (bool, 0,1) # check that the highest price is output as high, lowest price is output as low Spread Method 1 (choose via a command line option): 1-Take the price field in each file for a given date and subtract one from the other. The format of the file is: Date Open High Low Close Volume OpenInterest TotVolume TotOpenInterest The prices are Open, High, Low, Close. There are sometimes other fields (as shown above) but they are not used. In spread method 1, to prevent the result from going negative pass a number via a command line option as the starting value. For example, in the sample files below (C20 = Corn, W20 = Wheat) the first date using the opening field, 777-1532 = -755 (negative). The first day (before adding the starting value) would look like this: 19820112 -755 -755.25 -748 -752.25 Then adding the starting value of 10,000 would look like this: 19820112 (10000+ -755) (10000+ -755.25) (10000+ -748) (10000+ - 752.25) Final result for the three days: 19820112 9245 9244.75 9252 9247.75 19820113 9247.75 9245.75 9249.75 9248.5 19820114 9248 9247 9250.5 9247.5 Spread Method 2 (choose via a command line option) 2-Take the price field in each file for a given date and divide one by the other. 19820112 778.25/1531 778.75/1535 776.25/1528.5 777.5/1530.25 19820113 777/1529 778.25/1532.5 775.75/1525.5 778/1530.5 19820114 780.5/1532.5 782/1542 779.25/1532 781.5/1541 Final result for the three days: 19820112 0.50718015665796 0.50717781402936 0.50894469062859 0.50801177240026 19820113 0.50833333333333 0.50783034257749 0.50835517693316 0.50818062827225 19820114 0.50825568088932 0.50800392028749 0.50868567682727 0.50792872323034 There are usually 4 price fields in each file. The typical layout of the price file is like this below (but no header is actually in the file, below header is for explanation purposes): File 1 (C20) Date Open High Low Close Volume OpenInterest TotVolume TotOpenInterest 19820112 777.00000000 777.25000000 775.25000000 776.75000000 19977 65500 30383 132945 19820113 777.75000000 778.25000000 775.75000000 776.50000000 18526 64149 28388 133138 19820114 777.25000000 777.50000000 776.00000000 776.75000000 12571 64451 19071 134194 File 2 (W20) Date Open High Low Close Volume OpenInterest TotVolume TotOpenInterest 19820112 1532.00000000 1532.50000000 1523.25000000 1529.00000000 14079 31637 23037 66369 19820113 1530.00000000 1532.50000000 1526.00000000 1528.00000000 11333 31846 16613 67068 19820114 1529.25000000 1530.50000000 1525.50000000 1529.25000000 7115 32319 11176 67747 Additional requirements: 1- default values #default values for each command line option Explanations: 1- for option 6, before writing the output file there should be a check for high low consistency. Due to the nature of the data construction the low could be the high of the series, or the close could be the low, etc. A check should be made before writing the output that the highest price amongst the four fields becomes the high in the output file, and the lowest price amongs the four fields is the low in the output file. 2- test price files will be supplied so you can test the script.
프로젝트 ID: 2675319

프로젝트 정보

제안서 1개
원격근무 프로젝트
활동 중 12년 전

돈을 좀 벌 생각이십니까?

프리랜서 입찰의 이점

예산 및 기간 설정
작업 결과에 대한 급여 수급
제안의 개요를 자세히 쓰세요
무료로 프로젝트에 신청하고 입찰할 수 있습니다
프로젝트를 수여된 사용자:
사용자 아바타
See private message.
$71 USD 14일에
5.0 (1 건의 리뷰)
1.9
1.9

고객에 대한 정보

국기 (UNITED STATES)
Rocky Hil, United States
5.0
37
결제 수단 확인
6월 7, 2004부터 회원입니다

고객 확인

감사합니다! 무료 크레딧을 신청할 수 있는 링크를 이메일로 보내드렸습니다.
이메일을 보내는 동안 문제가 발생했습니다. 다시 시도해 주세요.
등록 사용자 전체 등록 건수(일자리)
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
미리 보기 화면을 준비 중...
위치 정보 관련 접근권이 허용되었습니다.
고객님의 로그인 세션이 만료되어, 자동으로 로그아웃 처리가 되었습니다. 다시 로그인하여 주십시오.