Is your broker really who he says he is?

Sounithtra Vongsaphay
Posted on Feb 28, 2018

Photo by Nancy Lee



My second industry standard data science project was another great challenge! Our primary task was to collect data from a web source by method of scraping. I wanted to explore the finance industry this time and decided to approach an Investor Relations Firm (IR firm) and offered to help them using this project!

When looking for a great broker, you want to do your due diligence and make sure to know whether or not you can trust your money with that person. FINRA's website BrokerCheck helps by telling you whether a person or firm is registered, as required by law, to sell securities (stocks, bonds, mutual funds and more), offer investment advice or both.

The website is useful to this IR firm who looks at continually building a network of licensed professionals and maintaining long-term relationships within the financial community. The IR firm I have partnered with for this web scraping project organizes roadshows where only licensed financial advisors are permitted to attend and meet with the company's management. The firm maintains a database of over 40,000 financial advisors that constantly needs to be updated. If not, advisors retiring and leaving the industry would cause a permanent decline in number of contacts in the database. When roadshows are organized in cities where there are not enough advisors in the database, the team puts an emphasis on finding licensed advisors in the areas that have the most need.

To do so, the employees would manually search the internet to find advisors or new firms that are not already in the database. However, before a practicing advisor can be considered for the company database, it must be checked that the advisor is series 7 licensed on


For this business problem, I opted to use Selenium to scrape as the website is using Java scripts. It would have been difficult to parse using BeautifulSoup or Scrapy. I also used Katalon Automation Recorder to help me automate the refining of the results to only get brokers that are actively registered. Another challenge I have encountered was generating a message that would indicate if any of the examinations the broker has is Series 7 - General Securities Representative Examination. I was able to write a code that can generate the results expected by the Investor Relations Firm in a csv file. It allows them to easily and efficiently access the information on the broker and their company.

Data analysis

Once all the advisors in a city are checked and entered in the database, my web scraping program can run again to find the movement in the population of licensed advisors using a comparison tool like Beyond Compare and easily identify new advisors that have joined the industry and those that have left or moved firms. This will save the IR firm an enormous amount of time searching the internet for new advisors and reduces the time wasted finding advisors online that are already in the database!

Future work

Shall I have more time in the future, I would like to have an additional use of R Shiny app to this project so they can select any city and have the shiny app call the web scraper. That would reduce the chance of creating an error in the code when changing the keys to send. I have to say, it feels great to know that the knowledge we acquire over the course of this data science program gives us the ability to build strong tools that can help businesses in many industries! It will be interesting to measure the increase in the number of contacts added to the database as well as the increased time spent interacting with financial advisors in lieu of internet searching.

The web scraper automatically refines the results to get brokers that are actively registered.


We are extracting the broker’s name, required examination and the company’s information.


The investor relations firm wants to speak with brokers that have passed the Series 7 exam.


The results are saved in a csv file for easy analysis.

About Author

Sounithtra Vongsaphay

Sounithtra Vongsaphay

Sounithtra graduated from the University of Quebec in Montreal with a Bachelor's degree in Actuarial Science. She helped Osgoode law professor Gus Van Harten on actuarial modelling of investment treaties for his book Sold Down the Yangtze, a...
View all posts by Sounithtra Vongsaphay >

Related Articles

Leave a Comment

Your email address will not be published. Required fields are marked *

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags