# Opportunity Cost - Quick Guide
## What Was Added ✨
A new **"Current Value If Held"** column on the Tradebook page for **sold positions only**.
## What It Shows
For stocks you've completely sold, you can now see:
- What they would be worth today
- How much you gained/missed by selling when you did
- Percentage difference
## Visual Example
### Before (What you see now):
```
Symbol: RELIANCE (SOLD)
Realized P&L: +₹5,000
Sold At: ₹15,000
XIRR: 15%
```
### After (With new column):
```
Symbol: RELIANCE (SOLD)
Realized P&L: +₹5,000
Sold At: ₹15,000
Current Value If Held: ₹20,000
-₹5,000 (-25%) ← New! Shows you sold too early
XIRR: 15%
```
## Color Coding 🎨
### 🟢 Green (Good Decision)
```
Current Value If Held: ₹12,000
+₹3,000 (+25%)
```
**Meaning**: Stock went down after you sold. You made the right call! 🎯
### 🔴 Red/Orange (Missed Opportunity)
```
Current Value If Held: ₹20,000
-₹5,000 (-25%)
```
**Meaning**: Stock went up after you sold. You missed out on gains. 😅
## Real Examples
### Example 1: Perfect Exit 🎯
```
You:
- Bought 100 @ ₹100 = ₹10,000
- Sold 100 @ ₹150 = ₹15,000 ✅
- Realized P&L: +₹5,000 (50%)
Today:
- Current Price: ₹80
- Would be worth: ₹8,000
- Opportunity Cost: +₹7,000 (87.5%) 🎉
Translation: You sold at the peak! If you still held, you'd be down ₹2,000 from your cost!
```
### Example 2: Sold Too Early 😅
```
You:
- Bought 50 @ ₹200 = ₹10,000
- Sold 50 @ ₹240 = ₹12,000 ✅
- Realized P&L: +₹2,000 (20%)
Today:
- Current Price: ₹300
- Would be worth: ₹15,000
- Opportunity Cost: -₹3,000 (-20%) 😅
Translation: You made profit, but left ₹3,000 on the table. Stock continued rallying.
```
### Example 3: Avoided Disaster 💪
```
You:
- Bought 200 @ ₹150 = ₹30,000
- Sold 200 @ ₹180 = ₹36,000 ✅
- Realized P&L: +₹6,000 (20%)
Today:
- Current Price: ₹50
- Would be worth: ₹10,000
- Opportunity Cost: +₹26,000 (260%) 💪
Translation: Great timing! You avoided a massive 67% loss!
```
## Where to Find It
1. Go to **Tradebook** page
2. Look for positions marked as **SOLD**
3. Find the new column after "Sold At"
4. Only appears if current price is available
## When It Shows
✅ Completely sold positions (quantity = 0)
✅ Current price available
✅ Valid sell transactions exist
❌ Active positions (shows Unrealized P&L instead)
❌ No current price data
❌ Never traded positions
## The Math
```
Current Value If Held = Sold Quantity × Current Market Price
Opportunity Cost = Actual Sale Proceeds - Current Value If Held
If Negative: You sold too early (missed gains)
If Positive: You sold at right time (avoided losses)
```
## Important Notes 📝
### What This Means
- Shows if your exit timing was good/bad
- Helps learn from past decisions
- Pure "what if" analysis
### What This DOESN'T Mean
- Not a recommendation to buy back
- Doesn't consider dividends
- Doesn't account for taxes
- Doesn't show what you did with the money
- Not considering opportunity cost of capital
### Remember
- **Hindsight is 20/20**: Past prices are easy to judge
- **Profit is profit**: Any realized gain is good
- **Learn, don't regret**: Use this to improve future exits
- **Context matters**: Maybe you needed the cash, or reduced risk
## Use Cases
### 1. Exit Strategy Review
Review your selling decisions to refine your exit strategy.
### 2. Holding Period Insights
See if you tend to sell too early or hold too long.
### 3. Learning Tool
Understand which stocks you should have held longer.
### 4. Satisfaction Check
Feel good about exits that avoided big losses! 😊
## FAQ
**Q: Why is my good trade showing negative opportunity cost?**
A: You still made profit! The negative just means the stock went up more after you sold.
**Q: Should I buy back if opportunity cost is very negative?**
A: No! This is historical analysis only. Don't make decisions based on past prices.
**Q: The percentage seems huge, is it a bug?**
A: No, percentages can be large if the stock moved significantly after your sale.
**Q: Why don't I see this for active positions?**
A: Active positions show "Unrealized P&L" instead, which serves a similar purpose.
**Q: Does this include dividends I got after selling?**
A: No, this only compares sale proceeds vs current market value.
---
**Feature Status**: ✅ Live Now - Just Refresh Your Tradebook!
**No Setup Required**: Works immediately
**Performance**: Zero impact
**Learning**: Priceless 😊