Essentials of Fetching Data from a Website

We are updating access to this course!

Welcome to the lesson on the essentials of fetching Data from a website!

In this chapter, we will discuss how we can use the Yahoo Finance Website to get the stock data we want. We will be using the Yahoo Finance Website as it is one of the most widely accepted and one of the most exhaustive websites for Stock Data that there is! 


However, before we discuss how to use the Yahoo finance website to obtain historical stock data, it is important that we learn how to analyse any financial website from which we want to obtain any financial data we desire. This is essential because we cannot directly fetch any data from any website in MATLAB. We must analyse the website and its URL ​properly before we can begin thinking about using it for data retrieval. Therefore, we will be using the information on the analysing websites that we gather in this lesson, later in MATLAB.


Specifically, in this lesson, you will learn the tips and tricks associated with locating essential information on a financial website and understanding the URL for such websites.




Analysing a website

Analysing any website for some data can be made fairly straightforward. Just Search, Observe and Examine! We will specifically focus on explaining how the URL might change when specific components on the website are manipulated.

  • Search
  •  Observe
  • Examine

The First Step in analysing a website is Searching the website for data. Try and find any search tabs on the Homepage and type in some text relevant to the data you are looking for. If the website returns any proper data, you can proceed to the next step. Otherwise, it is time to switch the website! 


Let us look at an example of how we can search for data on a financial website.

Example: CNN Business website

To open the CNN Business website, just look it up on any search engine or just type in the following link in the URL tab of your application or click on the link below:


https://edition.cnn.com/business


Once the home-page opens, you can search any stock company by using the search tab under MARKETS. Always remember to use the search tabs below or around some heading that indicates financial activity of some sort.

CNN Business Home Page

​Snapshot of Feb 2019

You can check the following image above wherein the stock company Google has been searched from the search tab and a list of results corresponding to that has been displayed by the website.


Now, in the next step, we will observe how choosing certain components on the webpage actually changes the website URL as well as the webpage layout. 

We are updating access to this course! Happy MATLABing!

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
Pen
>