From the course: Algorithmic Trading and Finance Models with Python, R, and Stata Essential Training (2019)
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Cleaning up data for algorithms
From the course: Algorithmic Trading and Finance Models with Python, R, and Stata Essential Training (2019)
Cleaning up data for algorithms
- [Instructor] Once you've imported your data into Stata, the next thing you'll want to do is start cleaning it up. Now, you can type directly into the command window in Stata, and it'll certainly run any program commands that you put in. For instance, I'll add a comma here by putting the star key and then write, This is a comment. And it populates it in the window. The only problem with doing this is that you can't easily save this code, and so, what you probably want to do is instead bring up what's called a do window. You can do this by either clicking Window and then opening up Do-file Editor or simply hitting Control + 9. So, I've now brought up a do-file, and anything we type in here, we can go through and execute once we've typed it by using this command at the top. So, again, I'll type, star, This is a Do file, and I'm going to execute it, and watch what happens. It populates right down here in our Stata command window, and it says that's the end of our do-file. Now, what I…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.