fidoandfido / blackswan

Blackswan Stock Game
Other
2 stars 0 forks source link

Rallys - possible AI behaviour #35

Open fidoandfido opened 13 years ago

fidoandfido commented 13 years ago

Another idea for AI behaviour - rallying AIs.

This would be AIs that would rally around a particular sector - either selling them down all at once or buying them up, over the course of a couple of AI trade cycles.

So how this would work: there would be a large number of AI rally traders, to allow them to dominate the market when they are trading.

Most of the time they would be idle, but occasionally, they would focus on a particular sector or group of companies, and all start buying them. This rally would last for a while and then they would go idle again. Whilst idle, they would slowly sell down their stocks, taking the loss.

Conversely, over time they might start buying shares in a particular sector, and at some point they would then sell them all in a rush.

fidoandfido commented 13 years ago

Implementation: In the RallyAI class, that implements the AI trade strategy interface, there would be a couple of static fields that would dictate the status of all the rally AIs. The first field would be the current status. On instantiation this would be idle (the default) and the strategy would be to sell down their portfolio gradually (so as not too effect the market too much).

Eventually, the status would shift to "rally sector up". At this point the sector field would be set to a random sector, and the AI would aggressively buy the sector, usually several different companies at once. After a number of AIs had acted, the strategy would shift back to idle.

The other alternative would be to shift to "pre rally down". At this point the sector field would be set to a random sector and the AI would start slowly buying the shares. This would last for a number of AIs, and eventually the strategy would shift to "rally down". At this point the AI would start to sell aggressively all the shares they had previously bought. After a number of AIs had traded, the strategy would shift back to idle.

It might be possible to add rumours of these rallys to the rumour feed... possibly giving people the chance to jump onto them.

It is also possible that this will make for uninteresting / unrealistic behaviour in practice - some testing will have to be done to verify this.