How can you model/simulate the price/value of a good?

Let's say that you have a good which price can change quite often because of its demand. Let's assume that you developed an algorithm that changes continuously the supply of the good to make its value as constant as possible and equal to \$1. How would you simulate this system?

What I cannot figure out is how to simulate the changes in price of the good based on the demand. For example, let's take these as the initial conditions of the system:

$$initial-supply = 1000 goods$$ $$initial-value = 1/good$$ $$production-rate-of-the-good=500 goods/second$$

Now let's assume that the demand is 500 goods/second. Does this imply that the price of the good will stay constant?

If the demand becomes 2000 goods/second for some interval, how will the price of the good change if the production rate remains the same?

I am a beginner in these concepts and I hope that this question makes sense

• The field you want to look at is "agent-based" modelling. Sadly, AFAICT, mainstream economists do very little of this kind of work. This paper may provide food for thought: arxiv.org/pdf/2103.05556.pdf - don't be put off by the title - a mechanism for sellers adjusting their prices in response to demand is described in section 2.
– Mick
Jul 28 '21 at 9:03

You're question is unclear...

If you're in a competitive market, as a supplier, you can only see the market price at a given time, where it is set essentially by all suppliers and consumers at once

If you're a monopoly, then you can estimate the quantitive demand based on price, simply because you control the entire market, and set the price level at the marginal revenue, where you gain the most

The only ways, other than a monopoly, to estimate demand are:

If demand is completely inelastic, like with fuel: people won't change their driving patterns on marginal changes in price meaning quantity will remain the same in any case

completely elastic: price will remain the same no matter the quantity

A government set price, quantity or any other specific regulation on the product. Although, with "too much" regulation, in some cases a black market can be created, etc.