Data Cleaning and calculations

levy77

Board Regular
Joined
May 7, 2019
Messages
67
Hi, I have been trying to create a calculator which looks at returns from a stock if you average in over time (average in is when you put $2000 into a stock every month or two months or so). Using data from yahoo finance such as https://au.finance.yahoo.com/quote/...96000&interval=1d&filter=history&frequency=1d what would people recommend is the best way to clean this data? For starters only "date" and "open" columns would be kept as the others are unneeded. There are some missing values in the data and some which read "null".

Continuing on from above I would then like a a formula of some sort where you select the "amount", "start date", "time interval" and "end date". Basically the formula then looks at these three things and put the amount in the start date and then puts another amount in after the time interval and then so on up until the end date. I have tried using some basic formulas but the issue is that a lot of dates aren't in the data set such as weekends and public holidays and so it just skips over them. I thought there may be a better way to clean the data which may make this easier.

Any help would be good thanks.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Power Query is the appropriate tool here. I use it all the time to get data from Yahoo, who I would note are being just super about giving us free historical stock data.

Download the file from Yahoo to your device. I'm sure it does so as a CSV. Then use PQ to manipulate the data.

Do you know PQ? If not we can look at some educational resources.

See? I got a chart done in 5 minutes.
 

Attachments

  • Annotation 2020-01-04 150249.jpg
    Annotation 2020-01-04 150249.jpg
    187 KB · Views: 21
Last edited:
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,141
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top