Stock Market Simulator

Welcome to the Stock Market AI simulator. In this game, you are responsible for writing the logic of a bot that buys and sells stocks. Your goal is to make as much money as possible over 100 turns.

To play the game, write your JavaScript function below. Your code should not contain the function declaration, but just the logic. The function is passed the current value of the stock, the change from the last iteration, your cash on hand, the total number of shares you own, and a generic object that you may write to as you see fit. (Changes to this argument persist so that it my be used for keeping track of things.)

Your code must return an object that contains an action value. The action must be one of "hold", "sell", "buy". The hold action does nothing. If sell or buy is used, your object must contain a numeric key called quantity.

function process(value, change, cash, shares, storage) {