Skip to content

Price of a stock freezes after it has reached absolute zero #946

Open
@cigarmemr

Description

@cigarmemr

Step to reproduce

  1. Build up strong hacking related stats, including hack level, hack time (reduction), hack power etc.
  2. Purchase 4S Market Data Access and Market Data TIX API Access
  3. Script hack()/grow() a server with corresponding stock with {stock: true} according to its forecast to make the price oscillate intensely.
  4. Wait and check its price.

Result

The price may eventually reach absolute zero and never changes from then on, making it non-sense to be traded any more (before soft reset)
This happens mostly on stocks with:

  • corresponding server with low hacking level required
  • high volatility
  • low initial price

namely JGN (Joe's Guns) and SGC (Sigma Cosmetics):
image

Version

bitburner v2.5.0 (b87b8b4)

Idea

This part of code prevents the stock price to go beyond certain cap. It might be possible to duplicate and modify them to prevent the price dropping below a certain threshold.
Another idea I came up with is to log the count of zero in past prices. When it reaches certain value (5 or 10 continuous 0's as such), reset the stock to some reasonable price. Optionally forbid trading stocks with a price of 0 to prevent exploiting absurd profit through resetting.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions