fidoandfido / blackswan

Blackswan Stock Game
Other
2 stars 0 forks source link

Need facility to have new companies being created #4

Closed fidoandfido closed 12 years ago

fidoandfido commented 13 years ago

Perhaps at the start of period, new companies could spring into existance, with an IPO.

Should allow traders to subscribe to an IPO event. This may require companies to be created, with no shares trading till the next period, so as to give traders time to prepare (read subscribe) to the IPO.

This could be done by having a company created in a special state - 'pre-trading'; shares could be traded only at the specified value and no 'events' would occur, no profit etc. Then after the first period, it goes on to the market and begins to trade and so on.

fidoandfido commented 13 years ago

Okay, so this will require a maximum limit on the number of active companies that a stock exchange can have. (Given the possibility of companies going broke, this should mean that there should be some companies spawning occasionally)

This will be included in the init data XML and be an attribute of the stock exchange.

fidoandfido commented 13 years ago

Next up, need to have a chance of generating a new company - this should probably be handled by the economic modifier. In 'growth' and 'boom' times, the chance of a company spawning should be higher than during recessions or stabilising periods.

fidoandfido commented 13 years ago

Okay, this has been done with some nasty hacks to get around database transaction session boundaries, will be testing over the next few days to assess and see if it has broken anything else.

Still need to add a system to generate period start messages, see separate issue.

fidoandfido commented 13 years ago

This is now generating period level messages when companies are created.

Some tweaking to ensure that companies are always being created when required still needs to be undertaken.

fidoandfido commented 13 years ago

Added code to update the stock exchange company count field to keep it accurate.

Will now focus on ensuring that the 'trading' of newly listed companies (while they are still in IPO status) is reasonable.

fidoandfido commented 12 years ago

This is fixed for now; may be revisited later when 'IPO's (initial public offerings) are introduced as a concept.