Value per Share

Can anyone explain the calculation for Value per Share?

Each company has 10 blocks of 1,000 shares for a total of 10,000 shares. The game seems to be dividing (in error?) by roughly 100,000 for Value/Share. Still, the calculation is off. From my current game:

Player / Total Value / Value per Share / "Missing" Value

P1 / 801,652 / 7.38 / 63,652

P2 / 549,836 / 5.50 / -164

P3 / 629,403 / 6.10 / 19,403

P4 / 538,164 / 5.37 / 1,164

The numbers are off dramatically immediately following a buyout. I played on and after P1 bought out P4 the tooltip shows:

Total Value: 1,521,781 (implies actual value/share of 15.21)

Value/Share: 9.20 (implies "missing" value of 601,781)

Any ideas on what other factors are at play? Is the calculation being done correctly?

34,370 views 14 replies
Reply #1 Top

Over here, Soren said that "stock price is not a linear relation to your actual cash on hand [..] There is a dampening effect". So perhaps some of the missing value is due to cash on hand being discounted to some (perhaps variable) extent?

Over here, there was a problem where right after a buyout your stock price was depressed. Soren said he "tweaked the code" to reduce the effect, which suggests that the algorithm does contain some kind of post-buyout special-casing, which might explain why the missing value is even greater after a buyout.

---

I too have noted the 10,000 shares vs. 100,000 Value/Share calculation. There's nothing inherently wrong with it since it's a game mechanic and not an actual stock trading mechanism, but it was certainly surprising (and a bit puzzling) the first time I noticed it. I hope that the devs publish the actual stock valuation mechanism in full sometime rather than making us work it out through trial-and-error. The current tooltips are a pretty good start, but a short forum post with full details would be even better. And yes, I know that the algorithm will be subject to change throughout the Early Access period. But seeing this kind of information and giving the devs feedback on it is exactly what Early Access is for, no?

(btw: Another oddity is that stock valuation includes both cash and resources, at least to some extent, although it may be discounted somewhat as noted above. But when you buy all of someone's stock and take over their company you don't get any of their cash or resources. Again, perfectly reasonable as a game mechanic but very counter-intuitive for something that's labeled "stock purchase".)

Reply #2 Top

To clarify, I'm trying to calc Value/Share, not Price/Share. I get that Price/Share gets modified by difficulty, other stocks owned and % of remaining stock.

Total Value seems to be: Base Value + Cash + Resources + Structures + Patents - (Debt * Debt Multiplier)

But I can't figure out the conversion from Total Value -> Value/Share. It should be a simple division by 100k but more is going on.

When you buy someone out, you get their Base/Structures but you don't get their Cash/Resources/Debt. If someone has low Cash/Resources and high Debt, their stock becomes a really attractive buy since your buying their Base/Structures for pennies on the dollar. Buying someone with high Cash/Resources and low Debt is far more painful since your paying a 100% multiple for Cash/Resources that your not going to get. Maybe, because we don't know how to accurately calculate Value/Share.

If someone buys your stock, what's the best way to defend yourself against a takeover? Pay down your debt? Maintain high Cash/Resources? Buy your own stock? Buy their stock? Buy someone else's stock at a lower multiple?

Important questions that I at least don't yet know how to answer.

Reply #3 Top

Actually not reasonable. You should get all of the building, the resources and the HQ. and maybe the cash, because it was probably used  as part of the buyout value. The thing that annoys me is being able to buy out a player without owning more than 50% of the stock. That shouldn't occur unless the player is willing.

Reply #4 Top

Something is definitely wrong. Last game I played, I bought about half of TruXPixels stock. When he bought his own stock back from me his stock price jumped from about $20/share to over $100/share in a matter of seconds. The game also temporarily calculated him somehow gaining over 9m cash in the transaction.

Cash: http://i.imgur.com/eeYqGTf.jpg

Graph: http://i.imgur.com/0Ddgth8.jpg

 

 

 

 

 

 

Reply #5 Top

Some things to consider:

 

1. Stock prices have a lag effect, they slowly move up and down.   (buy an auction for an insane quantity of debt. your stock price will reach $0.10, but will do so slowly.)

 

2.  When buying out a player, you are doing it at a "premium":  you paid more than the player was "worth"... therefor, your stock price will fall after a merger, simply because your assets have decreased.

Reply #6 Top

Here's the code. Let me know if this helps answer the question.

public void updateBaseSharePrice(bool bForce)
{
if (!isAlive())
{
return;
}

int iTotalValue = calculateTotalStockValue(true);

const int STOCK_STEPS = (1000 * Constants.STOCK_MULTIPLIER);

int iNewValue = 0;

if (iTotalValue > 0)
{
// XXX test this...

while (iTotalValue > 0)
{
int iChange = Math.Min(STOCK_STEPS, iTotalValue);

iNewValue += iChange;
iTotalValue -= iChange;

iTotalValue *= 3;
iTotalValue /= 4;
}
}
else
{
iNewValue = iTotalValue;
}

if (game().isGameOption(GameOptionType.MARATHON_MODE))
{
iNewValue *= 2;
}

iNewValue /= 100;

iNewValue = Math.Max(iNewValue, 0);

if (getBaseSharePrice() != iNewValue)
{
if (bForce || (Math.Abs(getBaseSharePrice() - iNewValue) < (Constants.STOCK_MULTIPLIER / 10)))
{
miBaseSharePrice = iNewValue;
}
else
{
miBaseSharePrice = ((getBaseSharePrice() * 9) + iNewValue) / 10;
}

makeDirty();
}
}

+1 Loading…
Reply #7 Top

and...

public int calculateTotalStockValue(bool bIncludeDebt)
{
int iValue = calculateBaseStockValue();

iValue += getMoney();

if (bIncludeDebt)
{
iValue += (getDebt() * infos().handicap(getHandicap()).miDebtMultiplier);
}

iValue += calculateResourceStockValue();

iValue += calculateHQStockValue();
iValue += calculateBuildingStockValue();
iValue += calculateConstructionStockValue();

iValue += calculatePatentStockValue();

return iValue;
}

+1 Loading…
Reply #8 Top

also, updateBaseSharePrice() gets called very tick (usually a second)

+1 Loading…
Reply #9 Top

Most helpful. There is some built in "market adjustment lag" to your Value/Share. The market needs time to "price in" large, recent changes to your value. Cool.

This explains why your so vulnerable following a buyout - your stock price instantly loses the value of your +100% shares in your acquisition but the value of their Base/Structures takes time to be reflected in your stock price.

Soren:

Could you comment on the TruXPixels screenshots in Reply #4? If Player A and B own shares in each other, is it possible to trigger some type of feedback loop when B buys back his shares from Player A? Could this cause B.getMoney() to temporarily return inflated values?

Constants.STOCK_MULTIPLIER == ???

iNewValue /= 100; // Shouldn't this be 'iNewValue /= 10;'

iNewValue is the value portion (not stock price) of buying 10% of the company?

Have we all been buying each other at a 90% discount? :D

Reply #10 Top

STOCK_MULTIPLIER is 1000.

 

As for reply#4, I'm really baffled. I assume there is not a replay of that game?

Reply #11 Top

Quoting Soren_Johnson, reply 10
As for reply#4, I'm really baffled. I assume there is not a replay of that game?

Of course not. That would be too easy.

From memory:

1) I bought 4-5 of his shares.

2) He bought the rest of his shares.

3) We were both around $20/share.

4) He bought himself out. I got ~450k payout and his cash-on-hand displayed as 9.3m for ~15 seconds. I don't think he ever actually had that cash or he could have immediately bought everything.

It looks like the game:

1) Temporarily set his cash to 9.3m

2) Gave me the inflated payout: 4,000 shares * $107.72/share = $430,880.

3) Calculated his value with the inflated cash, causing his Price/Share to skyrocket.

4) Reset his cash to the correct value, causing his Price/Share to plummet.

There is a 10X discrepancy between the Stock Purchase Tooltip (10 blocks of 1000 shares) and miBaseSharePrice (iNewValue /= 100). I'd be amazed if there isn't some corner case that is doing the conversion wrong.

Reply #12 Top

Quoting jgray5454, reply 11


There is a 10X discrepancy between the Stock Purchase Tooltip (10 blocks of 1000 shares) and miBaseSharePrice (iNewValue /= 100). I'd be amazed if there isn't some corner case that is doing the conversion wrong.

 

iNewValue is not the new share price. Look at the code again.

iNewValue is incremented by STOCK_STEPS for every multiple of STOCK_STEPS that iTotalValue exceeds while iTotalValue is depreciated by 1/4th at each step.  So, if STOCK_STEPS is 100,000 (maybe it is 10k or 1mil, we don't know for sure here), then for every (let's say) 100k in value you have, iNewValue is incremented by 100k and the remaining total value gets depreciated by 25%. This gives a heavier depreciation on values which are much higher than 100k. So, for example, the amounts over 600k would be depreciated by 25% at least 6 times. This is a huge depreciation factor. It probably should be 10% or maybe even 5%. This is why the stock buyouts are so screwed up at the end and why level 2 and 3 HQ players can buy out level 5 HQ players. All the extra value the level 5 players have is being heavily depreciated vs the value that the level 2 and 3 HQ players have. 

But, moving on...

Once we get through the loop, iNewValue is a discounted representation of the total value. The stock is 10 buckets of 1000 shares. So, that is 10,000 shares total. However, the price point is based on 1000 shares, so the price point is 1/10th of the depreciated company value. After we divide iNewValue by 100, it represents 1/100th of the whole company, which is an order of magnitude less expensive than the desired breakdown. But, look at the code which follows...

iNewValue /= 100;


iNewValue = Math.Max(iNewValue, 0);

if (getBaseSharePrice() != iNewValue)
{
   if (bForce || (Math.Abs(getBaseSharePrice() - iNewValue) < (Constants.STOCK_MULTIPLIER / 10)))
   {
      miBaseSharePrice = iNewValue;
   }
   else
   {
      miBaseSharePrice = ((getBaseSharePrice() * 9) + iNewValue) / 10;
   }

   makeDirty();
}

 

Presumably, iNewValue would equal getBaseSharePrice() for all ticks where nothing has changed in terms of the numbers. That implies that getBaseSharePrice() is returning a number which is 1/100th of the value of the company. Assuming the two numbers no longer match, an update is in order. When it updates, it updates miBaseSharePrice by taking 9/10ths of getBaseSharePrice() and 1/10th of iNewValue and adding them together. So, we are using 1/10th of 1/100th of the newly calculated and depreciated company value and 9/10th of getBaseSharePrice() to arrive at our new baseSharePrice. At least, that's what it looks like to me. Which is why 100k in cash only changes the value of your company by pennies. The original baseSharePrice makes up the bulk of the number.

 

Reply #13 Top

I think we are saying the same thing.

1) You can buy the value of other companies for 10 cents on the dollar. (20 cents on the dollar during a buyout since your paying 2X)

2) Companies valued over 1m face a further dampening effect that increases their discount.

STOCK_STEPS is 1,000,000 so:

Total Value:      500,000 iNewValue:   5,000
Total Value:   1,000,000 iNewValue: 10,000
Total Value:   2,000,000 iNewValue: 17,500
Total Value: 10,000,000 iNewValue: 50,849

I'm assuming getBaseSharePrice() is returning miBaseSharePrice

I'm thinking of iNewValue as "Dollars required to buy the first block of shares in an otherwise un-owned company".

 

Reply #14 Top

Quoting jgray5454, reply 9

Most helpful. There is some built in "market adjustment lag" to your Value/Share. The market needs time to "price in" large, recent changes to your value. Cool.

This explains why your so vulnerable following a buyout - your stock price instantly loses the value of your +100% shares in your acquisition but the value of their Base/Structures takes time to be reflected in your stock price.

If this is true, it doesn't make sense.  At the very least, the loss of value in stock price after the buyout should also have the lag, rather than be instantly lost.  There should be no loss in stock price associated with acquisition.  

In the real world, the mere announcement of an acquisition causes the stock price to rise in value before any deal is finalized.