OPEN-SOURCE SCRIPT
Fair Value Studio engine paths scenario rails - ClaudeVibe

***attempting to fill the gap between "autonomous-AI-research >INPUT*GAP*> chart-autofill"
open to collaboration if you are like-minded.***
your AI model > outputs the below FV rail paths for the stock of interest.
or you know, make a better AI script yourself to share for the retail community who want to get involved. advocacy for community driven investing>institutions.
refine it, make it quarterly when trying to find potential short term inflections.
Pine Script v6 — Fair Value Studio v4.1 rail cards
Paste each comma-separated string into the matching rail-card path input (2-decimal, 2026→2035). Leave blank to fall back to the CAGR shown.
// BEAR (start 137.00 · CAGR 10.50%)
137.00,151.38,167.28,184.84,204.25,225.70,249.40,275.59,304.52,336.50
// BASE (start 330.00 · CAGR 9.50%)
330.00,361.35,395.68,433.27,474.43,519.50,568.85,622.89,682.07,746.86
// BULL (start 545.00 · CAGR 9.00%)
545.00,594.05,647.51,705.79,769.31,838.55,914.02,996.28,1085.95,1183.68
// BLUESKY (start 864.00 · CAGR 8.50%)
864.00,937.44,1017.12,1103.58,1197.38,1299.16,1409.59,1529.40,1659.40,1800.45
Anchor inputs:
start_year = 2026
end_year = 2035
spot_ref = 362.00
bear_cagr = 0.105
base_cagr = 0.095
bull_cagr = 0.090
bluesky_cagr = 0.085
Two notes on construction so the rails behave the way you expect: the paths are intrinsic value compounding at each scenario's cost of equity, not a price forecast — they answer "what do I earn if this thesis is correct and the multiple holds," which is why bear still slopes up (a $137 fair value still accretes at 10.5%; the bear loss is the −62% gap to spot today, not a declining rail). And because GOOG's shareholder yield is now ~0.2% and net-dilutive post-raise, I let the rails accrete at the full CoE with no yield drag — if you want the rails to reflect the dilution explicitly, knock ~30–50bps off each CAGR for the ATM/convert overhang and the bear/base rails flatten meaningfully.
The chart's history line is illustrative (hits both 52-week extremes and the current 4-week pullback) — drop real OHLC into CONFIG.history and the log-regression channel refits automatically.
What it is
It's a TradingView indicator that overlays valuation on top of price. Most charting tools show you what a stock has done; this one draws what it's arguably worth — today and projected forward — so you can see at a glance whether price is running ahead of or behind fundamentals. It's built for someone who does their own valuation work (DCF, multiples) and wants those outputs living on the chart instead of in a spreadsheet.
The core idea: two ways to value a stock
The indicator can either figure out a fair value itself, or take yours.
Automatic mode reads the company's financials from TradingView's data feed — earnings, free cash flow, EBITDA, debt, margins — and classifies the business by sector. A bank gets valued on earnings at ~12x; a heavy/capital-intensive name (energy, utilities, REITs) gets valued on EBITDA on an enterprise basis; a profitable tech company gets valued on free cash flow at a richer multiple, and so on. It picks the metric, the multiple, and the method that fit the business type, then draws the resulting fair value as a line across the price history. A built-in "outlier guard" stops a single weird quarter from throwing the whole thing off.
Manual / studio mode is for when you've done the work elsewhere. You type in a "fair value now" number, and optionally paste forward paths — your own year-by-year fair-value estimates for several scenarios. This matters because the automatic trailing-multiple approach is genuinely poor for certain companies: anything mid-ramp, heavily leveraged, or reinvesting so hard that current earnings understate the business. For those, the indicator will actually flag itself with a warning and tell you to paste a real model.
The headline feature: scenario rails
This is what makes it useful for decision-making. You define four scenarios — bear, base, bull, and a "blue-sky" upside — and the indicator projects each one forward as a "rail" stretching years into the future. You can drive each rail two ways:
Paste a path: a comma-separated list of dollar values, one per year (e.g. 330, 361, 396, 433...). The rail traces exactly those points. This is for when you've modeled each year explicitly.
CAGR fallback: just give a growth rate per scenario, and the rail compounds forward at that rate. Simpler, less precise.
On top of the four scenarios it draws a probability-weighted rail — you assign odds to each scenario (say 25% bear, 40% base, 25% bull, 10% blue-sky) and it blends them into one expected path. It also draws a grey market-implied rail, which just grows today's price at your cost of equity. That grey line is your benchmark: if your weighted rail sits above it, the stock offers more than the return you'd demand; below it, you're not being paid enough for the risk.
Reading the output
Beyond the lines, there's a summary table in the corner that does the arithmetic for you. The single most useful row is the IRR for each scenario — the annualized return you'd earn buying at today's price and reaching that scenario's target over your chosen horizon. It also shows the premium or discount of price versus fair value, what data it used, and whether any guards or warnings fired. There are crossover alerts too, so you can be notified when price crosses through fair value rather than watching the chart.
How someone would actually use it
The honest workflow is: add it to a chart, and if the company is a clean, profitable, stable business, let automatic mode give you a quick read. If it's a complex name — a turnaround, a heavy reinvestor, something with a real growth story — do your valuation elsewhere, then come back and paste your scenario paths and a fair-value anchor. Set your scenario probabilities to match your actual conviction (the defaults are just placeholders — change them). Then look at the weighted IRR and where price sits relative to the rails.
What to be careful about
A few honest limitations worth stating up front. The automatic valuation is a trailing-multiple model — it values the company on what it earned recently, which says nothing about where it's going; treat it as a rough sanity check, not a thesis. The forward rails are only as good as the assumptions you feed them — a beautifully drawn rail built on a wishful growth rate is just a wishful guess with better production values. And one structural quirk: all the scenario rails fan out from a single anchor point, so if your scenarios genuinely start from different intrinsic values, the early years are slightly stylized (the long-run targets and IRRs are unaffected). It's a framework for organizing and visualizing your own judgment — it doesn't replace the judgment.
open to collaboration if you are like-minded.***
your AI model > outputs the below FV rail paths for the stock of interest.
or you know, make a better AI script yourself to share for the retail community who want to get involved. advocacy for community driven investing>institutions.
refine it, make it quarterly when trying to find potential short term inflections.
Pine Script v6 — Fair Value Studio v4.1 rail cards
Paste each comma-separated string into the matching rail-card path input (2-decimal, 2026→2035). Leave blank to fall back to the CAGR shown.
// BEAR (start 137.00 · CAGR 10.50%)
137.00,151.38,167.28,184.84,204.25,225.70,249.40,275.59,304.52,336.50
// BASE (start 330.00 · CAGR 9.50%)
330.00,361.35,395.68,433.27,474.43,519.50,568.85,622.89,682.07,746.86
// BULL (start 545.00 · CAGR 9.00%)
545.00,594.05,647.51,705.79,769.31,838.55,914.02,996.28,1085.95,1183.68
// BLUESKY (start 864.00 · CAGR 8.50%)
864.00,937.44,1017.12,1103.58,1197.38,1299.16,1409.59,1529.40,1659.40,1800.45
Anchor inputs:
start_year = 2026
end_year = 2035
spot_ref = 362.00
bear_cagr = 0.105
base_cagr = 0.095
bull_cagr = 0.090
bluesky_cagr = 0.085
Two notes on construction so the rails behave the way you expect: the paths are intrinsic value compounding at each scenario's cost of equity, not a price forecast — they answer "what do I earn if this thesis is correct and the multiple holds," which is why bear still slopes up (a $137 fair value still accretes at 10.5%; the bear loss is the −62% gap to spot today, not a declining rail). And because GOOG's shareholder yield is now ~0.2% and net-dilutive post-raise, I let the rails accrete at the full CoE with no yield drag — if you want the rails to reflect the dilution explicitly, knock ~30–50bps off each CAGR for the ATM/convert overhang and the bear/base rails flatten meaningfully.
The chart's history line is illustrative (hits both 52-week extremes and the current 4-week pullback) — drop real OHLC into CONFIG.history and the log-regression channel refits automatically.
What it is
It's a TradingView indicator that overlays valuation on top of price. Most charting tools show you what a stock has done; this one draws what it's arguably worth — today and projected forward — so you can see at a glance whether price is running ahead of or behind fundamentals. It's built for someone who does their own valuation work (DCF, multiples) and wants those outputs living on the chart instead of in a spreadsheet.
The core idea: two ways to value a stock
The indicator can either figure out a fair value itself, or take yours.
Automatic mode reads the company's financials from TradingView's data feed — earnings, free cash flow, EBITDA, debt, margins — and classifies the business by sector. A bank gets valued on earnings at ~12x; a heavy/capital-intensive name (energy, utilities, REITs) gets valued on EBITDA on an enterprise basis; a profitable tech company gets valued on free cash flow at a richer multiple, and so on. It picks the metric, the multiple, and the method that fit the business type, then draws the resulting fair value as a line across the price history. A built-in "outlier guard" stops a single weird quarter from throwing the whole thing off.
Manual / studio mode is for when you've done the work elsewhere. You type in a "fair value now" number, and optionally paste forward paths — your own year-by-year fair-value estimates for several scenarios. This matters because the automatic trailing-multiple approach is genuinely poor for certain companies: anything mid-ramp, heavily leveraged, or reinvesting so hard that current earnings understate the business. For those, the indicator will actually flag itself with a warning and tell you to paste a real model.
The headline feature: scenario rails
This is what makes it useful for decision-making. You define four scenarios — bear, base, bull, and a "blue-sky" upside — and the indicator projects each one forward as a "rail" stretching years into the future. You can drive each rail two ways:
Paste a path: a comma-separated list of dollar values, one per year (e.g. 330, 361, 396, 433...). The rail traces exactly those points. This is for when you've modeled each year explicitly.
CAGR fallback: just give a growth rate per scenario, and the rail compounds forward at that rate. Simpler, less precise.
On top of the four scenarios it draws a probability-weighted rail — you assign odds to each scenario (say 25% bear, 40% base, 25% bull, 10% blue-sky) and it blends them into one expected path. It also draws a grey market-implied rail, which just grows today's price at your cost of equity. That grey line is your benchmark: if your weighted rail sits above it, the stock offers more than the return you'd demand; below it, you're not being paid enough for the risk.
Reading the output
Beyond the lines, there's a summary table in the corner that does the arithmetic for you. The single most useful row is the IRR for each scenario — the annualized return you'd earn buying at today's price and reaching that scenario's target over your chosen horizon. It also shows the premium or discount of price versus fair value, what data it used, and whether any guards or warnings fired. There are crossover alerts too, so you can be notified when price crosses through fair value rather than watching the chart.
How someone would actually use it
The honest workflow is: add it to a chart, and if the company is a clean, profitable, stable business, let automatic mode give you a quick read. If it's a complex name — a turnaround, a heavy reinvestor, something with a real growth story — do your valuation elsewhere, then come back and paste your scenario paths and a fair-value anchor. Set your scenario probabilities to match your actual conviction (the defaults are just placeholders — change them). Then look at the weighted IRR and where price sits relative to the rails.
What to be careful about
A few honest limitations worth stating up front. The automatic valuation is a trailing-multiple model — it values the company on what it earned recently, which says nothing about where it's going; treat it as a rough sanity check, not a thesis. The forward rails are only as good as the assumptions you feed them — a beautifully drawn rail built on a wishful growth rate is just a wishful guess with better production values. And one structural quirk: all the scenario rails fan out from a single anchor point, so if your scenarios genuinely start from different intrinsic values, the early years are slightly stylized (the long-run targets and IRRs are unaffected). It's a framework for organizing and visualizing your own judgment — it doesn't replace the judgment.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.