fidoandfido / blackswan

Blackswan Stock Game
Other
2 stars 0 forks source link

Companies need to be able to fold #3

Closed fidoandfido closed 13 years ago

fidoandfido commented 13 years ago

Some companies now have negative assets; this is a bug.

They should fold, pay back their debts and leave.

fidoandfido commented 13 years ago

Companies REALLY need to be able to fold :) - currently there is a company making a loss, with negative asssets. D'oh!

fidoandfido commented 13 years ago

So thresholds should be set; an idea could be if a company has asset values at less than 10% of its debt AND it records a loss, then it goes into liquidation. At this point, the shares are now worthless, since the debtors get first dib at any assets. After one period, the company status goes from liquidation to bust (or liquidated ?) and the shares are removed entirely.

Will consider this implementation.

fidoandfido commented 13 years ago

So the idea is that a company has one of three states - trading, insolvent, or dissolved.

The company will be declared insolvent when:

A company can be dissolved in one of two ways:

  1. It is insolvent, and records a loss.
  2. The assets become negative. At this point, they are kind of debts as well :(

Once dissolved, if there is any equity, all shares are paid out and the company is no longer tradable.

The only tricky part is how to notify traders that this has occured. I think there will be a new object -- the 'company message'. Each period this will update to include the latest major change (ie insolvent, debt change etc). It will have a default value of "trading as normal".

The status of the company will be recorded by a couple of flags - isTrading, isInsolvent.

fidoandfido commented 13 years ago

Okay, with some rudimentary server side testing, this code has been promoted, and this issue will be closed.

Some kind of prayer seems appropriate about now...