Find Jobs
Hire Freelancers

Data Cleaning and Calculations-Windows XP

$30-5000 USD

Completed
Posted over 15 years ago

$30-5000 USD

Paid on delivery
I would like a program or macro that will run on Windows XP. It will parse/clean up data from a txt file, then inport 1 data row from a csv file, create a few variables, and then perform some calculations, updating a total, then displaying the results. Cleaning data looks like this: start [login to view URL] delete top of [login to view URL] delete bottom of [login to view URL] [login to view URL] column [login to view URL] And now some variables created and calculations are performed. ## Deliverables I would like a program or macro that will run on Windows XP. It will parse/clean up data from a txt file, then inport 1 data row from a csv file, and then perform some calculations, updating a total, then displaying the results. Cleaning data looks like this: ([login to view URL]) start [login to view URL] delete top of [login to view URL] delete bottom of [login to view URL] [login to view URL] column [login to view URL] And now some variables created and calculations are performed. Step by step detail: PARSING/CLEANING 1 -- A chunk of data at the top of the file and on the bottom needs to be stripped out and deleted. The datapic1 and datapic2 shows what needs to be deleted. The data needs to always START with the rows inst#, actual, predicted.... and needs to always end ABOVE "Stratified cross-validation". 2 -- In some of the columns there are * and + These need to be deleted and replaced with a SPACE to keep the lineup. 3 -- In the second column, under the name "actual", the first 2 characters need to be deleted all the way down. This could be for example 0:1 The 0: is to be deleted, leaving the 1 By replacing with 2 spaces the lineup is kept. Exactly the same for the next column called "predicted". It could be for example 1:2 The 1: is to be deleted leaving in this case the 2. Do this all the way down the column. By replacing with 2 spaces, the lineup is kept. 4 -- Delete the word "distribution" in the column "probability distribution", leaving the header"probability". See [login to view URL] 5 --Now a column called "price" needs to be imported from another .csv file ([login to view URL] in this case) and added at the end. of input.txt. See [login to view URL] I need to be able to select the file to import the column from. The column I need is called "price" and is always in the second last column of my .csv file. See [login to view URL] The number of columns may vary, but it will always be called price and always be in the second last column. Likewise, the amount of data in step one may vary which needs to be deleted, but the start and end points are always the same. At this point the data is as [login to view URL] CALCULATIONS 1 -- A new column in [login to view URL] created. It is called Ev. Ev=probability*price for every row. 2 -- A new column called Frac is created Frac=(Ev-1)/(price-1) for every row. 3 -- I need a button or tab to ask for an input. I need to input 4 variables: "Bank"-----any number for example 1000 PercentFrac"------a number between 0-1 for example .75 These variable are entered once. "RangeHi" ---- for example .8 "RangeLo" ---- for example .4 Entered once. What needs to happen with these variables is that looking the the column "probability", ONLY data that is between .4-.8 is used for the calculations to follow!! So in this case, ALL the data rows where probability is between .4-.8 will be used for calcultions! 4 -- START calculation in row 1: Amount to bet in row 1 (each row is calculated on running total of bank above it) Bet=Bank*(Frac*PercentFrac)------amount to bet NB: At the start, "Bank" is as entered above is used. In this case 1000. The program will now run down the data betting. If it wins, it updates the bank, if it loses, it subtracts from the bank. The way it is done is to look at column "actual" 1 is a win, 0 is a loss. A loss: (column actual=0) The amount bet is as above, (Bank*(Frac*PercentFrac)) A loss will SUBTRACT this amount from the total "Bank" A win: (column actual=1) A win updates the bank by ADDING ((Bank*(Frac*PercentFrac))*(price-1)) to the amount. This happens all the way down the rows, adding and deleting until the end. I would like the end result displayed, as well as the step by step amounts so that they can be graphed. Finish.
Project ID: 3528639

About the project

4 proposals
Remote project
Active 15 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$21.25 USD in 14 days
5.0 (4 reviews)
2.0
2.0
4 freelancers are bidding on average $57 USD for this job
User Avatar
See private message.
$84.15 USD in 14 days
4.9 (437 reviews)
6.9
6.9
User Avatar
See private message.
$53.55 USD in 14 days
4.9 (60 reviews)
5.5
5.5
User Avatar
See private message.
$68 USD in 14 days
5.0 (5 reviews)
3.0
3.0

About the client

Flag of AUSTRALIA
Australia
5.0
6
Member since May 12, 2008

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.