gamemanual:gm_stocks
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| gamemanual:gm_stocks [2022/06/13 09:28] – admin | gamemanual:gm_stocks [2022/06/20 13:57] (current) – [Variables] admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ======= Stocks Game Mechanics ======= | ||
| + | |||
| + | The Game Mechanics section of the manual details the internal formula used in the game's calculations. | ||
| + | |||
| + | The Game Mechanics part of the manual is mainly designed to be a reference for the frequently asked question, "Why do I get this rating when I do X, Y, Z?!" Usually, this answer involves many different variables, which this section of the manual demonstrates. | ||
| + | |||
| + | **The game mechanics section of the manual shows [[https:// | ||
| + | |||
| + | |||
| + | ====== Variables ====== | ||
| + | |||
| + | ^ Name ^ Description ^ ^ Name ^ Description ^ | ||
| + | | **Money** | Amount of cash your company has | | **Total_Debt** | Total Debt including all Loans, Bond Par Values, and Line Of Credit | | ||
| + | | **Branch_Construction_Costs** | Total value of all branch construction | | **Factory_Construction_Costs** | Total value of all completed factory construction | | ||
| + | | **Vehicle_Inventory** | Vehicle inventory times the average unit costs of the vehicles | | **Total_Design_Costs** | Design costs of all your components and vehicles divided by 10 | | ||
| + | | **Share_Holdings** | The value of other company shares you own | | **Global_Stock_Rate** | Global Stock Rate as defined by the TurnEvents.xml file | | ||
| + | | **Revenues_12_Months** | Revenues over the last 12 months | | **GameStartYear** | The year you started the game | | ||
| + | | **Evaluation** | Price Evaluation defined in the Price Evaluation section | | **EPS_Growth** | Change in EPS rating over the last year | | ||
| + | | **Total_Shares** | The total number of issued shares | | **CurrentSharePrice** | Share price for the previous month | | ||
| + | | **Last_EPS** | Last Quarter' | ||
| + | | **EPS_Q#** | EPS from # quarters ago | | **Delisted** | No longer publically traded | | ||
| + | | **LY_YTD_Profits** | Last Year Total Profits | | **CurrentFunds** | Current amount of money the company has | | ||
| + | | **Turn_Expenses** | Last Month' | ||
| + | | **LastYear_Expenses** | Last Year's Expenses | | **LastYear_Income** | Last Year's Revenues | | ||
| + | | **Current_Construction_Costs** | All current expenses from factory construction | | **** | | | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ====== Price Evaluation ====== | ||
| + | |||
| + | <code cpp> | ||
| + | Money - Total_Debt + Branch_Construction_Costs + | ||
| + | Factory_Construction_Costs + Vehicle_Inventory + | ||
| + | Total_Design_Costs + Share_Holdings | ||
| + | </ | ||
| + | |||
| + | |||
| + | ====== IPO Evaluation ====== | ||
| + | |||
| + | <code cpp> | ||
| + | |||
| + | PriceEvaluation = PriceEvaluation/ | ||
| + | |||
| + | PriceEvaluation = PriceEvaluation * 1.2 + (Revenues_12_Months * (3 * Global_Stock_Rate)) | ||
| + | |||
| + | IPO_Share_Price = 10 | ||
| + | |||
| + | Shares_Issued = PriceEvaluation / IPO_Share_Price | ||
| + | </ | ||
| + | |||
| + | |||
| + | ====== Share Price ====== | ||
| + | |||
| + | <code cpp> | ||
| + | |||
| + | if(Year > 2000) | ||
| + | { | ||
| + | if(Year-GameStartYear > 8 ) | ||
| + | NewSharePrice | ||
| + | (0.75 * EPS_Growth)) / (Total_Shares); | ||
| + | else | ||
| + | { | ||
| + | NewSharePrice | ||
| + | (Revenues_12_Months*1.0*Global_Stock_Rates) * | ||
| + | (((Year-GameStartYear)*0.1) * EPS_Growth)) / (Total_Shares); | ||
| + | } | ||
| + | } | ||
| + | else | ||
| + | { | ||
| + | if(Year-GameStartYear > 8 ) | ||
| + | NewSharePrice | ||
| + | Global_Stock_Rates) *(0.75 * EPS_Growth)) / (Total_Shares); | ||
| + | else | ||
| + | { | ||
| + | NewSharePrice | ||
| + | (Revenues_12_Months*(10.0-((Year-1900)/ | ||
| + | (((Year-GameStartYear)*0.1) * EPS_Growth)) / (Total_Shares); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | NewSharePrice = CurrentSharePrice + | ||
| + | ( ((NewSharePrice - CurrentSharePrice) / 3.5) + | ||
| + | ((((NewSharePrice - CurrentSharePrice) / 3.0)) - | ||
| + | (NewSharePrice - CurrentSharePrice) / 6.0) ) | ||
| + | |||
| + | if(NewSharePrice < 0) | ||
| + | NewSharePrice = 0.01; | ||
| + | |||
| + | if(A Quarter Month) | ||
| + | { | ||
| + | if(Last_EPS > 0) | ||
| + | { | ||
| + | if(Current_EPS > Last_EPS * 2.0) | ||
| + | NewSharePrice = NewSharePrice * 1.15; | ||
| + | else if(Current_EPS > Last_EPS * 1.2) | ||
| + | NewSharePrice = NewSharePrice * 1.1; | ||
| + | else if(Current_EPS > Last_EPS * 1.1) | ||
| + | NewSharePrice = NewSharePrice * 1.05; | ||
| + | else if(Current_EPS < Last_EPS * 0.9) | ||
| + | NewSharePrice = NewSharePrice * 0.95; | ||
| + | else if(Current_EPS < Last_EPS * 0.8) | ||
| + | NewSharePrice = NewSharePrice * 0.85; | ||
| + | else if(Current_EPS < Last_EPS * 0.7) | ||
| + | NewSharePrice = NewSharePrice * 0.75; | ||
| + | } | ||
| + | else if(Last_EPS < 0) | ||
| + | { | ||
| + | if(Current_EPS > Last_EPS * 0.7) | ||
| + | NewSharePrice = NewSharePrice * 1.15; | ||
| + | if(Current_EPS > Last_EPS * 0.8) | ||
| + | NewSharePrice = NewSharePrice * 1.1; | ||
| + | if(Current_EPS > Last_EPS * 0.9) | ||
| + | NewSharePrice = NewSharePrice * 1.05; | ||
| + | else if(Current_EPS < Last_EPS * 1.1) | ||
| + | NewSharePrice = NewSharePrice * 0.95; | ||
| + | else if(Current_EPS < Last_EPS * 1.2) | ||
| + | NewSharePrice = NewSharePrice * 0.85; | ||
| + | else if(Current_EPS < Last_EPS * 1.3) | ||
| + | NewSharePrice = NewSharePrice * 0.75; | ||
| + | } | ||
| + | else if(Last_EPS == 0) | ||
| + | { | ||
| + | if(Current_EPS > Last_EPS ) | ||
| + | NewSharePrice = NewSharePrice * 1.05; | ||
| + | else if(Current_EPS < Last_EPS ) | ||
| + | NewSharePrice = NewSharePrice * 0.95; | ||
| + | else if(Current_EPS == 0 && Last_EPS == 0 && eps3 == 0 && eps4 == 0) | ||
| + | { | ||
| + | NewSharePrice = NewSharePrice * (Random Number Between (0 AND 0.2) + 0.95); | ||
| + | } | ||
| + | |||
| + | } | ||
| + | |||
| + | } | ||
| + | |||
| + | if(NewSharePrice < ((Evaluation * 0.7) / Total_Shares)) | ||
| + | { | ||
| + | NewSharePrice = ((Evaluation * 0.7) / Total_Shares); | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | if(CurrentSharePrice != 0) | ||
| + | { | ||
| + | priceChange = NewSharePrice / CurrentSharePrice; | ||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ====== Share Splits ====== | ||
| + | |||
| + | |||
| + | ===== Split ===== | ||
| + | |||
| + | <code cpp> | ||
| + | |||
| + | if(NewSharePrice> | ||
| + | (((EPS_Q1+EPS_Q2+EPS_Q3+EPS_Q4)> | ||
| + | { | ||
| + | NewSharePrice = NewSharePrice / 2.0; | ||
| + | TotalShares = TotalShare * 2; | ||
| + | | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Reverse Split ===== | ||
| + | |||
| + | <code cpp> | ||
| + | if(NewSharePrice < 1) | ||
| + | { | ||
| + | |||
| + | if(TotalShares / 2 > 1000) | ||
| + | { | ||
| + | TotalShares = TotalShares / 2; | ||
| + | NewSharePrice = NewSharePrice * 2; | ||
| + | } | ||
| + | else | ||
| + | { | ||
| + | Delisted | ||
| + | } | ||
| + | |||
| + | } | ||
| + | |||
| + | </ | ||
| + | ====== Takeover Price ====== | ||
| + | |||
| + | <code cpp> | ||
| + | if(Shares_Needed > 0) | ||
| + | { | ||
| + | if(EPS_Year < -0.5) | ||
| + | { | ||
| + | AqusitionCosts = ((((Price_Evaluation*1.1)/ | ||
| + | | ||
| + | |||
| + | } | ||
| + | else | ||
| + | { | ||
| + | AqusitionCosts = ((((Price_Evaluation*1.2)/ | ||
| + | (PricePerShare*1.75)) * Shares_Needed) * ((EPS_Year/ | ||
| + | |||
| + | } | ||
| + | |||
| + | PricePerShare = (AqusitionCosts / (Shares_Needed)); | ||
| + | } | ||
| + | else | ||
| + | AqusitionCosts = ((Price_Evaluation/ | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ====== AI Buy/Sell Shares ====== | ||
| + | |||
| + | |||
| + | ===== Institutional ===== | ||
| + | |||
| + | ==== Buy ==== | ||
| + | |||
| + | <code cpp> | ||
| + | if(priceChange > 7%) | ||
| + | Buy 10% of the available shares. | ||
| + | else if(priceChange > 4%) | ||
| + | Buy 7% of the available shares. | ||
| + | else if(priceChange > 0% AND Random Number Between (0 AND 4) = 0) | ||
| + | Buy 3.5% of the available shares. | ||
| + | </ | ||
| + | |||
| + | ==== Sell ==== | ||
| + | |||
| + | <code cpp> | ||
| + | if(priceChange < -10% AND Random Number Between (0 AND 12) = 0) | ||
| + | Sell 4% of shares owned. | ||
| + | else if(priceChange < 0.95 AND Random Number Between (0 AND 12) = 0) | ||
| + | Sell 2.5% of shares owned. | ||
| + | else if(Random Number Between (0 AND 12) = 0) | ||
| + | Sell 1% of shares owned. | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ===== AI Companies ===== | ||
| + | |||
| + | ==== Buy ==== | ||
| + | |||
| + | <code cpp> | ||
| + | if(LY_YTD_Profits > 0 && CurrentFunds > (LY_YTD_Profits*2) ) | ||
| + | Buy 10% of CurrentFunds worth of stock shares. | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Sell ==== | ||
| + | |||
| + | <code cpp> | ||
| + | |||
| + | |||
| + | IF (( CurrentFunds < ( (Turn_Expenses-Turn_Income) * 3 ) AND | ||
| + | CurrentFunds < (LastYear_Expenses - LastYear_Income) ) OR | ||
| + | CurrentFunds < (Turn_Expenses-Current_Construction_Costs-Turn_Income)) | ||
| + | { | ||
| + | if( Company owns more than 25% of self ) | ||
| + | Sell 5% of shares owned of their company. | ||
| + | else | ||
| + | Sell all shares of random company. | ||
| + | } | ||
| + | |||
| + | </ | ||