Cookie Clicker

Cookie Clicker

CookiStocker 2 | Automatic Stock Trading Mod
z  [developer] 29 Jul, 2023 @ 1:32am
CookiStocker Versions 2 and 3
Here are the features I have incorporated in CookiStocker 2.0, as well as those that I plan to incorporate in version 3.0. Initially, these were all going to be incorporated into version 2.0, but as it became clear that determining a near-optimal trading algorithm was going to be exceedingly complex, I decided to split the upgrade into two parts so that an initial upgrade can be released in a more timely fashion. I have split the rest of this post to show which features to expect for which version of CookiStocker. The first set of features has recently been completed.

Features for CookiStocker 2.0:
  1. Fixes for all known bugs.
  2. A vastly improved trading algorithm that should generate about an order of magnitude times as much money as the current one. This is now complete; the new algorithm currently generates about $15 million per day, which is about an order of magnitude greater than the previous algorithm. This mean that it should be able to attain the Gaseous Assets shadow achievement in a little over two days of continuously running this mod, assuming that the recommendations in the Steam guide for the mod are all followed.
  3. Added more detail to both the in-game notifications and the console log.
  4. Added a whole new section to the console log that breaks down activity by trade type, and is published at the same time as the regular trading summaries, which is currently once an hour. (For a more complete description and illustration of these last two points, please see the accompanying discussion New Changes and Additions to the Console Output.)

Features for CookiStocker 3.0:
  1. An even more refined version of the trading algorithm that should boost the mod's trading returns even further. At this point, the algorithm is still being worked on, so it is not possible to say how much of a gain this new algorithm will produce. However, it should be significant, and it should start coming close the optimal gains possible from trading the stock market.
  2. Moving all current and future mod options to the game's Options page.
  3. Adding an option to temporarily stop and restart automatic trading.
  4. Adding an option to temporarily stop and restart the entire stock market.
  5. The addition of the new achievement Plasmic Assets, which would require total stock market gains equivalent to a full decade of base cookie production - ten times what is required for Gaseous Assets. Unlike Gaseous Assets, Plasmic Assets would be a regular achievement.
I will be keeping this first post up to date. Meanwhile, feel free to ask questions or contribute to this discussion. I can't guarantee an immediate response, but I will do my best to keep up with input here.
Last edited by z; 30 Jul, 2023 @ 1:03am
< >
Showing 1-2 of 2 comments
z  [developer] 29 Jul, 2023 @ 1:33am 
There has recently been a question on the main page of this mod by Ͼokeman as to when this mod will be released. The short answer is that I hope it will be sometime this summer; it's impossible to be more precise than that due to the complexity of the work and the vagaries of my schedule. The trading algorithm is taking a long time to create simply because the rules involved have turned out to be very complex, and I am having to analyze huge amounts of data to get them right, specifically the rules involved in what to do at mode transitions. In many (if not most) cases, the rules are quite unexpected, and often have the algorithm (correctly) buying when the mode changes to selling, and vice versa. Right now, I am looking at a full day's worth of data (gathered from a number of full-day runs). This data contains the price and mode of every stock at every tick during the day, as well as where all the mode changes occur for each stock.

Because the data is so detailed, I am able to tune the algorithm in a way that should provide a significantly better return than the algorithm that I am currently using. But creating this algorithm is very time consuming; so far, I have covered just the first six stocks in about 10 days of work. I am aiming for at least a 95% accuracy rate in these mode transitions and I am gradually getting there, but if I don't achieve this by the time I finish all 18 stocks, I'll have to analyze more data until I get sufficient accuracy in the algorithm.

So that people can have a glimpse of what's going on, I'm publishing the current draft of the algorithm that deals with mode transitions in The Trading Algorithm discussion thread, specifically in this post.
z  [developer] 21 Sep @ 11:21pm 
Here are the new features in the soon-to-be released CookiStocker 3.0. The sum total of them is significant enough for me to bump the major version number. The auto trading algorithm has not been modified for this version (I have plans for that later), but a number of features in this version enhance the effectiveness of the current algorithm. The new features to be included in version 3.0 are the following:

- There are two new Achievements. Since the stock market already has Liquid Assets and Gaseous Assets, I decided to continue the chain of states of matter to award higher levels of profits. There is now a Plasmic Assets achievement for reaching a profit of $100 million, and a Bose-Einstein Condensed Assets shadow achievement for reaching $500 million. Furthermore, each of these achievements doubles the number of all your warehouses.

- There is a new, bright red banner that is displayed after the first line of the mod's statistics (near the top of the stock market pane) whenever the user has insufficient resources (brokers or cash) for automatic trading, or when this mod or the stock market are turned off.

- All options, old and new, have been moved to the game's Options page, just like every other sane mod. The current options are as follows:

- The long-requested option to turn the mod on or off. Paradoxically, this is not needed as much since the installed version of the mod now has its minimum trading requirements.

- An option to turn the entire stock market off or on. Traders have to rest too, you know.

- An option to automatically buy all brokers needed to reach the auto trading threshold as soon as you can afford them.

- An option ("Resources Warning") not to display the new, bright red banner described above.

- An option to turn on exponential growth of warehouse numbers by tying them to the maximum raw CPS of the current session. This helps to keep stock market earnings at a relevant level.

- A slider to adjust the rate of exponential growth described in the previous option.

- A slider to set the minimum number of brokers required before auto trading is allowed. The default is 103.

- A slider setting the maximum percentage of your bank you can spend on any one purchase. The default is 5%; you can set it all the way up to 100% if you don't mind a lot of volatility in your bank balance.

- An option to toggle the standard popup transaction notifications.

- An option to make popup notifications fade away on their own after 6 seconds.

- An option to turn on console logging.

- Settings in hours and minutes for the interval between reports (either via popups or the console). Default: one hour.

- An option to display more detailed trading stats in the mod's statistics section.

The following options are advanced, and should only be used by knowledgeable (or cheating) players:

- The logic loop frequency in seconds. This is preset to 30, which is half the normal stock market tick duration of one minute.

- An option to force the stock market to tick at the logic loop frequency. Together with the previous option, this allows you to run the market (and this mod) at virtually any speed you want.

You can see a sample options page, fully working, using my personal settings, at
https://imgur.com/cZlnDGk.
Last edited by z; 21 Sep @ 11:38pm
< >
Showing 1-2 of 2 comments
Per page: 1530 50