DEV Community

Eastkap
Eastkap

Posted on

What If Your Habits Had a Stock Price?

What If Your Habits Had a Stock Price?

Posted on dev.to -- March 22, 2026

I got tired of habit apps that give you green checkmarks and confetti.

They feel good for five minutes. Then you skip a day and the app sends you a little sad notification: "You broke your streak. Keep going!" And somehow that makes it worse.

So I built something different. I built a habit tracker where your habits have an actual stock price.


The Idea

Every habit you track becomes a ticker. Miss your morning run? $MRN drops. Take your vitamins? $MEDS is up. Skip social media before noon for 8 days straight? Your portfolio is outperforming the market.

Your personal stock is a composite of all your habits weighted by how much they matter to you. Hit everything? Bull run. Slack off for a week? You're in a correction.

The app is called HabitStock and it's the most anxious I've ever been about skipping a gym session.


Why This Works (For Me, At Least)

The problem with most habit apps is that checkmarks don't scale. Completing something feels good, but the feedback is flat. Day 1 and day 100 feel identical.

A stock price changes. It has momentum. A 22-day streak means your price has been climbing for 22 days -- and there's actual psychological weight to watching it drop when you break it. Not because the app guilts you. Because you can see the correction happen in real time.

There's also a social layer. Friends can "invest" in you -- their encouragement shows up as buy orders in your activity feed. It sounds gimmicky. It's not. Knowing that @alex_dev has 50 virtual shares in your consistency is weirdly effective.


The Technical Choices

Built on Next.js 15 with Tailwind and recharts for the chart. Dark mode only -- Bloomberg Terminal aesthetic was the vibe I was going for.

The price engine is simple:

function calculateDailyDelta(habits: Habit[], completions: boolean[]): number {
  const BASE_MOVE = 2.5;
  return habits.reduce((delta, habit, i) => {
    const streakBonus = Math.log1p(habit.streak) * 0.4;
    const direction = completions[i] ? 1 : -1.8;
    return delta + direction * (habit.weight * BASE_MOVE + streakBonus);
  }, 0);
}
Enter fullscreen mode Exit fullscreen mode

A few intentional design choices:

  • Misses hurt more than completions help (-1.8 multiplier vs +1). This is asymmetric, like real markets.
  • Streak bonus uses a log curve. The first few days compound fast. Later, it plateaus. Just like real streaks.
  • Everything lives in localStorage. No account. No sync. Your data is yours.

The Empty State

My favorite part of the app is what it shows before you add any habits.

A flatlined chart. A horizontal green zero-line. And a badge that reads: IPO PENDING.

"You haven't gone public yet."

"3 friends are watching. Don't disappoint them."

I wrote that copy at 2am and it still makes me laugh. But it also works. The framing of "going public" reframes what adding a habit means. You're not setting a goal. You're making a public offering.


The App

It's live at habitstock.limed.tech -- free, no account needed, runs entirely in your browser.

The demo pre-populates with Maya's portfolio: a $142 stock price after 30 days, a 22-day morning run streak, and a market correction mid-month when she skipped four days in a row.


What I'm Testing

I want to know if the financial framing actually changes behavior.

My hypothesis: people who think of their habits as a portfolio take them more seriously than people who think of them as a checklist.

If you try it, I'd love to know -- does the stock price framing make you more anxious to maintain your habits? Or does it just add noise?


HabitStock is open to try at habitstock.limed.tech. Built with Next.js, recharts, and an unhealthy interest in behavioral finance.

Top comments (0)