B1-S2 IndicatorThe B1-S2 Indicator is designed to detect potential entry and exit points. It provides graded signals for buy and sell positions (B1/B2/B for buy, S1/S2/S for sell) to help traders refine their decisions. This versatile strategy shows solid performance on daily timeframes, with potential signals on shorter intervals like 4-hour and 2-hour charts.
Usage Instructions
1) The indicator works best when used in conjunction with the overall market trend.
2) Market trend is displayed by Super Trend(line) and Parabolic Sar(dots) and also two SMA(9) SMA(21) on the chart.
2) In uptrends, prioritize B1 and B2 signals and B signals(combination of B1 and B2) for potential long entries.
In downtrends, look for S1 and S2 signals and S signals (a combination of S1 and S2) as potential exit points or short positions.
3) This indicator shows you a potential trend reversal when signals appear.
4) As a BIG plus you must consider using price levels and signals together. If the price is close to a strong level and signals appear it may suggest you as an entry point in position.
5) Also you can combine signals with the usual technical analysis.
6) As well, a possible entry may occur when we see a divergence in RSI and a lot of signals appear.
7) Volume confirmation ensures that the market is backing the signal, adding extra strength to the move.
How the script works
Indicator Components:
1) RSI (Relative Strength Index)
- Default period: 16
- Signals are generated when the RSI crosses key thresholds.
- Buy signals (b1, b2) appear when RSI shows oversold conditions (below 45).
- Sell signals (s1, s2) appear when RSI shows overbought conditions (above 60).
2) Williams %R
- Default period: 16
- Provides additional confirmation of overbought/oversold market conditions.
- Buy signals appear when Williams %R is below -75.
- Sell signals appear when Williams %R is above -25.
3) Volume Confirmation
- Buy and sell signals are only valid when trading volume exceeds certain thresholds, ensuring that signals occur during significant market activity.
- Volume thresholds for buy (b1 and b2) and sell (s1 and s2) signals are adjustable.
4) Ichimoku Kinko Hyo
- Provides strong trend signals based on the crossover of the Tenkan and Kijun lines, as well as the position of the price relative to the Senkou Span A and B clouds.
- Bullish signals are confirmed when the price is above the cloud, and bearish signals are confirmed when the price is below the cloud.
5) Rahul Mohindar Oscillator
- The RMO identifies market trends and generates long (buy) and short (sell) signals based on the crossover of the SwingTrd2 and SwingTrd3 oscillators.
- This serves as an additional confirmation for bullish and bearish trends.
6) Major Leledc Exhaustion Bar
- This signal identifies potential market exhaustion by comparing the current price with historical high/low levels over a specified number of bars.
- Bullish exhaustion (buy) is signalled when a strong downtrend shows signs of reversal, and bearish exhaustion (sell) is signalled during strong uptrends that may be reversing.
Buy/Sell Signal Gradation
- b1 Buy : A mild buy indication triggered when RSI and Williams %R show oversold conditions combined with high trading volume. It suggests a possible rebound but lacks strong trend confirmation.
- b2 Buy : A stronger buy signal, activated when trend confirmations occur from Ichimoku, Rahul Mohindar Oscillator (RMO), and Major Leledc Exhaustion and stronger volume confirmation. This signal reflects a potential trend continuation and suggests a stronger buying opportunity.
- s1 Sell : A mild sell indication triggered by overbought conditions on the RSI and Williams %R, along with high trading volume, suggesting a potential downturn.
- s2 Sell : A stronger sell signal that activates when trend confirmations occur from Ichimoku, RMO, and Major Leledc Exhaustion and stronger volume confirmation. It signals a more probable downward trend.
- B buy : Big letter B shows strong Buy signals when b1 and b2 occur on the same candle.
- S Sell : Big letter S shows strong Buy signals when s1 and s2 occur on the same candle.
SUGGESTION:
Use Buy/Sell Signals along with trend reversal confirmation(Super Trend or Parabolic Sar).
Want to send a BIG THANKS to the creator of ADEPT_bitcoin buy&sell v.3.1
From ADEPT_bitcoin buy&sell v.3.1 script were added several indicators for confirmation for the creation of b2 and s2 signals.: Major Leledc Exhaustion Bar, Rahul Mohindar Oscillator, and Ichimoku Kinko Hyo.
Also Big thanks for SuperTrend and Parabolic SAR implementation By everget .
Enjoy. And don't be afraid of changing some indicator settings.
Z-VALUE
LV Stock QualityCritical financial and technical values are listed in the table.
PIOTROSKI_F_SCORE (expect. >5) -> The Piotroski score is a discrete score between zero and nine that reflects nine criteria used to determine the strength of a firm's financial position. The Piotroski score is used to determine the best value stocks, with nine being the best and zero being the worst. Having a score bigger than 5 is a good sign for the strength of a firm's financial position
ROE (expect. >11) --> Return on equity (ROE) is a measure of a company's financial performance. It is calculated by dividing net income by shareholders' equity. Because shareholders' equity is equal to a company’s assets minus its debt, ROE is a way of showing a company's return on net assets. A “good” ROE will depend on the company’s industry and competitors.
EPS_GROWTH (expect. >11) --> This indicator is calculated as the percentage change in Basic earnings per share for one year. This indicator reflects the growth rate of a company's basic profit per share outstanding for one year. It is calculated based using only common shares. An increase in EPS growth may signal that a company is becoming more profitable and efficient in its operations. A decline in EPS growth may signal that a company is spending more or losing business share. EPS growth should be viewed alongside other metrics like revenue and costs.
CURRENT_RATIO (expect. >1.25) --> The current ratio measures a company’s ability to pay current, or short-term, liabilities (debt and payables) with its current, or short-term, assets (cash, inventory, and receivables). Current ratios over 1.00 indicate that a company's current assets are greater than its current liabilities, meaning it could more easily pay of short-term debts.
OPERATING_MARGIN(expect. >11) --> The operating margin measures how much profit a company makes on a dollar of sales after paying for variable costs of production, such as wages and raw materials, but before paying interest or tax.
RETURN_CAPITAL (expect. >11) --> Return of capital (ROC) is a payment that an investor receives as a portion of their original investment and that is not considered income or capital gains from the investment.
ALTMAN_Z_SCORE (expect. >1.8) --> The Altman Z-score is the output of a credit-strength test that gauges a publicly traded manufacturing company's likelihood of bankruptcy. An Altman Z-score close to 0 suggests a company might be headed for bankruptcy, while a score closer to 3 suggests a company is in solid financial positioning.
REVENUE_GROWTH (expect. >11) --> Quarterly revenue growth is an increase in a company's sales in one quarter compared to sales of a different quarter. Comparing a company's financials from one period to another gives a clear picture of its revenue growth rate and can help investors identify the catalyst for such growth.
SUSTAINABLE_GROWTH (expect. >11) --> The sustainable growth rate (SGR) is the maximum rate of growth that a company or social enterprise can sustain without having to finance growth with additional equity or debt. In other words, it is the rate at which the company can grow while using its own internal revenue without borrowing from outside sources.
DEBT TO INCOME (expect. <0.4) --> A debt-to-income (DTI) ratio is a financial metric used by lenders to determine your borrowing risk. Your DTI ratio represents the total amount of debt you owe compared to the total amount of money you earn each month.
NORMALIZED ATR (expect. <8, W) --> The Normalized Average True Range (Normalized ATR) is an indicator used to measure market volatility by normalizing the average true range values. It does this by dividing the Average True Range (ATR) by the asset's closing price, converting it into a percentage. This normalization allows for the comparison of volatility levels across different securities or market conditions, regardless of the asset's price levels. The Normalized ATR helps traders to adjust their strategies based on relative volatility, rather than absolute price movements.
INDEX expect. EMA10>EMA20 --> it is expected to have EMA 10 > EMA 20 in weekly basis graph. It is known that having a strong trend in index will also increases chance of strong trend on stock levels. You need to select INDEX Market of stock via settings.
M. RELATIVE STRENGTH expect. MRS>1 --> Stan Weinstein uses the Mansfield RS indicator as another relative strength indicator. The indicator measures the variation in the 52-week ratio of stock and market.
VOLUME CHANGE (expect. >30) --> Having an increase on volume comparing to previous week can be a good sign if it occurs at the same time of breakout.
PRICE CHANGE (expect. >5 and <20) --> Having an increase on price comparing to previous week can be a good sign if it occurs at the same time of breakout.
It is better to look on weekly basis graphs.
ADA Stock-to-Flow Model (BSP)ADA Stock-to-Flow Model
This script implements a Stock-to-Flow (S2F) model for ADA (Cardano). The Stock-to-Flow ratio is a popular metric used to assess the scarcity of an asset by comparing its current supply (stock) to the rate at which it is being produced (flow). By visualizing the S2F ratio on ADA, this model helps traders and analysts evaluate potential long-term price trends based on supply scarcity.
Key features:
Calculates ADA's Stock-to-Flow ratio dynamically, adjusting for changes in circulating supply and emission rates.
Provides easy-to-read visualizations with adjustable timeframes, making it accessible for both novice and experienced traders.
The Stock-to-Flow model is widely used in analyzing assets like Bitcoin, and this adaptation for ADA gives unique insights into the relationship between its supply and market value. While the model offers a useful perspective on ADA’s potential trajectory, it should be used in conjunction with other tools for a comprehensive market analysis.
CAPE / Shiller PE RatioThe CAPE (Cyclically Adjusted Price-to-Earnings) or Shiller PE ratio is a popular valuation measure used by investors to assess whether a stock or index is over or undervalued relative to its historical earnings. Unlike the traditional P/E ratio, the CAPE ratio smooths earnings over ten years, adjusting for inflation and providing a more stable and long-term view of valuation.
This indicator lets you quickly calculate and visualize the CAPE ratio for any stock on TradingView, helping you make informed decisions about the sustainability of current price levels. With its clear presentation and intuitive setup, you can compare historical CAPE levels and identify potential opportunities for long-term investments or avoid overvalued markets.
Advantages of the CAPE Ratio:
Long-Term Focus : Smooth earnings over ten years, reducing the impact of short-term volatility.
Inflation-Adjusted : Provides a more precise, inflation-adjusted valuation measure over time.
Historical Comparison : Allows for benchmarking against long-term historical averages.
Market Sentiment Indicator : Can highlight overvalued or undervalued markets for long-term investors.
Reduces Noise : Filters out short-term earnings fluctuations, offering a more stable view.
Disadvantages of the CAPE Ratio:
Ignores Recent Earnings : Misses short-term earnings changes, which can affect current valuations.
Outdated Data : Relies on old earnings data that may not reflect recent company performance.
Less Effective for Growth Stocks : May undervalue high-growth stocks focused on future earnings.
Sector Limitations : Works best for broad markets, less so for fast-changing industries.
Debated Predictive Power : It’s unreliable for timing short-term market movements.
In short, the CAPE ratio is excellent for long-term valuation but has limitations for short-term or growth-focused investing.
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
Leonid's Bitcoin Sharpe RatioThe Sharpe ratio is an old formula used to value the risk-adjusted return of an asset. It was developed by Nobel Laureate William F. Sharpe. In this case, I have applied it to Bitcoin with an adjustable look-back date.
The Sharpe Ratio shows you the average return earned after subtracting out the risk-free rate per unit of volatility (I've defaulted this to 0.02 ).
Volatility is a measure of the price fluctuations of an asset or portfolio. Subtracting the risk-free rate from the mean return allows you to understand what the extra returns are for taking the risk.
If the indicator is flashing red, Bitcoin is temporarily overbought (expensive).
If the indicator is flashing green, Bitcoin is temporarily oversold (cheap).
The goal of this indicator is to signal out local tops & bottoms. It can be adjusted as far as the lookback time but I have found 25-26 days to be ideal.
DRIP Yearly PerformanceOverview: The DRIP Yearly Performance indicator is designed for long-term investors using Dividend Reinvestment Plans (DRIP). This script calculates both the total and average yearly performance of an asset, factoring in the reinvestment of dividends over time. It provides key insights into portfolio growth by tracking the number of accumulated units from dividend reinvestment and how this impacts overall performance.
Key Features:
Dividend Reinvestment (DRIP) Calculation: Automatically adjusts the number of units held by reinvesting dividends, enhancing the calculation of total returns.
Custom Start Date: Choose a custom start date to begin tracking performance from a specific time period, allowing for more tailored performance analysis.
Performance Metrics: Displays key metrics such as the initial investment value, current value, total performance percentage, and the average yearly performance, all in an easy-to-read table format.
Visual Representation: Plots accumulated units and overall performance on the chart, with customizable colors for clarity.
Inputs Explained:
Start Quantity: Define the initial number of units (shares) held at the start of the investment.
Dividend Type: Choose between tracking Net or Gross dividends for reinvestment purposes. Net is always better unless you have a special case and you need to base your calculations on gross.
Start Date: Select a custom date to begin tracking performance. This allows users to focus on performance from any historical point.
Table Size: Customize the size of the text in the performance table to suit your visual preferences.
Performance Line Color: Choose the color of the performance plot line that tracks the value of your investment over time.
Accumulator Line Color: Customize the color of the line that tracks the accumulated units (shares) due to reinvested dividends.
Who Can Benefit: This indicator is ideal for long-term investors and dividend growth investors who want to measure their investment returns over time while factoring in the effects of dividend reinvestment.
Use Cases:
Tracking Dividend Impact: See how reinvesting dividends enhances your overall portfolio value.
Custom Performance Analysis: Set a custom start date to analyze performance from a specific point in time.
Visualizing Growth: Use the chart's plots to visually track your growing number of shares (units) and overall performance.
Stef's Enterprise Value CalculatorI have learned the hard way why Enterprise Value is far more superior than Market Cap. That's why I made this indicator, but more importantly, why I added several features that other similar indicators just don't have. The key thing is to not just show you Enterprise Value of a company (it's true worth) but also the capability to see that line colored in a specific way, with key stats as a neat table, and the ability to chart the key facts that go into Enterprise Value, which are debt and cash.
I'll say it again: Market Cap is not nearly as good as Enterprise Value. Don't get tricked by what Market Cap does NOT show you and instead focus on Enterprise Value. I hope my indicator, and the features you see below, help investors and traders all over the world better understand this.
Here are the key features:
Enterprise Value Indicator Features:
1. Real-Time Enterprise Value (EV) Display: Track the EV of a company directly on your chart, providing a comprehensive measure of its true market value.
2. Custom Color Trends: Customize the color of your EV line based on specific trends you’re monitoring, allowing for personalized and insightful visual analysis.
3. Debt & Cash Visualization: Plot both debt and cash & equivalents on the same chart, offering a clear and concise view of a company’s financial health.
4. Key Metrics Table: View a table displaying essential metrics including:
- Average EV
- Highest EV
- Lowest EV
- MC-EV (Market Cap minus Enterprise Value)
MC-EV Charting: Easily chart MC-EV to understand how much debt a company has relative to its market cap, providing insight into financial leverage and growth potential.
Why MC-EV Matters: This metric is crucial for evaluating a company’s financial risk and operational efficiency, giving you an edge in making informed investment decisions.
Thanks for reading and I hope you find some value in this! More updates to come.
PE Ratio Intrinsic ValueThe "Median PE Ratio and Intrinsic Value" indicator is designed for traders and investors who wish to evaluate the intrinsic value of a stock based on a comparative analysis of Price-to-Earnings (PE) ratios across multiple stocks. This tool not only provides insights into whether a stock is undervalued or overvalued but also allows you to visualize the intrinsic value directly on the chart.
Comparison Across Multiple Stocks:
This indicator calculates the PE ratio for up to five different stocks, allowing you to compare the target stock's valuation against four other same sector companies. By default, the stocks included are Apple (AAPL), Google (GOOG), Microsoft (MSFT), and Amazon (AMZN), but you can customize these symbols to fit your analysis needs.
Dynamic PE Ratio Calculation:
The indicator calculates the PE ratio for each stock by dividing the current price by the earnings per share (EPS). The EPS data is retrieved based on the selected period, which can be one of the following:
FY (Fiscal Year)
FH (Fiscal Half-Year)
FQ (Fiscal Quarter)
TTM (Trailing Twelve Months)
You can easily switch between these periods using the provided input options, enabling a more customized analysis based on your preferred financial timeframe.
Once the PE ratios for the selected stocks are computed, the indicator calculates the average PE ratio. The average value is a robust measure that reduces the influence of outliers and provides a balanced view of market valuation.
The intrinsic value of the stock on the chart is calculated by multiplying its EPS by the median PE ratio of the selected stocks. This gives you an estimate of what the stock should be worth if it were to trade at a fair valuation relative to the chosen peers.
The intrinsic value is plotted directly on the price chart as a step line with breaks. This step line style is chosen to represent changes in intrinsic value clearly, with breaks indicating periods where the calculated value is not valid (e.g., negative intrinsic value). Only positive intrinsic values are displayed, helping you focus on meaningful data.
You can easily customize the stocks analyzed by entering the ticker symbols of your choice. Additionally, the indicator allows you to adjust the timeframe for EPS data, giving you flexibility depending on whether you are focused on long-term trends or shorter financial periods.
How to Use:
Compare the current stock price to the plotted intrinsic value. If the current price is below the intrinsic value, the stock may be undervalued. Conversely, if the price is above the intrinsic value, the stock might be overvalued. By comparing your stock against major market players, you can gauge whether it's trading at a premium or discount relative to other key companies in the sector. Use the period selection (FY, FQ, TTM) to adapt your analysis to different market conditions or earnings cycles, giving you more control over your valuation assessment.
Ideal For:
Long-term Investors looking to assess the intrinsic value of a stock based on comparative analysis.
Fundamental Analysts who want to combine multiple stocks' PE ratios to estimate a fair valuation.
Value Investors interested in finding undervalued opportunities by comparing the market price to intrinsic value.
Grayscale GSOL Solana Financials [NeoButane]This script shows Grayscale's GSOL financials based on the information from their website. Investors and traders like to use financials when making the decision to buy, sell, or hold.
►Usage
This script is specific to GSOL. Investors and traders use financials when making the decision to buy, sell, or hold. How one interprets financials is up to the individual. For example, investors who believe a Solana ETF is coming soon can view the "% Discount / Premium to NAV", which is currently over 600%, and decide not to buy because the premium would collapse if an ETF began trading.
►Configuration
Data select the data you'd like to display.
Show Highest label show the highest value of the entire data set.
Line Color an expression of self.
Extrapolate Data Using Average or Last Known Value Shows a line beyond the dataset, using the average of all past data or the last data point to predict newer data. % Discount / Premium to NAV, Share Premium, and SOL Per Share are supported.
→Data retrieved from Grayscale
AUM assets under management.
NAV net asset value.
Market Price market price of GSOL.
Shares Outstanding number of shares held in the open market.
→Data retrieved from Grayscale, modified by me
% Discount / Premium to NAV the % away NAV is from the market price of GSOL.
Formula: (GSOL - NAV) / NAV
Share Premium the actual $ premium of GSOL to its NAV.
Formula: GSOL - NAV
SOL Per Share the amount of SOL 1 share of GSOL can redeem. This is derived using Kraken's SOLUSD daily close prices.
Formula: Kraken's SOLUSD / NAV
SOL Price Using Market Price Premium the price of SOL if GSOL's market price was "correct" and the SOL Per Share ratio remained the same.
Formula: GSOL / SOL Per Share
►How this works
Grayscale has a spreadsheet of historical data available on their GSOL page. Since financials are not available for OTC:GSOL, I placed all the data into arrays to emulate a symbol's price (y) coordinates. UNIX time for each day, also in an array, is used as the time (x) coordinates. The UNIX arrays and data arrays are then looped to plot as lines, with data y2 being the next data point, making it appear as a continuous line.
Grayscale's GSOL was downloaded spreadsheet and opened in Excel. SOLUSD prices were exported using TradingView export function. The output of information was pasted into Pine Script. For matching up Kraken's SOLUSD prices to each Grayscale's data since GSOL does not trade daily, dates were converted to UNIX and matched with xlookup(). A library or seed will be used in the future for updating.
References
Data retrieved from Grayscale's website 2024/08/04.
www.grayscale.com
Quantity of Solana held by the trust can be seen in their filings. Ctrl + F "Quantity of
SOL "
www.grayscale.com
Q1 2024: www.grayscale.com
The high premium can partly be explained by private placement currently being closed. This means private sales can't dilute share value.
www.etf.com
Stef's Money Supply IndicatorI have been fascinated by the growth in the Money Supply. Well, I think we ALL have been fascinated by this and the corresponding inflation that followed. That's why I created my Money Supply Indicator because I always wanted to chart and analyze my symbols based on the Money Supply. This indicator gives you that capability in a way that no other indicator in this field currently offers. Let me explain:
How does the indicator work?
Chart any symbol, turn on this indicator, and instantly it will factor in the M2 money supply on the asset's underlying price. Essentially, you are seeing the price of the asset normalized for the corresponding rise in the money supply. In some ways, this is a rather unique inflation-adjusted view of a symbol's price.
More importantly, you can compare and contrast the symbol's price adjusted for the rise in the Money Supply vs. the symbol's price without that adjustment by indexing all lines to 100. This is essential for understanding if the asset is at all-time highs, lows, or possibly undervalued or overvalued based on the current money supply situation.
Why does this matter?
This tool provides a deeper understanding of how the overall money supply influences the value of assets over time. By adjusting asset prices for changes in the money supply, traders can see the true value of assets relative to the amount of money in circulation.
What features can you access with this indicator?
The ability to normalize all lines to a starting point of 100 allows traders to compare the performance of the Money Supply, the symbol price, and the symbol price adjusted for the money supply all on one readable chart. This feature is particularly useful for spotting divergences and understanding relative performance over time with a rising or falling Money Supply.
What else can you do?
This is just version 1, and so I'll be adding more features rather soon, but there are two other important features in the settings menu including the following:
• Get the capability to quickly spot the highest and lowest points on the Money Supply adjusted price of your asset.
• Get the capability to change the gradient colors of the line when going up or down.
• Turn on the Brrrrrrr printer text as a reminder of our Fed Overlord Jerome Powell... lol
• Drag this indicator onto your main chart to combine it with your candlesticks or other charting techniques.
Stef's Money Supply Indicator! I look forward to hearing your feedback.
Stock Value RainbowStock Valuation based on Book Value, Dividends, Cashflow, Earnings and Estimates and Money Multiplier
There are many ways to measure stock valuations: some methods are using book value, some are using dividends, some are using cashflow, some are using earnings and some using estimates data. Most of these valuation methods are based on multiplier effect which measure how many times the stock price could expand from their valuation base. This indicator attempts to unify all these measurements using just simple addition of all measurements such as: book value per share, dividend per share, cashflow per share, earning per share, and estimates of earning per share and then using multiplier effect to create beautiful rainbow to see how far the stock has growing up above or below their valuation base. The higher the stock price on rainbow spectrum means it is more expensive and the lower in the rainbow spectrum means it is cheaper. Here is the basic formula explanation:
SV = (BVPS + DPS + CFPS + EPS + EST) * MM
BVPS = Book Value Per Share (Asset - Liability)
DPS = Dividends Per Share
CFPS = Free Cash Flow Per Share
EPS = Earnings Per Share
EST = Estimates of EPS
MM = Money Multiplier (1x, 2x, ... ,10x)
- The gray line represents the stock value SV
- The rainbow above the gray line represents the multiplication factors from 1x, 2x, ..., 10x
- The rainbow below the gray line represents the division factors from 0.8x, 0.6x, ..., 0.2x
Check other script to value stock and index:
- Stock Value Rainbow: script to value stock based on book value, dividend, cash flow, earning and estimates.
- Index Value Rainbow: script to value index based on fed balance sheet and base money supply
- Gold Value Rainbow: script to value gold based on global money supply
- Stock Value US: script to check US stock value
- Stock Value EU: script to check EU stock value
- Stock Value JP: script to check JP stock value
- Stock Value CN: script to check CN stock value
Double FVG-BPR [QuantVue]The Double FVG BPR Indicator is a versatile tool that helps traders identify potential support and resistance levels through the concept of balanced price ranges.
A Balanced Price Range (BPR) is a zone on a price chart where the market has found equilibrium after a period of price imbalance.
It is identified by detecting a Fair Value Gap (FVG) in one direction, followed by an overlapping Fair Value Gap in the opposite direction.
Components of a Balanced Price Range
Fair Value Gap (FVG): A FVG occurs when there is a rapid price movement, creating a gap in the price chart where minimal trading occurs. This gap represents an imbalance between supply and demand.
Bullish FVG: A bullish FVG is identified when the low of a candle is higher than the high of a candle two periods ago, and the close of the previous candle is higher than the high of that same period.
Bearish FVG: A bearish FVG is identified when the high of a candle is lower than the low of a candle two periods ago, and the close of the previous candle is lower than the low of that same period.
Overlapping Fair Value Gap: For a BPR to be formed, an initial FVG must be followed by an overlapping FVG in the opposite direction. This creates a balanced zone where the price has moved up (or down) quickly and then moved down (or up) with similar intensity, suggesting a temporary equilibrium.
The area between the high and low points of these overlapping FVGs forms the BPR. This zone represents a temporary market equilibrium where supply and demand have balanced out after a period of significant price movement in both directions.
How to Use
Support and Resistance Levels: The upper and lower boundaries of the BPR act as dynamic support and resistance levels. Traders can use these levels to place buy and sell orders, anticipating that the price may find support or face resistance within these zones.
Trend Reversal and Continuation: The BPR can signal potential trend reversals or continuations.
If the price moves back into the BPR after a breakout, it may indicate a reversal. Conversely, if the price breaks out of the BPR with strong momentum, it may signal a trend continuation.
Sharpe RatioThe Sharpe Ratio Indicator is a widely-used tool designed to measure the risk-adjusted performance of an asset. The Sharpe Ratio helps investors understand how much excess return they are receiving for the extra volatility endured for holding a riskier asset. By comparing the return of an investment to the risk-free rate and accounting for the volatility of the investment's returns, the Sharpe Ratio provides a clear metric for evaluating the return on investment per unit of risk.
Features:
Calculation Period Input: Allows users to specify the period over which the Sharpe Ratio is calculated, making it flexible and adaptable to various trading strategies and time frames.
Risk-Free Rate Input: Users can set a specific risk-free rate, enabling a customized risk-return analysis based on prevailing market conditions or individual investment preferences.
Daily Returns Calculation: The indicator calculates daily returns, which are used to determine the mean return and standard deviation.
Sharpe Ratio Calculation: The indicator calculates the Sharpe Ratio by dividing the excess return (mean return minus risk-free rate) by the standard deviation of returns and annualizing the result (assuming 252 trading days in a year).
Visual Plot: The Sharpe Ratio is plotted on the chart, with a reference zero line to help users quickly assess whether the asset's returns are favorable relative to the risk-free rate.
How to Use:
Add the Indicator to Your Chart: Copy the script into the Pine Script editor on TradingView and add it to your chart.
Specify the Calculation Period: Adjust the Calculation Period input to match your desired time frame for the Sharpe Ratio calculation.
Set the Risk-Free Rate: Input the current risk-free rate (e.g., the yield on 10-year government bonds) to customize the risk-return analysis.
Interpret the Sharpe Ratio: A higher Sharpe Ratio indicates better risk-adjusted performance, while a ratio below zero suggests that the asset has underperformed relative to the risk-free rate.
Omega RatioThe Omega Ratio Indicator is a powerful tool designed to measure the risk-adjusted performance of an asset. Unlike traditional measures like the Sharpe or Sortino Ratios, the Omega Ratio considers both the frequency and magnitude of returns above and below a specified target return, providing a more comprehensive view of an asset's performance. This makes it an ideal choice for traders and investors seeking to evaluate the probability of achieving a desired return relative to the risk taken.
Features:
Calculation Period Input: Allows users to specify the period over which the Omega Ratio is calculated, making it flexible and adaptable to various trading strategies and time frames.
Target Return Input: Users can set a specific target return, enabling a customized risk-return analysis based on individual investment goals.
Daily Returns Calculation: The indicator calculates daily returns, which are used to determine the cumulative returns above and below the target return.
Omega Ratio Calculation: By dividing the cumulative returns above the target return by the cumulative returns below it, the indicator provides a clear measure of the likelihood of achieving the target return.
Visual Plot: The Omega Ratio is plotted on the chart, with a reference line at 1, helping users quickly assess whether the asset's returns are favorable relative to the target.
How to Use:
Add the Indicator to Your Chart: Copy the script into the Pine Script editor on TradingView and add it to your chart.
Specify the Calculation Period: Adjust the Calculation Period input to match your desired time frame for the Omega Ratio calculation.
Set the Target Return: Input your desired target return to customize the risk-return analysis.
Interpret the Omega Ratio: An Omega Ratio greater than 1 indicates that the asset's returns are more likely to exceed the target return than to fall short, whereas a ratio less than 1 suggests the opposite.
Sortino RatioThe Sortino Ratio Indicator is a custom script developed to measure the risk-adjusted performance of an asset. Unlike the Sharpe Ratio, which penalizes both upside and downside volatility equally, the Sortino Ratio specifically differentiates between harmful volatility (downside risk) and overall volatility. This makes it a preferred choice for traders and investors who are particularly concerned with downside risk.
Features:
Calculation Period Input: Users can specify the period over which the Sortino Ratio is calculated, making it adaptable to different time frames and trading strategies.
Daily Returns Calculation: The indicator calculates daily returns using logarithmic returns, which provides a more accurate reflection of percentage changes in price.
Mean Return and Downside Deviation: The script calculates the mean of daily returns and the downside deviation, focusing only on negative returns that fall below the mean.
Annualized Sortino Ratio: The Sortino Ratio is annualized assuming 252 trading days in a year, providing a standardized measure that can be easily compared across different assets and time periods.
Visual Plot: The indicator plots the Sortino Ratio on the chart, with a reference zero line to help users quickly assess the performance relative to the risk-free rate.
How to Use:
Add the Indicator to Your Chart: Copy the script into the Pine Script editor on TradingView and add it to your chart.
Specify the Calculation Period: Adjust the Calculation Period input to match your desired time frame for the Sortino Ratio calculation.
Interpret the Sortino Ratio: A higher Sortino Ratio indicates better risk-adjusted performance, while a ratio below zero suggests that the asset has underperformed relative to its downside risk.
Market Cap / Revenue RatioA variation of the P/S ratio, this script takes the future estimated revenue of the current stock versus it's Market Cap. It then compares the aforementioned Market Cap:Revenue ratio against a market bellwether's corresponding ratio (MSFT by default) to determine the following:
- Light green when the ratio is extremely low (Stock is very undervalued)
- Green when the ratio is low (Stock's multiple is lower by 20-50%)
- Blue when the ratio is close to the benchmark (Stock is fairly valued to benchmark multiple)
- Red when the ratio is high (Stock's mulitple is higher by 50% or more)
- Dark red when the ratio is extremely high (Stock is very overvalued)
CONFIGURABLE
- Full Table: Show the entire calculation table
- Minimalist: Go minimal and show only the ratio and color code
- Show Benchmark Multiple: Show the multiple ratio calculated between the current stock and the benchmark stock (MSFT by default)
NOTES
- When calculating the Market Cap, TradingView sometimes under-reports the number of shares and thus skews the Market Cap too low. This seems to happen for stocks with multiple share classes like GOOGL so be mindful that the data can be wrong for these kinds of stocks. You can check on this by going into the Indicator's Settings and select Show Full Table which will show the number of shares outstanding reported by TradingView.
- For certain stocks such as foreign ADRs, there won't be a future revenue estimate so the script will automatically use the Total Revenue for the most recent Quarter in these cases
Fair Value Calculator V 1.0Fair Value Calculator V 1.0
This indicator calculates the fair value of a stock based on the revenue growth rate and net profit margin of a company, providing a quick estimate of its intrinsic worth. The calculation takes into account:
Current Revenue: The company's current revenue
5-Year Growth Rate: Expected revenue annual growth rate (CAGR) over the next 5 years
Average PE Ratio: The average Price-to-Earnings ratio for the next 5 years
Average Profit Margin: The average profit margin for the next 5 years
Share Outstanding: The total number of shares outstanding
Yearly Share Buyback Rate: The percentage of shares bought back by the company each year
Discount Rate: The rate used to calculate the present value of the fair value
Using these inputs, the indicator estimates the fair value of the stock, providing a valuable tool for investors and traders to make informed decisions.
Note: all values can be adjusted by the user by entering the desired value and selecting the item in the setup menu.
How it works
The indicator calculates the future revenue based on the current revenue and the expected revenue annual growth rate (CAGR).
It then estimates the future earnings using the average profit margin.
The future price is calculated using the exit value of the PE ratio.
The present value of the fair value is calculated using the discount rate.
The indicator adjusts the fair value based on the yearly share buyback rate.
Benefits
Provides a quick but valuable estimate of a stock's fair value based on the revenue growth and the expected profit.
Helps investors and traders identify undervalued or overvalued stocks.
Allows users to adjust inputs to suit their own assumptions and scenarios.
Note
This indicator is for informational purposes only and should not be considered as investment advice. Always do your own research and consider multiple perspectives before making investment decisions.
True stock performance based on EY Bar divergenceI created this indicator to be used in conjunction with my other indicator "True stock performance based on Earnings Yield". I've detailed in that description how true performance is calculated. In short it measures how much EY is moving in relation to the stock price. The theory is that if stock price is moving heavily while EY isn't you have a sentiment driven trend and the stock isn't traded on fundamentals.
This indicators marks bars when stock performance divergences from true performance.
Green upward triangle = The true performance closes lower than previous while stock price is closing higher. This indicates a optimistic sentiment as stock price is pushed up even though price based on EY is moving down.
Red downward triangle = The true performance closes higher than previous while stock price closing lower. This indicates a negative sentiment as stock price is pushed down even though price based on EY is moving up.
How do I use it?
I use it to confirm when sentiment has taken taken over a stock. If you have a fair uptrend (when both stock performance and true performance are doing higher highs), optimistic divergencies are welcome. I've used NVIDIA from 2017 to 2019 to demonstrate.
But if true performance starts to make lower highs while stock performance keeps going up and you see optimistic divergencies, you can tell that the market is getting overoptimistic.
When the stock had crashed it eventually bottomed and started to make higher lows together with an uptrend of true performance, which I count as a fair uptrend. Regardless of that you start to see some negative divergencies indicating that people are scared that the stock will drop again and oversell. These opportunities can be good places to buy more.
But i don't care about earnings, I'm a technical trader. Do i have any use for it?
You possibly could, yes. If you want to follow the crowd, optimistic divergencies confirms that the market is still interested in the stock and may keep pushing the price up. But be careful. Negative divergencies almost never marks any tops, it often confirms downtrends and may indicate bottoms. Often the optimistic divergencies marks the top so don't buy more blindly using this indicator.
True stock performance based on Earnings YieldThe whole basis of the stock market is that you invest your money into a business that can use that money to increase it's earnings and pay you back for that investment with dividends and increased stock value. But because we are human the market often overbuy stocks that cant keep up their earnings with the current inflow of investments. We can also oversell a stock that is keeping up with earnings in regards to the stock price but we don't care because of the sentiment we have.
Earnings Yield is simply the percentage of Earnings Per Share in relation to the stock price. Alone, it's a great fundamental indicator to analyze a company. But I wanted to use it in another way and got tired of using the calculator all the time so that's why I made this indicator.
The goal is to see if the STOCK price is moving accordingly to the BUSINESS earnings. It works by calculating the difference of EY (TTM) previous close (1 bar) to the close thereafter. It then calculates the stock performance of the latest bar and divides that to get decimal form instead of percent. Then it divides the stock performance in decimal form with the difference of EY calculated before. The result shows how much the stock prices moves in relation to how much EY is moving. The theory is that if EY barely moves but the stock price moves heavily, you have a sentiment driven trend.
Example: Week 1 EY = 1.201. Week 2 EY = 1.105.
1.201 - 1.105 = 0.096
Week 2 performed a 11,2% increase in stock price. = 0.112 in decimal form.
0.112 / 0.096 = 1.67
1.67 is the multiple that plots this indicator.
Here is an good example of a stock that's currently in a highly sentiment driven trend, NVIDIA! (Posted 2024-03-30)
Here is an example of a Swedish stock that retail investors flocked to that have been blowned out completely.
When do I buy and sell?
This indicator is not meant to give exact entries or exits. The purpose is to scout the current and past sentiment, possible divergencies and see if a stock is over or under valued. I did add a 50 EMA to get some form of mean plotted. One could buy when true performance is low and sell when true performance drops below the 50 EMA. You could also just sell a part of your position and set a trailing exit with a ordinary 50 EMA or something like that. Often the sentiment will keep driving the price up. But if it last for 1 month or 1 year is impossible to tell.
Try it out and learn how it works and use it as you like. Cheers!
Statistics • Chi Square • P-value • SignificanceThe Statistics • Chi Square • P-value • Significance publication aims to provide a tool for combining different conditions and checking whether the outcome is significant using the Chi-Square Test and P-value.
🔶 USAGE
The basic principle is to compare two or more groups and check the results of a query test, such as asking men and women whether they want to see a romantic or non-romantic movie.
–––––––––––––––––––––––––––––––––––––––––––––
| | ROMANTIC | NON-ROMANTIC | ⬅︎ MOVIE |
–––––––––––––––––––––––––––––––––––––––––––––
| MEN | 2 | 8 | 10 |
–––––––––––––––––––––––––––––––––––––––––––––
| WOMEN | 7 | 3 | 10 |
–––––––––––––––––––––––––––––––––––––––––––––
|⬆︎ SEX | 10 | 10 | 20 |
–––––––––––––––––––––––––––––––––––––––––––––
We calculate the Chi-Square Formula, which is:
Χ² = Σ ( (Observed Value − Expected Value)² / Expected Value )
In this publication, this is:
chiSquare = 0.
for i = 0 to rows -1
for j = 0 to colums -1
observedValue = aBin.get(i).aFloat.get(j)
expectedValue = math.max(1e-12, aBin.get(i).aFloat.get(colums) * aBin.get(rows).aFloat.get(j) / sumT) //Division by 0 protection
chiSquare += math.pow(observedValue - expectedValue, 2) / expectedValue
Together with the 'Degree of Freedom', which is (rows − 1) × (columns − 1) , the P-value can be calculated.
In this case it is P-value: 0.02462
A P-value lower than 0.05 is considered to be significant. Statistically, women tend to choose a romantic movie more, while men prefer a non-romantic one.
Users have the option to choose a P-value, calculated from a standard table or through a math.ucla.edu - Javascript-based function (see references below).
Note that the population (10 men + 10 women = 20) is small, something to consider.
Either way, this principle is applied in the script, where conditions can be chosen like rsi, close, high, ...
🔹 CONDITION
Conditions are added to the left column ('CONDITION')
For example, previous rsi values (rsi ) between 0-100, divided in separate groups
🔹 CLOSE
Then, the movement of the last close is evaluated
UP when close is higher then previous close (close )
DOWN when close is lower then previous close
EQUAL when close is equal then previous close
It is also possible to use only 2 columns by adding EQUAL to UP or DOWN
UP
DOWN/EQUAL
or
UP/EQUAL
DOWN
In other words, when previous rsi value was between 80 and 90, this resulted in:
19 times a current close higher than previous close
14 times a current close lower than previous close
0 times a current close equal than previous close
However, the P-value tells us it is not statistical significant.
NOTE: Always keep in mind that past behaviour gives no certainty about future behaviour.
A vertical line is drawn at the beginning of the chosen population (max 4990)
Here, the results seem significant.
🔹 GROUPS
It is important to ensure that the groups are formed correctly. All possibilities should be present, and conditions should only be part of 1 group.
In the example above, the two top situations are acceptable; close against close can only be higher, lower or equal.
The two examples at the bottom, however, are very poorly constructed.
Several conditions can be placed in more than 1 group, and some conditions are not integrated into a group. Even if the results are significant, they are useless because of the group formation.
A population count is added as an aid to spot errors in group formation.
In this example, there is a discrepancy between the population and total count due to the absence of a condition.
The results when rsi was between 5-25 are not included, resulting in unreliable results.
🔹 PRACTICAL EXAMPLES
In this example, we have specific groups where the condition only applies to that group.
For example, the condition rsi > 55 and rsi <= 65 isn't true in another group.
Also, every possible rsi value (0 - 100) is present in 1 of the groups.
rsi > 15 and rsi <= 25 28 times UP, 19 times DOWN and 2 times EQUAL. P-value: 0.01171
When looking in detail and examining the area 15-25 RSI, we see this:
The population is now not representative (only checking for RSI between 15-25; all other RSI values are not included), so we can ignore the P-value in this case. It is merely to check in detail. In this case, the RSI values 23 and 24 seem promising.
NOTE: We should check what the close price did without any condition.
If, for example, the close price had risen 100 times out of 100, this would make things very relative.
In this case (at least two conditions need to be present), we set 1 condition at 'always true' and another at 'always false' so we'll get only the close values without any condition:
Changing the population or the conditions will change the P-value.
In the following example, the outcome is evaluated when:
close value from 1 bar back is higher than the close value from 2 bars back
close value from 1 bar back is lower/equal than the close value from 2 bars back
Or:
close value from 1 bar back is higher than the close value from 2 bars back
close value from 1 bar back is equal than the close value from 2 bars back
close value from 1 bar back is lower than the close value from 2 bars back
In both examples, all possibilities of close against close are included in the calculations. close can only by higher, equal or lower than close
Both examples have the results without a condition included (5 = 5 and 5 < 5) so one can compare the direction of current close.
🔶 NOTES
• Always keep in mind that:
Past behaviour gives no certainty about future behaviour.
Everything depends on time, cycles, events, fundamentals, technicals, ...
• This test only works for categorical data (data in categories), such as Gender {Men, Women} or color {Red, Yellow, Green, Blue} etc., but not numerical data such as height or weight. One might argue that such tests shouldn't use rsi, close, ... values.
• Consider what you're measuring
For example rsi of the current bar will always lead to a close higher than the previous close, since this is inherent to the rsi calculations.
• Be careful; often, there are na -values at the beginning of the series, which are not included in the calculations!
• Always keep in mind considering what the close price did without any condition
• The numbers must be large enough. Each entry must be five or more. In other words, it is vital to make the 'population' large enough.
• The code can be developed further, for example, by splitting UP, DOWN in close UP 1-2%, close UP 2-3%, close UP 3-4%, ...
• rsi can be supplemented with stochRSI, MFI, sma, ema, ...
🔶 SETTINGS
🔹 Population
• Choose the population size; in other words, how many bars you want to go back to. If fewer bars are available than set, this will be automatically adjusted.
🔹 Inputs
At least two conditions need to be chosen.
• Users can add up to 11 conditions, where each condition can contain two different conditions.
🔹 RSI
• Length
🔹 Levels
• Set the used levels as desired.
🔹 Levels
• P-value: P-value retrieved using a standard table method or a function.
• Used function, derived from Chi-Square Distribution Function; JavaScript
LogGamma(Z) =>
S = 1
+ 76.18009173 / Z
- 86.50532033 / (Z+1)
+ 24.01409822 / (Z+2)
- 1.231739516 / (Z+3)
+ 0.00120858003 / (Z+4)
- 0.00000536382 / (Z+5)
(Z-.5) * math.log(Z+4.5) - (Z+4.5) + math.log(S * 2.50662827465)
Gcf(float X, A) => // Good for X > A +1
A0=0., B0=1., A1=1., B1=X, AOLD=0., N=0
while (math.abs((A1-AOLD)/A1) > .00001)
AOLD := A1
N += 1
A0 := A1+(N-A)*A0
B0 := B1+(N-A)*B0
A1 := X*A0+N*A1
B1 := X*B0+N*B1
A0 := A0/B1
B0 := B0/B1
A1 := A1/B1
B1 := 1
Prob = math.exp(A * math.log(X) - X - LogGamma(A)) * A1
1 - Prob
Gser(X, A) => // Good for X < A +1
T9 = 1. / A
G = T9
I = 1
while (T9 > G* 0.00001)
T9 := T9 * X / (A + I)
G := G + T9
I += 1
G *= math.exp(A * math.log(X) - X - LogGamma(A))
Gammacdf(x, a) =>
GI = 0.
if (x<=0)
GI := 0
else if (x
Chisqcdf = Gammacdf(Z/2, DF/2)
Chisqcdf := math.round(Chisqcdf * 100000) / 100000
pValue = 1 - Chisqcdf
🔶 REFERENCES
mathsisfun.com, Chi-Square Test
Chi-Square Distribution Function
BTC Valuation
The BTC Valuation indicator
is a powerful tool designed to assist traders and analysts in evaluating the current state of Bitcoin's market valuation. By leveraging key moving averages and a logarithmic trendline, this indicator offers valuable insights into potential buying or selling opportunities based on historical price value.
Key Features:
200MA/P (200-day Moving Average to Price Ratio):
Provides a perspective on Bitcoin's long-term trend by comparing the current price to its 200-day Simple Moving Average (SMA).
A positive value suggests potential undervaluation, while a negative value may indicate overvaluation.
50MA/P (50-day Moving Average to Price Ratio):
Focuses on short-term trends, offering insights into the relationship between Bitcoin's current price and its 50-day SMA.
Helps traders identify potential bullish or bearish trends in the near term.
LTL/P (Logarithmic TrendLine to Price Ratio):
Incorporates a logarithmic trendline, considering Bitcoin's historical age in days.
Assists in evaluating whether the current price aligns with the long-term logarithmic trend, signaling potential overvaluation or undervaluation.
How to Use:
Z Score Indicator Integration:
The BTC Valuation indicator leverages the Z Score Indicator to score the ratios in a statistical way.
Statistical scoring provides a standardized measure of how far each ratio deviates from the mean, aiding in a more nuanced and objective evaluation.
Z Score Indicator
This BTC Valuation indicator provides a comprehensive view of Bitcoin's valuation dynamics, allowing traders to make informed decisions.
While indicators like BTC Valuation provide valuable insights, it's crucial to remember that no indicator guarantees market predictions.
Traders should use indicators as part of a comprehensive strategy and consider multiple factors before making trading decisions.
Historical performance is not indicative of future results. Exercise caution and continually refine your approach based on market dynamics.
Crypto MVRV ZScore - Strategy [PresentTrading]█ Introduction and How it is Different
The "Crypto Valuation Extremes: MVRV ZScore - Strategy " represents a cutting-edge approach to cryptocurrency trading, leveraging the Market Value to Realized Value (MVRV) Z-Score. This metric is pivotal for identifying overvalued or undervalued conditions in the crypto market, particularly Bitcoin. It assesses the current market valuation against the realized capitalization, providing insights that are not apparent through conventional analysis.
BTCUSD 6h Long/Short Performance
Local
█ Strategy, How It Works: Detailed Explanation
The strategy leverages the Market Value to Realized Value (MVRV) Z-Score, specifically designed for cryptocurrencies, with a focus on Bitcoin. This metric is crucial for determining whether Bitcoin is currently undervalued or overvalued compared to its historical 'realized' price. Below is an in-depth explanation of the strategy's components and calculations.
🔶Conceptual Foundation
- Market Capitalization (MC): This represents the total dollar market value of Bitcoin's circulating supply. It is calculated as the current price of Bitcoin multiplied by the number of coins in circulation.
- Realized Capitalization (RC): Unlike MC, which values all coins at the current market price, RC is computed by valuing each coin at the price it was last moved or traded. Essentially, it is a summation of the value of all bitcoins, priced at the time they were last transacted.
- MVRV Ratio: This ratio is derived by dividing the Market Capitalization by the Realized Capitalization (The ratio of MC to RC (MVRV Ratio = MC / RC)). A ratio greater than 1 indicates that the current price is higher than the average price at which all bitcoins were purchased, suggesting potential overvaluation. Conversely, a ratio below 1 suggests undervaluation.
🔶 MVRV Z-Score Calculation
The Z-Score is a statistical measure that indicates the number of standard deviations an element is from the mean. For this strategy, the MVRV Z-Score is calculated as follows:
MVRV Z-Score = (MC - RC) / Standard Deviation of (MC - RC)
This formula quantifies Bitcoin's deviation from its 'normal' valuation range, offering insights into market sentiment and potential price reversals.
🔶 Spread Z-Score for Trading Signals
The strategy refines this approach by calculating a 'spread Z-Score', which adjusts the MVRV Z-Score over a specific period (default: 252 days). This is done to smooth out short-term market volatility and focus on longer-term valuation trends. The spread Z-Score is calculated as follows:
Spread Z-Score = (Market Z-Score - MVVR Ratio - SMA of Spread) / Standard Deviation of Spread
Where:
- SMA of Spread is the simple moving average of the spread over the specified period.
- Spread refers to the difference between the Market Z-Score and the MVRV Ratio.
🔶 Trading Signals
- Long Entry Condition: A long (buy) signal is generated when the spread Z-Score crosses above the long entry threshold, indicating that Bitcoin is potentially undervalued.
- Short Entry Condition: A short (sell) signal is triggered when the spread Z-Score falls below the short entry threshold, suggesting overvaluation.
These conditions are based on the premise that extreme deviations from the mean (as indicated by the Z-Score) are likely to revert to the mean over time, presenting opportunities for strategic entry and exit points.
█ Practical Application
Traders use these signals to make informed decisions about opening or closing positions in the Bitcoin market. By quantifying market valuation extremes, the strategy aims to capitalize on the cyclical nature of price movements, identifying high-probability entry and exit points based on historical valuation norms.
█ Trade Direction
A unique feature of this strategy is its configurable trade direction. Users can specify their preference for engaging in long positions, short positions, or both. This flexibility allows traders to tailor the strategy according to their risk tolerance, market outlook, or trading style, making it adaptable to various market conditions and trader objectives.
█ Usage
To implement this strategy, traders should first adjust the input parameters to align with their trading preferences and risk management practices. These parameters include the trade direction, Z-Score calculation period, and the thresholds for long and short entries. Once configured, the strategy automatically generates trading signals based on the calculated spread Z-Score, providing clear indications for potential entry and exit points.
It is advisable for traders to backtest the strategy under different market conditions to validate its effectiveness and adjust the settings as necessary. Continuous monitoring and adjustment are crucial, as market dynamics evolve over time.
█ Default Settings
- Trade Direction: Both (Allows for both long and short positions)
- Z-Score Calculation Period: 252 days (Approximately one trading year, capturing a comprehensive market cycle)
- Long Entry Threshold: 0.382 (Indicative of moderate undervaluation)
- Short Entry Threshold: -0.382 (Signifies moderate overvaluation)
These default settings are designed to balance sensitivity to market valuation extremes with a pragmatic approach to trade execution. They aim to filter out noise and focus on significant market movements, providing a solid foundation for both new and experienced traders looking to exploit the unique insights offered by the MVRV Z-Score in the cryptocurrency market.
LV Stock Valuation by Benjamin Graham's FormulaBenjamin Graham's stock valuation formula for growth companies is based on the principle that a stock is a part of a business, and that by analyzing the fundamentals of any company in the stock market, you should be able to derive its intrinsic value independent from its current stock price. Graham suggests that over the long-term, the stock price of a company and its intrinsic/fair value will converge towards each other until the stock price reflects the true value of the company. Finally, Graham recommends that after estimating the intrinsic value of a stock, investors should always purchase the stock with a "margin of safety," to protect oneself from assumptions and potential errors made in the valuation process.
Graham's stock valuation formula to calculate intrinsic value was originally shown in the 1962 edition of Security Analysis as follows:
V = EPS * (8.5 + 2g)
where:
V = intrinsic value per share (over the next 7-10 years)
EPS = earnings per share (over the trailing twelve months (TTM))
8.5 = price-to-earnings (P/E) base for a no-growth company
g = reasonably expected annual growth rate (over the next 7-10 years)
In 1974, Graham revised this formula, as published in The Intelligent Investor, to include a discount rate (aka required rate of return). This was after he concluded that the greatest contributing to stock values and prices over the past decade had been due to interest rates.
Graham's current stock valuation formula is shown below:
V = (EPS * (8.5 + 2g) * Z) / Y
where:
V = intrinsic value per share (over the next 7-10 years)
EPS = diluted earnings per share (over the trailing twelve months (TTM))
8.5 = price-to-earnings (P/E) base for a no-growth company (you can change it manually)
g = reasonably expected annual growth rate (calculated by 5-Yr EPS CAGR%) (you can change year period)
Z = average yield of XXX Bonds (4.4 is default on Graham's formula)
Y = current yield of XXX Bonds
Current bond yield values (Z and Y) are selected as an example from Turkey. You need to change it according to the country of stocks.
Buy price (BP) = Intrinsic value per share * (1 - Margin of safety %)
Margin of safety = selected 20% (you need to change it to 0, if you don’t want to use margin of safety and to see intrinsic value)
Buy price > Current market price: Consider buying the stock, as the current market price appears to be undervalued.
Buy price < Current market price: Consider selling or not buying the stock, as the current market price appears to be overvalued.
Keep in mind that this buy/sell recommendation is purely based on Graham's stock valuation formula and the current market price, and ignores all other fundamental, news, and market factors investors should examine as well before making an investment decision.
Buy price is calculated for 5 different P/E values in the script.
1. with fixed P/E
2. with current P/E
3. with forward P/E
4. with sector P/E (optional)
5. with index P/E (optional)
You can also do calculations by using different growth rate by selecting that option.
Different type of moving averages is also included in the script as an option.