The Stock Market Mood Ring

Day 62 of 100 Days Coding Challenge: Python

Yesterday, I taught my script how to look into the past—specifically, the last 30 days of each tracked stock’s closing prices. Today, we’re talking emotions—well, stock emotions. I added a function in Python to show each stock’s daily percentage change, color-coded like a moody person: green when it’s up, red when it’s down, and default when it’s flat.

Now, to be clear, I’m not a day trader glued to five monitors with live tickers whizzing by. I have a full-time job, thank you very much, and no one’s got time for that kind of circus. I check in weekly, adjust when needed, and focus on consistency over drama. Still, this function gives me a quick visual snapshot of how things are moving—and more importantly, how they might move. It’s like giving your portfolio a morning coffee and asking, “How are we feeling today?”

Patterns are the name of the game. If I can start spotting them, maybe one day I’ll teach this program to make some educated guesses—and eventually, add a bit of risk management to keep me from playing financial roulette. The next few days are all about adding the kind of analytical firepower that helps with smarter decisions down the road. And honestly? I’m kind of pumped.

Today’s Motivation / Challenge

You know that moment when you look at your bank account and squint, wondering, “What happened yesterday?” That’s what this feature is for. It’s like a digital mood chart for your stocks—without the therapy bills. Adding daily change percentages, especially in color, helps me scan for drama or calm in seconds. It’s a tiny step toward building a truly useful tool for hands-off investors like me, who want the intel without the stress.

Purpose of the Code (Object)

This code adds a quick visual check-in for each stock in my portfolio. It tells me whether a stock’s price went up or down today—and by how much—without needing a spreadsheet or third-party app. It’s lightweight, readable, and tailored to my investment rhythm.

AI Prompt (used to create today’s function):

“Please add the following function to the script.
Daily Change (%): Show today’s % change for each stock with green/red highlight.

Functions & Features

  • Calculates daily percent change for each stock.
  • Highlights gains in green and losses in red.
  • Leaves unchanged stocks in default color.
  • Makes my console look like it actually cares.

Requirements / Setup

pip install yfinance

Minimal Code Sample

if change_percent > 0:

    color = “\033[92m”  # Green

elif change_percent < 0:

    color = “\033[91m”  # Red

else:

    color = “\033[0m”   # Reset

This assigns a text color based on the day’s percent change in stock price.

Stock Tracker

Notes / Lessons Learned


I’m starting to feel like a feature-adding machine—well-oiled, slightly caffeinated, and surprisingly organized. Thanks to the roadmap I drafted early on, it’s easier to stack new functions like LEGO bricks (minus the foot pain).

Today, I learned how to add color using ANSI escape codes. Think of them as secret signals you whisper to your terminal to make it look fancier. So now, green means the stock had a good day, red means it might need a hug, and the reset command keeps the rest of the terminal from turning into Christmas.

What I love about this feature? It’s subtle but powerful. Visual clarity goes a long way when you don’t have time to deep dive. And hey—who knew the terminal had a flair for drama?

Optional Ideas for Expansion

  • Add arrows (↑/↓) next to the percent for more flair.
  • Let users set custom alert colors (purple for panic? Why not).
  • Create a summary line showing how many stocks gained vs. lost today.

Watching Your Stocks Like a Hawk (But With a Graph)

Day 61 of 100 Days Coding Challenge: Python

The last five days were all about laying the foundation—think of it as assembling IKEA furniture, but with Python and fewer Allen wrenches. I got the stock tracker’s bones in place, installing essentials like the yfinance library. Now, it’s time to dress it up and make it do something more alive—like track real stock movement over time.

I’m finally stepping into the exciting part: creating a portfolio visualization that doesn’t require squinting at 14 browser tabs.

We’re starting simple. One historical price chart per stock. No more, no less. Why? Because trying to cram five charts into one screen is like watching five soap operas at once—dramatic, confusing, and probably bad for your blood pressure.

Back in university, my finance professors swore by stock observation like it was a sacred rite. Watch the markets, they said. Understand the impact of events—unemployment numbers, interest rate announcements, or when Jerome Powell so much as blinks. These things shake the market, and now, thanks to a bit of Python magic, I can watch those ripples without hopping from one website to another.

Today’s Motivation / Challenge

Have you ever tried checking your stocks manually, one by one? It’s like chasing toddlers in different directions. Today’s goal: automate that madness. With a single function, I want to see the historical price trends of each stock in my portfolio—visually. Because numbers are fine, but a chart? A chart speaks volumes.

Purpose of the Code (Object)

This little script fetches and plots the past 30 days of closing prices for each stock in your portfolio. It doesn’t try to impress anyone with fancy calculations. It just shows you what your stock has been up to, in a nice, simple line graph—so you can stop opening 27 browser tabs.

AI Prompt

Add the function to plot past 30-day price history for a single stock

Functions & Features

  • Plots past 30-day price history for a single stock
  • Automatically fetches historical data from Yahoo Finance.
  • Easy to reuse for each stock in your portfolio

Requirements / Setup

pip install yfinance matplotlib

Minimal Code Sample

import yfinance as yf

import matplotlib.pyplot as plt

def plot_stock_history(ticker):

    stock = yf.Ticker(ticker)

    hist = stock.history(period=”30d”)

    hist[‘Close’].plot(title=f”{ticker} – Last 30 Days”)

    plt.xlabel(“Date”)

    plt.ylabel(“Price ($)”)

    plt.grid(True)

    plt.show()

→ Fetches and plots 30-day closing price for a given stock symbol.

Stock Tracker

Notes / Lessons Learned

To get this feature working, I first installed yfinance and matplotlib. Easy enough—until I noticed the pip version nagging me to update (again). I was on 25.1.1, and suddenly it wants 25.2. It’s like that one friend who insists on “just one more update” before going out.

This is the reality of programming: libraries get updated more often than your favorite streaming shows, and if you’re not careful, your working code might just throw a tantrum the next day. I used to roll my eyes when game servers went down for “maintenance.” Now I know—those devs were heroes.

Also, pro tip: stock movements don’t just come from earnings reports. Tariff announcements? Those hit hard. I saw a few of my stocks tumble right after one went into effect. Should’ve bought the dip… but hey, now I can at least see it happening, in style.

Optional Ideas for Expansion

  • Add a dropdown menu or an input box to select stock instead of typing it
  • Color-code gains vs losses on the chart
  • Combine charts into one interactive dashboard (when you’re feeling brave)

Pull-Ups, Greed, and the Fine Art of Pushing Just Enough

Brian’s fitness journal after a brain stroke

I woke up a few minutes early this morning, which already put me in a suspiciously good mood. Mondays usually require negotiation. Today did not. Today was pull-up day.

That meant I had a decision to make.

I’d originally set my goal at 20 pull-ups—a nice, round, respectable number. I hit that last week. So the question was simple:
Do I maintain… or do I get greedy?

Before my brain stroke, I used to follow a program called P90X. I had one of those doorway pull-up bars—the kind that makes you question both engineering and your doorframe. A year before my stroke, my wife upgraded me to a proper exercise bar. Then the stroke happened. The bar sat unused. Later, it was dismantled when we moved to Nashville.

For a long time, upper-body strength wasn’t even on the agenda.

First came walking—with a walker.
Then walking with my wife’s support.
Then a stick.
Then jogging.
And now… 10K runs.

A few years ago, I pulled the equipment back out and reassembled it. At first, pull-ups were brutal. Awkward. Humbling. But slowly—quietly—they came back.

Here’s the strange part:
I can now do more pull-ups than I could before my stroke.

That still surprises me.

So this morning, being appropriately greedy, I went for 21.

I completed the first 10 without dropping from the bar and immediately felt victorious enough to justify the decision. When you push just beyond what you think you can handle—not recklessly, but deliberately—your body often agrees to the negotiation.

The remaining 11 came in two bursts:
6 pull-ups, a few seconds of existential bargaining, then 5 more.

Done.

I’m still careful. I have to be. My kidneys mean I can’t overwork muscle tissue or recover like a typical athlete. Cardio and resistance training are good for me—but excess is not. Everything lives in the margins of balance.

Still, this kind of pushing works for me.

For now, I think I’ll keep increasing the count each week—at least until I can comfortably complete two clean sets of 10 with only a short break between them.

After that?
We’ll renegotiate again.

That’s how progress works—not in straight lines, but in small, stubborn decisions made on ordinary Monday mornings.

How to Simulate Weighted Stock Investments in Python

Day 60 of 100 Days Coding Challenge: Python

When it comes to investing, I tend to lean toward the systematic approach. I like a plan. Not a “buy high, panic low” kind of plan, but a “how can I make $100 go as far as possible without needing a spreadsheet and a prayer” plan. Many stocks—especially ETFs—allow fractional share purchases, which is a blessing for anyone whose investing budget is less Wall Street and more wallet lint. That’s the beauty of modern investing: even if you don’t have a mountain of capital, you can still climb the hill.

So today I asked myself, what if my program could simulate that for me? What if I could say, “Here’s my $100,” and the program could allocate it automatically? Then I thought: what if I want to invest 25% in TSLA and only 5% in that random biotech company I’m not sure I trust? That’s where the idea of weighted allocation came in. A little money invested consistently can become something big over time—and the code now knows how to treat your dollars like they matter. Because they do.

Today’s Motivation / Challenge

You’ve probably heard some version of the advice “invest consistently, even with small amounts.” But how do you split that $100 in a smart, intentional way? Today’s challenge was about helping the program act like a friendly robo-advisor. Instead of dividing your money equally, it now lets you decide how much each stock gets. More TSLA, less risk. Or more risk, less cash. Either way, it’s your call—and the math is on your side.

Purpose of the Code (Object)

This new feature lets you simulate how much stock you could buy with a specific amount of money based on custom weight percentages. You choose the amount to invest, set the allocation weights for each stock, and the script calculates how many shares you could get, what it would cost, and how much remains. It’s budgeting, but for your imaginary portfolio.

AI Prompt: 

Create a Python function that takes a total investment amount and a custom percentage for each stock, then calculates how many shares can be purchased and the cost per stock using yfinance.

Functions & Features

  • Add or remove stock symbols from your portfolio
  • View real-time prices of all tracked stocks
  • Simulate investment allocation based on equal weights
  • Simulate investment allocation based on custom weight percentages
  • Check the price of a specific stock
  • Exit the program (option 99)

Requirements / Setup

pip install yfinance

Works with Python 3.8+. Use a virtual environment for clean setup.

Minimal Code Sample

def simulate_weighted_allocation():

    total = float(input(“How much to invest? $”))

    for symbol in stocks:

        weight = float(input(f”{symbol} weight (%): “))

        allocated = (weight / 100) * total

        shares = allocated / get_price(symbol)

        print(f”{symbol}: {shares:.4f} shares for ${allocated:.2f}”)

Takes your total investment and simulates purchasing based on custom weights.

Stock Tracker App

Notes / Lessons Learned

Initially, my simulation just split the money evenly—simple and safe. With 13 stocks in my portfolio, that reminded me of those index funds that allocate 1% to everything, like some kind of financial democracy. And while that’s a solid strategy (Vanguard would approve), I wanted control. I wanted to give TSLA a bigger slice of my $100 pie. So I added a custom weight input. Now the script lets me play mini portfolio manager.

One catch: if your percentages don’t add up to exactly 100, the program will throw a gentle tantrum. So you do have to plan ahead and know what you’re allocating. Otherwise, it’s like hosting a potluck and forgetting who brings dessert—awkward and disappointing. Still, once it worked, I thought: This is cool. It’s like mock investing with real math—and zero risk.

Optional Ideas for Expansion

  • Save your weight presets for recurring investment styles
  • Add error handling to automatically rebalance weights to 100%
  • Display a pie chart of your allocation with matplotlib

This marks the point where the stock tracker grows from a utility to a personal investing playground. And we’re only 60 days in.

The Price is Modular: Breaking Up is Clean to Do

Day 59 of 100 Days Coding Challenge: Python

Yesterday, I caught myself on the edge of a rookie mistake: copying the same chunk of “fetch price” code into every place that needed it. It was like déjà vu with worse indentation. So I took a breath, cleaned it up, and extracted that logic into a shiny, single-purpose function: get_price(). Now, anytime I need the current price of a stock, I just call one clean little line. And if I ever want to swap out Yahoo Finance for Alpha Vantage—or carrier pigeons, who knows—I only have to update it in one place.

Unlike my previous project (the slightly chaotic book tracker that looked like it was written in a storm), this time I’ve actually thought about structure. I outlined a rough roadmap and started slicing features into small, logical pieces. Turns out, coding for your future self is a real kindness. It’s already making the script easier to manage, and I haven’t even spilled coffee on it yet.

I also added an extra feature that turned out to be more useful than expected: the ability to check the current price of a single stock on demand. It’s perfect for those moments when I randomly wonder, “How’s TSLA doing today?” or “Is MSFT still climbing?” Now I don’t have to scroll through my entire portfolio—I just type, fetch, and boom. Market curiosity satisfied.

Today’s Motivation / Challenge

 This project is starting to feel like a real tool, not just a list of stock symbols collecting digital dust. But with functionality growing, it was time to tidy up the code before it turned into a spaghetti bowl. By modularizing the price-fetching logic, I gave myself room to grow—because adding new features is so much easier when your code isn’t held together with duct tape and denial.

Purpose of the Code (Object)
 

The script now includes a reusable function, get_price(), that handles all price-fetching tasks. It simplifies the process of displaying current prices and opens the door to adding new features without clutter. I also added a quick price-check tool for any stock—not just ones in your portfolio.

AI Prompt: 

Refactor price-fetching logic into a reusable Python function using yfinance. Add an option to check the real-time price of any single stock.

Functions & Features

  • Add or remove stock symbols
  • View your portfolio with current prices
  • Fetch real-time price for any single stock
  • Show stock symbol list
  • Exit the program (option 99, always last)

Requirements / Setup

pip install yfinance

Python 3.8+ recommended. Use a virtual environment if possible for clean installs.

Minimal Code Sample

python

CopyEdit

def get_price(symbol):

    ticker = yf.Ticker(symbol)

    return ticker.info.get(“regularMarketPrice”)

A reusable function to get the latest market price for a stock symbol.

Stock Tracker

Notes / Lessons Learned
 

The key to keeping a growing script from turning into chaos? Organization. Even with AI in your corner, you still need to think ahead. During my book tracker project, I just tacked on features as they came to mind—resulting in a menu that looked like a word jumble and an exit function mysteriously wedged in the middle of everything.

This time, it’s different. Each function has a purpose, and I’m building with intention. Adding the “check a specific stock” feature was fast and satisfying. I tested it with TSLA and MSFT—worked like a charm. It’s amazing what a little structure (and a lot less clutter) can do.

Optional Ideas for Expansion

  • Add error handling for invalid or misspelled stock symbols
  • Include the timestamp of last price update
  • Build a search history so you can revisit recently checked stocks

This project is starting to feel less like a toy and more like a tool. Clean code, clear menus, and real data—what’s not to love?

A Skunk Alarm Clock and My Fastest Start to a New Year

Brian’s fitness journal after a brain stroke

My New Year didn’t start with an alarm clock—it started with a skunk alert.

About an hour earlier than I planned to wake, my wife called me to open the garage door so she could get back into the house after her morning walk. Apparently, she’d spotted a skunk casually loitering near our front porch and decided that direct negotiation was not the safest strategy.

Reasonable.

She’d just returned from her morning exercise, and it was still dark outside. When I turned on the porch light, the skunk immediately fled—clearly not interested in confrontation or homeownership. Crisis resolved. Sleep, however, was not.

Being awake an hour early left me groggy and disoriented, but I did my best to reset into my normal routine. Eventually, I laced up and headed out for my run.

And then something unexpected happened.

The first quarter kilometer felt fast—suspiciously fast. I checked my pace and realized I was already about 30 seconds ahead of my target. Concerned I might burn out early, I shifted focus to simply maintaining speed instead of chasing numbers.

By the end of the first kilometer, I was over a minute ahead of my target pace.

At the two-kilometer mark, my average pace had dropped below 8 minutes per kilometer. That’s the kind of number that starts doing dangerous things to your optimism. If I could hold it for another three kilometers, I’d set a new personal best and potentially smash my end-of-year goal on the first run of the year.

That part felt slightly unreal.

I couldn’t quite maintain that pace through the final kilometer and drifted back above 8 minutes per kilometer—but it didn’t matter. I still set a new personal best and ran significantly faster than my previous run on Wednesday.

More importantly, it confirmed something:
If I just keep doing what I’m doing, my goal is absolutely reachable.

I only need to shave 22 seconds off my pace to hit sub-9 minutes per kilometer.

That’s not magic.
That’s consistency.

For a year that began with a skunk encounter and a disrupted sleep cycle, it turned into a surprisingly perfect first run. Strong, fast, confident, and full of momentum.

Not a bad way to start a new year at all.

Now Showing: The Price is (Almost) Right

Day 58 of 100 Days Coding Challenge: Python

Today, I finally unlocked the magic of seeing live stock prices for the companies I’ve been tracking. I activated the virtual environment I had so carefully crafted for this project—like slipping into a freshly pressed lab coat—and copied my previous file to create the next version. This has become my ritual. I don’t trust myself enough to overwrite yesterday’s work. I’ve learned the hard way: one misstep, and suddenly you’re debugging into the void at midnight.

But this time, everything felt smoother. More methodical. Like my stock tracker finally got itself a LinkedIn profile and a morning routine. I added the new function and, for the first time, watched real prices pop up for the stocks I entered. It was like watching your kid take their first steps… except your kid is Apple and it’s walking straight into your fantasy portfolio.

Today’s Motivation / Challenge


Sure, it’s fun to say you’re tracking stocks—but it’s even better to see what they’re actually worth. Today’s goal was to bring those tickers to life with live price data. It’s like turning a guest list into a party: you know who’s there, but now you see what they’re wearing. A clean interface that pulls prices makes the tracker feel real—and a lot more useful than a plain list of letters.

Purpose of the Code (Object)


This update adds a function that displays all currently tracked stocks alongside their latest prices pulled from Yahoo Finance. It keeps things simple and readable, so users can check their “portfolio” at a glance without needing to log into a brokerage or scroll through a financial website.

AI Prompt:

Add a function to a Python script that displays all stock symbols in a list along with their current market prices using the yfinance library.

Functions & Features

  • Add stock symbols
  • Remove stock symbols
  • Show tracked symbols
  • View current stock prices
  • Exit the program (option 99, always last)

Requirements / Setup

pip install yfinance

You’ll also need Python 3.8+ and a virtual environment (optional but recommended).

Minimal Code Sample

import yfinance as yf

def view_portfolio():

    for symbol in load_stocks():

        price = yf.Ticker(symbol).info.get(‘regularMarketPrice’)

        print(f”{symbol}: ${price:.2f}” if price else f”{symbol}: Price unavailable”)

Fetches and displays each stock’s latest price using Yahoo Finance.

Stock Tracker

Notes / Lessons Learned


For this feature, I added the yfinance library and made sure to import it up top with the rest of the code crew. I also handled the situation where your portfolio might be empty—no one likes being told they have nothing, but it’s better than a crash. Thankfully, all the stocks I added yesterday were valid, so prices rolled in smoothly like a stock market ticker parade.

The function pulls from regularMarketPrice, which seems to be the most consistent for daily price checks. There were no errors, no false alarms, and no imaginary companies to spoil the moment. Just sweet, sweet confirmation that this tracker is starting to walk, maybe even jog.

Optional Ideas for Expansion

  • Show daily percentage change or price movement alongside current price
  • Highlight gains and losses in green/red
  • Let users refresh prices without restarting the script

Day 58 marks the moment this project stopped being theoretical. It’s starting to feel real—and I’m here for it.

Name It and Claim It: Deleting Stocks and Wrestling Filenames

Day 57 of 100 Days Coding Challenge: Python

Yesterday, I made a small typo when entering a stock symbol—just one little slip of the keyboard, and suddenly I’m the proud owner of a fictional stock ticker. Unfortunately, the program didn’t come with an “oops” button, so today’s goal was obvious: build a function that lets me delete stock symbols from my list before my portfolio starts sounding like a toddler named it.

While I was at it, I got curious about filenames. You see, in the past, I’ve gone a bit wild with my naming convention—stuff like Book_Tracker_v2.py, final_final_please_work.py, or the classic version3_newest_final_backup2.py. This time, I wanted to test a more polished approach. I tried naming my file stock_tracker v1.1.py, thinking it looked quite professional. Spoiler alert: Python did not agree. Turns out, spaces in filenames are like pineapple on pizza—technically possible, but likely to cause arguments and strange behavior. Thankfully, stock_tracker_v1.1.py worked like a charm. I even read online that while dashes (-) are allowed, underscores (_) are generally the safer bet, especially if you want to avoid those sneaky bugs that only show up on Tuesdays after coffee.

Today’s Motivation / Challenge

Stock lists, like closets, need regular cleaning. If you accidentally track “TSLAA” instead of “TSLA,” your code won’t yell at you—but your future self will. Today’s challenge was all about giving the user (ahem, me) the power to tidy up their tracked stocks without digging through JSON files manually. It’s about building habits—and menus—that you can live with.

Purpose of the Code (Object)

This code lets you remove any stock symbol you’ve previously added. You just type the ticker you no longer want, and poof—it’s gone from the list. No editing files, no drama. The script also includes the option to view your list or exit gracefully (with a nod of thanks).

AI Prompt:

Write a Python program that allows users to delete a stock symbol from a JSON-based watchlist. The program should prevent duplicates, validate user input, and display a clean menu.

Functions & Features

  • Add new stock symbols to your list
  • View all currently tracked stocks
  • Remove a stock symbol by name
  • Quit the program (option 99, always last)

Requirements / Setup

Python 3.8 or higher

No additional libraries are needed. If you’re starting from scratch, create a virtual environment:

python -m venv venv

source venv/bin/activate  # macOS/Linux

venv\Scripts\activate     # Windows

Minimal Code Sample

def remove_stock(symbol):

    symbol = symbol.upper()

    stocks = load_stocks()

    if symbol in stocks:

        stocks.remove(symbol)

        save_stocks(stocks)

Removes a stock from your tracked list if it exists.

Stock Tracker

Notes / Lessons Learned

The trusty “Exit” option is still holding strong at number 99—right where it belongs. Tucking it at the bottom of the menu means no more accidental goodbyes when all I meant to do was clean up a typo. It’s like the emergency exit: always there, but hopefully not pressed by mistake.

Now, about filenames. I had this grand idea to name my script stock_tracker v1.1.py—you know, a classy versioning system worthy of a Silicon Valley pitch deck. Python, however, wasn’t impressed. Turns out, putting spaces in filenames is a little like trying to run a sprint in flip-flops. Technically doable. Practically… a terrible idea. After a few errors and some Googling, I landed on stock_tracker_v1_1.py, which behaved much better. Pro tip: underscores are your friends, hyphens are moody, and spaces are just asking for trouble.

Oh, and that rogue stock symbol I entered yesterday? Gone. Deleted. Justice served.

Optional Ideas for Expansion

  • Confirm before deleting a stock (a simple “Are you sure?” prompt)
  • Add auto-complete for stock symbols already in the list
  • Show a “last modified” timestamp next to each symbol

Starting the Year Strong—with New Year Fitness Goal, Planks, Plans, and Yard Work

Brian’s fitness journal after a brain stroke

Happy New Year!

Looking back over the past year, I’m genuinely pleased with how things turned out. I ran just over 1,200 kilometers, lowered my average pace, and increased my strength training. As a small but satisfying punctuation mark, I completed a three-minute plank on my first attempt today—an achievement my abdominal muscles are already protesting and will likely escalate tomorrow.

I can’t gain muscle quickly, and I never will. With my kidney condition, protein intake has limits, so everything becomes a balancing act: how hard I train versus how much my body can reasonably rebuild. Still, consistency counts. Despite the constraints, my muscle mass percentage remains high, which feels like a quiet victory earned through patience rather than force.

I’ve already started working on my New Year Fitness Goal. New year, clean sheets—literally and figuratively. I spent time around the house updating spreadsheets, refining routines, and mentally shifting into the next phase. My wife was home today because of the holiday, though “home” is a relative term—she was busy all day, as usual, and woke up early like it was any normal workday. My wife, by the way, does not make new year fitness goal or any goals. Instead, she adjusts her goals daily, weekly, and monthly.

Neither of us fluctuates much with our schedules. We go to bed and wake up around the same times every day. Occasionally, I sleep in when I’m especially exhausted, but it’s rare. My wife usually wakes up about thirty minutes before schedule—without an alarm. She doesn’t like being woken during REM sleep. Even when she’s sick or taking medication, the variation is only about 30 to 45 minutes. Consistency is her default setting.

Leaf Collection On January 1st!

Today wasn’t just about reflection and planning, though. There was also one final seasonal obligation: leaf collection.

One stubborn tree had refused to drop its leaves even as temperatures fell. Finally, after the last major windstorm, it gave up and scattered its leaves everywhere. Some were blown away, but enough remained to justify one final cleanup.

After finishing my morning routine, I headed out and completed what should be the last leaf collection of the season. Our trees are now completely bare, and most of the neighbors have already cleared their yards, so accumulation should be minimal from here on out.

That means until spring arrives, my Tuesdays and Thursdays just got a little emptier.

I might even find another small project to fill the gap—at least until mowing season inevitably returns. For now, though, the year has started exactly the way I hoped:
steady, intentional, and quietly productive.

Stocks, Aristotle, and Other Risky Investments

Day 56 of 100 Days Coding Challenge: Python

Introduction to DIY Portfolio: A Python-Powered Stock Tracker (Day 56-Day75)

I’ve always had a curious relationship with investing. Back in my early twenties—just when online trading was beginning to sparkle with possibility—E*TRADE was running flashy stock-simulation competitions. I never had the nerve to join in, but the idea of tracking trades fascinated me. While others were glued to leaderboards, I was quietly watching market psychology unfold.

In one of my marketing classes, we studied consumer behavior, and I couldn’t help noticing the parallel. Stocks, like shoppers, are swayed by emotion. A bad headline sparks panic selling; a glowing report sends buyers rushing in. It was less about the spreadsheets and more about human nature in motion.

That said, I am no day trader. With a full-time job, I simply don’t have the bandwidth—or appetite—to chase tickers every second. Early on, I learned the hard truth: betting heavily on a single stock feels thrilling right up until it doesn’t. So I shifted to a disciplined rhythm. First, parking cash in money markets weekly, then funneling it into chosen investments. Eventually, I swapped most individual stocks for ETFs, which let me hedge my bets without needing caffeine-fueled midnight monitoring.

This is where my stock tracker comes in. It isn’t just a neat dashboard—it’s a sanity check. How much should live in bonds? How much in equities? The tracker keeps me honest, reminding me that a balanced pie chart beats chasing shiny objects.

Unlike my earlier Book Tracker project—where I bolted on features haphazardly and ended up cleaning a digital junk drawer—this time I built with a vision. The bigger the project, the less forgiving chaos becomes. Structure first, spaghetti later (preferably with marinara, not code).

What surprised me most was not the tracker itself but the realization of just how powerful Python can be. With a few libraries and some determination, I had built something that, in the past, I would have had to pay for—except now it’s tailored exactly to me. A personalized financial sidekick, minus the subscription fee.

Experience

Today marks the thrilling kickoff of a brand-new project: a stock tracking system. That’s right—I’m building a little Wall Street in my terminal. This time, I’ve sworn an oath to the ghost of Aristotle not to wing it. Last time, when I built a book tracker, I skipped the whole “final cause” thing—you know, the actual goal—and ended up redesigning everything from the menu to the data structure while muttering like a sleep-deprived philosopher. It was less “Eureka!” and more “Why did I do this to myself?” But not today. Today, I have a plan. A real roadmap. With arrows and everything. Step one? Get a stock symbol into the system without accidentally starting a recession.

Today’s Motivation / Challenge

We all want to be savvy investors, right? Or at least know what “diversification” means without Googling it every week. Today’s project is the first brick in a 20-day tower of financial wisdom—well, mock financial wisdom. We’re not handling real money here (unless you count emotional investment). The goal is simple: give users a way to start tracking the stocks they care about. It’s the tech equivalent of sticking Post-its on your fridge, but smarter—and less sticky.

Purpose of the Code (Object)

This tiny program lets you add stock symbols you want to track. It stores them in a JSON file so you don’t lose them the moment you close the terminal. It also shows you your current list, so you can admire how financially responsible you look. No actual money involved—yet.

AI Prompt:

Write a Python program that allows users to input and store multiple stock symbols, display them, and save the list in a JSON file. Make it beginner-friendly.

Functions & Features

  • Add a stock symbol to your personal watchlist
  • Display your current stock list
  • Save everything to a JSON file for future sessions
  • Quit the program using a menu option (helpfully numbered 99)

Requirements / Setup

Python 3.8 or higher

No external libraries required (yet). If you’re starting fresh, set up a virtual environment like this:

python -m venv venv

source venv/bin/activate  # On macOS/Linux

venv\Scripts\activate     # On Windows

Minimal Code Sample

def add_stock(symbol):

    symbol = symbol.upper()

    stocks = load_stocks()

    if symbol not in stocks:

        stocks.append(symbol)

        save_stocks(stocks)

Adds a new stock symbol to the list and saves it—simple, clean, effective.

Stock Tracker

Notes / Lessons Learned

I meant to start this two or three weeks ago, but I blinked and suddenly forgot how to create a virtual environment. My brain filed it somewhere between “how to fold a fitted sheet” and “useful Latin phrases.” After some desperate Googling, I finally got it working and documented it—this time for real. No more fumbling with pip and hoping for the best.

Since I want my little tracker to actually remember the stocks I add, I set it up to save everything in a JSON file. I also made the menu option to quit the program number 99. Why? Because it looks dramatic, and it guarantees it’ll always show up at the end of the menu. Will this strategy work? Unclear. Will I pretend I did it on purpose even if it doesn’t? Absolutely.

I enthusiastically added all the stock tickers I wanted to follow… and of course, I immediately typed one in wrong. Which means tomorrow’s task is obvious: build a delete function so I can pretend that the mistake never happened.

Optional Ideas for Expansion

  • Let users add a nickname or note next to each stock (e.g., “my retirement bet”)
  • Validate stock symbols against a real financial API to catch typos early
  • Add timestamps to track when each stock was added