Skip to content

A network graph of stocks in the AI megatrend, by sector and industry

Notifications You must be signed in to change notification settings

jefferybatt/AI-Stocks-Network-Graph-Using-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Stocks Network Graph

This repository visualizes relationships between selected publicly traded companies, their industries, and their broader market sectors.
The network graph groups are:

  • Sectors โ€“ top-level market categories
  • Industries โ€“ specific business areas
  • Stocks โ€“ individual companies

The visualization was generated in Python with networkx and matplotlib.


๐Ÿ“Š Network Graph

Below is the rendered network graph (Stocks Network Graph.png) showing all tickers and their connections:

Stocks Network Graph

Green nodes represent sectors, blue nodes represent industries, and orange nodes represent stocks.


๐Ÿ”ง How It Was Built

  1. Data Mapping: Each ticker was mapped to its GICS-style sector and industry.
  2. Graph Creation: networkx created a three-level network (sector โ†’ industry โ†’ stock).
  3. Visualization: A spring layout was used for the โ€œbubble-planetโ€ style.

To reproduce the graph, run the included Python script (network_graph.py) or the code in this READMEโ€™s scripts section.


๐Ÿš€ Getting Started

Clone the repository and run the script:

git clone https://github.com/<your-username>/<your-repo>.git
cd <your-repo>
python network_graph.py

About

A network graph of stocks in the AI megatrend, by sector and industry

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages