IRR (Rate of Return) for Profit, and other crop research.

Discussion in 'General Discussion' started by xFishbone, Mar 14, 2016.

  1. xFishbone

    xFishbone Cosmic Narwhal

    TL;DR: The sheet
    Make a copy if you want to change values.


    Yes the wiki has profit per day per plant.
    Thats only good if your farm stays the same size.
    (ROI) or profit margin, another popular metric, does not take the time required into account.

    Rate of return is the way to go for expanding farms.
    because every time you sell crops, you can buy bigger and bigger batches of seeds.


    example: Wheat vs Starfruit
    A quick search will tell you planting starfruit will give you a profit of 30.77g per day per plant.
    Wheat gives you a measly 3.75g per day per plant.
    So starfruit is obviously best! ...Assuming your farm stays the same size.

    But what about when you are trying to GROW your farm?
    Then, Wheat is better. :)
    If you reinvest the money from harvests back into more seeds, then it looks like this:
    Wheat grows capital at 25.74% per day
    vs
    Starfruit at 1.46% per day



    if your head is starting to hurt, This sheet should help.
    :)




    F.A.Q
    When should i look at IRR, and when should i look at profit per plant?
    Limited by gold: IRR
    Limited by space/time: Profit per plant

    What if i run out of energy?

    energy is not a limiting factor. You can eat to get it back at the cost of money, or visit the spa to get it back at a cost of time.

    I dont understand that example!
    okay. here's how that example works.

    10 Wheat seeds cost 100g. They sell for 250g.
    Thats 25 wheat seeds on harvest day.
    62.5 seeds (statistics.. lol...) on the 2nd harvest
    and that harvest on the 12th day sells for 1562.5g
    etc... on the 24th day, its 24415g

    1 starfruit seed costs you 400g.
    and you get 800g on the 13th, which gets you 2 seeds..
    so you sell a harvest of 1600 on the 26th.

    Profit over time when reinvesting, is compounded. Just like your bank interest!
    (assuming you have the time/space for 2k wheat seeds...)

    Assumptions and known issues
    • kegs and barrels dont take space
    • you sleep at 12 midnight
    • you never run out of time(or patience) to plant more crops
    • sprinklers cost 0g/day because they are used over a long period of time.
    • energy used to till land not considered for above reason.
    • harvests are sold at the shop, so you get your money back on the same day.
    • kegs/barrels checked at the same time every day. something that takes 1.1 days will be sold on the 2nd day.
    • This is a statistical model. Its smart enough to not grow a cauliflower with only 2 days left in the month, but it WILL give you 1/4 potatoes, that go into 1/4 kegs
    • cant handle multi-season crops (trees, ancient fruit, corn, etc)
    • rounding error on some crops when planted with fertilizer

    Changelog

    14 mar
    • sheet created
    15 mar
    • fixed beer
    • added flowers
    • changing the current day of the month works.
    • some code cleanup
    16 mar
    • bit more code cleanup.
    • added fertilizers!
    • comments on the sheet are allowed too.
    • added crop quality effects from farming levels! ty Axelius!
    19 mar
    • Support for more energy alternatives. Added salmonberry
     
      Last edited: Mar 19, 2016
    • Landwalker

      Landwalker Scruffy Nerf-Herder

      I love this chart, and I love this avenue of thinking.

      It's been a few years since I looked at internal rate of return, and unfortunately I don't have the time or energy these days to go back and grok this as much as I want to. However, I do want to, and I do plan on coming back to this.

      As a synopsis, can you maybe provide layfolks with an overview of the results and why they're the results, what assumptions were made, etc.? Because it's easy to look at this, not knowing the assumptions involved, and then look at "Profit per Day" on the Wiki (or other source), and say "Pfft. Moar money per day = Moar money per day," and then go back to throwing starfruit (or maybe blueberries) all over the damn place.
       
      • xFishbone

        xFishbone Cosmic Narwhal

        here's why. (again using starfruit vs wheat)

        10 Wheat seeds cost 100g. They sell for 250g.
        Thats 25 wheat seeds on harvest day.
        62.5 seeds (statistics.. lol...) on the 2nd harvest
        and that harvest on the 12th day sells for 1562.5g
        etc... on the 24th day, its 24415g

        1 starfruit seed costs you 400g.
        and you get 800g on the 13th, which gets you 2 seeds..
        so you sell a harvest of 1600 on the 26th.

        Profit over time when reinvesting, is compounded. Just like your bank interest!

        this is just for illustrative purposes. it uses almost 1000 wheat plants at the end.
        in reality, you will run out of energy and time before you can process that much wheat.
        at which point u will be unable to completely reinvest your capital, and you should switch to the more "normal" way of measuring profit used by the wiki and most other guides.
        or go down the IRR list till you find a crop you think you can handle. Like eggplants. with sprinklers.
        ...and sprinkles.



        And thats why an IRR(internal rate of return) calculation better when growing,
        while flat net profit figures. are better at stagnant fixed sized farms.



        main assumptions
        If you are concerned about return on investment, i assume you are trying to grow your presumably limited capital as fast as possible. therefore ignored in favor of IRR.

        IRR:
        Unlimited time per day, both ingame and IRL. and that your fingers dont tire.
        also assumes you sell to the shop instead of the box. so you get to replant the same day.
        Doesnt take into account the energy used to till the land. Only considers watering.
         
          Last edited: Mar 14, 2016
        • Axelius

          Axelius Tentacle Wrangler

          You have not taken into account that Wheat in Barrels make Beer, which is 200g.
           
          • xFishbone

            xFishbone Cosmic Narwhal

            Ahh... i knew i was missing something!

            fixed!

            now also assumes u check barrels/kegs only once a day at the same time every day, so a keg that takes 1.1 days will only be sold on the 2nd day.
            and that you sleep at midnight.
             
              Last edited: Mar 15, 2016
            • DukeOfRiven

              DukeOfRiven Giant Laser Beams

              This is so far removed from how I play the game I don't really know how to react to it.
               
              • xFishbone

                xFishbone Cosmic Narwhal

                Stop, remain calm, back away slowly while speaking in a calm voice. You are trying to show the b̶e̶a̶r̶ geek that you are being submissive and yielding to their territorial supremacy.
                then go socialize with more villagers to try and forget we exist =D



                in other news, flower support added.
                fixed some(but not all) weird code.
                changing day now works.

                still wondering what to do about corn/ancient fruit
                 
                • Morgath

                  Morgath Astral Cartographer

                  Really nice spreadsheet, and an interesting way to look at things.

                  One question I would like to ask, as I do not see it in the spreadsheet atm (has changed since I looked at it this morning, (nice to see you are continually improving it) is how the deluxe fertilizer (Edit: meant Deluxe speed grow) would effect the values, if you were to buy it. (ie factor in the cost of the fertilizer into the price)

                  Your spreadsheet helps highlight when a farm is undergoing rapid growth, so not likely to be much of a factor as much of the growth will be in the first year, until it hits the "stagnant" phase you described.

                  But its a pretty good tool, so I wonder if it could be modified to show the effect of this, as other ones I have seen haven't done this.

                  For larger farms it seems unlikely that there would be enough resources to craft enough deluxe speed grow for every season (coral doesn't grow on trees) So for those going for wine etc that rewards speed of production of crops over quality, buying it from Pierre's is the best option.

                  Not got to the stage in the game where this is a factor for me (still in first year as playing slowly, and deluxe speed grow isn't available yet) but definitely interested to see how it might effect things. would be nice to know what crops would be worth buying it for, and which has marginal benefits etc.


                  Yeah, I don't min max myself, but it's always nice to have someone crunch the numbers so if you decide to do something similar in the future someone else has done the work, or at least have an idea of the best way to get the most out of your money if saving up for something. You can play more casual, but still harvest the fruits of someone else's labor in a way.
                   
                    Last edited: Mar 15, 2016
                  • xFishbone

                    xFishbone Cosmic Narwhal

                    i would have added that in, but i have no idea how much effect it has too.. daily luck plays a part too i think?
                    if someone knows the numbers behind it ill gladly add it in.
                    i use it for my own reference too so having that in the sheet will be really useful for me as well :D
                     
                    • Morgath

                      Morgath Astral Cartographer

                      Didn't know luck had a factor in it. Perhaps just assume 0 luck modifiers, and people just use as a guide. Price for Deluxe speed grow is listed as 180 on the wiki, but can't confirm. Not even sure exactly when it unlocks.
                       
                      • Axelius

                        Axelius Tentacle Wrangler

                        Lvl 8 Farming for crafting and in Spring 2 at Pierre's.
                         
                        • Morgath

                          Morgath Astral Cartographer

                          Thanks. Knew about the level 8 farming to craft, and guessed was year 2 for the store unlock. Nice to confirm.
                           
                          • Morgath

                            Morgath Astral Cartographer

                            Should clarify what I said before, I just realized I accidently said deluxe fertilizer in my original post when I meant deluxe speed grow. (which is why luck would be a factor with deluxe fertilizer for the quality as you replied)

                            That is what I am interested in, how much the added cost for the deluxe speed grow would impact on the values if you bought it.

                            It would obviously impact single grow crops differently than ones that continue to produce crops after the initial growth period, as I believe from what I have read that the harvest period afterwards does not change.
                             
                              Last edited: Mar 15, 2016
                            • xFishbone

                              xFishbone Cosmic Narwhal

                              you can change the growth speed mod
                              35% for agriculturalist + deluxe speed gro

                              25% for just deluxe speed gro


                              the cost though.. is a bit weird.
                              i mean, it lasts for the whole season...
                              wouldnt make sense to add the whole cost into 1 crop.

                              i guess i could add a portion based on how long the crop will be growing for...
                              and does anyone know the quality results for crops with no fertiliser?


                              edit: Added fertilizer!!
                              going to assume u get 100% normal crops without fertilizer..
                              ill change that if i ever find out the actual numbers.


                              2nd edit: there. hopefully the opening post is a little easier to read. x.x
                               
                                Last edited: Mar 16, 2016
                              • Axelius

                                Axelius Tentacle Wrangler

                                Give me an hour or two and i might be able to dig out that info from the game files.
                                 
                                  xFishbone likes this.
                                • Axelius

                                  Axelius Tentacle Wrangler

                                  Ok, bear with me now, it's about to get serious.

                                  Code:
                                  		int quality = 0;
                                  		int fertilizer = 0;
                                  		switch (soil.fertilizer)
                                  		{
                                  		case 368:
                                  			fertilizer = 1;
                                  			break;
                                  		case 369:
                                  			fertilizer = 2;
                                  			break;
                                  		}
                                  		double chanceOfGold = 0.2 * (double)(Game1.player.FarmingLevel / 10) + 0.2 * (double)fertilizer * (double)((float)(Game1.player.FarmingLevel + 2) / 12f) + 0.01;
                                  		double chanceOfSilver = Math.Min(0.75, chanceOfGold * 2.0);
                                  		if (random.NextDouble() < chanceOfGold)
                                  		{
                                  			quality = 2;
                                  		}
                                  		else if (random.NextDouble() < chanceOfSilver)
                                  		{
                                  			quality = 1;
                                  		}
                                  
                                  This is the code* that calculated the quality of a crop before harvest. As you can see it is pretty heavily dependent on player.FarmingLevel.

                                  Assuming FarmingLevel 1 and no fertilizer we would have a chanceOfGold of 0.03 and chanceOfSilver of 0.05. Netting 3% gold crops and 4.85 % silver.

                                  Assuming FarmingLevel 5 and basic fertilizer woulf give us 0.22 chanceOfGold and 0.44 chanceOfSilver. With 22% of harvest being gold, 34.3% silver and 43.7% normal.

                                  Assuming FarmingLevel 10 and Quality fertilizer this would result in a chanceOfGold of 0.61 and a chanceOfSilver of 0.75. This means that 61% of any harvest will be of gold quality, 29% of silver and 10% normal.

                                  FarmingLevel 10 and Basic fertilizer nets you chanceOfGold 0.41, chanceOfSilver 0.75 for 41% Gold, 44.2% Silver and 14.8% normal.

                                  Obivously, this makes this a HIGHLY variable statistic. Additionally, the effective use of fertilizer is also highly dependent on the level of the farmer, which in this case isn't really a value we can control.

                                  *edited to make it easier to read instead of using num3, num4, num5 and num6 for various variables.
                                   
                                    gchristopher and xFishbone like this.
                                  • xFishbone

                                    xFishbone Cosmic Narwhal

                                    lets see if i understand this x.x

                                    [goldchance] = 0.2* [farming] /10 + 0.2 * if(fertilizer is basic,1, and if its quality, 2) * ([farming]+2) /12 + 0.01
                                    [silverchance] = [goldchance] *2


                                    so the actual chance of silver is something like...
                                    (1-goldchance)*goldchance*2

                                    added that in ^^
                                     
                                      Last edited: Mar 16, 2016
                                    • Axelius

                                      Axelius Tentacle Wrangler

                                      Except Silverchance is maximum 0.75, so after 37% Gold chance the Silver chance stays at 75% no matter what.

                                      So yes, if you have 21% and 42% You first have a 21% chance of it being gold, then if it isn't gold it has a 42% chance of being silver.
                                       
                                      • DukeOfRiven

                                        DukeOfRiven Giant Laser Beams

                                        Well, uh...

                                        Uh...

                                        I've noticed that, uh, sometimes when you hit a rock with a pickaxe, you get stone!

                                        And, uh, sometimes you don't.

                                        There's probably some maths and code backing that up.

                                        ...

                                        ... I don't know them, though.
                                         
                                        • xFishbone

                                          xFishbone Cosmic Narwhal

                                          rocks dont give you stone.. they just break.
                                          the sudden appearance of perfectly shaped stone each time is actually magic.

                                          just like putting 500 gold on a shelf will change your hair colors
                                          and changing a cell in my spreadsheet can update hundreds of cells two sheets away!
                                           

                                          Share This Page