1. Home
  2. Google Doc
  3. Breaking Down The Stalk Market

Breaking Down The Stalk Market

The goal of this paper is to take a deep dive into the code and really explore all of the numbers and algorithms at play in The Stalk Market - Sourceful

animal crossing, games, ACNH, guide, stalk market

v1.2.1













Breaking Down The Stalk Market









































Written By: /u/Edricus - Discord: Kelauron#2495

Publication Date: April 1st, 2020

Special Thanks: Ninji

Version: 1.2.1

Preface 3

Daisy’s Selling Price 4

Stalk Market Patterns 4

Pattern Types 4

The First Week 4

Assigning A New Pattern 5

Pattern Phases 5

Random 6

Important Takeaways 8

Tips 8

Large Spike 9

Important Takeaways 10

Tips 11

Decreasing 12

Important Takeaways 12

Tips 12

Small Spike 13

Important Takeaways 14

Tips 14

Overall Takeaways 15

Lowest Possible Price 15

Highest Possible Price 15

Time Travel Effects 15

Change Log 16



________________

Preface

Before we begin, I’d like to thank Ninji who was the first person to publish the datamined code. Up until then, many channels had been analyzing a week's worth of data to try and find some patterns but more importantly to see if they have changed since the previous game.



With the data mined code for how turnips are calculated, we can now reverse engineer the process and get a peek into how things work to help us better predict our Stalk Market trends.



Additionally, I would like to thank several people who gave this paper an initial read and helped with general editing. Without them I likely wouldn’t have caught several of the small errors that were made and resolved.



A reminder that all this is solely based on the data mined code that was provided. If you have observed anything different than what is stated here, I encourage you to submit your information along with some proof. Preferably a screenshot or data set if possible.



The goal of this paper is to take a deep dive into the code and really explore all of the numbers and algorithms at play. With that said, let's get to it! Enjoy!

________________

Daisy’s Selling Price

During the analyzing process many people had written off the idea that the price that Daisy sells at played any sort of factor in determining how your weekly turnip prices are calculated. What we know now is that it does play a role! But what we also know now is what range those prices are locked in at.



This is very simple. Daisy’s price is calculated based on a random integer between 90 and 110. So in other words, Daisy will never sell you turnips for less than 90 or more than 110. From this moment forward, let’s refer to this number as the base price.



A very important note is that the base price is the sell price on your respective island and not anyone else's that you may have purchased from. Even if you purchased Turnips at 90 Bells from your friend but your island’s Daisy was selling at 100, that would be the base price for your weekly pricing.

Stalk Market Patterns

Upon investigation of the code, one of the first things that happens after randomizing Daisy’s sale price is determining what your pattern for this week will be. Interestingly, the pattern you received last week plays a pivotal role in determining what pattern you will get next week. Let’s start by defining what pattern types are present in this game.

Pattern Types

The patterns are defined by a simple integer value between 0 and 3 inclusive.



Pattern Identifier

Pattern Name

0

Random

1

Large Spike

2

Decreasing

3

Small Spike

The First Week

You may be wondering how the game determines what pattern you should receive the very first time you buy Turnips from Daisy. Since at this point you never had a previous pattern what happens? There is a special chunk of logic to deal with just that. If a previous pattern is not detected and it's the first time you’ve ever bought Turnips then your pattern is immediately set to Pattern 3 - Small Spike.

Assigning A New Pattern

Each type of pattern listed above has a percentage table assigned to it. This percentage represents the chance of you receiving a particular pattern as your next one.



Percentage Matrix


Random

Large Spike

Decreasing

Small Spike

Random

20%

30%

15%

35%

Large Spike

50%

5%

20%

25%

Decreasing

25%

45%

5%

25%

Small Spike

45%

25%

15%

15%


The left column is last week’s pattern and the top row is your next possible pattern for the current week. For example when receiving a Small Spike pattern on Week 1, you have a 45% chance of receiving the Random pattern on Week 2. A 25% chance for a Large Spike, a 15% chance for a Decreasing pattern and a 15% chance for another Small Spike pattern. A reminder that just because you may receive the same pattern again, does not mean the values within the pattern will be exactly the same. It just means that if you had plotted out the data on a chart, the overall trend would be the same.

Pattern Phases

Okay, so now we understand how different patterns are chosen each week but you are likely wondering how each pattern got its name. Well the answer to that lays in another concept uncovered in the data mine which we will call Phases.



Different patterns have different types and amounts of phases. They also have varying lengths. I will do my best to break down each one below by pattern. For the sake of easy explanation let us assume that our base price is 100 Bells unless otherwise stated in an example.



It is also worth noting the following important points

* The length of each phase is represented in half days and is determined according to the criteria in each patterns chart below

* One week has 12 assigned prices otherwise known as half days

* An AM and PM price for each day

* Prices reset at 12 AM and 12 PM respectively

* However since the Nook shop doesn’t open until 8 AM you effectively only have access to the AM price for 4 hours

* This is also the reason why half days are used

Random



Probably one of the most nerve wracking patterns to be in. This is broken down into 2 major phases. They are listed below.



1. Decreasing Phase

2. Increasing Phase



The interesting thing here is that each of those phases happen an exact amount of times each week. There will always be 2 Decreasing Phases and 3 Increasing Phases. The chart below describes the phase and the order they happen in.



Phase

How Length Is Determined

Increasing Phase 1



May Not Occur

A random amount between 0 and 6 half days

Decreasing Phase 1

50% chance of being 2 half days

50% chance of being 3 half days

Increasing Phase 2

This one is interesting as it breaks down into two calculations. First we determine a temporary length with the following formula.



Temp Length

7 half days - Increasing Phase 1 Length



Example

Increasing Phase 1 Length set to 4 half days



Temp Length

7 - 4 = 3 half days



Then we determine Increasing Phase 3s length below. Please read that section before proceeding in this cell. Once that is determined we use the following formula.



Temp Length - Increasing Phase 3 Length

Our range was between 0 & 2 Half Days

Let’s say we randomized 2 Half days.



3 - 2 = 1 Half Day

Decreasing Phase 2

5 half days - Decreasing Phase 1 Length



Example

Decreasing Phase 1 Length

3 half days



Decreasing Phase 2 Length

5 - 3 = 2 half days

Increasing Phase 3



May Not Occur

A random amount between 0 and Increase Phase 2 Temp Length - 1



Example

Increasing Phase 2 Temp Length set to 3 half days



3 - 1 = 2 half days



Our range is now between 0 and 2 Half Days inclusive.


Below is the order in which these phases happen



1. Increasing Phase 1

2. Decreasing Phase 1

3. Increasing Phase 2

4. Decreasing Phase 2

5. Increasing Phase 3



Additionally, each phase above acts on our base price (which remember is 100 for now) in a different way. Note that Bells are always rounded UP to the closest integer. See the chart below.



Phase

Algorithm

Description

Increasing Phase 1

Random between 90% and 140% of your base price

This does mean that in this phase Nook’s buying price may be 10% lower than what you bought for but up to 40% higher as well.



In our example our min and max would be

0.9 * 100 = 90 Bells

1.4 * 100 = 140 Bells

Decreasing Phase 1

Initial starting base rate is random between 60% and 80% of your base price



Every half day this base rate drops by 4% to 10% for the length of this phase

In our description above, the length of the decreasing phase was either 2 or 3 half days.



Let’s assume we got 2 half days as our length. At worst this would mean the following would occur.



Initial Base Rate: 60%

Monday AM: 60% of 100 = 60 Bells

Monday PM: 50% of 100 = 50 Bells

Increasing Phase 2

Same as Increasing Phase 1

At this point you can start to see why this is labelled Random Pattern. Now we just get similar sporadic numbers to Increasing Phase 1.

Decreasing Phase 2

Same as Decreasing Phase 1

Basically at this point the pattern has repeated with one more Increasing Phase to go and that’s it.

Increasing Phase 3

Same as Increasing Phase 1

We’ve now come full circle. The ride is over.


Important Takeaways

In a Random Pattern your maximum profit will only ever be 140% of whatever your base price was. So in our example, 140 Bells would be the most we’d ever see in this pattern. The interesting part of this pattern is its variable phase length.

Tips

Your best bet here if you don’t have any friends whose island you can visit is to sell the moment it is higher than your buying price. Unless of course RNG is not in your favor and during the Increasing Phase you always get 90% of your base price. But that likelihood is low. You are much more likely to either break even or make a semi-decent profit.

________________

Large Spike



Likely the most exciting pattern to be in. When the second phase

Breaking Down The Stalk Market
Info
Tags Animal crossing, Games, ACNH, Guide, Stalk market
Type Google Doc
Published 11/06/2020, 23:07:33

Resources

ACNH Art: Real vs. Fake (Unofficial)
Friendship Mechanics
NmlNpcParam - ACNH
Personality Subtypes
ACNH Fish & Insect Chart
NH Villagers + Exteriors + Interiors
ACNH Flower Layouts and Placement Guide
Garden FAQ