How PSX IndexMate calculates index-based portfolio allocations
PSX IndexMate turns published PSX index weights into a practical allocation plan. The method is simple: start with filtered index constituents, normalize the remaining weights to 100 percent, apply the investment amount proportionally, then estimate whole-share quantities using the available price field.
Fetch
The app reads a PSX DPS index page and locates the table containing the index weight field.
Filter
The index table is narrowed to the investor's selected tickers, so the working basket becomes the basis for allocation.
Normalize
The remaining positive weights are re-scaled so the selected basket totals 100 percent.
Allocate
The normalized basket is converted into per-stock capital amounts and rough whole-share estimates.
Normalization
Normalization Factor = 100 / Sum of valid selected weights
Only rows with a valid positive parsed weight are used. Each stock's raw weight is multiplied by this factor so the filtered basket becomes a consistent 100 percent allocation base.
Capital Allocation
Allocated Amount = (Normalized Weight % / 100) x Investment Amount
This preserves the relative weight structure of the filtered basket. A stock with double the normalized weight receives double the cash allocation.
Why normalization is necessary
Investors often work with only part of an index. If allocation were calculated directly from the raw published index weights, excluded stocks would still consume part of the total weight and the remaining basket would be under-allocated. Normalization fixes that by re-scaling only the chosen names into a full 100 percent planning basket.
How share counts are estimated
After capital is assigned to a stock, PSX IndexMate looks for a usable price in a fixed priority
order: LDCP, Last, Close, Price,
Current, LTP, and Last Traded Price. The first valid
positive number becomes the stock price used for estimation.
Share quantity is then calculated with int(allocated_amount / stock_price). That means
fractional shares are dropped rather than rounded, so some cash may remain unallocated.
What the current formula gets right
The method is coherent for portfolio planning. It keeps allocation proportional to the filtered basket, makes the subset mathematically consistent, and produces outputs investors can understand: normalized weight, allocated amount, stock price used, and estimated shares to buy.
What the formula does not model
The page should be read as a planning methodology, not a trade execution model. The current formula does not account for lot sizes, brokerage, taxes, slippage, timing differences, or post-rounding cash redistribution. It also depends on the available price field in the source data.
Method, not advice
PSX IndexMate does not generate investment advice, target prices, or forecast models. It is a deterministic way to convert published index information into a cleaner, more usable portfolio planning output.
See the methodology in the working app
Move from the explanation into the live screener and allocation workflow when you want to test the method against the current PSX dataset.