7 Financial Analyst Projects to Land Your Dream Job (Part 7)
Must-know Financial Analyst Projects to Build Your Portfolio 🚀
7 Financial Analyst Projects to Land Your Dream Job (Part 7)
Must-know Financial Analyst Projects to Build Your Portfolio 🚀
After completing this entire series on “7 Financial Analyst Projects to Land Your Dream Job,” I shared it with my colleague, who is also a financial analyst at our company.
After reading all the parts in the series and realizing that he had been featured in each one, he was moved to tears of joy and expressed his gratitude for the recognition.
If you’re not a Paid Medium Member, you can read the article for FREE here! If You Enjoyed it, Consider Giving it 50 Claps as a Token of Appreciation! 😊👏
I told him that I was wrapping up the series by writing the final part, and he mentioned that he had an intriguing project idea for me today.
With Eager Anticipation, I Waited for his Next Words!
Since today was the IATF audit at our office, an African American auditor lady was meticulously searching for non-conformities during her audit of one of the financial analyst projects he led.
He Shared that it was a Bottleneck Situation during the Project Audit!
He revealed that the project is titled, “Finance News Sentiments Dataset Building and Analysis,” and I was immediately intrigued, deciding to make it the seventh part of the series, **“7 Financial Analyst Projects to Land Your Dream Job.”**
Save this Medium Story, because it’s a Must-know Financial Analyst Project to Build Your Portfolio!🚀

7 Financial Analyst Projects to Land Your Dream Job (Part 7). Image Created by Meta AI
Table of Contents
- **Financial Analysis (Skills for Success Specialization): Your Path to Financial Mastery ∘ Are you ready to unlock the power of financial data? 💰 ∘ Why choose this specialization? 🤔**
- Project #7 : Finance News Sentiments Dataset Building and Analysis ∘ Project Objective · Finance News Sentiments Dataset Building and Analysis ∘ Packages Installation · Datasets Concatenation · Nulls Removal · Duplicates Removal · Balancing ∘ Output: Piechart of Sentiment Distribution ∘ Output: Piechart of Sentiment Distribution after Balancing · URL Removal · Contractions Expansion · Stripping · Shuffling · Output
Financial Analysis (Skills for Success Specialization): Your Path to Financial Mastery
Are you ready to unlock the power of financial data? 💰
**Join this comprehensive specialization** from Gies College of Business, University of Illinois Urbana-Champaign, and learn how to harness financial analysis to become a skilled decision-maker.
This three-course specialization will equip you with a well-rounded understanding of key financial concepts, enabling you to apply an analytical mindset to organizational success.

ILLINOIS Offers this Financial Analysis (Skills for Success Specialization) on Coursera
**Key topics covered in this specialization include:**
- The importance of a financial perspective
- Fundamental principles of Accounting and Finance
- Financial statement analysis
- Strategic and operational decision-making
- Planning and budgeting
Why choose this specialization? 🤔
**This specialization** builds upon the foundational skills developed in the Google Data Analytics Professional Certificate, offering you the opportunity to earn a dual credential. By completing this program, you’ll be equipped to:
- Analyze financial data to make informed business decisions
- Understand the financial health of an organization
- Contribute to strategic planning and resource allocation
- Enhance your career prospects in finance and business
Don’t Miss out on this Opportunity to Gain a Competitive Edge in the Business World. Enroll today and start your Journey to becoming a Financial Analysis Expert! 👈
Project #7 : Finance News Sentiments Dataset Building and Analysis
***This Project is done by Mr. Anto Benedetti *on Kaggle.
Project Objective
**The project** aims to demonstrate the application of natural language processing (NLP) and sentiment analysis in financial markets, providing a deeper understanding of how news sentiment can influence trading decisions and market dynamics.
Tools
- Python
- Natural Language Processing (NLP) libraries
- Sentiment Analysis Frameworks
What you’ll learn
- NLP
- Sentiment Analysis
- Text Processing
- Data Preprocessing
- Data Cleaning
- Data Visualization
Processes
- Gather Financial News Data: Collect financial news articles or headlines from various sources relevant to the financial markets.
- Preprocess Text Data: Clean and preprocess the text data to remove noise, tokenize it, and prepare it for sentiment analysis.
- Sentiment Analysis: Use NLP techniques to perform sentiment analysis on the financial news data and categorize the sentiment (positive, negative, or neutral).
- Model Integration: Build predictive models using sentiment scores to forecast market trends and assess the correlation between sentiment and market movements.
Finance News Sentiments Dataset Building and Analysis
Packages Installation
# `language_check` dependency must be used with Java 8
! sudo apt install openjdk-8-jdk -y
! sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
# Working version of `language_check`
! pip install git+https://github.com/MCFreddie777/language-check.git
! pip install POT # pycontractions dependency
! pip install contractions # For counting contractions
! pip install pycontractions # For expanding contractions
Datasets Concatenation
import pandas as pd
from pandas import DataFrame
dataset_path: str = "/kaggle/input/news-sentiment-analysis-for-stock-data-by-company/djia_news copy.csv/djia_news copy.csv"
column_names: list[str] = ["sentiment", "text"]
X: DataFrame = pd.read_csv(
dataset_path,
header=0,
names=column_names,
encoding="utf-8",
encoding_errors="replace",
usecols=[0, 2]
)
print(f"X shape: {X.shape}")
dataset_path: str = "/kaggle/input/news-sentiment-analysis-for-stock-data-by-company/nasdaq.csv/nasdaq.csv"
X1: DataFrame = pd.read_csv(
dataset_path,
header=0,
names=column_names,
encoding="utf-8",
encoding_errors="replace",
usecols=[0, 2]
)
print(f"X1 shape: {X1.shape}")
# Concatenate dataframes
X: DataFrame = pd.concat([X, X1])
print(f"Concatenated dataframe shape: {X.shape}")
# Map integers labels to string for data visualization
X.sentiment = X.sentiment.map({
0: "negative",
1: "positive",
2: "neutral"
})
X.sample(5)
X shape: (2381, 2)
X1 shape: (13181, 2)
Concatenated dataframe shape: (15562, 2)
Output: Financial Analyst Projects Data Table20 from My GitHub
[embed]Output: Financial Analyst Projects Data Table20 from My GitHub
dataset_path: str = "/kaggle/input/stockmarket-sentiment-dataset/stock_data.csv"
column_names: list[str] = ["text", "sentiment"]
X1: DataFrame = pd.read_csv(
dataset_path,
header=0,
names=column_names,
encoding="utf-8",
encoding_errors="replace"
)
# Reorder columns
X1: DataFrame = X1.reindex(columns=["sentiment", "text"])
X1.sample(5)
# Map integers labels to string for data visualization
X1.sentiment = X1.sentiment.map({
-1: "negative",
1: "positive",
})
X1.sample(5)
X: DataFrame = pd.concat([X, X1])
X.sample(5)
Output: Financial Analyst Projects Data Table21 from My GitHub
[embed]Output: Financial Analyst Projects Data Table21 from My GitHub
dataset_path: str = "/kaggle/input/twitter-financial-news-sentiment-dataset/sent_train.csv"
column_names: list[str] = ["text", "sentiment"]
X1: DataFrame = pd.read_csv(
dataset_path,
header=0,
names=column_names,
encoding="utf-8",
encoding_errors="replace"
)
dataset_path: str = "/kaggle/input/twitter-financial-news-sentiment-dataset/sent_valid.csv"
column_names: list[str] = ["text", "sentiment"]
X2: DataFrame = pd.read_csv(
dataset_path,
header=0,
names=column_names,
encoding="utf-8",
encoding_errors="replace"
)
X1: DataFrame = pd.concat([X1, X2])
X1.sample(5)
# Reorder columns
X1: DataFrame = X1.reindex(columns=["sentiment", "text"])
X1.sample(5)
# Map integers labels to string for data visualization
X1.sentiment = X1.sentiment.map({
0: "negative",
1: "positive",
2: "neutral"
})
X1.sample(5)
# Concatenate dataframes
print(f"X shape: {X.shape}")
print(f"X1 shape: {X1.shape}")
X: DataFrame = pd.concat([X, X1])
print(f"Concatenated dataframe shape: {X.shape}")
X.sample(5)
X shape: (21353, 2)
X1 shape: (11931, 2)
Concatenated dataframe shape: (33284, 2)
Output: Financial Analyst Projects Data Table22 from My GitHub
[embed]Output: Financial Analyst Projects Data Table22 from My GitHub
dataset_path: str = "/kaggle/input/sentiment-analysis-for-financial-news/all-data.csv"
column_names: list[str] = ["sentiment", "text"]
X1: DataFrame = pd.read_csv(
dataset_path,
names=column_names,
encoding="utf-8",
encoding_errors="replace"
)
print(f"X shape: {X.shape}")
print(f"X1 shape: {X1.shape}")
# Concatenate dataframes
X: DataFrame = pd.concat([X, X1])
print(f"Concatenated dataframe shape: {X.shape}")
X.sample(5)
X shape: (33284, 2)
X1 shape: (4846, 2)
Concatenated dataframe shape: (38130, 2)
Output: Financial Analyst Projects Data Table23 from My GitHub
[embed]Output: Financial Analyst Projects Data Table23 from My GitHub
Nulls Removal
# Check for nulls
print("Nulls before dropping:", X.isnull().sum().sum())
print("Dropping nulls...")
X.dropna(inplace=True)
print("Nulls remaining:", X.isnull().sum().sum())
Nulls before dropping: 0
Dropping nulls...
Nulls remaining: 0
Duplicates Removal
# Check for duplicates
print("Duplicates found:", X.text.duplicated().sum().sum())
print("Removing duplicates...")
X.drop_duplicates(subset=["text"], inplace=True)
print("Duplicates remaining:", X.text.duplicated().sum().sum())
Duplicates found: 4257
Removing duplicates...
Duplicates remaining: 0
Balancing
import matplotlib.pyplot as plt
from pandas import Series
label_counts: Series = X.sentiment.value_counts()
plt.figure(figsize=(8, 8))
plt.pie(label_counts, labels=label_counts.index, autopct='%1.1f%%')
plt.title('Sentiments distribution')
plt.show()
Output: Piechart of Sentiment Distribution

Output: Piechart of Sentiment Distribution
# Balance dataframe so that each sentiment has the same number of elements
min_label_count: int = label_counts.values[-1]
negative_sample: DataFrame = X[X.sentiment == "negative"].sample(min_label_count)
neutral_sample: DataFrame = X[X.sentiment == "neutral"].sample(min_label_count)
positive_sample: DataFrame = X[X.sentiment == "positive"].sample(min_label_count)
X: DataFrame = pd.concat([negative_sample, neutral_sample, positive_sample])
# Visualize sentiment distribution after balancing
label_counts: Series = X.sentiment.value_counts()
plt.figure(figsize=(8, 8))
plt.pie(label_counts, labels=label_counts.index, autopct='%1.1f%%')
plt.title('Sentiment distribution after balancing')
plt.show()
Output: Piechart of Sentiment Distribution after Balancing

Output: Piechart of Sentiment Distribution after Balancing
URL Removal
import re
from pandas import Index
# Remove all URLs
regex: str = r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+'
urls: list[list[str]] = [re.findall(regex, x) for x in X.text]
urls: list[str] = [x for x1 in urls for x in x1 if x]
print(f"Number of URLs present in the dataset: {len(urls)}")
print("Cleaning...")
X.text.replace(inplace=True, regex=regex, value="")
urls: list[list[str]] = [re.findall(regex, x) for x in X.text]
urls: list[str] = [x for x1 in urls for x in x1 if x]
print(f"Remaining URLs: {len(urls)}")
Number of URLs present in the dataset: 7087
Cleaning...
Remaining URLs: 0
/tmp/ipykernel_23/1135268522.py:11: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
X.text.replace(inplace=True, regex=regex, value="")
Contractions Expansion
from pycontractions import Contractions
path_to_model: str = "/kaggle/input/googlenewsvectors/GoogleNews-vectors-negative300.bin"
# Contractions object initialization takes a bit of time...
contractions: Contractions = Contractions(path_to_model)
contractions.load_models()
import contractions as contractions_counter
# Contractions expansion takes time too...
print("Expanding contractions...")
X.text = X.text.apply(lambda x: list(contractions.expand_texts([x], precise=True))[0])
X.text.sample(10)
Expanding contractions...
11284 Summer Infant Complete Nursery Care Kit Pink/W...
1350 Marriott International Announces Name of Integ...
5460 Retail Inflation Could Slow Further Going Ahea...
9219 $PHUN - Phunware gains on coronavirus mobile s...
3643 In the third quarter of 2007 , net sales total...
4284 This is bad news for the barbeque season .
2645 The Line 4 will run fully underground and will...
1424 Ecolab Named to CDP Water Security A List for ...
7752 Israeli leader calls for independent Kurdistan...
5332 To save Venice after its latest flood, you can...
Name: text, dtype: object
Stripping
# Remove leading and trailing whitespaces and newline characters
X.text = X.text.str.strip()
# Remove return carriage and newline inside texts
X.text = X.text.str.replace(r'[\r\n]', ' ', regex=True)
Shuffling
# Shuffle
X = X.sample(frac=1).reset_index(drop=True)
X.head(5)
Output: Financial Analyst Projects Data Table23 from My GitHub
[embed]Output: Financial Analyst Projects Data Table23 from My GitHub
Output
# Make final dataset downloadable
path: str = "/kaggle/working/dataset.csv"
X.to_csv(path, index=False)
You can also access and download the **output from my GitHub here**.
If you haven’t read the previous six parts of this series, check them out here. 👇
I hope these Financial Analyst Projects will assist you building a compelling portfolio to Land Your Dream Job. With that being said, Call me old-fashioned but Consider Following Me and Subscribe to Emails so you’ll be notified first for my next publish.

Your 50 Claps Equals One Real Delicious Coffee in My Hands! ☕
After reading this blog, If you like this blog “Just Click and Hold that Clap Icon 👏 until it reaches 50 Claps!”
If You know that, “Your 50 Claps Equals One Real Delicious Coffee in My Hands!” ☕ I beleive you never leave me here in an empty pocket.
Affiliate Disclosure: As Per the USA’s Federal Trade Commission laws, I’d like to disclose that these links to the web services are affiliate links. I’m an affiliate marketer with links to an online retailer on my website. When people read what I’ve written about a particular product and then click on those links and buy something from the retailer, I earn a commission from the retailer.
메타데이터
- post_id
- ed75b5874b95
- slug
- financial-analyst-projects-ed75b5874b95
- url
- https://medium.com/@dheenmech007/financial-analyst-projects-ed75b5874b95
- canonical_url
- https://medium.com/@dheenmech007/financial-analyst-projects-ed75b5874b95
- author_url
- https://medium.com/@dheenmech007
- status
- ok
- fetched_at
- 2026-06-26 21:52:29