Live data from Hacker News

Building an economy simulator from scratch

thomassimon.dev

181–190 of 217 posts

Re: Building an economy simulator from scratch

#181

The simulation only has workers/producers and it has a free market – it is missing capitalism. To make it realistic you need a subset of people owning the labor output of others, taking out all the surplus, using it to buy stakes of more economic activity, diverting profits to themselves, thus creating the loop of concentration of wealth which removes the surplus wealth from the producers and assigns it to ever decre…

[dead]

Re: Building an economy simulator from scratch

#182

Earlier quoted context omitted.

Banks don’t borrow from depositors. Loans create deposits and the deposits just change ownership tag from then on.

A deposit is literally you lending money to your bank, payable on demand.

That’s not the point. The point is where what you have came from in the first place.

A loan creates an advance. That advance is the bank owing a person in return for the person owing the bank.

The advance is then used to pay you so you have a deposit. All that does is change the ownership tag on the advance.

Re: Building an economy simulator from scratch

#183
post #162

Earlier quoted context omitted.

Banks don’t borrow from depositors. Loans create deposits and the deposits just change ownership tag from then on.

I mean, they do, to the extent that people walk into banks and hand over wads of cash for deposit. I.e. it happens, but increasingly rarely.

How did you get the wad of cash in the first place and what is it?

A wad of cash isn’t money. It is nothing more than a receipt for a deposit held at an institution somewhere - that was created as an advance in the past in response to an equivalent loan.

When you deposit a wad of cash in a bank, the bank takes ownership of the deposit in the institution and creates a new deposit in the bank for you. It’s just another loan creating a deposit.

Re: Building an economy simulator from scratch

#184
post #19
post #6

Is the source code for this simulator available anywhere? The post's code itself is minimized/obfuscated: https://thomassimon.dev/assets/cashloss.1fca21f6.js I couldn't find anything on the author's GitHub. I'm mostly just curious how it's built.

Author here, if there is enough interest I can clean the code up and put it on GitHub. It is basically a state machine.

Another +1 from me.

For me I’m particularly interested in how you’ve done the presentation interface.

Re: Building an economy simulator from scratch

#185
post #71

Earlier quoted context omitted.

While it's true that banks can exist outside capitalism, capitalists generally can't. --- The parent's point is that an economic simulator that does not include them is probably not something that's useful to draw conclusions about capitalist societies from. It is a fun toy, though.

> While it's true that banks can exist outside capitalism, capitalists generally can't. That's not really true; people who own and profit from their ownership of the means of production exist in feudal economies; the fact that their ownership of the means of production is a sonetimes a consequence of rights associated with land tenure and, whether or not that is the case, not marketable or less freely so than under c…

If you separate capitalists and landlords out as different classes (in the Georgist sense) then you can say that landlords have extracted rent for far longer than capitalists have been around; it took the Industrial Revolution to move from the guild-based master and apprentice model to a capital-based owner and worker model of production.

Re: Building an economy simulator from scratch

#186
post #143

Earlier quoted context omitted.

The only real rule in economics, other than simple accounting identities, is that people will do what they think is best for themselves. But everyone's utility curve is different, let alone their perception of their utility curve. It's incredibly difficult to rigorously model.

At sufficiently large scale we should be able to model certain personalities though.

Imo a decent economics simulator is indistinguishable from a full physics simulator. There’s no other way to account for the actions of millions of independent actors with unique incentives. Econ models tend to focus on very specific independent variables and hold everything else constant because there are just too many dimensions to consider in a full model

Re: Building an economy simulator from scratch

#187

In the late 80s, I typed in a BASIC economy simulator I found in some computer magazine. It ran to two or three closely-typed pages (sides). As Chancellor of the Exchequer, you set the tax-rate, interest rate, level of public spending and so on; then you ran a cycle. I can't remember whether a cycle was a month or a year. After about three years, the workers would be on strike and there would be rioting in the street…

I think anybody who's ever tried to model MMT feels the same way. I suspect the underlying theory doesn't have enough substance to actually model.

Re: Building an economy simulator from scratch

#188
post #166

Earlier quoted context omitted.

No, no: the jackwagons atop the Tower engage in the reign of terror. The gravity at work here is economics, as seen through the lens of people. People, it turns out, don't flourish in captivity.

People don't flourish when most of their productive output is sucked up by some neo-feudal lord, either. For some reason, capital is currently consolidating at the top.

And those at the top pander to the bottom for power with public money.

Disadvantage: the kulaks.

Re: Building an economy simulator from scratch

#190
post #126

I did something similar, but started somewhere different: The individuals personal value of a good. You might find it interesting as a different approach to a similar project. https://jasonfantl.com/posts/Simulated-Economy-(1)/

Great series! I liked your addition of inter-process communication, and the last one was a treat.
Post reply on HN