PSX Strategy Optimizer
Backtest dip-buy strategies on Pakistan Stock Exchange historical data — 100% client-side.
The Basic Idea
This is a "buy the dip" strategy. When a stock's price falls from its opening price during the day, you buy at those lower levels. If the price bounces back to your target, you sell for profit. You split your money into parts so you don't put everything in at once — you buy more as it gets cheaper.
Full Example: Buying FFC with PKR 300,000
Let's say you pick these settings after running the optimizer:
Step 1 — Split your capital into parts:
Step 2 — Calculate buy prices (assuming FFC opens at Rs. 150):
Step 3 — What actually happens during the day?
You triggered buys at 1%, 2%, and 3% levels (3 parts used = PKR 150,000).
Total shares: 337 + 340 + 344 = 1,021 shares
Average buy price: PKR 150,000 ÷ 1,021 = Rs. 146.97
Your target: 146.97 × 1.02 = Rs. 149.91
If the day's HIGH reaches Rs. 149.91 → PROFIT = Rs. 3,002
You triggered all 5 buy levels (5 parts used = PKR 250,000).
Total shares: 1,719 shares. Average price: Rs. 145.44
Target: Rs. 148.35 — but the day's HIGH never reaches it.
Market closes at Rs. 143.00 → LOSS = Rs. 4,196
(This is a "stuck day" in the tool's language)
The day's LOW stays above Rs. 148.50. None of your buy levels trigger.
No profit, no loss — you simply skip the day.
How to Actually Trade This on PSX
Buy Price = Open × (1 - Level%) for each level.Target = Avg Price × (1 + Target%)Reading the Results
- Total Profit — How much money you would have made over all days tested. Positive = good.
- Win Rate — Out of all days you traded, what percentage hit the target. Above 60% is solid. Above 70% is excellent.
- Max Loss — Your single worst day. This tells you the worst-case pain. Keep this small.
- Stuck Days — Days where price dropped enough to trigger buys but never bounced to target. These are your risk days. Fewer is better.
- Score — Combined number rewarding high profit + high win rate + low max loss. Higher = better overall.
What the Optimizer Does
Tests many combinations automatically. For example:
Then ranks by Score and shows the best combination — that's the one you should use in real trading.
0 Comments