Mateus_Rapini

AIAE: Average Investor's Allocation To Equity

People say a bull market ends when there are no more buyers left on the market and a bear market ends when there are no more sellers. Well, this indicador shows exactly this.
It uses FRED data to compare the total value invested on stocks with the total value held by investors to find the percentage that is allocated to stocks.
The exact formula used to calculate this index was created by pseudonymous Jesse Livermore and is available for free to anyone who wishes to consult it in his blog Philosophical Economics. The only thing I'm adding here that wasn't available on Jesse's index is the color code.

This script will use Jesse's formula to find the average investor's allocation to equity at any given time. Then, it will color the SPDR (S&P 500) according to this allocation.
A high allocation to equity means we could be close to a market correction, so it will color the SPDR in red and a low allocation means we could be close to a market bottom, so it will color the SPDR in blue.

Here's the exact color parameters used:
switch
AIAE <= 23 => priceLevel := "Gift"
AIAE > 23 and AIAE <=26 => priceLevel := "Very Cheap"
AIAE > 26 and AIAE <= 29 => priceLevel := "Cheap"
AIAE > 29 and AIAE <= 32 => priceLevel := "Slightly Cheap"
AIAE > 32 and AIAE <= 37 => priceLevel := "Neutral"
AIAE > 37 and AIAE <= 40 => priceLevel := "Slightly Expensive"
AIAE > 40 and AIAE <= 43 => priceLevel := "Expensive"
AIAE > 43 and AIAE <= 46 => priceLevel := "Very Expensive"
AIAE > 46 => priceLevel := "Exuberant"

Please note that this indicador should ONLY be used on the SPDR (S&P 500). It will not produce adequate results if used on other assets.

Mateus Rapini
Mã được bảo vệ
Tập lệnh này được xuất bản mã nguồn đóng và bạn có thể sử dụng một cách tự do. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ. Bạn không thể xem hoặc sửa đổi mã nguồn.
Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?