OPEN-SOURCE SCRIPT

Trading Psychology - Fear & Greed Index by DGT

Mis à jour
Psychology of a Market Cycle - Where are we in the cycle?

Before proceeding with the question "where", let's first have a quick look at "What is market psychology?"

Market psychology is the idea that the movements of a market reflect the emotional state of its participants. It is one of the main topics of behavioral economics - an interdisciplinary field that investigates the various factors that precede economic decisions. Many believe that emotions are the main driving force behind the shifts of financial markets and that the overall fluctuating investor sentiment is what creates the so-called psychological market cycles - which is also dynamic. 

Stages of Investor Emotions:

*Optimism – A positive outlook encourages us about the future, leading us to buy stocks.
*Excitement – Having seen some of our initial ideas work, we begin considering what our market success could allow us to accomplish.
*Thrill – At this point we investors cannot believe our success and begin to comment on how smart we are.
*Euphoria – This marks the point of maximum financial risk. Having seen every decision result in quick, easy profits, we begin to ignore risk and expect every trade to become profitable.
*Anxiety – For the first time the market moves against us. Having never stared at unrealized losses, we tell ourselves we are long-term investors and that all our ideas will eventually work.
*Denial – When markets have not rebounded, yet we do not know how to respond, we begin denying either that we made poor choices or that things will not improve shortly.
*Fear – The market realities become confusing. We believe the stocks we own will never move in our favor.
*Desperation – Not knowing how to act, we grasp at any idea that will allow us to get back to breakeven.
*Panic – Having exhausted all ideas, we are at a loss for what to do next.
*Capitulation – Deciding our portfolio will never increase again, we sell all our stocks to avoid any future losses.
*Despondency – After exiting the markets we do not want to buy stocks ever again. This often marks the moment of greatest financial opportunity.
*Depression – Not knowing how we could be so foolish, we are left trying to understand our actions.
*Hope – Eventually we return to the realization that markets move in cycles, and we begin looking for our next opportunity.
*Relief – Having bought a stock that turned profitable, we renew our faith that there is a future in investing.


It's hard to predict with certainty where we exactly are in the market cycle, we can only make an educated guess as to the rough stage based on data available. And here comes the study "Trading Psychology - Fear & Greed Index"  

Factors taken into account in this study include: 

1-Price Momentum : Price Divergence/Convergence versus its Slow Moving Average

2-Strenght :  Rate of Return (RoR) also called Return on Investment (ROI) is a performance measure used to evaluate the efficiency of an investment, net gain or loss of an investment over a specified time period, the rate of change in price movement over a period of time to help investors determine the strength

3-Money Flow : Chaikin Money Flow (CMF) is a technical analysis indicator used to measure Money Flow Volume over a set period of time. CMF can be used as a way to further quantify changes in buying and selling pressure and can help to anticipate future changes and therefore trading opportunities. CMF calculations is based on Accumulation/Distribution

4-Market Volatility : CBOE Volatility Index (VIX), the Volatility Index, or VIX, is a real-time market index that represents the market's expectation of 30-day forward-looking volatility. Derived from the price inputs of the S&P 500 index options, it provides a measure of market risk and investors' sentiments. It is also known by other names like "Fear Gauge" or "Fear Index." Investors, research analysts and portfolio managers look to VIX values as a way to measure market risk, fear and stress before they take investment decisions

5-Safe Haven Demand: in this study GOLD demand is assumed 

What to look for:
*Fear and Greed Index as explained above,
*Divergencies 

Tool tip of the label displayed provides details of references

Conclusion:
As investors, we always get caught up in the day to day price movements, and lose sight of the bigger picture. The biggest crashes happen not when investors are cautious and fearful, it's when they're euphoric and expecting financial instruments to continue going higher. So as we continue investing, don’t forget to stop and ask yourself, where in the chart do you think we are right now? The Market Psychology Cycle shines light on how emotions evolve, fear and greed index can come in handy, provided that it is not the only tool used to make investment decisions. It is easy to look back at market cycles and recognize how the overall psychology changed. Analyzing previous data makes it obvious what actions and decisions would have been the most profitable. However, it is much harder to understand how the market is changing as it goes - and even harder to predict what comes next. Many investors use technical analysis (TA) to attempt to anticipate where the market is likely to go. Investors are advised to keep tabs on fear for potential buying the dips opportunities and view periods of greed as a potential indicator that financial instruments might be overvalued.

Warren Buffett's quote, buy when others are fearful, and sell when others are greedy


Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely

Disclaimer: The script is for informational and educational purposes only. Use of the script does not constitute professional and/or financial advice. You alone have the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Notes de version
minor update : volume data is not provided for some of the financial instruments, such as GOLD, NIFTY, NIFTY BANK etc. In such a case no plotting had been performed.
with this update in case volume data is not available, Chaikin Money Flow calculations will be excluded from Fear & Greed Index' reference metrics

finally, dash characters "-" are replaced with semicolons ":" to avoid misinterpreting the minus sign
Notes de version
- added ability to perform fear and greed index calculations on the current time frame
- graph will be plotted and colored based on selection (daily or current time frame)
- label and tooltip will display both calculated values
- slight improvments on the colors, added more colors for more smoothed view
Notes de version
now available with Fear & Greed weighted price chart display option
convergenceCyclesDGTDivergencefearfearandgreedGoldmarketcycleOscillatorsriskVIX CBOE Volatility IndexVolatility

Script open-source

Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?

Clause de non-responsabilité