top of page

Data Analytics with Python

Background - Financial Freedom vs Financial Anxiety
In 2018, to put things into perspective, I came up with an idea to track and visualise my financial progress using Excel to determine the success of my financial strategy. Being financial independence is utmost important to me. I followed a strict investing and spending plan in order to achieve my financial freedom as soon as I can, however throughout these years, it took a toll on me. I rather missing out times like spending quality time with family, trying out new experiences, avoid spending money on things I like and others for the sake of my monthly financial objectives. I caught myself being overly worrying when I overspent on something or investing lesser than I thought. I feel that I am not living my life fullest by chasing my financial goals. Therefore, I came up with this insight study to understand myself in both financial and mental perspective.

What do Jack want to know about himself?
1. The Golden Question: Can money buy Jack's happiness?
2. How my monthly investing and spending habit affect my mental well-being?
3. What data findings here can help Jack to live better financially and mentally?


What data I am using?
・Total assets, loan and net worth in MYR (*)
・Self-assessed mental well being using 5 point Likert scale (1 - Very dissatified to 5 - Very satisfied)
・All data is collected in a 4 year time span from 2018 to 2022


What tools I am using for my data analysis?
Python (Pandas & Matplotlib), Jupyter Notebook IDE, Google Sheets
← Click this funny boy to check my coding work in Github!


Disclaimer: (*) Financial data is moderated for my own privacy

My Life Journey
Financial Health & Mental Well-Being

2018-2022

Net Worth and Mental Well-Being.png

Net Worth = Total Assets - Total Liabilties
Total net worth grows in an upward trend for the past four years. Major life events bring little to no effect to my net worth growth which indicates the effectiveness of current financial strategy.

Mental Well-Being (four-month moving average)
My mental well-being faces higher fluctuation in response to major life events, for examples, having a relationship, facing pandemic lockdown or moving to a new place. It is observed that my mental well-being is very sensitive to major life event based on graph observation.

Correlation of Net Worth & Mental Well-Being 4 Month Moving Average.png

Pearson's Correlation R of 0.71 between Total Net Worth and Mental Well-Being (four-month moving average)
with a p-value <= 0.05 - statistically signifcant

Data findings found strong and positive correlation of 0.71 with my total net worth and my mental well-being 4 month average trend. It is concluded that higher net worth is positively correlated with better mental health. 

Investing&Spending and Mental Well-Being.png

Percentage of monthly investing & spending rate compared with mental well-being
A 0.20 investing rate means 20% of my net salary is for investment. Different sizes of circles are randomly scattered throughout the graph. One interesting pattern could be found in this scatter plot graph is highlighted in the grey area. Most bigger and greener circles are gathered in area where investing rate is 20% and spending rate of 25% to 40%.

Preliminary findings suggest that I have a better mental health when investing rate is on 20%. In other words, any life circumstances that affect my ability to save at least 20% may be associated with lower mental health. It can also be interpreted as I prioritize highly on financial stability and future savings.

Correlation of Other 3 Variables & Mental Well-Being.png

Pearson's Correlation R result of Mental Well-Being and
Primary Expenses Rate:  -0.19, p-value > 0.05
Spending Rate: 0.22, , p-value > 0.05
Investing Rate:  0.23, , p-value > 0.05


To study the influnce of my investing and spending habit on my mental health, three variables above are tested. Three variables are found with p-values that are more than 0.05 which claims there is insignificant evidence to determine significant relationship between these variables with my mental well-being. 

Data Findings & Conclusions

The Golden Question: Can money buy Jack's happiness?
It is found with net worth is highly correlated to mental well-being (four month moving average). However, it is important to note that correlation does not imply causation. While a strong correlation suggests a higher probability of causal relationship between two variables, there are limitations to prove causation in this study. A higher net worth may contribute to other factors like spending more quality time with friends and family that may be one of the crucial variables that affect my mental well-being. 

How my monthly investing and spending habit affect my mental well-being?
Scatterplot found one interesting pattern that better mental health is associated with 20% investing rate however correlation study shows there are weak relationship and insufficient evidence to claim that investing and spending habit has effect on mental well-being. Not to mention that my thoughts on having a monthly investing rate of 20% is ideal has some influence on my mental state as well (how I perceive financial security and stability). More further study is needed for these two variables.

What data findings here can help Jack to live better financially and mentally? 
Higher net worth is associated with better mental health on four-months moving average trend. By keeping the current financial momentum may enhance my overall mental state. However, money is not everything. it is also observed that mental health fluctuates rapidly upon important life events. Mental health improved after lockdown restrictions were lifted. Mental health degenerated after relationship broke up and pandemic. While keeping my financial stability is important for my mental health, it is suggested that social aspects may play a major role on affecting my mental health too. Assumingly, exposing myself in positive life experiences may improve my overall mental health. 

There is no evidence that my mental well-being differ from different level of spending and investing habits. I should not be overextending myself on meeting monthly financial objectives by sacrificing other life aspects. Life is not a rat race. It is okay to splurge myself on things I like or new experiences as long as it does not sabotage my net worth growth. Having some flexibility on investing and spending habit in accordance to life events and keep a balance between my financial growth and mental well-being may be a good starting point. Further data research on how my investing and spending habit affect my mental well-being may be needed.



Hypothesis and Limitations

One interesting hypothesis is yet to be tested. Could a better mental health contribute to an increase of net worth? Self-awareness, acceptance of current life difficulties, confidence of facing adversity, a sense of comfort and others may help myself identifying and improving my financial situation instead of making bad life decision and sabotaging myself. Both graphs suggest that my perception of financial stability could take a big role on mental health too as better net worth and the constant investing rate predicts future financial stability.

There are limitations on this study. This study uses the past four years historical data to predict future mental health trend with net worth hence it cannot conclude the future result would be the same. This study only analyze a range of net worth from -50,000 to 125,000. Different range of net worth, for examples, a net worth of 500,000 might bring different opinions to mental health, investing and spending habit and also the perception on how I view financial stability and financial anxiety.

© 2023 by Odam Lviran. Proudly created with Wix.com

  • Facebook
  • Flickr
  • Twitter
  • Pinterest
bottom of page