Financial Lab
Change variables and observe the model.
Lab 1 · Compound interest experiment (interactive)
Compound interest experiment · How time changes results
The amount supports (0–10) × 100,000,000 CNY, the annual interest rate is 0–100%, and the number of years is an integer of 0–100. Entering 5 means 5% per year, not 500%.
- compound interest future value
- CN¥26,532.98
- simple interest future value
- CN¥20,000.00
- Compound interest is more than simple interest
- CN¥6,532.98
- The present value of the same amount of money in the future
- CN¥3,768.89
The first three terms treat the input amount as today's principal; the present value treats the same amount as the money received at the end of the 20 year, discounted back to today at an annual interest rate. The two are experiments in different directions.
Future value = principal × (1 + annual interest rate) ^ number of years; simple interest future value = principal × (1 + annual interest rate × number of years); present value = future amount ÷ (1 + annual interest rate) ^ number of years. The model uses a fixed non-negative annual interest rate, interest is calculated every year, and there is no additional investment; taxes and inflation are not calculated. Parameters are for educational purposes only and do not represent revenue predictions.
Lab 2 · Balance sheet (interactive)
Balance Sheet · Who owns the assets and who bears the liabilities
The unit of all amounts is 10,000 CNY, and the single range is (0–10) × 100,000,00010,000 CNY. Fill in the data at the same time point; fill in the positive amount owed for liabilities, and calculate the equity from the difference.
- Total assets
- (120) × 10,000 CNY
- total liabilities
- (65) × 10,000 CNY
- Equity / Net Assets
- (55) × 10,000 CNY
Asset 120 = Liability 65 + Equity (55), unit: 10,000 CNY.
Available cash 10 − 30 days due 8 = (2) × 10,000 CNY; Liquidity Balance (2) × 10,000 CNY. Due amounts are already included in the liabilities above and cannot be added again.
Positive net assets: There is an equity buffer under this valuation basis. Net assets are not cash balances and cannot alone prove that payments can be made on time.
The example is a fictional teaching ledger. The valuation of family housing and the book value of enterprise equipment use different measurement examples and do not make market comparisons; taxes, discounts, guarantees and other unlisted items are not included. Only the first item of cash/deposit in the template is considered available within 30 days; housing, equipment, accounts receivable and other assets are not automatically discounted. Due accounts are a subset of existing liabilities, not new liabilities; cash use restrictions, future wages and asset sales are not included. Display to two decimal places, calculations using unrounded input.
Lab 3 · Bank run (interactive)
10 depositors · 5 borrowers · 1 banks
Unit: 10,000 CNY. Each depositor deposits 10, totaling 100; initial equity 20, total assets 120. Assets other than cash are divided equally among the five loans. The scenario at the same point in time is recalculated for each change and is not executed cumulatively.
- Withdrawal request
- (0) × 10,000 CNY
- actual payment
- (0) × 10,000 CNY
- Unmet withdrawals
- (0) × 10,000 CNY
- Loan losses
- (0) × 10,000 CNY
- remaining cash
- (20) × 10,000 CNY
- loan residual value
- (100) × 10,000 CNY
- remaining deposit liabilities
- (100) × 10,000 CNY
- Equity
- (20) × 10,000 CNY
Assets 120 = Deposit Liabilities 100 + Equity (20).
Applications for this round can be satisfied by cash. Equity remains positive, but immediate payment is not guaranteed.
Each initial loan is (20) × 10,000 CNY; this question pays equal proportions to the applicants, each person receives (0) × 10,000 CNY, and the unpaid portion remains a deposit liability.
In a fictitious single-period model, loan losses are recognized first and then withdrawals are paid. The loan cannot be sold, mortgaged or repossessed on the same day; there is no new borrowing, central bank support, insurance compensation, interest and fees. Increasing the initial cash will reduce the loan by the same amount, rather than creating capital; the loss rate will directly offset the loan value without increasing cash. Equal proportional payments are only classroom rules and do not represent the actual bank disposition sequence.
Lab 4 · Bond pricing (interactive)
Bonds · Same set of cash flows, different discount prices
Interest is paid at the end of each year and the principal is repaid at maturity. The interest rate input 5 represents 5%. The face value is (0–10) × 100,000,000 CNY, the coupon rate and yield are 0–100%, and the number of years is an integer of 0–100. This experiment does not include negative yields.
- Current model price
- 100.00 CNY
- The price after the yield increases by 1 percentage points
- 95.79 CNY
- Price changes (CNY)
- -4.21 CNY
The sensitivity comparison only changes the yield from 5.00% to 6.00%, with the coupon and term unchanged. The price changes by approximately -4.21%.
Year-by-year cash flow and present value
| End of year | Cash (CNY) | Present value (CNY) |
|---|---|---|
| 1 | 5.00 | 4.76 |
| 2 | 5.00 | 4.54 |
| 3 | 5.00 | 4.32 |
| 4 | 5.00 | 4.11 |
| 5 | 105.00 | 82.27 |
The price is the sum of coupons and principal of each period discounted at a fixed annual rate of return. Assuming no default, no redemption rights, and no taxes, the valuation is after interest payments and does not include accrued interest. When the number of years reaches zero, only the principal is returned immediately, and the last coupon payment is considered paid; this is not a full maturity transaction quote. Changing the term will change the number of cash flows, and the change in yield is not a realized return.
Lab 5 · Stock valuation (interactive)
Stock Valuation · Cash Flow and Terminal Value Assumptions
The amount is 10,000 CNY, the number of shares is 10,000 shares, and the result per share is yuan. Growth during the forecast period and sustainable growth are input separately; this teaching model requires the discount rate to be at least 1 percentage points higher than the sustainable growth rate to avoid unstable results close to zero in the denominator.
- Present value of cash flows during the forecast period
- 348.65 10,000 CNY
- future value present value
- 808.32 10,000 CNY
- enterprise value
- 1,156.97 10,000 CNY
- Equity value (enterprise value less net debt)
- 1,056.97 10,000 CNY
- model value per share
- 10.57 Yuan
The final value of The present value of the terminal value accounts for 69.87% of the enterprise value. at the end of the 5 year is (1,301.81) × 10,000 CNY, and then folded back to today.
See year-by-year forecasts and discounts
| year | income | operating profit after tax | free cash flow | Present value |
|---|---|---|---|---|
| 1 | 1,050 | 105 | 84 | 76.36 |
| 2 | 1,102.5 | 110.25 | 88.2 | 72.89 |
| 3 | 1,157.63 | 115.76 | 92.61 | 69.58 |
| 4 | 1,215.51 | 121.55 | 97.24 | 66.42 |
| 5 | 1,276.28 | 127.63 | 102.1 | 63.4 |
The amounts are all 10,000 CNY, rounding is displayed, and the calculation is not rounded period by period.
Year-end cash flow = revenue × after-tax operating margin × conversion ratio; this ratio summarizes the impact of depreciation, capital expenditures and working capital, and profit is not directly equal to cash. Terminal value = cash flow in the last year × (1 + perpetual growth rate) ÷ (discount rate − perpetual growth rate). The discount rate corresponds to the company's free cash flow, equity value minus net debt (debt minus cash). Fixed profit margin/conversion ratio and sustainable continuing operations are assumptions, and no loss-making operations, financing changes, dilution and discontinuation of operations are modeled; they do not constitute real stock target prices or investment recommendations.
Lab 6 · Housing affordability (interactive)
Housing Affordability · Monthly Budget for Buying and Renting
Enter 10,000 CNY for the house price, and the remaining amounts are CNY. Divide the annual nominal interest rate by 12 to get the monthly interest rate, and multiply the integer number by 12 to get the number of periods. Fixed interest rate, equal monthly payments of principal and interest; the monthly payment is zero when the full payment is made, but other housing expenses are still retained.
- Down payment (one-time payment)
- 200,000 CNY
- Loan principal
- 800,000 CNY
- Monthly payment (principal + interest)
- 4,294.57 CNY
- first month interest
- 3,333.33 CNY
- First month's principal repayment
- 961.24 CNY
- Full term loan interest
- 746,046.27 CNY
- Monthly cash expenditure for buying a house
- 5,294.57 CNY
- Monthly rental expenses
- 3,000 CNY
- Buying a house costs more per month than renting (negative values mean less spending)
- 2,294.57 CNY
- Monthly income balance after buying a house
- 4,705.43 CNY
- Monthly income balance after renting
- 7,000 CNY
The housing affordability rate is 52.95%; the rental affordability rate is 30%. The denominator is monthly after-tax income, and the numerator for buying a house includes monthly payments and other housing expenses. The monthly income balance has not yet deducted food, transportation and other living expenses and cannot be regarded as the amount that can be saved.
A total of 360 periods; monthly payment = principal × monthly interest rate ÷ [1 − (1 + monthly interest rate) to the power of the negative number of periods]. At zero interest rate, monthly payment = principal ÷ number of periods. Calculations are not rounded period by period and displayed to two decimal places.
Other housing expenses can be summarized as the average monthly budget for property, maintenance, taxes, and insurance. The rent-to-purchase comparison is limited to the current monthly cash flow, and the rent is assumed to include the tenant's housing expenses; the principal repayment and equity increase in the monthly payment are not equal to the consumption cost. Changes in house prices, rent changes, down payment opportunity costs, sales taxes, remaining loans and holding period terminal values are not calculated here, so it cannot be used to judge whether renting or buying is more cost-effective. Prepayments, floating rates, and specific bank approval rules are not modeled; there is no universal safety line for affordability rates.
Lab 7 · Combination risk (interactive)
Portfolio Risk · Weights, Co-Changes and Drawdowns
All are original 12 monthly synthetic returns, not real market prices or predictions. The initial net value is 100, which is rebalanced according to the input weight at the beginning of each month, excluding costs, taxes and leverage. The cash return is fixed at zero.
Total weight: 100%
- 12 Monthly accumulated income
- 9.3%
- average monthly arithmetic return
- 0.77%
- Monthly return sample volatility
- 2.24%
- Assumed converted annualized volatility
- 7.77%
- Maximum drawdown (from historical peak)
- 3.2%
View Synthetic Earnings and Equity Paths
| month | Stocks | Bonds | gold | Cash | Crypto | Combination% | Net asset value | Retracement % |
|---|---|---|---|---|---|---|---|---|
| 1 | 4% | 1% | -2% | 0% | 8% | 2.5 | 102.5 | 0 |
| 2 | -3% | 2% | 3% | 0% | -10% | -1.3 | 101.17 | 1.3 |
| 3 | 2% | -1% | 1% | 0% | 6% | 1.2 | 102.38 | 0.12 |
| 4 | 5% | 0% | -1% | 0% | 12% | 3.1 | 105.56 | 0 |
| 5 | -6% | 2% | 4% | 0% | -18% | -3.2 | 102.18 | 3.2 |
| 6 | 3% | 1% | -2% | 0% | 9% | 2.2 | 104.43 | 1.07 |
| 7 | 1% | -2% | 3% | 0% | 4% | 0.5 | 104.95 | 0.58 |
| 8 | -4% | 1% | -1% | 0% | -12% | -2.6 | 102.22 | 3.16 |
| 9 | 6% | -1% | 2% | 0% | 15% | 3.8 | 106.1 | 0 |
| 10 | -2% | 2% | 1% | 0% | -5% | -0.6 | 105.47 | 0.6 |
| 11 | 3% | 0% | -2% | 0% | 7% | 1.7 | 107.26 | 0 |
| 12 | 2% | 1% | 2% | 0% | 6% | 1.9 | 109.3 | 0 |
View sample correlation matrix
| Assets | Stocks | Bonds | gold | Cash | Crypto |
|---|---|---|---|---|---|
| Stocks | 1 | -0.59 | -0.46 | — | 0.99 |
| Bonds | -0.59 | 1 | -0 | — | -0.63 |
| gold | -0.46 | -0 | 1 | — | -0.44 |
| Cash | — | — | — | — | — |
| Crypto | 0.99 | -0.63 | -0.44 | — | 1 |
Matrices are calculated as sequences from the same combination, maintaining a consistent covariance structure. Cash zero movement, correlation undefined, displayed with —, no zeros filled.
Monthly income = weight of each asset × sum of monthly income; net value is multiplied monthly. The denominator of the sample variance is n−1; the annualized fluctuation is monthly fluctuation × √12, which can only be converted under the assumption of no serial correlation and is not a future risk prediction. The maximum drawdown includes the initial net value 100, calculated based on the decline of the net value at the end of each month relative to the previous highest value; intra-month fluctuations are not included. The common decline scenario changes both single-asset returns and correlations, and the entire difference cannot be attributed to correlations. Diversification does not eliminate losses and does not cover liquidity, custody or tail risks.
Lab 8 · Inflation and purchasing power (interactive)
Inflation and Purchasing Power · If your balance sheet has increased, can you buy more?
All teaching assumptions are fixed annual rates. The nominal amount is calculated in current-year yuan, and the purchasing power is converted into yuan at the opening price. Negative inflation indicates falling prices; the range is limited to −50% to 100%, and destabilizing price paths near −100% are not supported.
- Ending nominal amount
- 16,288.95 Yuan that year
- Actual purchasing power at the end of the period
- 12,120.51 Beginning price yuan
- Ending purchasing power of cash without interest
- 7,440.94 Beginning price yuan
- Price index at the end of the period (100 at the beginning of the period)
- 134.39
- Accurate Actual Annual Return
- 1.94 %
- Approximate: nominal returns minus inflation
- 2 %
Please compare the end-of-period amount and the price index at the same time, and do not directly regard future dollars as today's dollars. When the principal is zero, the amount result is zero, and the annual return rate is still the model parameter corresponding to the input assumption.
View nominal amounts and purchasing power year by year
| year | Notional amount | price index | actual purchasing power | Idle cash purchasing power |
|---|---|---|---|---|
| 0 | 10,000 | 100 | 10,000 | 10,000 |
| 1 | 10,500 | 103 | 10,194.17 | 9,708.74 |
| 2 | 11,025 | 106.09 | 10,392.12 | 9,425.96 |
| 3 | 11,576.25 | 109.27 | 10,593.91 | 9,151.42 |
| 4 | 12,155.06 | 112.55 | 10,799.62 | 8,884.87 |
| 5 | 12,762.82 | 115.93 | 11,009.32 | 8,626.09 |
| 6 | 13,400.96 | 119.41 | 11,223.09 | 8,374.84 |
| 7 | 14,071 | 122.99 | 11,441.01 | 8,130.92 |
| 8 | 14,774.55 | 126.68 | 11,663.17 | 7,894.09 |
| 9 | 15,513.28 | 130.48 | 11,889.64 | 7,664.17 |
| 10 | 16,288.95 | 134.39 | 12,120.51 | 7,440.94 |
Nominal future value = principal × (1 + nominal annual return)^number of years; purchasing power = nominal future value ÷ (1 + inflation)^number of years; precise real annual return = (1 + nominal return) ÷ (1 + inflation) − 1. Direct subtraction of the two rates is only an approximation. The price index uses a fixed consumption basket; it does not simulate personal consumption differences, taxes, new inputs or random inflation, and does not represent real investment returns. To show rounding, calculations are not rounded year by year.
Lab 9 · Lever pressure (interactive)
Leverage pressure · Asset decline and equity loss
Assume that asset prices change instantaneously and debt remains constant. The fictional contract requires equity ÷ assets not to be lower than the maintenance ratio; it is triggered when it is lower, and equality is still at the boundary. Trigger conditions are calculated here and clearing transactions are not executed.
- Initial equity
- (20) × 10,000 CNY
- post-shock assets
- (90) × 10,000 CNY
- post-shock equity
- (10) × 10,000 CNY
- Changes in equity
- (-10) × 10,000 CNY
Equity return: -50%; loan-to-value ratio LTV: 88.89%; equity ratio: 11.11%.
The margin condition of the fictitious contract has been triggered.
The trigger boundary corresponds to the total asset value (94.12) × 10,000 CNY, relative to initial asset change -5.88%. Triggered when the asset falls below this value; this is not the actual transaction price.Even if equity is still positive, a margin condition may have been triggered.
Equity = Assets − Debt; Return on Equity = Change in Equity ÷ Positive Initial Equity; Trigger Boundary Assets = Debt ÷ (1 − Maintenance Ratio). Maintain the upper limit of the proportion value 99% to avoid the denominator being zero. Zero assets and the presence of debt are considered triggered, and the ratio of zero assets is not forcibly divided by zero. No interest, additional collateral, slippage or liquidation feedback are included; the single-asset teaching model of fixed debt cannot directly apply futures, options or specific platform rules. Shows rounding and uses unrounded values for comparison.
Lab 10 · Credit loss (interactive)
Credit losses · Average expectations versus one default
Synthetic one-year principal model with fixed exposure; probabilities and recovery rates are input assumptions, not real borrower ratings. The benchmark and stress use the same tenor and the same exposure, and the two scenarios are calculated separately.
benchmark scenario
- expected loss
- 1.2 10,000 CNY
- expected loss rate
- 1.2 %
- In case of default: loss of principal
- 60 10,000 CNY
- In case of default: principal recovery
- 40 10,000 CNY
- Probability weighted principal recovery
- 98.8 10,000 CNY
pressure scenario
- expected loss
- 8 10,000 CNY
- expected loss rate
- 8 %
- In case of default: loss of principal
- 80 10,000 CNY
- In case of default: principal recovery
- 20 10,000 CNY
- Probability weighted principal recovery
- 92 10,000 CNY
Expected loss change in pressure relative to baseline: (6.8) × 10,000 CNY.
Benchmark: 98% probability of no default, principal loss 0; 2% probability of default, principal loss (60) × 10,000 CNY. The expected loss is the probability-weighted average of these two outcomes, and does not mean that the loan will necessarily lose exactly (1.2) × 10,000 CNY.
EL = EAD × PD × (1 − recovery rate). The principal will be recovered in full in the absence of default, and at the input recovery rate in the event of default; interest, discounts, recovery delays, collateral disposal fees and changes in exposure are not included. This is a two-state instructional model, not a complete loan pricing, capital requirement, or accounting impairment model; average losses do not describe portfolio correlations and tail losses. At zero exposure the amount is zero and the loss rate remains a scenario parameter.
Lab 11 · Exchange rate cash flow (interactive)
Exchange rate cash flow · Confirm the quotation direction first
All exchange rates are hypothetical, not real-time quotes. Income and expenditure are collected and paid in the same foreign currency in the same period, and the exchange rate is unified as the local currency corresponding to each 1 foreign currency. An increase in the exchange rate value indicates an appreciation of the foreign currency relative to the domestic currency; the net payer and net recipient have opposite effects.
Base exchange rate 7 → Pressure exchange rate 7.7 local currency / foreign currency; reverse quotation (foreign currency / local currency) change -9.09%, not always simple inversion.
- Net foreign currency receipts and payments
- 40 foreign currency unit
- Base currency income
- 700 local currency unit
- Base currency expenditure
- 420 local currency unit
- Baseline local currency net cash flow
- 280 local currency unit
- Pressure on local currency income
- 770 local currency unit
- Pressure on local currency spending
- 462 local currency unit
- Stressed local currency net cash flow
- 308 local currency unit
- Change in net cash flow
- 28 local currency unit
Currently, there are net foreign currency receipts, and foreign currency appreciation will increase net domestic currency inflows. Negative net cash flow indicates net outflow; "positive change" indicates an increase in inflow or a decrease in outflow, which does not necessarily represent profit.
Net cash flow in local currency = (foreign currency income − foreign currency expenditure) × exchange rate; pressure exchange rate = benchmark exchange rate × (1 + change rate). It is assumed that the amount of receipts and payments is fixed, settled simultaneously and without hedging; spreads, fees, taxes, account period differences and changes in demand are not taken into account. Different currencies cannot be directly subtracted from each other, nor can mismatches in payment and receipt be considered as complete offsets. This model does not predict exchange rates and does not calculate all corporate profits.
Lab 12 · Rebalance (interactive)
Rebalancing · Deduct transaction costs first, then restore target weights
Assume that the five assets can be traded in infinite subdivisions at the current price; the cash price remains unchanged. The transaction amount is the amount, not the number of shares. The same proportion of fees are charged for buying and selling stocks, bonds, gold, and Crypto, and there is no additional charge for cash balance adjustments. No external capital injections or borrowings.
Total assets before trade 110 CNY; Total transaction amount (buys + sells, excluding cash adjustments) 10 CNY; Fees 0.1 CNY; Total assets after costs 109.9 CNY.
| Assets | Transaction dollars | Drift weight % | Buy+/Sell−yuan | Cost Yuan | Yuan after transaction | Actual weight % |
|---|---|---|---|---|---|---|
| Stocks | 60 | 54.5455 | -5.05 | 0.0505 | 54.95 | 50 |
| Bonds | 50 | 45.4545 | 4.95 | 0.0495 | 54.95 | 50 |
| gold | 0 | 0 | 0 | 0 | 0 | 0 |
| Cash | 0 | 0 | 0 | 0 | 0 | 0 |
| Crypto | 0 | 0 | 0 | 0 | 0 | 0 |
Cash reconciliation: original cash 0 + sell 5.05 − buy 4.95 − expense 0.1 = ending cash 0 CNY. Changes in the cash line represent balance adjustments and are not chargeable transactions.
Pre-trade assets = initial amount × (1 + price change). Solve "net value after cost + transaction fee = net value before transaction", and then multiply the net value after cost by the target weight to determine the position. It’s not like you buy it at the old net value first and then deduct the cash. Assets whose prices fall to zero cannot be repurchased and their target weight must be set to zero; the entire portfolio cannot be rebalanced when it reaches zero. Excludes taxes, minimum trading sizes, spreads, market shocks, trading suspensions or trading sequence restrictions; rebalancing does not guarantee improved returns. Four decimal places are displayed, and calculations are not rounded to the displayed value.