![]() Let's say we want to pull out just these three columns from our timetable. To access a subset of data, so in our timetable, we have NKE, AAPL over here, and WMT over here. And based on the granularity that you have for your data, you could go down to nanosecond-level precision. If I go ahead and zoom in, notice how the x-axis gets automatically updated. And I've got the x-axis, which is a date time axis. The corresponding code has been written out by MATLAB. Over here, I could click on time and on, let's say, any of these columns, go ahead to plot, click on Plot, and quickly get an idea of what the time series look like. That said, if I open this variable in variable editor by right-clicking on that variable and asking MATLAB to open prices, it opens prices in variable editor. And you can see that second line gets added to the code as well. Let's keep the way that we imported the data, sort oldest to newest, that's how we saw it, update code. If this is my intention to preserve this, I could go ahead and say Update Code, which case, that line gets added to this code over here. If I go ahead and choose to sort this entire table by the values that is there in the column KMI, I could do that by setting sort smallest to largest, in which case, the code would be that. I could sort largest to smallest or smallest to largest. I can get this arrow, upon clicking which, I have some interactivity. If I hover over these column names of, let's say for example- the first column name is KMI. Now we can see that the entire Excel file has been loaded into this variable called prices, so I can scroll down to the end and see that the last date that I would have is 27th of December, 2019. So it reads this Excel file in the format of a timetable. So for reading an Excel file into MATLAB, the function that I'm using here is readTimetable. Let's go ahead and bring this data completely into MATLAB. And we have prices that goes from 4th of January, 2018 until 27th of December, 2019. Before we get into the demo, let's have a look at the data that we'll be working with. We'll be looking at time series of stocks. Here's the data that we'll be working with today. ![]() The app is called Regression Learner, and you'll be looking at how we could use this. We'll be closing the session with a trading strategy fit using several regression models using zero lines of code. For working through the second part, we'll be using an example using trading using regression models. In the second part, we'll be looking at how to identify trends and fit distributions. ![]() In the first part, we'll be looking at basics of mathematics and matrices. Today's session is broken down into two parts. I'm Lawrence, an application engineer at MathWorks. Hello, and welcome to today's session on mathematics and matrices. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |