Quick Newb Question!? - How are commodity prices calculated

MGSteve

Newbie
Messages
1
Likes
0
Hi, This is going to be an odd question I'm sure!

I'm working on a plan for an online game, part of which will involve the buying and selling of various commodities. Obviously I'd like to get the fundamentals of this based somewhat in reality, particularly how the price of the commodities is calculated based upon the trades.

e.g, you may have one player selling the coal he's mined and another player wanting to buy coal for his power station. The power the second player generates is then sold on the market to people who need to buy power to run their factories etc...

So, the way I see it (and I'm in no way knowledgable on this, its just how I think it could work), the price for any given commodity is based upon the average of the previous x number of trades. Therefore, if it costs someone £5000 to produce 1000 tonnes of coal (just for examples sake), they're going to want to sell their coal at a value at least equal to £5000 just to cover their costs. So they may choose to sell it at £6 a tonne, giving a £1 profit per tonne.

Imagining that 20 people all did the same, 20 trades would go through at £6 a tonne.

Now, someone else comes along, he managed to mine some coal at a cost of £3 a tonne. So he sells his coal for £5 a tonne. He also has 10,000 tonnes of it.

So suddenly you had 20 trades of 1000 tonnes sold at £6 a tonne, now 10000 tonnes of coal was sold at £5 a tonne on ten trades. This would obviously bring the price of coal down, if the system updated the price every so often based upon the last 30 trades, it would set the price to £5.65 per tonne.

Does this sound remotely akin to how the commodity market works? I appreciate its bound to be hugely simplified for how I need it to work, just wondering if there is any similarity to the real-life system that I can apply to the game.

Although I've just realised that it doesn't take volume into account. If he sold the 10,000 in one hundred trades it would make more effect on the commodity price the way I've suggested it, due to it only looking a the last 30 trades, so I guess it needs to go on the volume of a commodity sold rather than the last x number of trades.

Players could ask whatever they want for the commodity they're selling, but the game would match up orders from buyers to the sales that are available on the market, naturally cheapest first. So although a buyer may say he'll pay £7 a tonne, the game will make up the order from the available sales starting with the cheapest first, so they may only pay £3 a tonne if there is enough at £3 to make up the order. Otherwise he may pay £3 for 300 and £4 for 700 tonnes to make up his order of 1000 tonnes. This way someone who says they want to sell at £99 a tonne will never get a buyer, unless someone says they're prepared to pay it.

Any help or pointers given would be appreciated and credited when the game is done.
 
Last edited:
Top