Calculation guide
For investors reviewing holdings, income and trading assumptions.
Include only the costs you enter. Purchase averages use quantity weights; portfolio-return weights use beginning values over the same period. Reinvestment retains residual cash and states whether fractional shares are allowed. Rebalancing conserves cash after entered fees. Position size is an illustrative risk budget with no leverage or execution guarantee. Taxes and broker rules are not inferred.
Inputs
Portfolio value
Total cash-funded portfolio amount used for the trade's cash and risk limits.
Risk percent
Share of the portfolio you are willing to lose under the entered stop-price assumption.
Entry price
Assumed trade entry price per unit.
Stop price
Assumed exit price if the trade moves against you. Actual execution can differ.
Cost per unit
Transaction cost per unit included in both cash use and modeled risk.
Lot size
Minimum trading block; the calculated quantity is rounded down to a multiple of this size.
Position direction
Long expects prices to rise; short expects a fall. The stop must be on the loss side.
Worked example
| Input | Value |
|---|---|
| Portfolio value | 100,000 |
| Risk percent | 1% |
| Entry price | 100 |
| Stop price | 95 |
| Cost per unit | 0 |
| Lot size | 1 |
| Position direction | Long / buy |
Formula:
q=⌊min(RiskBudget/(|Entry−Stop|+F_unit),Portfolio/(Entry+F_unit))/Lot⌋·Lot
Position quantity = 200.000000000000
| Result | Value |
|---|---|
| Position quantity | 200 |
| Capital used | 20,000 |
| Modeled risk | 1,000 |
| Risk budget | 1,000 |
Interpreting the result
Trade quantity rounded down to whole lots and limited by both cash and modeled risk.
Trade quantity multiplied by entry price plus per-unit cost.
How each input affects this example
Each row starts from the worked example and changes one input.
| Input | Original input | New input | Affected result | Original result | New result |
|---|---|---|---|---|---|
| Portfolio value | 100,000 | 110,000 | Position quantity | 200 | 220 |
| Risk percent | 1% | 2% | Position quantity | 200 | 400 |
| Entry price | 100 | 110 | Position quantity | 200 | 66 |
| Stop price | 95 | 85 | Position quantity | 200 | 66 |
| Cost per unit | 0 | 1 | Position quantity | 200 | 166 |
