Live data from Hacker News

Building an economy simulator from scratch

thomassimon.dev

151–160 of 217 posts

Re: Building an economy simulator from scratch

#151
post #132

Earlier quoted context omitted.

>That's the source of money, and the source of the price level. The vast majority of money in the modern economy is created by banks, not by the tax agencies or even the mint. When the bank lends you $1000 they just create it out of thin air and credit your account by $1000.

The bank acts as an intermediary, but not the way economists tell you. They say that the bank is an intermediary of loanable funds between debtor and creditor. That is, money exists outside the system and the bank is just efficiently distributing it, kind of like eBay. Except the bank is an intermediary of a completely different kind between creditor and lender. What the bank does is aggregate illiquid credits and de…

[deleted]

Re: Building an economy simulator from scratch

#152
post #132

" tax works by pooling a percent of sellers revenue." What the public servant actually does is impose a tribute on the workers in a denomination the public servant determines . If you don't provide the denomination then the public servant confiscates your assets by force. The population then offers their goods and services in return for the denomination the public servant issues . The public servant then determines t…

>That's the source of money, and the source of the price level. The vast majority of money in the modern economy is created by banks, not by the tax agencies or even the mint. When the bank lends you $1000 they just create it out of thin air and credit your account by $1000.

Using what for collateral?

Yes banks create money but all they do is discount what already exists.

As every budding entrepreneur finds out when they try to get a loan at 17 years old.

Banks provide liquidity after the fact. They don’t kick the system off.

Re: Building an economy simulator from scratch

#153
post #136
post #132

Earlier quoted context omitted.

>That's the source of money, and the source of the price level. The vast majority of money in the modern economy is created by banks, not by the tax agencies or even the mint. When the bank lends you $1000 they just create it out of thin air and credit your account by $1000.

They still have to borrow the money from the central bank. Fractional reserves mean that the credited account's bank must deposit a portion of the money bank at central bank. So there is a limit to how much money can the bank create.

They don’t. Reserves are irrelevant for bank lending.

They are nothing more than a centralised optimisation of what would otherwise be a full mesh network of point to point exchanges

Re: Building an economy simulator from scratch

#154
post #136

Earlier quoted context omitted.

They still have to borrow the money from the central bank. Fractional reserves mean that the credited account's bank must deposit a portion of the money bank at central bank. So there is a limit to how much money can the bank create.

Mostly banks borrow from depositors and from the capital markets. Reserve requirements of that type still do exist in some places (though in some places they've been abolished) but don't really play much of a role in determining how quickly money supply grows any more. Control over money supply growth is mostly down to interest rates these days. Similarly, the role reserve requirements used to play in protecting depo…

Banks don’t borrow from depositors.

Loans create deposits and the deposits just change ownership tag from then on.

Re: Building an economy simulator from scratch

#155
I’d love to work on this more. Definitely would like to see it on GitHub.

If we’re talking about money printing then we need to talk about money shredding as well.

If government prints money to buy thing then taxation feeds old money into the shredder.

Print is always matched with a shred.

Even bank loans are paid off (shredded)

Re: Building an economy simulator from scratch

#156
post #99

Earlier quoted context omitted.

That's more or less what every quantitative hedge fund out there is doing.

With no reports of funds consistently beating the market in a surprising way. There’s no consistent way to make money. You can exploit small details about how each market works, but in a short time everyone will notice and copy you. It’s like a market without patents. People talk, the trade ideas spread. Like wildfire. Too fast even for a quant to make sense - good managers can tell if a piece of info is hot. No mana…

It's a common misconception about hedge funds that objective is to outperform market.

The objective is to maximize profit per unit of risk taken. If hedge fund made 20% less than market but took 50% less risk, that's a MASSIVE value proposition.

(now, one could argue they fail at that too, but that's more difficult to prove)

Re: Building an economy simulator from scratch

#157

Earlier quoted context omitted.

With no reports of funds consistently beating the market in a surprising way. There’s no consistent way to make money. You can exploit small details about how each market works, but in a short time everyone will notice and copy you. It’s like a market without patents. People talk, the trade ideas spread. Like wildfire. Too fast even for a quant to make sense - good managers can tell if a piece of info is hot. No mana…

It's a common misconception about hedge funds that objective is to outperform market. The objective is to maximize profit per unit of risk taken. If hedge fund made 20% less than market but took 50% less risk, that's a MASSIVE value proposition. (now, one could argue they fail at that too, but that's more difficult to prove)

[deleted]

Re: Building an economy simulator from scratch

#158
post #44

OT: I see economists of various ideological tilts constantly arguing about how macroeconomic variables will respond to specific government policies. You know: "this new tax will increase inflation; no it will not, it will increase unemployment". What I don't get is why there are no readily available online macroeconomic simulators with real world data that make these sort of predictions. For a lot of countries, up-to…

An “economy” is composed of people, so maybe we can do this once we’ve cracked simulating people.

psycohistory!

Re: Building an economy simulator from scratch

#159
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.

Yes please! Fantastic work by the way.

I’d love to see the code with a permissive license for others to build upon.

Reminds me a little of ncase’s fantastic simulations — for example: https://ncase.me/sim/

Re: Building an economy simulator from scratch

#160

Earlier quoted context omitted.

> After, the developer then introduces ration tickets. This is simulation #20, and I'm pretty sure it's Zimbabwe. But it's not the real world Zimbabwe, it somehow works. That is, if you're ok printing trillion dollar bills. In a cashless society, I suspect the zimbabwe method would actually probably work. The only hangup was "Now I need to crate around boatloads of money". In a cashless society, we can just move the…

It's definitely important, when analyzing the impact of policies on an economy, not to get hung up on things like 'what the numbers on the banknotes look like' rather than important things like 'how well the population's wants and needs are satisfied'. Certainly it's not inherently a problem to continually have to revalue your currency if the net effect of your economy is it makes a lot of happy people, and it's cert…

> so I should buy 10 apples today, then sell them on Friday'

Simulation might also want to take into account that you can’t stock pile apples indefinitely before they spoil.

Post reply on HN