Investment Analysis & Portfolio Management Engine
Complete investment analysis, portfolio construction, risk management, and trade execution methodology. Works across stocks, crypto, ETFs, bonds, and alternatives. Zero dependencies — pure agent skill.
Quick Health Check (/8)
Before any investment activity, score your current state:
| Signal |
✅ Healthy |
❌ Fix First |
| Investment thesis documented |
Written with edge + invalidation |
"I think it'll go up" |
| Position sizing calculated |
Kelly/fixed-fractional with max cap |
"I'll put in $5K" |
| Stop-loss defined |
Price or thesis invalidation trigger |
No exit plan |
| Portfolio heat tracked |
Total exposure known, <15% |
Unknown aggregate risk |
| Asset correlation checked |
No >40% correlated concentration |
All tech / all crypto |
| Rebalance schedule set |
Monthly or threshold-based |
Never rebalanced |
| Tax impact considered |
Harvesting losses, holding periods |
Tax-blind trading |
| Performance tracked |
Benchmarked vs buy-and-hold |
"I think I'm up" |
Score /8. Below 5 = fix fundamentals before any new positions.
Phase 1: Investment Thesis Development
Every position starts with a thesis. No thesis = no trade.
Thesis Brief Template
thesis:
ticker: "AAPL"
asset_class: "equity" # equity | crypto | etf | bond | commodity | real_estate
date: "2026-02-22"
# THE EDGE — why does this opportunity exist?
edge:
type: "mispricing" # mispricing | catalyst | trend | mean_reversion | structural
description: "Market pricing in worst-case regulation; actual impact is 5-10% revenue, not 30%"
why_others_miss_it: "Headline risk scaring generalists; specialists still buying"
# THESIS STATEMENT (one sentence)
thesis_statement: "AAPL is undervalued by 20% due to regulatory FUD; earnings growth will re-rate within 2 quarters"
# TIMEFRAME
timeframe:
horizon: "3-6 months"
catalyst_date: "2026-04-15" # earnings, FDA, macro event
catalyst_type: "earnings_beat"
# BULL / BASE / BEAR
scenarios:
bull:
probability: 30
target_price: 245
thesis: "Regulation light + Services acceleration"
base:
probability: 50
target_price: 215
thesis: "Regulation moderate, priced in by Q3"
bear:
probability: 20
target_price: 165
thesis: "Full regulatory impact + macro downturn"
# EXPECTED VALUE
# EV = (P_bull × R_bull) + (P_base × R_base) + (P_bear × R_bear)
current_price: 190
expected_value: 213.5 # (0.3×245 + 0.5×215 + 0.2×165)
ev_vs_current: "+12.4%"
# INVALIDATION — when you're WRONG
invalidation:
price_stop: 175 # -7.9% from entry
thesis_stop: "Revenue decline >10% YoY in any segment"
time_stop: "No catalyst by 2026-07-01"
# CONVICTION (1-5)
conviction: 4
conviction_factors:
- "3 independent data sources confirm undervaluation"
- "Insider buying last 90 days"
- "Valuation below 5Y average on EV/EBITDA"
Edge Type Framework
| Edge Type |
Description |
Validation Method |
Decay Rate |
| Mispricing |
Market wrong on fundamentals |
Comp analysis + model |
Slow (months) |
| Catalyst |
Known upcoming event |
Calendar + probability |
Fast (event-driven) |
| Trend |
Momentum / technical |
Price action + volume |
Medium (weeks) |
| Mean Reversion |
Extreme deviation from norm |
Z-score + history |
Medium |
| Structural |
Market structure creates opportunity |
Flow analysis |
Slow |
Thesis Quality Checklist
Phase 2: Fundamental Analysis
Equity Analysis Framework
Valuation Metrics (collect all, weight by sector)
valuation:
# Price Multiples
pe_ratio: null # Price / Earnings (TTM)
forward_pe: null # Price / Forward Earnings
peg_ratio: null # PE / Earnings Growth Rate
ps_ratio: null # Price / Sales
pb_ratio: null # Price / Book
ev_ebitda: null # Enterprise Value / EBITDA
ev_revenue: null # Enterprise Value / Revenue
fcf_yield: null # Free Cash Flow / Market Cap
# Compare to:
sector_median: null
historical_5y_avg: null
historical_range: [null, null] # [low, high]
# Verdict
valuation_score: null # 1-10 (1=very expensive, 10=very cheap)
relative_to_sector: null # premium | inline | discount
Financial Health Scorecard
| Dimension |
Metric |
Healthy |
Warning |
Danger |
| Profitability |
Gross Margin |
>50% |
30-50% |
<30% |
| Profitability |
Net Margin |
>15% |
5-15% |
<5% |
| Profitability |
ROE |
>15% |
8-15% |
<8% |
| Profitability |
ROIC |
>12% |
6-12% |
<6% |
| Growth |
Revenue YoY |
>15% |
5-15% |
<5% |
| Growth |
EPS YoY |
>10% |
0-10% |
Declining |
| Growth |
FCF Growth |
>10% |
0-10% |
Declining |
| Leverage |
Debt/Equity |
<0.5 |
0.5-1.5 |
>1.5 |
| Leverage |
Interest Coverage |
>8x |
3-8x |
<3x |
| Leverage |
Net Debt/EBITDA |
<2x |
2-4x |
>4x |
| Liquidity |
Current Ratio |
>1.5 |
1-1.5 |
<1 |
| Liquidity |
Quick Ratio |
>1.0 |
0.5-1 |
<0.5 |
| Efficiency |
Asset Turnover |
>0.8 |
0.4-0.8 |
<0.4 |
| Efficiency |
Inventory Days |
<60 |
60-120 |
>120 |
| Quality |
FCF/Net Income |
>80% |
50-80% |
<50% |
| Quality |
Accruals Ratio |
<5% |
5-10% |
>10% |
Score each dimension 1-3. Total /48. Above 36 = strong. Below 24 = avoid.
Moat Assessment (0-25 points)
| Moat Source |
Score 0-5 |
Evidence Required |
| Network Effects |
|
Users increase value for other users |
| Switching Costs |
|
Painful to leave (data lock-in, integrations) |
| Cost Advantages |
|
Structural cost below competitors |
| Intangible Assets |
|
Brand, patents, regulatory licenses |
| Efficient Scale |
|
Market only supports limited competitors |
Score /25. Above 15 = wide moat. 8-15 = narrow. Below 8 = no moat.
Crypto Analysis Framework
crypto_analysis:
# Network Fundamentals
network:
daily_active_addresses: null
transaction_volume_24h: null
hash_rate_trend: null # BTC/PoW
staking_ratio: null # PoS chains
developer_activity: null # GitHub commits 90d
tvl: null # DeFi protocols
tvl_trend_30d: null
# Tokenomics
tokenomics:
supply_schedule: null # inflationary | deflationary | fixed
circulating_vs_total: null # % circulating
unlock_schedule: null # upcoming unlocks
concentration: null # top 10 holders %
# On-Chain Signals
on_chain:
exchange_reserves_trend: null # decreasing = bullish
whale_accumulation: null # large wallet changes
realized_profit_loss: null # NUPL
mvrv_ratio: null # Market Value / Realized Value
# Market Structure
market:
funding_rate: null # perpetuals funding
open_interest_trend: null
spot_vs_derivatives_volume: null
correlation_to_btc: null
correlation_to_sp500: null
Crypto Valuation Methods
| Method |
Best For |
Formula |
| Stock-to-Flow |
BTC |
Price = 0.4 × S2F^3 (check vs actual) |
| NVT Ratio |
L1 chains |
Network Value / Daily Transaction Value |
| TVL Ratio |
DeFi |
Market Cap / TVL (below 1 = undervalued) |
| Fee Revenue Multiple |
Revenue-generating |
MC / Annualized Fees |
| Metcalfe's Law |
Network tokens |
Value ∝ n² (active addresses) |
Phase 3: Technical Analysis
Price Action Framework
technical_analysis:
ticker: "BTC-USD"
timeframe: "daily"
date: "2026-02-22"
# TREND
trend:
primary: "uptrend" # uptrend | downtrend | range
higher_highs: true
higher_lows: true
above_200ma: true
above_50ma: true
ma_alignment: "bullish" # 20 > 50 > 200 = bullish
# KEY LEVELS
levels:
resistance: [105000, 110000, 120000]
support: [95000, 88000, 80000]
current_price: 98500
distance_to_resistance: "+6.6%"
distance_to_support: "-3.6%"
# MOMENTUM
momentum:
rsi_14: 58 # <30 oversold, >70 overbought
rsi_divergence: null # bullish_div | bearish_div | none
macd_signal: "bullish" # bullish | bearish | neutral
macd_histogram_trend: "increasing"
# VOLUME
volume:
vs_20d_avg: "+15%"
trend: "increasing_on_up_days" # confirms trend
# PATTERN
pattern:
current: "ascending_triangle"
reliability: "high"
target: 112000
invalidation: 93000
Signal Scoring Matrix
| Factor |
Bullish (+) |
Neutral (0) |
Bearish (-) |
| Trend (weight 3x) |
Above 200MA, higher highs |
Ranging |
Below 200MA, lower lows |
| Momentum (weight 2x) |
RSI 40-60 rising, MACD bull cross |
RSI 45-55 flat |
RSI >75 or bearish div |
| Volume (weight 2x) |
Rising on up moves |
Average |
Rising on down moves |
| Support/Resistance (weight 1x) |
Near strong support |
Mid-range |
Near strong resistance |
| Pattern (weight 1x) |
Bullish continuation |
No pattern |
Bearish reversal |
Score -9 to +9. Above +5 = strong buy signal. Below -5 = strong sell signal.
Phase 4: Position Sizing & Risk Management
Position Sizing Rules (MANDATORY)
risk_rules:
# Per-Trade Risk
max_risk_per_trade: 2% # of total equity
max_risk_aggressive: 3% # only with 5/5 conviction
# Portfolio Heat
max_portfolio_heat: 15% # total risk across all positions
max_correlated_exposure: 25% # in correlated assets
max_single_position: 10% # of total equity
# Position Size Formula
# Position Size = (Account × Risk%) / (Entry - Stop Loss)
# Example: ($100K × 2%) / ($190 - $175) = $2,000 / $15 = 133 shares
# Kelly Criterion (optional, aggressive)
# f* = (bp - q) / b
# b = win/loss ratio, p = win probability, q = 1-p
# ALWAYS use Half-Kelly or Quarter-Kelly (full Kelly = too aggressive)
Position Size Calculator
Account Equity: $___________
Risk Per Trade: ___% (max 2%)
Dollar Risk: $___________ (equity × risk%)
Entry Price: $___________
Stop Loss Price: $___________
Risk Per Share: $___________ (entry - stop)
Position Size: ___________ shares (dollar risk / risk per share)
Position Value: $___________ (shares × entry)
Portfolio Weight: ___% (position value / equity)
CHECK: Portfolio weight < 10%? ☐ Yes ☐ No (reduce if no)
CHECK: Portfolio heat < 15%? ☐ Yes ☐ No (reduce if no)
CHECK: Correlated exposure ok? ☐ Yes ☐ No (reduce if no)
Stop-Loss Decision Tree
Is this a TREND trade?
├── YES → Trailing stop below swing low (ATR-based: 2× ATR)
│ Initial stop: Below last higher low
│ Trail: Move stop to below each new higher low
│
└── NO → Is this a CATALYST trade?
├── YES → Time-based + price stop
│ Price: Below pre-catalyst support
│ Time: Close if no move within 2 days post-catalyst
│
└── Is this a VALUE trade?
├── YES → Thesis invalidation stop
│ Price: Below bear case scenario price
│ Thesis: Close if fundamental thesis breaks
│ Time: Close if no re-rating in stated timeframe
│
└── MEAN REVERSION → Tight stop
Price: If moves further from mean (wider Z-score)
Target: Mean / fair value level
Risk Management Hard Rules
- Never average down without a plan — Adding to losers kills accounts. Only add if: thesis intact AND price at predetermined add level AND total position still within limits
- Cut losses fast, let winners run — Asymmetric payoff is the goal. 1:3 risk/reward minimum
- No revenge trading — After a loss, wait 24 hours before next trade
- Daily loss limit — Stop trading for the day after -3% account drawdown
- Weekly loss limit — Reduce position sizes by 50% after -5% weekly drawdown
- Monthly loss limit — Go to cash if -10% monthly drawdown. Review all positions.
- Correlation check — Before every new position, check correlation to existing holdings
- Black swan rule — If any asset moves >15% in 24h, review ALL positions immediately
Phase 5: Portfolio Construction
Asset Allocation Framework
portfolio:
name: "Growth + Income"
target_allocation:
# Core (60-70% — low turnover)
core:
us_large_cap: 25% # S&P 500 / quality growth
international: 10% # Developed markets
fixed_income: 15% # Bonds / treasuries
bitcoin: 10% # Digital gold thesis
real_estate: 5% # REITs
# Satellite (20-30% — active management)
satellite:
growth_stocks: 15% # Individual stock picks
crypto_alts: 5% # L1s, DeFi
thematic: 5% # AI, clean energy, etc.
# Cash (5-15%)
cash: 10% # Dry powder for opportunities
# Rebalance Rules
rebalance:
method: "threshold" # calendar | threshold | hybrid
threshold: 5% # Rebalance when drift >5% from target
calendar_check: "monthly" # Review allocations monthly
tax_aware: true # Use new contributions to rebalance first
Portfolio Models by Risk Profile
| Profile |
Stocks |
Bonds |
Crypto |
Alts |
Cash |
Expected Return |
Max Drawdown |
| Conservative |
30% |
40% |
5% |
10% |
15% |
6-8% |
-15% |
| Balanced |
50% |
20% |
10% |
10% |
10% |
8-12% |
-25% |
| Growth |
60% |
10% |
15% |
10% |
5% |
12-18% |
-35% |
| Aggressive |
50% |
0% |
30% |
15% |
5% |
15-25% |
-50% |
| Degen |
20% |
0% |
50% |
25% |
5% |
20-40%+ |
-70%+ |
Correlation Matrix Template
Track correlations between holdings. Target: no two positions with >0.7 correlation exceeding 20% combined weight.
SPY BTC ETH AAPL MSFT GLD TLT
SPY 1.00
BTC 0.35 1.00
ETH 0.30 0.85 1.00
AAPL 0.82 0.25 0.20 1.00
MSFT 0.85 0.28 0.22 0.78 1.00
GLD -0.10 -0.05 -0.08 -0.12 -0.10 1.00
TLT -0.35 -0.15 -0.12 -0.30 -0.32 0.40 1.00
Phase 6: Trade Execution
Trade Journal Template
trade:
id: "T-2026-042"
date_opened: "2026-02-22"
date_closed: null
# WHAT
ticker: "BTC-USD"
direction: "long"
asset_class: "crypto"
# SIZING
entry_price: 98500
position_size: 0.15 # BTC
position_value: 14775
portfolio_weight: "8.2%"
# RISK
stop_loss: 93000
risk_amount: 825 # (98500-93000) × 0.15
risk_percent: "0.82%" # of portfolio
# TARGETS
target_1: 105000 # 50% of position
target_2: 115000 # 30% of position
target_3: 130000 # 20% of position (runner)
risk_reward: "1:3.8" # avg target vs risk
# THESIS
thesis: "BTC consolidating above 200MA, halving supply reduction, ETF inflows accelerating"
edge_type: "trend + structural"
conviction: 4
# EXECUTION
entry_type: "limit" # market | limit | scaled
scale_plan: null # or: [{"price": 97000, "size": "50%"}, {"price": 95000, "size": "50%"}]
# RESULT (fill on close)
exit_price: null
exit_reason: null # target_hit | stop_hit | thesis_invalidated | time_stop | manual
pnl_dollar: null
pnl_percent: null
r_multiple: null # PnL / initial risk
# REVIEW
followed_plan: null # yes | partially | no
lessons: null
mistakes: null
grade: null # A-F
Execution Checklist (Before EVERY Trade)
Order Types Decision
| Situation |
Order Type |
Why |
| Strong conviction, want in now |
Market |
Speed over price |
| Good setup, not urgent |
Limit at support |
Better entry |
| High-conviction, want scale in |
Scaled limits (3 levels) |
Average entry, reduce timing risk |
| Breakout trade |
Stop-limit above resistance |
Only enter if breakout confirms |
| Catalyst trade |
Limit pre-catalyst |
Position before event |
Phase 7: Performance Tracking
Daily Dashboard
daily_dashboard:
date: "2026-02-22"
# PORTFOLIO SNAPSHOT
portfolio:
total_equity: null
daily_pnl: null
daily_pnl_percent: null
weekly_pnl: null
monthly_pnl: null
ytd_pnl: null
# POSITIONS
open_positions: 0
portfolio_heat: "0%" # sum of all position risks
cash_percent: "100%"
# BENCHMARK
benchmark:
sp500_ytd: null
btc_ytd: null
portfolio_vs_sp500: null
portfolio_vs_btc: null
# ACTIVITY
trades_today: 0
alerts_triggered: []
Performance Metrics (Track Weekly)
| Metric |
Formula |
Target |
| Win Rate |
Winning trades / Total trades |
>50% |
| Average R |
Average R-multiple of all trades |
>1.5R |
| Profit Factor |
Gross profit / Gross loss |
>2.0 |
| Expectancy |
(Win% × Avg Win) - (Loss% × Avg Loss) |
Positive |
| Max Drawdown |
Peak to trough decline |
<-15% |
| Sharpe Ratio |
(Return - RFR) / Std Dev |
>1.5 |
| Sortino Ratio |
(Return - RFR) / Downside Dev |
>2.0 |
| Calmar Ratio |
Annual Return / Max Drawdown |
>1.0 |
| Recovery Factor |
Net Profit / Max Drawdown |
>3.0 |
Monthly Review Template
monthly_review:
month: "2026-02"
# PERFORMANCE
portfolio_return: null
benchmark_return: null # vs S&P 500
alpha: null # portfolio - benchmark
# TRADING STATS
total_trades: 0
winning_trades: 0
losing_trades: 0
win_rate: null
average_winner: null
average_loser: null
largest_winner: null
largest_loser: null
profit_factor: null
# RISK STATS
max_drawdown: null
avg_portfolio_heat: null
risk_rule_violations: 0
# BEHAVIOR ANALYSIS
followed_plan_rate: null # % of trades that followed the plan
emotional_trades: 0 # trades driven by FOMO/revenge/boredom
early_exits: 0 # cut winners short
late_exits: 0 # held losers too long
# TOP 3 LESSONS
lessons:
- null
- null
- null
# ADJUSTMENTS FOR NEXT MONTH
adjustments:
- null
Phase 8: Market Regime Detection
Regime Framework
| Regime |
Characteristics |
Strategy |
Position Size |
| Bull Trend |
Rising 200MA, breadth >60%, VIX <20 |
Trend following, buy dips |
Full size |
| Bear Trend |
Falling 200MA, breadth <40%, VIX >30 |
Short / inverse, raise cash |
Half size |
| Range/Chop |
Flat 200MA, breadth 40-60% |
Mean reversion, sell premium |
Quarter size |
| High Vol |
VIX >35, large daily swings |
Reduce exposure, hedge |
Minimum size |
| Euphoria |
VIX <12, extreme bullish sentiment |
Take profits, hedge |
Scale down |
| Panic |
VIX >50, capitulation signals |
Accumulate quality |
Scale in slowly |
Macro Checklist (Weekly)
Sentiment Indicators
| Indicator |
Extreme Fear (Buy) |
Neutral |
Extreme Greed (Sell) |
| CNN Fear & Greed |
<20 |
40-60 |
>80 |
| AAII Bull-Bear |
>-30% spread |
±10% |
>+30% spread |
| Put/Call Ratio |
>1.2 |
0.7-0.9 |
<0.5 |
| VIX Term Structure |
Backwardation |
Flat |
Steep contango |
| Crypto Fear & Greed |
<15 |
40-60 |
>85 |
| BTC Funding Rates |
Deeply negative |
Neutral |
>0.05% |
Phase 9: Dividend & Income Analysis
Dividend Quality Score (0-100)
| Factor |
Weight |
Scoring |
| Yield vs Sector |
15 |
At/above median = 15, below = proportional |
| Payout Ratio |
20 |
<50% = 20, 50-75% = 15, 75-100% = 5, >100% = 0 |
| Growth Rate (5Y CAGR) |
20 |
>10% = 20, 5-10% = 15, 0-5% = 10, declining = 0 |
| Consecutive Years |
15 |
>25y = 15 (Aristocrat), 10-25 = 10, 5-10 = 5, <5 = 0 |
| FCF Coverage |
15 |
FCF/Div >1.5 = 15, 1-1.5 = 10, <1 = 0 |
| Debt/EBITDA |
15 |
<2 = 15, 2-4 = 10, >4 = 5 |
Score /100. Above 75 = excellent income pick. Below 40 = dividend at risk.
Income Portfolio Construction
- Core income (60%): Dividend Aristocrats, quality REITs, investment-grade bonds
- Growth income (25%): Dividend growers (low yield, high growth rate)
- High yield (15%): Higher risk, higher yield (junk bonds, BDCs, covered calls)
- Yield target: 4-6% blended, growing 5-8% annually
Phase 10: Tax Optimization
Tax-Loss Harvesting Rules
- When: Position down >10% from cost basis AND held <12 months
- How: Sell the position, immediately buy a correlated (not substantially identical) replacement
- Wash sale rule: Cannot buy back the same security within 30 days (before or after)
- Replacement examples: SPY→VOO, AAPL→QQQ, BTC spot→BTC futures ETF
- Track: Cumulative harvested losses, offset against gains + $3K income deduction
Holding Period Optimization
| Holding Period |
Tax Rate (US) |
Strategy |
| <1 year |
Ordinary income (up to 37%) |
Only for high-conviction short-term trades |
| >1 year |
Long-term CG (0/15/20%) |
Default for all positions when possible |
| >5 years (QOZ) |
Reduced + deferred |
Qualified Opportunity Zone investments |
Tax-Efficient Account Allocation
| Account Type |
Best For |
Why |
| Taxable |
Long-term holds, tax-loss harvesting |
Capital gains treatment |
| Traditional IRA/401k |
Bonds, REITs, high-dividend |
Defer high-tax income |
| Roth IRA |
Highest growth potential |
Tax-free growth |
| HSA |
Aggressive growth |
Triple tax advantage |
Phase 11: Screening & Idea Generation
Stock Screener Criteria Templates
Value Screen:
- P/E < sector median
- P/B < 1.5
- Debt/Equity < 0.5
- ROE > 12%
- FCF positive 5 consecutive years
- Insider buying last 90 days
Growth Screen:
- Revenue growth > 20% YoY
- EPS growth > 15% YoY
- Gross margin > 50%
- Net retention > 110% (SaaS)
- TAM > $10B
Dividend Screen:
- Dividend yield > 3%
- Payout ratio < 60%
- Dividend growth > 5% CAGR (5Y)
- Consecutive increases > 10 years
- Debt/EBITDA < 3
Crypto Screen:
- Market cap > $1B (avoid micro-caps)
- Daily volume > $50M
- Active development (GitHub commits)
- Not >90% held by top 10 wallets
- Clear revenue model or adoption metrics
Research Sources (No API Required)
| Source |
URL |
Best For |
| Yahoo Finance |
finance.yahoo.com |
Fundamentals, quotes |
| Finviz |
finviz.com |
Screening, heatmaps |
| Macrotrends |
macrotrends.net |
Historical financials |
| CoinGecko |
coingecko.com |
Crypto data |
| DeFiLlama |
defillama.com |
DeFi TVL, yields |
| FRED |
fred.stlouisfed.org |
Macro data |
| TradingView |
tradingview.com |
Charts, technicals |
| SEC EDGAR |
sec.gov/edgar |
Filings, insider trades |
| Glassnode |
glassnode.com |
On-chain data |
| Fear & Greed |
alternative.me |
Crypto sentiment |
Phase 12: Advanced Strategies
Options Basics (for hedging)
| Strategy |
When |
Risk |
Reward |
| Protective Put |
Own stock, want downside protection |
Premium paid |
Unlimited upside, limited downside |
| Covered Call |
Own stock, willing to cap upside |
Capped gains |
Premium income |
| Cash-Secured Put |
Want to buy at lower price |
Must buy at strike |
Premium + lower entry |
| Collar |
Want protection, willing to cap upside |
Capped both ways |
Low/no cost protection |
DCA (Dollar Cost Averaging) Framework
dca_plan:
asset: "BTC"
frequency: "weekly" # daily | weekly | biweekly | monthly
amount: 250 # per purchase
day: "Monday" # specific day
duration: "indefinite" # or end date
# SMART DCA (optional — buy more when cheap)
smart_dca:
enabled: true
base_amount: 250
multiplier_rules:
- condition: "price < 200MA"
multiplier: 1.5 # buy 50% more
- condition: "RSI < 30"
multiplier: 2.0 # double buy
- condition: "price > 200MA × 1.5"
multiplier: 0.5 # buy less in euphoria
Rebalancing Decision Tree
Is any allocation >5% from target?
├── NO → No action needed. Check again next month.
│
└── YES → Is it a tax-advantaged account?
├── YES → Rebalance by selling overweight, buying underweight
│
└── NO (taxable) → Can you rebalance with new contributions?
├── YES → Direct new money to underweight positions
│
└── NO → Are there tax losses to harvest?
├── YES → Sell losers (harvest), redirect to underweight
│
└── NO → Is the drift >10%?
├── YES → Rebalance (accept tax hit for risk control)
└── NO → Wait for next contribution or year-end
Investor Psychology Rules
10 Cognitive Biases That Kill Returns
| Bias |
Trap |
Defense |
| Loss Aversion |
Holding losers, cutting winners |
Pre-set stops, mechanical exits |
| Confirmation Bias |
Only seeing data that supports thesis |
Actively seek disconfirming evidence |
| Recency Bias |
Extrapolating recent performance |
Look at full cycle data (10+ years) |
| Anchoring |
Fixating on purchase price |
Focus on current value vs alternatives |
| FOMO |
Chasing after 50%+ move |
Stick to your screener, your edge |
| Overconfidence |
Too large positions after wins |
Fixed position sizing rules |
| Disposition Effect |
Selling winners too early |
Trailing stops, let runners run |
| Herding |
Buying because everyone is |
Contrarian checkpoints |
| Sunk Cost |
"I've held this long, can't sell now" |
Would you buy this TODAY at this price? |
| Hindsight |
"I knew it all along" |
Review trade journal honestly |
Trading Psychology Checklist (Daily)
Quality Scoring (0-100)
| Dimension |
Weight |
Criteria |
| Thesis Quality |
20 |
Clear edge, documented invalidation, realistic timeframe |
| Risk Management |
25 |
Position sizing, stops, portfolio heat, correlation |
| Analysis Depth |
15 |
Fundamental + technical + macro considered |
| Execution |
15 |
Entry/exit discipline, order type selection, patience |
| Record Keeping |
10 |
Trade journal, performance metrics, monthly reviews |
| Psychology |
10 |
Emotional control, bias awareness, plan adherence |
| Tax Efficiency |
5 |
Harvesting, account allocation, holding periods |
Score /100. Above 80 = professional-grade process. Below 50 = gambling.
Natural Language Commands
| Command |
Action |
| "Analyze [ticker]" |
Full fundamental + technical analysis |
| "Compare [ticker1] vs [ticker2]" |
Side-by-side comparison |
| "Build thesis for [ticker]" |
Generate thesis brief template |
| "Size position for [ticker] at [price]" |
Calculate position size with risk |
| "Portfolio health check" |
Score current portfolio /8 |
| "Monthly review" |
Generate performance review template |
| "Screen for [value/growth/dividend/crypto]" |
Apply screening criteria |
| "What's the market regime?" |
Assess current macro environment |
| "Tax harvest opportunities" |
Identify positions for loss harvesting |
| "DCA plan for [asset]" |
Generate dollar cost averaging plan |
| "Dividend score for [ticker]" |
Run dividend quality analysis |
| "Risk report" |
Portfolio heat, correlations, exposure summary |
Built by AfrexAI — turning market noise into signal. 🖤💛
1---2name: investment-analysis-portfolio-management-engine3description: Complete investment analysis, portfolio construction, risk management, and trade execution methodology. Works across stocks, crypto, ETFs, bonds, and alternatives. Zero dependencies — pure agent sk...4---5
6# Investment Analysis & Portfolio Management Engine
7
8Complete investment analysis, portfolio construction, risk management, and trade execution methodology. Works across stocks, crypto, ETFs, bonds, and alternatives. Zero dependencies — pure agent skill.
9
10## Quick Health Check (/8)
11
12Before any investment activity, score your current state:
13
14| Signal | ✅ Healthy | ❌ Fix First |
15|--------|-----------|-------------|
16| Investment thesis documented | Written with edge + invalidation | "I think it'll go up" |
17| Position sizing calculated | Kelly/fixed-fractional with max cap | "I'll put in $5K" |
18| Stop-loss defined | Price or thesis invalidation trigger | No exit plan |
19| Portfolio heat tracked | Total exposure known, <15% | Unknown aggregate risk |
20| Asset correlation checked | No >40% correlated concentration | All tech / all crypto |
21| Rebalance schedule set | Monthly or threshold-based | Never rebalanced |
22| Tax impact considered | Harvesting losses, holding periods | Tax-blind trading |
23| Performance tracked | Benchmarked vs buy-and-hold | "I think I'm up" |
24
25Score /8. Below 5 = fix fundamentals before any new positions.
26
27---
28
29## Phase 1: Investment Thesis Development
30
31Every position starts with a thesis. No thesis = no trade.
32
33### Thesis Brief Template
34
35```yaml
36thesis:
37 ticker: "AAPL"
38 asset_class: "equity" # equity | crypto | etf | bond | commodity | real_estate
39 date: "2026-02-22"
40
41 # THE EDGE — why does this opportunity exist?
42 edge:
43 type: "mispricing" # mispricing | catalyst | trend | mean_reversion | structural
44 description: "Market pricing in worst-case regulation; actual impact is 5-10% revenue, not 30%"
45 why_others_miss_it: "Headline risk scaring generalists; specialists still buying"
46
47 # THESIS STATEMENT (one sentence)
48 thesis_statement: "AAPL is undervalued by 20% due to regulatory FUD; earnings growth will re-rate within 2 quarters"
49
50 # TIMEFRAME
51 timeframe:
52 horizon: "3-6 months"
53 catalyst_date: "2026-04-15" # earnings, FDA, macro event
54 catalyst_type: "earnings_beat"
55
56 # BULL / BASE / BEAR
57 scenarios:
58 bull:
59 probability: 30
60 target_price: 245
61 thesis: "Regulation light + Services acceleration"
62 base:
63 probability: 50
64 target_price: 215
65 thesis: "Regulation moderate, priced in by Q3"
66 bear:
67 probability: 20
68 target_price: 165
69 thesis: "Full regulatory impact + macro downturn"
70
71 # EXPECTED VALUE
72 # EV = (P_bull × R_bull) + (P_base × R_base) + (P_bear × R_bear)
73 current_price: 190
74 expected_value: 213.5 # (0.3×245 + 0.5×215 + 0.2×165)
75 ev_vs_current: "+12.4%"
76
77 # INVALIDATION — when you're WRONG
78 invalidation:
79 price_stop: 175 # -7.9% from entry
80 thesis_stop: "Revenue decline >10% YoY in any segment"
81 time_stop: "No catalyst by 2026-07-01"
82
83 # CONVICTION (1-5)
84 conviction: 4
85 conviction_factors:
86 - "3 independent data sources confirm undervaluation"
87 - "Insider buying last 90 days"
88 - "Valuation below 5Y average on EV/EBITDA"
89```
90
91### Edge Type Framework
92
93| Edge Type | Description | Validation Method | Decay Rate |
94|-----------|-------------|-------------------|------------|
95| Mispricing | Market wrong on fundamentals | Comp analysis + model | Slow (months) |
96| Catalyst | Known upcoming event | Calendar + probability | Fast (event-driven) |
97| Trend | Momentum / technical | Price action + volume | Medium (weeks) |
98| Mean Reversion | Extreme deviation from norm | Z-score + history | Medium |
99| Structural | Market structure creates opportunity | Flow analysis | Slow |
100
101### Thesis Quality Checklist
102
103- [ ] Edge clearly articulated (not just "it's cheap")
104- [ ] Bull/base/bear with probabilities summing to 100%
105- [ ] Expected value positive vs current price
106- [ ] At least 2 independent data sources
107- [ ] Invalidation criteria defined (price + thesis + time)
108- [ ] Timeframe realistic for the edge type
109- [ ] Not just consensus view repackaged
110- [ ] Considered "what if I'm wrong?"
111
112---
113
114## Phase 2: Fundamental Analysis
115
116### Equity Analysis Framework
117
118#### Valuation Metrics (collect all, weight by sector)
119
120```yaml
121valuation:
122 # Price Multiples
123 pe_ratio: null # Price / Earnings (TTM)
124 forward_pe: null # Price / Forward Earnings
125 peg_ratio: null # PE / Earnings Growth Rate
126 ps_ratio: null # Price / Sales
127 pb_ratio: null # Price / Book
128 ev_ebitda: null # Enterprise Value / EBITDA
129 ev_revenue: null # Enterprise Value / Revenue
130 fcf_yield: null # Free Cash Flow / Market Cap
131
132 # Compare to:
133 sector_median: null
134 historical_5y_avg: null
135 historical_range: [null, null] # [low, high]
136
137 # Verdict
138 valuation_score: null # 1-10 (1=very expensive, 10=very cheap)
139 relative_to_sector: null # premium | inline | discount
140```
141
142#### Financial Health Scorecard
143
144| Dimension | Metric | Healthy | Warning | Danger |
145|-----------|--------|---------|---------|--------|
146| Profitability | Gross Margin | >50% | 30-50% | <30% |
147| Profitability | Net Margin | >15% | 5-15% | <5% |
148| Profitability | ROE | >15% | 8-15% | <8% |
149| Profitability | ROIC | >12% | 6-12% | <6% |
150| Growth | Revenue YoY | >15% | 5-15% | <5% |
151| Growth | EPS YoY | >10% | 0-10% | Declining |
152| Growth | FCF Growth | >10% | 0-10% | Declining |
153| Leverage | Debt/Equity | <0.5 | 0.5-1.5 | >1.5 |
154| Leverage | Interest Coverage | >8x | 3-8x | <3x |
155| Leverage | Net Debt/EBITDA | <2x | 2-4x | >4x |
156| Liquidity | Current Ratio | >1.5 | 1-1.5 | <1 |
157| Liquidity | Quick Ratio | >1.0 | 0.5-1 | <0.5 |
158| Efficiency | Asset Turnover | >0.8 | 0.4-0.8 | <0.4 |
159| Efficiency | Inventory Days | <60 | 60-120 | >120 |
160| Quality | FCF/Net Income | >80% | 50-80% | <50% |
161| Quality | Accruals Ratio | <5% | 5-10% | >10% |
162
163Score each dimension 1-3. Total /48. Above 36 = strong. Below 24 = avoid.
164
165#### Moat Assessment (0-25 points)
166
167| Moat Source | Score 0-5 | Evidence Required |
168|-------------|-----------|-------------------|
169| Network Effects | | Users increase value for other users |
170| Switching Costs | | Painful to leave (data lock-in, integrations) |
171| Cost Advantages | | Structural cost below competitors |
172| Intangible Assets | | Brand, patents, regulatory licenses |
173| Efficient Scale | | Market only supports limited competitors |
174
175Score /25. Above 15 = wide moat. 8-15 = narrow. Below 8 = no moat.
176
177### Crypto Analysis Framework
178
179```yaml
180crypto_analysis:
181 # Network Fundamentals
182 network:
183 daily_active_addresses: null
184 transaction_volume_24h: null
185 hash_rate_trend: null # BTC/PoW
186 staking_ratio: null # PoS chains
187 developer_activity: null # GitHub commits 90d
188 tvl: null # DeFi protocols
189 tvl_trend_30d: null
190
191 # Tokenomics
192 tokenomics:
193 supply_schedule: null # inflationary | deflationary | fixed
194 circulating_vs_total: null # % circulating
195 unlock_schedule: null # upcoming unlocks
196 concentration: null # top 10 holders %
197
198 # On-Chain Signals
199 on_chain:
200 exchange_reserves_trend: null # decreasing = bullish
201 whale_accumulation: null # large wallet changes
202 realized_profit_loss: null # NUPL
203 mvrv_ratio: null # Market Value / Realized Value
204
205 # Market Structure
206 market:
207 funding_rate: null # perpetuals funding
208 open_interest_trend: null
209 spot_vs_derivatives_volume: null
210 correlation_to_btc: null
211 correlation_to_sp500: null
212```
213
214### Crypto Valuation Methods
215
216| Method | Best For | Formula |
217|--------|----------|---------|
218| Stock-to-Flow | BTC | Price = 0.4 × S2F^3 (check vs actual) |
219| NVT Ratio | L1 chains | Network Value / Daily Transaction Value |
220| TVL Ratio | DeFi | Market Cap / TVL (below 1 = undervalued) |
221| Fee Revenue Multiple | Revenue-generating | MC / Annualized Fees |
222| Metcalfe's Law | Network tokens | Value ∝ n² (active addresses) |
223
224---
225
226## Phase 3: Technical Analysis
227
228### Price Action Framework
229
230```yaml
231technical_analysis:
232 ticker: "BTC-USD"
233 timeframe: "daily"
234 date: "2026-02-22"
235
236 # TREND
237 trend:
238 primary: "uptrend" # uptrend | downtrend | range
239 higher_highs: true
240 higher_lows: true
241 above_200ma: true
242 above_50ma: true
243 ma_alignment: "bullish" # 20 > 50 > 200 = bullish
244
245 # KEY LEVELS
246 levels:
247 resistance: [105000, 110000, 120000]
248 support: [95000, 88000, 80000]
249 current_price: 98500
250 distance_to_resistance: "+6.6%"
251 distance_to_support: "-3.6%"
252
253 # MOMENTUM
254 momentum:
255 rsi_14: 58 # <30 oversold, >70 overbought
256 rsi_divergence: null # bullish_div | bearish_div | none
257 macd_signal: "bullish" # bullish | bearish | neutral
258 macd_histogram_trend: "increasing"
259
260 # VOLUME
261 volume:
262 vs_20d_avg: "+15%"
263 trend: "increasing_on_up_days" # confirms trend
264
265 # PATTERN
266 pattern:
267 current: "ascending_triangle"
268 reliability: "high"
269 target: 112000
270 invalidation: 93000
271```
272
273### Signal Scoring Matrix
274
275| Factor | Bullish (+) | Neutral (0) | Bearish (-) |
276|--------|-------------|-------------|-------------|
277| Trend (weight 3x) | Above 200MA, higher highs | Ranging | Below 200MA, lower lows |
278| Momentum (weight 2x) | RSI 40-60 rising, MACD bull cross | RSI 45-55 flat | RSI >75 or bearish div |
279| Volume (weight 2x) | Rising on up moves | Average | Rising on down moves |
280| Support/Resistance (weight 1x) | Near strong support | Mid-range | Near strong resistance |
281| Pattern (weight 1x) | Bullish continuation | No pattern | Bearish reversal |
282
283Score -9 to +9. Above +5 = strong buy signal. Below -5 = strong sell signal.
284
285---
286
287## Phase 4: Position Sizing & Risk Management
288
289### Position Sizing Rules (MANDATORY)
290
291```yaml
292risk_rules:
293 # Per-Trade Risk
294 max_risk_per_trade: 2% # of total equity
295 max_risk_aggressive: 3% # only with 5/5 conviction
296
297 # Portfolio Heat
298 max_portfolio_heat: 15% # total risk across all positions
299 max_correlated_exposure: 25% # in correlated assets
300 max_single_position: 10% # of total equity
301
302 # Position Size Formula
303 # Position Size = (Account × Risk%) / (Entry - Stop Loss)
304 # Example: ($100K × 2%) / ($190 - $175) = $2,000 / $15 = 133 shares
305
306 # Kelly Criterion (optional, aggressive)
307 # f* = (bp - q) / b
308 # b = win/loss ratio, p = win probability, q = 1-p
309 # ALWAYS use Half-Kelly or Quarter-Kelly (full Kelly = too aggressive)
310```
311
312### Position Size Calculator
313
314```
315Account Equity: $___________
316Risk Per Trade: ___% (max 2%)
317Dollar Risk: $___________ (equity × risk%)
318Entry Price: $___________
319Stop Loss Price: $___________
320Risk Per Share: $___________ (entry - stop)
321Position Size: ___________ shares (dollar risk / risk per share)
322Position Value: $___________ (shares × entry)
323Portfolio Weight: ___% (position value / equity)
324
325CHECK: Portfolio weight < 10%? ☐ Yes ☐ No (reduce if no)
326CHECK: Portfolio heat < 15%? ☐ Yes ☐ No (reduce if no)
327CHECK: Correlated exposure ok? ☐ Yes ☐ No (reduce if no)
328```
329
330### Stop-Loss Decision Tree
331
332```
333Is this a TREND trade?
334├── YES → Trailing stop below swing low (ATR-based: 2× ATR)
335│ Initial stop: Below last higher low
336│ Trail: Move stop to below each new higher low
337│
338└── NO → Is this a CATALYST trade?
339 ├── YES → Time-based + price stop
340 │ Price: Below pre-catalyst support
341 │ Time: Close if no move within 2 days post-catalyst
342 │
343 └── Is this a VALUE trade?
344 ├── YES → Thesis invalidation stop
345 │ Price: Below bear case scenario price
346 │ Thesis: Close if fundamental thesis breaks
347 │ Time: Close if no re-rating in stated timeframe
348 │
349 └── MEAN REVERSION → Tight stop
350 Price: If moves further from mean (wider Z-score)
351 Target: Mean / fair value level
352```
353
354### Risk Management Hard Rules
355
3561. **Never average down without a plan** — Adding to losers kills accounts. Only add if: thesis intact AND price at predetermined add level AND total position still within limits
3572. **Cut losses fast, let winners run** — Asymmetric payoff is the goal. 1:3 risk/reward minimum
3583. **No revenge trading** — After a loss, wait 24 hours before next trade
3594. **Daily loss limit** — Stop trading for the day after -3% account drawdown
3605. **Weekly loss limit** — Reduce position sizes by 50% after -5% weekly drawdown
3616. **Monthly loss limit** — Go to cash if -10% monthly drawdown. Review all positions.
3627. **Correlation check** — Before every new position, check correlation to existing holdings
3638. **Black swan rule** — If any asset moves >15% in 24h, review ALL positions immediately
364
365---
366
367## Phase 5: Portfolio Construction
368
369### Asset Allocation Framework
370
371```yaml
372portfolio:
373 name: "Growth + Income"
374 target_allocation:
375 # Core (60-70% — low turnover)
376 core:
377 us_large_cap: 25% # S&P 500 / quality growth
378 international: 10% # Developed markets
379 fixed_income: 15% # Bonds / treasuries
380 bitcoin: 10% # Digital gold thesis
381 real_estate: 5% # REITs
382
383 # Satellite (20-30% — active management)
384 satellite:
385 growth_stocks: 15% # Individual stock picks
386 crypto_alts: 5% # L1s, DeFi
387 thematic: 5% # AI, clean energy, etc.
388
389 # Cash (5-15%)
390 cash: 10% # Dry powder for opportunities
391
392 # Rebalance Rules
393 rebalance:
394 method: "threshold" # calendar | threshold | hybrid
395 threshold: 5% # Rebalance when drift >5% from target
396 calendar_check: "monthly" # Review allocations monthly
397 tax_aware: true # Use new contributions to rebalance first
398```
399
400### Portfolio Models by Risk Profile
401
402| Profile | Stocks | Bonds | Crypto | Alts | Cash | Expected Return | Max Drawdown |
403|---------|--------|-------|--------|------|------|----------------|--------------|
404| Conservative | 30% | 40% | 5% | 10% | 15% | 6-8% | -15% |
405| Balanced | 50% | 20% | 10% | 10% | 10% | 8-12% | -25% |
406| Growth | 60% | 10% | 15% | 10% | 5% | 12-18% | -35% |
407| Aggressive | 50% | 0% | 30% | 15% | 5% | 15-25% | -50% |
408| Degen | 20% | 0% | 50% | 25% | 5% | 20-40%+ | -70%+ |
409
410### Correlation Matrix Template
411
412Track correlations between holdings. Target: no two positions with >0.7 correlation exceeding 20% combined weight.
413
414```
415 SPY BTC ETH AAPL MSFT GLD TLT
416SPY 1.00
417BTC 0.35 1.00
418ETH 0.30 0.85 1.00
419AAPL 0.82 0.25 0.20 1.00
420MSFT 0.85 0.28 0.22 0.78 1.00
421GLD -0.10 -0.05 -0.08 -0.12 -0.10 1.00
422TLT -0.35 -0.15 -0.12 -0.30 -0.32 0.40 1.00
423```
424
425---
426
427## Phase 6: Trade Execution
428
429### Trade Journal Template
430
431```yaml
432trade:
433 id: "T-2026-042"
434 date_opened: "2026-02-22"
435 date_closed: null
436
437 # WHAT
438 ticker: "BTC-USD"
439 direction: "long"
440 asset_class: "crypto"
441
442 # SIZING
443 entry_price: 98500
444 position_size: 0.15 # BTC
445 position_value: 14775
446 portfolio_weight: "8.2%"
447
448 # RISK
449 stop_loss: 93000
450 risk_amount: 825 # (98500-93000) × 0.15
451 risk_percent: "0.82%" # of portfolio
452
453 # TARGETS
454 target_1: 105000 # 50% of position
455 target_2: 115000 # 30% of position
456 target_3: 130000 # 20% of position (runner)
457 risk_reward: "1:3.8" # avg target vs risk
458
459 # THESIS
460 thesis: "BTC consolidating above 200MA, halving supply reduction, ETF inflows accelerating"
461 edge_type: "trend + structural"
462 conviction: 4
463
464 # EXECUTION
465 entry_type: "limit" # market | limit | scaled
466 scale_plan: null # or: [{"price": 97000, "size": "50%"}, {"price": 95000, "size": "50%"}]
467
468 # RESULT (fill on close)
469 exit_price: null
470 exit_reason: null # target_hit | stop_hit | thesis_invalidated | time_stop | manual
471 pnl_dollar: null
472 pnl_percent: null
473 r_multiple: null # PnL / initial risk
474
475 # REVIEW
476 followed_plan: null # yes | partially | no
477 lessons: null
478 mistakes: null
479 grade: null # A-F
480```
481
482### Execution Checklist (Before EVERY Trade)
483
484- [ ] Thesis documented with edge, invalidation, timeframe
485- [ ] Position size calculated (≤2% risk, ≤10% portfolio weight)
486- [ ] Stop-loss set (price + thesis + time)
487- [ ] At least 2 take-profit targets defined
488- [ ] Risk/reward ≥1:2 (preferably 1:3+)
489- [ ] Portfolio heat check (total risk <15%)
490- [ ] Correlation check (not adding to concentrated exposure)
491- [ ] No emotional driver (revenge, FOMO, boredom)
492- [ ] Checked economic calendar (no surprise events imminent)
493- [ ] Entry type decided (market/limit/scaled)
494
495### Order Types Decision
496
497| Situation | Order Type | Why |
498|-----------|-----------|-----|
499| Strong conviction, want in now | Market | Speed over price |
500| Good setup, not urgent | Limit at support | Better entry |
501| High-conviction, want scale in | Scaled limits (3 levels) | Average entry, reduce timing risk |
502| Breakout trade | Stop-limit above resistance | Only enter if breakout confirms |
503| Catalyst trade | Limit pre-catalyst | Position before event |
504
505---
506
507## Phase 7: Performance Tracking
508
509### Daily Dashboard
510
511```yaml
512daily_dashboard:
513 date: "2026-02-22"
514
515 # PORTFOLIO SNAPSHOT
516 portfolio:
517 total_equity: null
518 daily_pnl: null
519 daily_pnl_percent: null
520 weekly_pnl: null
521 monthly_pnl: null
522 ytd_pnl: null
523
524 # POSITIONS
525 open_positions: 0
526 portfolio_heat: "0%" # sum of all position risks
527 cash_percent: "100%"
528
529 # BENCHMARK
530 benchmark:
531 sp500_ytd: null
532 btc_ytd: null
533 portfolio_vs_sp500: null
534 portfolio_vs_btc: null
535
536 # ACTIVITY
537 trades_today: 0
538 alerts_triggered: []
539```
540
541### Performance Metrics (Track Weekly)
542
543| Metric | Formula | Target |
544|--------|---------|--------|
545| Win Rate | Winning trades / Total trades | >50% |
546| Average R | Average R-multiple of all trades | >1.5R |
547| Profit Factor | Gross profit / Gross loss | >2.0 |
548| Expectancy | (Win% × Avg Win) - (Loss% × Avg Loss) | Positive |
549| Max Drawdown | Peak to trough decline | <-15% |
550| Sharpe Ratio | (Return - RFR) / Std Dev | >1.5 |
551| Sortino Ratio | (Return - RFR) / Downside Dev | >2.0 |
552| Calmar Ratio | Annual Return / Max Drawdown | >1.0 |
553| Recovery Factor | Net Profit / Max Drawdown | >3.0 |
554
555### Monthly Review Template
556
557```yaml
558monthly_review:
559 month: "2026-02"
560
561 # PERFORMANCE
562 portfolio_return: null
563 benchmark_return: null # vs S&P 500
564 alpha: null # portfolio - benchmark
565
566 # TRADING STATS
567 total_trades: 0
568 winning_trades: 0
569 losing_trades: 0
570 win_rate: null
571 average_winner: null
572 average_loser: null
573 largest_winner: null
574 largest_loser: null
575 profit_factor: null
576
577 # RISK STATS
578 max_drawdown: null
579 avg_portfolio_heat: null
580 risk_rule_violations: 0
581
582 # BEHAVIOR ANALYSIS
583 followed_plan_rate: null # % of trades that followed the plan
584 emotional_trades: 0 # trades driven by FOMO/revenge/boredom
585 early_exits: 0 # cut winners short
586 late_exits: 0 # held losers too long
587
588 # TOP 3 LESSONS
589 lessons:
590 - null
591 - null
592 - null
593
594 # ADJUSTMENTS FOR NEXT MONTH
595 adjustments:
596 - null
597```
598
599---
600
601## Phase 8: Market Regime Detection
602
603### Regime Framework
604
605| Regime | Characteristics | Strategy | Position Size |
606|--------|----------------|----------|---------------|
607| Bull Trend | Rising 200MA, breadth >60%, VIX <20 | Trend following, buy dips | Full size |
608| Bear Trend | Falling 200MA, breadth <40%, VIX >30 | Short / inverse, raise cash | Half size |
609| Range/Chop | Flat 200MA, breadth 40-60% | Mean reversion, sell premium | Quarter size |
610| High Vol | VIX >35, large daily swings | Reduce exposure, hedge | Minimum size |
611| Euphoria | VIX <12, extreme bullish sentiment | Take profits, hedge | Scale down |
612| Panic | VIX >50, capitulation signals | Accumulate quality | Scale in slowly |
613
614### Macro Checklist (Weekly)
615
616- [ ] Fed funds rate / next meeting: ___
617- [ ] US 10Y yield trend: ___
618- [ ] Dollar (DXY) trend: ___
619- [ ] VIX level: ___
620- [ ] Credit spreads: ___ (tightening/widening)
621- [ ] Yield curve: ___ (inverted/flat/steep)
622- [ ] Leading indicators: ___ (improving/declining)
623- [ ] Global liquidity trend: ___ (expanding/contracting)
624- [ ] Sector rotation: ___ (risk-on/risk-off)
625- [ ] Crypto market cap trend: ___
626
627### Sentiment Indicators
628
629| Indicator | Extreme Fear (Buy) | Neutral | Extreme Greed (Sell) |
630|-----------|-------------------|---------|---------------------|
631| CNN Fear & Greed | <20 | 40-60 | >80 |
632| AAII Bull-Bear | >-30% spread | ±10% | >+30% spread |
633| Put/Call Ratio | >1.2 | 0.7-0.9 | <0.5 |
634| VIX Term Structure | Backwardation | Flat | Steep contango |
635| Crypto Fear & Greed | <15 | 40-60 | >85 |
636| BTC Funding Rates | Deeply negative | Neutral | >0.05% |
637
638---
639
640## Phase 9: Dividend & Income Analysis
641
642### Dividend Quality Score (0-100)
643
644| Factor | Weight | Scoring |
645|--------|--------|---------|
646| Yield vs Sector | 15 | At/above median = 15, below = proportional |
647| Payout Ratio | 20 | <50% = 20, 50-75% = 15, 75-100% = 5, >100% = 0 |
648| Growth Rate (5Y CAGR) | 20 | >10% = 20, 5-10% = 15, 0-5% = 10, declining = 0 |
649| Consecutive Years | 15 | >25y = 15 (Aristocrat), 10-25 = 10, 5-10 = 5, <5 = 0 |
650| FCF Coverage | 15 | FCF/Div >1.5 = 15, 1-1.5 = 10, <1 = 0 |
651| Debt/EBITDA | 15 | <2 = 15, 2-4 = 10, >4 = 5 |
652
653Score /100. Above 75 = excellent income pick. Below 40 = dividend at risk.
654
655### Income Portfolio Construction
656
657- **Core income** (60%): Dividend Aristocrats, quality REITs, investment-grade bonds
658- **Growth income** (25%): Dividend growers (low yield, high growth rate)
659- **High yield** (15%): Higher risk, higher yield (junk bonds, BDCs, covered calls)
660- **Yield target**: 4-6% blended, growing 5-8% annually
661
662---
663
664## Phase 10: Tax Optimization
665
666### Tax-Loss Harvesting Rules
667
6681. **When**: Position down >10% from cost basis AND held <12 months
6692. **How**: Sell the position, immediately buy a correlated (not substantially identical) replacement
6703. **Wash sale rule**: Cannot buy back the same security within 30 days (before or after)
6714. **Replacement examples**: SPY→VOO, AAPL→QQQ, BTC spot→BTC futures ETF
6725. **Track**: Cumulative harvested losses, offset against gains + $3K income deduction
673
674### Holding Period Optimization
675
676| Holding Period | Tax Rate (US) | Strategy |
677|----------------|--------------|----------|
678| <1 year | Ordinary income (up to 37%) | Only for high-conviction short-term trades |
679| >1 year | Long-term CG (0/15/20%) | Default for all positions when possible |
680| >5 years (QOZ) | Reduced + deferred | Qualified Opportunity Zone investments |
681
682### Tax-Efficient Account Allocation
683
684| Account Type | Best For | Why |
685|-------------|----------|-----|
686| Taxable | Long-term holds, tax-loss harvesting | Capital gains treatment |
687| Traditional IRA/401k | Bonds, REITs, high-dividend | Defer high-tax income |
688| Roth IRA | Highest growth potential | Tax-free growth |
689| HSA | Aggressive growth | Triple tax advantage |
690
691---
692
693## Phase 11: Screening & Idea Generation
694
695### Stock Screener Criteria Templates
696
697**Value Screen:**
698- P/E < sector median
699- P/B < 1.5
700- Debt/Equity < 0.5
701- ROE > 12%
702- FCF positive 5 consecutive years
703- Insider buying last 90 days
704
705**Growth Screen:**
706- Revenue growth > 20% YoY
707- EPS growth > 15% YoY
708- Gross margin > 50%
709- Net retention > 110% (SaaS)
710- TAM > $10B
711
712**Dividend Screen:**
713- Dividend yield > 3%
714- Payout ratio < 60%
715- Dividend growth > 5% CAGR (5Y)
716- Consecutive increases > 10 years
717- Debt/EBITDA < 3
718
719**Crypto Screen:**
720- Market cap > $1B (avoid micro-caps)
721- Daily volume > $50M
722- Active development (GitHub commits)
723- Not >90% held by top 10 wallets
724- Clear revenue model or adoption metrics
725
726### Research Sources (No API Required)
727
728| Source | URL | Best For |
729|--------|-----|----------|
730| Yahoo Finance | finance.yahoo.com | Fundamentals, quotes |
731| Finviz | finviz.com | Screening, heatmaps |
732| Macrotrends | macrotrends.net | Historical financials |
733| CoinGecko | coingecko.com | Crypto data |
734| DeFiLlama | defillama.com | DeFi TVL, yields |
735| FRED | fred.stlouisfed.org | Macro data |
736| TradingView | tradingview.com | Charts, technicals |
737| SEC EDGAR | sec.gov/edgar | Filings, insider trades |
738| Glassnode | glassnode.com | On-chain data |
739| Fear & Greed | alternative.me | Crypto sentiment |
740
741---
742
743## Phase 12: Advanced Strategies
744
745### Options Basics (for hedging)
746
747| Strategy | When | Risk | Reward |
748|----------|------|------|--------|
749| Protective Put | Own stock, want downside protection | Premium paid | Unlimited upside, limited downside |
750| Covered Call | Own stock, willing to cap upside | Capped gains | Premium income |
751| Cash-Secured Put | Want to buy at lower price | Must buy at strike | Premium + lower entry |
752| Collar | Want protection, willing to cap upside | Capped both ways | Low/no cost protection |
753
754### DCA (Dollar Cost Averaging) Framework
755
756```yaml
757dca_plan:
758 asset: "BTC"
759 frequency: "weekly" # daily | weekly | biweekly | monthly
760 amount: 250 # per purchase
761 day: "Monday" # specific day
762 duration: "indefinite" # or end date
763
764 # SMART DCA (optional — buy more when cheap)
765 smart_dca:
766 enabled: true
767 base_amount: 250
768 multiplier_rules:
769 - condition: "price < 200MA"
770 multiplier: 1.5 # buy 50% more
771 - condition: "RSI < 30"
772 multiplier: 2.0 # double buy
773 - condition: "price > 200MA × 1.5"
774 multiplier: 0.5 # buy less in euphoria
775```
776
777### Rebalancing Decision Tree
778
779```
780Is any allocation >5% from target?
781├── NO → No action needed. Check again next month.
782│
783└── YES → Is it a tax-advantaged account?
784 ├── YES → Rebalance by selling overweight, buying underweight
785 │
786 └── NO (taxable) → Can you rebalance with new contributions?
787 ├── YES → Direct new money to underweight positions
788 │
789 └── NO → Are there tax losses to harvest?
790 ├── YES → Sell losers (harvest), redirect to underweight
791 │
792 └── NO → Is the drift >10%?
793 ├── YES → Rebalance (accept tax hit for risk control)
794 └── NO → Wait for next contribution or year-end
795```
796
797---
798
799## Investor Psychology Rules
800
801### 10 Cognitive Biases That Kill Returns
802
803| Bias | Trap | Defense |
804|------|------|---------|
805| Loss Aversion | Holding losers, cutting winners | Pre-set stops, mechanical exits |
806| Confirmation Bias | Only seeing data that supports thesis | Actively seek disconfirming evidence |
807| Recency Bias | Extrapolating recent performance | Look at full cycle data (10+ years) |
808| Anchoring | Fixating on purchase price | Focus on current value vs alternatives |
809| FOMO | Chasing after 50%+ move | Stick to your screener, your edge |
810| Overconfidence | Too large positions after wins | Fixed position sizing rules |
811| Disposition Effect | Selling winners too early | Trailing stops, let runners run |
812| Herding | Buying because everyone is | Contrarian checkpoints |
813| Sunk Cost | "I've held this long, can't sell now" | Would you buy this TODAY at this price? |
814| Hindsight | "I knew it all along" | Review trade journal honestly |
815
816### Trading Psychology Checklist (Daily)
817
818- [ ] Am I calm? (no anger, fear, or euphoria)
819- [ ] Am I following my system? (not improvising)
820- [ ] Am I within risk limits? (checked portfolio heat)
821- [ ] Am I trading my plan? (not reacting to noise)
822- [ ] Have I done my analysis? (not trading on tips)
823
824---
825
826## Quality Scoring (0-100)
827
828| Dimension | Weight | Criteria |
829|-----------|--------|----------|
830| Thesis Quality | 20 | Clear edge, documented invalidation, realistic timeframe |
831| Risk Management | 25 | Position sizing, stops, portfolio heat, correlation |
832| Analysis Depth | 15 | Fundamental + technical + macro considered |
833| Execution | 15 | Entry/exit discipline, order type selection, patience |
834| Record Keeping | 10 | Trade journal, performance metrics, monthly reviews |
835| Psychology | 10 | Emotional control, bias awareness, plan adherence |
836| Tax Efficiency | 5 | Harvesting, account allocation, holding periods |
837
838Score /100. Above 80 = professional-grade process. Below 50 = gambling.
839
840---
841
842## Natural Language Commands
843
844| Command | Action |
845|---------|--------|
846| "Analyze [ticker]" | Full fundamental + technical analysis |
847| "Compare [ticker1] vs [ticker2]" | Side-by-side comparison |
848| "Build thesis for [ticker]" | Generate thesis brief template |
849| "Size position for [ticker] at [price]" | Calculate position size with risk |
850| "Portfolio health check" | Score current portfolio /8 |
851| "Monthly review" | Generate performance review template |
852| "Screen for [value/growth/dividend/crypto]" | Apply screening criteria |
853| "What's the market regime?" | Assess current macro environment |
854| "Tax harvest opportunities" | Identify positions for loss harvesting |
855| "DCA plan for [asset]" | Generate dollar cost averaging plan |
856| "Dividend score for [ticker]" | Run dividend quality analysis |
857| "Risk report" | Portfolio heat, correlations, exposure summary |
858
859---
860
861*Built by AfrexAI — turning market noise into signal.* 🖤💛