Richard Golian

1995-born. Charles University alum. Head of Performance at Mixit. 10+ years in marketing and data.

Castellano Français Slovenčina

Manage subscription Choose a plan

RSS
Newsletter
New articles to your inbox
Richard Golian

Article

What Determines a Stock Price?

How a stock price is determined: six components that help my AI system predict the stock market
Richard Golian
Richard Golian · 1 613 reads
Hi, I am Richard. On this blog I share my thoughts, not investment advice. This is not a recommendation to buy or sell securities.

In April, in the first part of this series, I wrote about an AI prediction system I had started building on my own computer. At the time the software was a few hours old and the prediction record was empty. The record since then has shown one thing that could have been expected from the start: the system does not yet understand the market it is being asked to forecast. It sees the price, a number. It can find macro context, the book value of the companies, the earnings. But it cannot put those things together into something that would help it understand the price going forward.

I needed to simplify it for the system. I started showing it what the price of an asset is made of. It is a deliberate simplification, to which I will then add further criteria.

Illustrative chart showing how an asset price decomposes into six coloured bands

I started building a new foundation for the system. For any historical day on the S&P 500 or a sector fund, it breaks the price down into six numbers. The book value of the companies in the index. The premium the market pays for the companies' earnings. What the macroeconomic situation contributed to the price. What one-off world events contributed to the price. How media attention affected the price. And an arithmetic remainder that we cannot yet fully name.

The thing I used to keep in spreadsheets and called the mood thermometer, which I wrote about in the past, worked from the same instinct. But that record, unlike the system I am building, worked more interpretively and contextually than in this simplified quantitative way. I now need to simplify first and add context gradually. Because I know that too much information, without a good explanation of how the pieces relate, can break the logic entirely. I have tested this on several prediction systems in the past.

Below I describe the six components of the price, one at a time. Then I share what surprised me on the chart when I looked back at my own best purchases. And finally, what this step means for the predictive side of the system.

So what determines a stock price? The price of a share, or of a whole index, is made of six parts: the book value of the companies, the premium for their earnings, the macroeconomic situation, individual world events, media attention, and a remainder that cannot be measured precisely, at least not yet. But the most important part is the future. A price is really the market's estimate of how much those companies, or that sector, will earn later on. And that is the harder part. My tool can only break down the price from the past and the present. How to calculate the future part, and include the probability of future earnings in it, is what I am still working on.

How my system analyses a stock price

The six components add up to the price of the index to within a cent. Each has its own coloured band on the chart.

Book value, the bottom band. The price divided by the price-to-book ratio of the companies in the index. It represents the price the index would have if all other factors, earnings, the macroeconomic effect, media coverage and any other unidentified influence fell to zero: only the book value of the companies, scaled to today's share price. This is the first foundational part of the chart, on which everything else sits.

Earnings premium. What investors pay above book value for the companies' ability to earn. Calculated from long-term price-to-earnings and cyclically adjusted ratios, the same CAPE percentile against history since 1871 that I used in the first version of the prediction tool to classify market regimes. When this part grows on its own, the market is paying a higher premium for the same companies behind it. Perhaps precisely because it expects higher earnings in the future. Bringing that into the system will be the next phase of development.

Macro contribution. It depends on a broad set of indicators: credit spreads, volatility indices, currency moves, real yields, inflation expectations.

Contribution of world events. These are one-off moves, not a continuous band. The start of a war, sharp political changes, unexpected events.

Media attention. A local language model scores the tone of the week's headlines about the asset.

Unidentified remainder, the top band. The arithmetic remainder after the four observable parts of the price. I originally called this part of the chart sentiment. That was a lie. The system did not measure sentiment; it calculated a remainder and labelled it with a word that was not quite accurate. The renaming itself was an honest step. After this change, the system will at least be aware that it does not know everything, and can take that into account in the future when assigning probabilities.

When the system started, this unidentified remainder was more than half of every increment on the chart and was called sentiment. Two weeks of work on improving all the criteria and accounting for the macro impact reduced it to a small part of the price.

The sum of these parts equals the price of the index or fund to within a cent.

What I saw on the chart, and what I did not expect

When I had the chart ready for the first time, I looked back at the periods in which I had made the most money on shares. My purchases were in phases the chart now shows as almost pure green. Book value and the earnings premium were what I had paid for, not media hype or a temporary macroeconomic situation.

Continue

Join the Library

The rest of this article is in the Library. Get full access to my findings, personal stories, and what I learn from the people I meet.

Join the Library · €29.99 per year How to get your first job with no experience… How a small business, creator or politician can be… What should I study in the age of AI?… I Left My Job for Several Months to Read… How I Fell in Love With Her, at First… How do you stop depending on social media? Can…
Read only this one · €2,99

Get the full article by email and feel free to reply if you want to discuss it further.

Visa Mastercard Apple Pay Google Pay

Disclaimer

This series and any predictions it produces are not financial advice. They are a personal experiment in calibrated forecasting and decision discipline. Do not act on any prediction described here. Consult a licensed financial professional before making investment decisions.

Sources

FRED, Federal Reserve Economic Data (https://fred.stlouisfed.org/); Multpl, Shiller historical S&P data (https://www.multpl.com/); Damodaran NYU industry valuation datasets (http://pages.stern.nyu.edu/~adamodar/)

Summary

I break the price of an index or a sector fund down into six components: the book value of the companies, earnings, the macroeconomic context, one-off events, media attention and an arithmetic remainder. I am teaching this to my AI prediction system so that, based on this look at the past, it can create rules for predictions about the future. Looking back at my best purchases, the chart showed that they were made in a phase that appears almost pure green on the chart, which means good value for the price.

Common questions on this article's topic

What determines a stock price?
A stock price, or the price of an index, is the sum of six parts: the book value of the underlying companies, the earnings premium investors pay above it, the macroeconomic contribution, the contribution of discrete events, media attention, and an arithmetic residual no model fully explains. These parts sum to the closing price to within a cent.
How does the stock market work?
At the level of a single price, the market sets a number that combines what the companies are worth on the books, what investors will pay for their earnings, the macroeconomic backdrop, events, and the attention paid in the media. When any one of these moves, the price moves with it, even if the underlying business has not changed.
What does it mean to decompose a stock price into components?
The price of an index or sector fund is broken into six observable parts: the book value of the companies, the earnings premium investors pay above it, the macro contribution, the event contribution, media attention, and an arithmetic remainder. The sum of these parts equals the closing price to within a cent.
What is the CAPE percentile?
The cyclically adjusted price-to-earnings ratio (Shiller CAPE) converted to a percentile against history from 1871. It shows whether the market today is paying a higher or lower premium for the same companies than it has historically.
Why does the system not compute fair value when data is missing?
Without years of price-to-earnings history, the fair value would simply equal today's price, always exactly fair. That is not an answer. It is better for the system to say it does not know than to say it knows something it in fact does not.
Can an LLM forecast individual price components on its own?
Not reliably. When you ask the system to separately forecast book value, earnings, and the macro situation, the computation grows an order of magnitude more complex, and the model starts to hallucinate or overshoots without sense.
What is vibecoding and why is tuning a project so hard?
Vibecoding is AI-assisted development where you describe what you want in natural language and a large language model generates the code; you can reach roughly 80 per cent of the functionality in a few days, but the last stretch is hard because you must keep stepping back and trying different paths, as some changes degrade the system rather than improve it.
Is this tool investment advice?
No. The tool does not compute with certainty how something will turn out. It computes probabilities. It works on indices, sector funds, and broad groups of assets, not on the selection of individual shares.
Richard Golian

If you have any thoughts, questions, or feedback, feel free to drop me a message at mail@richardgolian.com.

NEWSLETTER
Findings, personal stories, mistakes and lessons learned. About AI, the internet and life.
Sent the first Sunday of the month. Unsubscribe anytime.

Related articles

Can AI Predict the Stock Market? Building a Calibrated System

I am building an AI system to predict the S&P 500. It runs on my own machine, uses free public data (yfinance, FRED, the Shiller dataset), and grades every forecast against reality. This series documents the build itself: the decisions, the methodology, the mistakes. What I will eventually share from the running system is a separate question, and an honest one.

26 April 2026·3 158 reads
Market Fear and Outages at Banks, Airlines and Big Tech Companies: Which of My Predictions Are Coming True

The world has changed. Every day brings news that shakes our confidence in its foundations. In some parts of the world, bank outages leave people unable to access the money in their bank accounts. Flights are grounded. The authorities tell us to prepare for worst-case scenarios and to stock up on basic food. And then there are those who deliberately stoke fears of what might happen, because they benefit from it. It is hard to separate useful news, which can show us how to prepare for a crisis or how to respond when it comes, from the hysterical shouting that fills the internet and attracts comments and shares far more quickly.

17 November 2026·490 reads
Can AI Replace Human Judgement?

AI produces the graphic, the newsletter and the product page faster than a person. What is left for the one who used to do it is the judgement, knowing whether the output is good. But most people have worse judgement than AI. And whoever cannot judge quality cannot delegate either. How do you tell whether yours is the judgement a company relies on, or the kind it can replace?

30 May 2026·1 601 reads

More articles

How to get your first job with no experience when AI is replacing entry-level jobs

Over the past few years I have interviewed hundreds of candidates for marketing specialist, advertising specialist and data analyst roles. I often invited beginners to interviews with a practical task: people who had only completed a course, had studied the subject, or had tried the work on a small project of their own. I saw in them the motivation to develop in the field.

14 November 2026·542 reads
How a small business, creator or politician can be independent of big platforms in the AI age

Are you a content creator playing by the rules of YouTube, Instagram or Google? Are you a small business owner whose business model depends on how often Amazon recommends you, how expensive Facebook ad impressions will be or how expensive Google Ads clicks will be? If all or most of your contact with your audience or customers depends on a big platform showing you to them, you are not in a strong position.

11 October 2026·1 378 reads
What should I study in the age of AI? What should I major in? Does a degree still make sense?

The development of artificial intelligence changes how we look at which paths in life make sense. Which studies and which profession to choose.

4 October 2026·1 073 reads
I Left My Job for Several Months to Read Philosophy

It was Thursday, 31 March 2022, when I handed over the last of my responsibilities to my colleagues, closed my laptop and went to the library. I left my job for several months and immersed myself in philosophy. And I am immensely grateful for it. Today I am, like most people, on a merry-go-round, and it is hard for me to stop and think about the fundamental questions of my own life.

28 September 2026·1 268 reads
How I Fell in Love With Her, at First Sight

It was September 2023. My life, my work, everything was completely different from now. It was simpler. I owned almost nothing. I needed to film an advert, I went up to a floor inside the company where the product I needed for that advert was, and there I noticed her for the first time. She laughs at me when I describe it like this, but at that moment the universe told me, that is her.

20 September 2026·1 224 reads
How to stop depending on social media, and what the IndieWeb is

How and why I am gradually leaving social media and the big platforms. When I read that Meta is testing a new way to charge for organic posts that link outside its platform, it confirms how right I was to become steadily less dependent on the big platforms and on social media. It does not mean I have left them completely. It means that whether or not I stay in touch with my readers depends on them less and less, and today almost not at all.

9 September 2026·1 347 reads
How to Start With AI in a Company

One of my family members described a firm that has its data in several different tools, and its employees still join it by hand, in spreadsheets. That is the ordinary state of firms. When somebody tells such people not to do it by hand and to use AI, they will not understand. Most firms do not even have the basic connectors between the tools they use. These firms need help with AI transformation.

12 August 2026·1 429 reads
Fable 5 vs Opus: the cheaper model won

The same task, two models. Fable 5 against Opus 4.8. On paper Fable is the better model, with a larger context and stronger specs. And still it lost. Opus handled the task with a single round of checking for 721,000 tokens, while Fable needed nine rounds and burnt through 2.78 million tokens. The difference was not in the model, but in how I set the task. And I know it, because I measured it.

22 July 2026·1 655 reads
I Ran Object Detection on My Laptop, and Saw Everything Is Possible

A few weeks ago I installed a small local AI model on my laptop that watches a live camera feed. I turned the webcam on in the dark, and in near total darkness it recognised me and the objects in the room. That such things exist, I have known for a long time. What opened my eyes was the accessibility. I installed it in one prompt, free, and it runs entirely on my machine, sending data nowhere.

15 July 2026·1 306 reads
Dependent on AI: Are We Still Masters, or Slaves?

I have Heidegger and my notebook beside me. I am asking where all of this is heading, where artificial intelligence is taking us.

21 June 2026·2 070 reads
How to Find Blogs by Real People

For years I mostly read books. I found blogs and articles by chance: on social media, or while searching for something on Google. In the age of AI that stopped working, a large share of new content online is now written or co-written by a machine. The internet is not one place, it has layers, and a part of the population has moved to the cozy web and to quiet personal blogs. I show what those layers are and how to reach them through RSS, a reader and one OPML file, on my own example with the Human filter.

19 July 2026·1 678 reads
My blog is full of bots and AI agents

I once wrote about building my own privacy-friendly analytics tool. It had bot detection from the first version, yet it was not enough. Direct visits took a strangely high share of my traffic. When someone claims that 20% of their visits are bots and 80% are humans, I used to think the same. Today I would say the opposite ratio is closer to the truth. This is how I got there.

6 July 2026·3 212 reads
Everything with AI agents, or fully offline.

Four days in Catalonia. No computer, no AI, almost no social media. I bought this notebook so that I could write down what I would think about, and what I would come across and learn on the trip.

10.5.2026·2 314 reads
NEWSLETTER
Findings, personal stories, mistakes and lessons learned. About AI, the internet and life.
Sent the first Sunday of the month. Unsubscribe anytime.