Based on the current market sentiment, the fear and greed index is 100% invested in
stocks and holding 0% cash in its portfolio.
Last updated Aug. 21, 2026
Investors can manage the risk of their portfolios based on the fear greed index by increasing their
cash allocation when markets are trending down and increasing their equity allocation when markets are trending up.
This tool uses stock market sentiment to determine the ideal cash allocation in your portfolio.
This is done by observing stocks in the market and
finding out the percentage of stocks that are in a downtrend.
The higher the percentage of stocks in a downtrend, the higher our cash allocation.
During a crisis when market sentiment is bearish and most stocks start to enter a downtrend,
this strategy will increase its cash allocation
to protect the investor's portfolio from large drawdowns. When the market starts to recover and market sentiment turns bullish,
the strategy will gradually switch from cash to equities to take advantage of rising prices during the recovery.
We compare the performance of investing in the S&P 500 using the cash allocation
from our fear and greed index against a buy and hold strategy on the S&P 500. The
backtest shows
that our risked managed portfolio that relies on the fear&greed index has a lower volatility and a lower drawdown during a crisis.
The CNN Fear Greed Index from
CNN Money is a popular tool used to measure market sentiment.
The CNN Fear and Greed index measures market sentiment using an equal weighted average of 7 indicators: Safe Haven Demand,
Stock Price Strength, Stock Price Momentum,
Stock Price Breadth, Put and Call Options, Junk Bond Demand, and Market Volatility.
Image Source: CNN Money
However, the tool fails to address how can an investor profit from market sentiment. As a solution, I built the PyInvesting
Fear and Greed Index and backtest
a trading strategy based on market sentiment.
The results showed that the PyInvesting Fear and Greed Index was able to actively manage risks in the
portfolio by reducing both drawdown and volatility while achieving similar expected returns.
This improves your strategy's risk adjusted returns and leads to a more profitable trading strategy.
Financial markets are driven by two powerful emotions: greed and fear.
These emotions drive volatility in the stock market, and are part of the animal spirits
that Keynes described as having a huge impact on markets.
While contrarian investors such as Warren Buffett prefer being
"fearful when others are greedy and greedy only when others are fearful", we believe that
this approach will cause investors to be underinvested and miss out on the expected returns
from the stock market. It is far better to remain fully invested in the market
as "time in the market beats timing the market".
As some investors might have sleepless nights worrying about large swings in their portfolio,
we suggest using the fear and greed index to manage your portfolio's risk. By using market sentiment
to raise cash when markets are trending down, you can protect your portfolio when markets get volatile and
hence improve your risk reward ratio.