Introduction to NetworkX in Python to analyze global relationships between oil-producing countries.

Image for post
Image for post
Photo by NASA on Unsplash

Social graphs are crucial for many reasons. These types of visualizations depict relationships between entities like people. In our case, we are going to create a social graph using NetworkX in Python to display the relationships between oil-producing countries. It is a very interesting topic from which we could learn a lot about the powerful world of oil.

In this example, we will use a high positive or negative correlation between the two country’s production output to define a relationship. …


Please don’t iterate over rows to web scrape tables using Python’s Scrapy application.

Image for post
Image for post
Photo by Tomáš Malík on Unsplash

I’ve been refining my web scraping skills for a while now. I’ve used beautiful soup, requests, and Scrapy. Recently, I decided to take a second look at the Scrapy application. I wanted to see if it was more efficient to scrape the Yahoo Finance stock price history website with Scrapy versus requests using multithreading.

At first, I was annoyed by the response output when I tried to scrape a table. I researched online to see how other coders approached tables using the Scrapy application. …


Should you use multithreading or multiprocessing to scrape stock price history faster on Yahoo Finance?

Image for post
Image for post
Photo by Andreas Klassen on Unsplash

Multithreading is faster than multiprocessing at Python web scraping stock price history from Yahoo Finance. To understand why, you must know the difference between multithreading and multiprocessing.

  • Multithreading: One central processing unit or core in a multicore processor concurrently executes multiple threads of tasks together.
  • Multiprocessing: Two or more central processing units allocate mutliple tasks across the units.

Think about how many cores are in your computer processor. It is likely that you might have four cores. This means that you can run four tasks at the same time across each core. …


It’s crucial to focus on the solutions rather than the problems.

Image for post
Image for post
Photo by Rosie Kerr on Unsplash

I am not different from many people who have quickly become disillusioned with the government and its institutions. My journey began at birth, but it really started in 2013. I was working on returning to the University of Arizona to finish my bachelor’s degree in political science when I stumbled upon an article about a CEO who stood up for gay rights in his company.

I was impressed with this man’s courage to confront bigotry among shareholders of his firm. I started to write to him without response about the economic situation. …


Love is but the discovery of ourselves in others, and the delight in the recognition. — Alexander Smith.

Image for post
Image for post

Love is not a choice; it is a condition

I’ve fallen in love before against my will. It was the most painful experience of my life.

Love is not always a choice. I couldn’t choose not to love the person I cared about, even though I wanted to control my feelings.

I wasn’t ready for love. Moreover, the relationship would have been unhealthy for both of us.

It felt like a plague with physical symptoms as well as emotional. Therefore, real love is a condition for which there may be no cure.

Love is selfless and unconditional

Love can be unrequited. A person can love another person without expecting anything in return.

Love may hurt more when the feelings aren’t returned. People have to learn to not allow love to hurt them. …


Battling the echo chamber that polarizes society and divides communities.

United Nations COVID-19 Response, spread positivity, not the virus.
United Nations COVID-19 Response, spread positivity, not the virus.
Spread Positivity. Image created by Alissa Azureen. Submitted for United Nations Global Call Out To Creatives — help stop the spread of COVID-19.

It might have been Aristotle that first said, “It is the mark of an educated mind to be able to entertain a thought without accepting it.” I have been forced to live this quote to the fullest extent to survive the past few months of the Coronavirus pandemic in South America.

Throughout the Covid-19 pandemic, I have been living in Ecuador, a small country in South America. I had been here for an extended period before in 2017, and my experience this time was not much different.

Like my first visit, I was exposed to a plethora of perspectives. The voices seemed to reverberate through an echo chamber, growing louder as each part of the whole broadcast the opinions of the community. Imagine the great polar divides during political debates on Facebook. They always end in forming cliques in us versus them conflicts to persuade people to one side or the other. …


The first step in any investor’s journey is to master the definitions of crucial company financial statistics and technical stock price measurements.

a page from a dictionary defining embankment and embargo.
a page from a dictionary defining embankment and embargo.
Photo by Sandy Millar on Unsplash

Access to stock market statistics is only as powerful as your knowledge of the data itself. Therefore, here are brief descriptions of common stock market statistics. These definitions should give you a better understanding of how you can use these stock measures to make sound investing choices. You can find each of these data points on the statistics tab on Yahoo Finance.

Stock market valuation measures

Value investors, in particular, prefer to use the following real measures of financial performance to determine whether a stock the market has reasonably priced an asset.

Intraday market capitalization

The intraday market capitalization is the share price of the stock multiplied by the number of outstanding shares. The market capitalization can be a more natural way to compare valuations between similar companies with differing amounts of shares outstanding. …


How to web scrape the stock market statistics tab on the Yahoo Finance website using Python.

newspaper showing the dow jones over the trailing 12 months.
newspaper showing the dow jones over the trailing 12 months.
Photo by Markus Spiske on Unsplash

The Yahoo Finance website is one of the most popular data sources on the internet for Python programmers to gather stock market statistics. Particularly for value investors, statistics such as debt-to-equity and price-to-earnings are arguably the most essential weapons used in finance. Therefore, efficient data compilation for analysis using the Python coding language is as powerful as it is convenient.

It might sound onerous to create software that will speed up your financial data collection efforts. …


Coronavirus Photo by Edwin Hooper: Picture of an old movie theater sign that says, “The world is temporarily closed.
Coronavirus Photo by Edwin Hooper: Picture of an old movie theater sign that says, “The world is temporarily closed.
Photo by Edwin Hooper on Unsplash

I’ve been trapped in one of the poorest countries in the Americas — but not without encountering some problems.

During the Coronavirus outbreak in Ecuador, I’ve mostly been happy, but I’ve also had to deal with criminals, alcoholics, and bogus drug-induced threats over minuscule complaints. To make matters worst, some of us wait for hours for taxis that never arrive, meaning we can’t go anywhere.

I traveled to Ecuador in November from Washington, D.C., for a more relaxed lifestyle after years of stress. Like many others before me, I made the decision to visit Ecuador because I wanted to get away from the soul-sucking, debt-financed corporate culture in the United States.

At the end of January 2020, I took a short week-long trip to D.C.. The Covid-19 virus was the last thing on my mind. Luckily, I didn’t contract the Coronavirus on the trip. …


A retired quantitative trader walked me through his $800,000 automated trading platform and this is what I learned.

Quantitative stock market trading on a laptop computer screen on a reflective table with door and bookcase in background.
Quantitative stock market trading on a laptop computer screen on a reflective table with door and bookcase in background.
Photo by Carlos Muza on Unsplash

I meet the most interesting people travelling in Ecuador. My dream came true yesterday when I met a retired quantitative trader and finance engineer who used to work on Wall Street.

His wife was selling me a health insurance policy in Ecuador, which is a new requirement to obtain a professional residency visa. In the middle of filling out some paperwork, I quickly opened up my laptop to check on the price of Tesla stock.

I apologized to her for my rudeness and casually mentioned that I was trading in the stock market. …

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store