S&P 500 Quandl Data & RatiosTradingView has a little-known integration that allows you to pull in 3rd party data-sets from Nasdaq Data Link, also known as Quandl. Today, I am open-sourcing for the community an indicator that uses the Quandl integration to pull in historical data and ratios on the S&P500. I originally coded this to study macro P/E ratios during peaks and troughs of boom/bust cycles.
The indicator pulls in each of the following datasets, as defined and provided by Quandl. The user can select which datasets to pull in using the indicator settings:
Dividend Yield : S&P 500 dividend yield (12 month dividend per share)/price. Yields following June 2022 (including the current yield) are estimated based on 12 month dividends through June 2022, as reported by S&P. Sources: Standard & Poor's for current S&P 500 Dividend Yield. Robert Shiller and his book Irrational Exuberance for historic S&P 500 Dividend Yields.
Price Earning Ratio : Price to earnings ratio, based on trailing twelve month as reported earnings. Current PE is estimated from latest reported earnings and current market price. Source: Robert Shiller and his book Irrational Exuberance for historic S&P 500 PE Ratio.
CAPE/Shiller PE Ratio : Shiller PE ratio for the S&P 500. Price earnings ratio is based on average inflation-adjusted earnings from the previous 10 years, known as the Cyclically Adjusted PE Ratio (CAPE Ratio), Shiller PE Ratio, or PE 10 FAQ. Data courtesy of Robert Shiller from his book, Irrational Exuberance.
Earnings Yield : S&P 500 Earnings Yield. Earnings Yield = trailing 12 month earnings divided by index price (or inverse PE) Yields following March, 2022 (including current yield) are estimated based on 12 month earnings through March, 2022 the latest reported by S&P. Source: Standard & Poor's
Price Book Ratio : S&P 500 price to book value ratio. Current price to book ratio is estimated based on current market price and S&P 500 book value as of March, 2022 the latest reported by S&P. Source: Standard & Poor's
Price Sales Ratio : S&P 500 Price to Sales Ratio (P/S or Price to Revenue). Current price to sales ratio is estimated based on current market price and 12 month sales ending March, 2022 the latest reported by S&P. Source: Standard & Poor's
Inflation Adjusted SP500 : Inflation adjusted SP500. Other than the current price, all prices are monthly average closing prices. Sources: Standard & Poor's Robert Shiller and his book Irrational Exuberance for historic S&P 500 prices, and historic CPIs.
Revenue Per Share : Trailing twelve month S&P 500 Sales Per Share (S&P 500 Revenue Per Share) non-inflation adjusted current dollars. Source: Standard & Poor's
Earnings Per Share : S&P 500 Earnings Per Share. 12-month real earnings per share inflation adjusted, constant August, 2022 dollars. Sources: Standard & Poor's for current S&P 500 Earnings. Robert Shiller and his book Irrational Exuberance for historic S&P 500 Earnings.
Disclaimer: This is not financial advice. Open-source scripts I publish in the community are largely meant to spark ideas that can be used as building blocks for part of a more robust trade management strategy. If you would like to implement a version of any script, I would recommend making significant additions/modifications to the strategy & risk management functions. If you don’t know how to program in Pine, then hire a Pine-coder. We can help!
Quandl
HASHRATE and MINER REVENUEThis script uses daily data points from Quandl which measure Bitcoin mining hashrate, and miner revenue, and averages the two. The two data sets are fairly zigzaggy, so to smooth the data I am use a John Ehlers' filter to reduce the noise. Why did I combine the two? Both have correlation to BTC price action, and by combining hashrate and revenue, I believe it produces a stronger and more accurate signal. At times when the background is green (also displayed with a green square at the bottom), conditions are good in Bitcoinland with miner revenue/hashrate going up. No color in the background and no dot, means the combined miner revenue and hashrate indicator is dropping, but nothing to get worried about. Seeing red dots on the bottom along with a red background signals a rapidly dropping rate of hashrate/miner revenue, and with a fairly strong correlation to the Bitcoin price. Not every red zone foretells a drop in the Bitcoin price, but a significant number of them do. I wrote this script as an early warning system for when to move out of Bitcoin. Use at your own risk. Feel free to modify this code to suit your personal needs. Please only use on BTC /USD pairs with 1D bars. Since there is only one data point per day published by Quandl, it will not give accurate data for shorter timeframes. Enjoy.
Noncommercial long futures position to overall Open InterestThis is an indicator that gets data from Quandl and presents weekly CFTC futures data (www.cftc.gov). In this indicator, the noncommercial long/short positions are calculated as a percentage of overall Open Interest. This indicates the bullish/bearish sentiment of the market.
[5F ] Number of Bitcoin wallets-═════════════════════════-
This is a simple script that displays the total number of Bitcoins wallets based on the data provided by Quandl.
Use it in dayli resolution minimum
Refresh every day
Thanks to all Pinecoders who share their work with the community.
-═════════════════════════-
Noldo Blockchain Cryptocurrency Indicator
Hello, this script has the same logic as Noldo CFTC COT Forex Indicator :
And Noldo CFTC COT Commodities Indicator :
*
Script briefly calculates the period length between two signals of Pivot Reversal Strategy when new signal arrives and allows us to see relative Blockchain data and price changes of Major Cryptocurrencies over that automatic length.
This saves us from the hassle and time wasting of searching for a reference point.
Usage
This script works only on all Bitcoin / U.S Dollar pairs and futures.
It only works on 1W graphics.
ICOT data are pulled via Quandl
NOTE :
Since blockchain data is very votalile, 7-day ema values are adjusted to take into account.
Regards.
[Daveatt] BEST Quandl Federal Reserve Economic Dashboard 1.0Hello traders
I hope you're all doing well and the quarantine will soon be over in your respective countries.
We all have strong opinions on how it could have been handled by our respective governments but the facts cannot be contested.
And basically, they acted based on a lot of unknown data. Obviously, we can throw away some conspiracy theories but what's the point really?
Conspiracy theorists never ever ever ever made money - Permabulls did historically.
Fight only for what you can change, in other words, YOURSELF. Those 2 months were tremendous for me to adapt, learn, and pivot my different businesses.
I believe that humans are wired to one thing - transform themselves. You'll never be able to change our governments, the banks, the FED printing money (making it the dollar less and less valuable)
Transforming yourself and your life is the only (and the most powerful) hedge you have
Yes, you didn't ask for it, this is not fair. Life is not fair. Only YOU can make it fair for yourself
That's why I stopped listening to the media, social media and all the news related to COVID
Context
I wanted to play with the new Quandl utility function provided by TradingView
With this dashboard, I tried to build a Quandl dashboard based on the Federal Reserve Economic Data data
I pulled out a few metrics from this Quandl page: www.quandl.com
"Federal Reserve Economic Data" or FRED is a project by the Economic Research Department of the Federal Reserve Bank of St Louis.
FRED collects over 200,000 US and international economic time series, from 69 different sources, on a single website. Data coverage includes all major areas of macroeconomic analysis: growth, inflation, employment, interest rates, exchange rates, production and consumption, income and expenditure, savings and investment, and more.
What can you do with the indicator
First, kudos to Pinecoders . I used his color scale and f_print functions to display those labels at the right.
Script Reference:
You can change from the indicator settings:
- Labels horizontal position
- Labels size (tiny, normal, big, huge)
- Labels colors
Final words
Tough times are ahead as we can see from those numbers.
For those having an online business, it's a fantastic period despite the terrible events. Use it at your advantage to learn and share your vibes and knowledge with your audience
Stay brave,
Dave
Open Interest Market Facilitation IndexOriginal script from ChartChampions :
Let's start.
This script was created by using Open Interest instead of Volume in the Market Facilitation Index.
Thus, it can make a difference in the Future and CFD Markets.
If your financial instrument is not from these markets, that is, if Open Interest is not used, you can choose Volume.
You can set "FUTURES" and "OTHERS" from the menu.
If you use the Open Interest (FUTURES) option in the menu on 1W bars and defined Future markets, it will not repaint.
This is the best use for Open Interests, as data is extracted from Quandl and CFTC COT reports are published once a week.
Color Change Rules :
In my version :
Green Bars = Green
Fade Bars = Orange
Fake Bars = Blue
Squat Bars = Red
To show the difference in the presentation, both the Futures option using Open Interest and the Others option using Volume were published to compare.
You can observe the difference.
Best regards.
Blockchain Artificial Neural NetworksI found a very high correlation in a research-based Artificial Neural Networks.(ANN)
Trained only on daily bars with blockchain data and Bitcoin closing price.
NOTE: It does not repaint strictly during the weekly time frame. (TF = 1W)
Use only for Bitcoin .
Blockchain data can be repainted in the daily time zone according to the description time.
Alarms are available.
And you can also paint bar colors from the menu by region.
After making reminders, let's share the details of this interesting research:
INPUTS :
1. Average Block Size
2. Api Blockchain Size
3. Miners Revenue
4. Hash Rate
5. Bitcoin Cost Per Transaction
6. Bitcoin USD Exchange Trade Volume
7. Bitcoin Total Number of Transactions
OUTPUTS :
1. One day next price close (Historical)
TRAINING DETAILS :
Learning cycles: 1096436
AutoSave cycles: 100
Grid :
Input columns: 7
Output columns: 1
Excluded columns: 0
Training example rows: 446
Validating example rows: 0
Querying example rows: 0
Excluded example rows: 0
Duplicated example rows: 0
Network :
Input nodes connected: 7
Hidden layer 1 nodes: 5
Hidden layer 2 nodes: 0
Hidden layer 3 nodes: 0
Output nodes: 1
Controls :
Learning rate: 0.1000
Momentum: 0.8000
Target error: 0.0100
Training error: 0.010571
The average training error is really low, almost worth the target.
Without using technical analysis data, we established Artificial Neural Networks with blockchain data.
Interesting!
Open Interest Stochastic Money Flow IndexThis is the improved version of Stochastic Money Flow Index script that uses Open Interest instead of volume in Future markets.
I think it will make a difference especially in Future and CFD markets.
Since the system will pull data from Quandl, CFTC reports may cause repaint when disclosed.
So if you use it during the weekly time frame (1W), it will definitely not repaint.
You can also use the volume by selecting "Others" from the menu.This option applies to each instrument, you can use it on any financial instrument with or without COT data.
Bitcoin is included in the "Futures" option.
In Futures, you can observe the difference of Open Interest's success by comparing, since it counts exchanges between the two parties singularly, it reacts more firmly to speculative movements.
This script also includes alerts and bar color options, you can use from the menu.
It is also suitable for mutable variables.This script was freed from the integer loads.You can modify it in any adaptive or fractional period.
I hope it will help your analyzes, regards .
Weiss Wave Open Interest BarsFirstly :
LazyBear ' s "Weiss Wave " codes are used for open interests.
Original Weiss Wave Volume :
Let's start :
Open Interest vs. Volume: An Overview
Volume and open interest are two key measurements that describe the liquidity and activity of contracts In the options and futures markets. However, their meanings and applications are different. Volume refers to the number of contracts traded in a given period, while open interest denotes the number of active contracts.
Volume
Trading volume measures the number of options or futures contracts being exchanged between buyers and sellers, identifying the level of activity for that particular contract. For every buyer, there is a seller, and the transaction itself counts toward the daily volume.
Open Interest
Open interest indicates the number of options or futures contracts that are held by traders and investors in active positions. These positions have not been closed out, expired, or exercised. Open interest decreases when holders and writers of options (or buyers and sellers of futures) close out their positions. To close out positions, they must take offsetting positions or exercise their options. Open interest increases once again when investors and traders open new long positions or writers/sellers take on new short positions. Open interest also increases when new options or futures contracts are created.
Options or futures contract trading volume can only increase while open interest can either increase or decrease. While trading volume indicates the number of contracts that have been bought or sold, open interest identifies the number of contracts that are currently held.
Reference : www.investopedia.com
*** Worked to define all futures . You can look them in codes (between line : 13 to line 94 )
** CAUTION 1 : Since each instrument in the list has its own unique contract data, you must first enter its name to display it. I recommend you to select OANDA from the markets. Finally, when the COT reports are issued, it may repaints. However, this repaint is usually close to closing or after close .(When COT reports are so sharp ) So use this script only 1W ( 1 week ) or 1 M ( 1 month ) timeframe.
** CAUTION 2 : This data is taken to Tradingview with the help of Quandl. This is a tremendous possibility, but the system will not work if there is a malfunction.
Best regards.
NVT Signal with RMA and thresholds [alertable]NVT Signal, or NVTS, is an indicator that compares the market cap of Bitcoin to the aggregate USD value of daily transactions on the Bitcoin blockchain. It is a value indicator that shows a multiple of Bitcoin price against the actual usage of its blockchain. When the NVTS is low, it suggests Bitcoin price is low relative to the amount of utility the network provides, and vice versa.
For more information on NVTS, visit medium.com
This indicator aims to provide the following:
1. An open-source implementation of NVTS on Tradingview, as the most popular one currently is closed-source.
2. To provide two simple ways to define and visualize "overbought" or "oversold" conditions using the NVTS. Here, we have absolute value of NVTS & deviation from a long-term moving average.
3. Crude integration into Tradingview's alert system.
What this indicator CANNOT do:
1. Timeframes below 1d.
2. Signals based on statistical analyses, such as seen in Bollinger Bands et al. (However, with the appropriate type of account, you can add BBands on top of this indicator.)
I would like to express my gratitude to Willy Woo, Chris Burniske and Dimitry Kalichkin for their work on NVT Ratio and NVT Signal, without which my indicator would not have been created.
Feel free to fork & improve, or experiment with settings. I hope this indicator will be useful to someone.
BTC exchange trade vol / on-chain transaction volThis Bitcoin indicator shows the percentage that the exchange traded volume is from the sum of the exchange traded volume + on-chain transaction volume.
The thin red line is the non-smoothed value calculated from daily volumes.
The thick black line is the 7-day EMA-smoothed value.
The exchange traded volume and the on-chain transaction volume are reported by Quandl and have a 1D resolution - so it is best to use this indicator on the daily time frame.
When the value is high, it shows the the interest of traders is high and they are intensely trading BTC. When the indicator is low, it means that BTC is "dormant": it is used for transfers, but not so much for trading - traders forgot about it for a while - which may be a good time to accumulate if the economy is in a general bull market.
CBOE/CME BTC FUTURE LISThow to pull data from quandl.com
this script for CBOE/CME BTC FUTURE
ex.
if you want to pull www.quandl.com you input "QUANDL:CFTC/1330E1_FO_ALL|n" as TV symbol.("n" is table number)
10Y Bond Yield Spread (beta)10-Year Bond Yield Spread using Quandl data
See also:
- seekingalpha.com
- www.babypips.com
- www.forexfactory.com
CPI-weighted USD/RUB exchange rate calculationProjected target for USDRUB calculated by inflation rates (consumer price indexes) is 110.
Herrick Payoff Index for Quandl DataUpdate to my previous Herrick Payoff Index script. This script pulls Quandl futures data with daily open interest. The prior version only used the weekly Commitment of Traders open interest data so could only be used on weekly bars. Note: Must use Quandl Symbol methodology in chart (i.e. enter symbol as QUANDL:CHRIS/CME_FC2, QUANDL:CME/FCX2016, ect.). Unfortunately, I haven't been able to program this to pull from the embedded futures data.
COT (Legacy): Largest 8 NetPercents of Open Interest held by the largest eight reportable traders from legacy commitment of traders (COT) report. Computed on a net long and net short basis. For the main symbol but also allows to override it. Also allows to include options in consideration.
COT (Legacy): Largest 4 NetPercents of Open Interest held by the largest four reportable traders from legacy commitment of traders (COT) report. Computed on a net long and net short basis. For the main symbol but also allows to override it. Also allows to include options in consideration.
COT (Legacy): Largest 8 GrossPercents of Open Interest held by the largest eight reportable traders from legacy commitment of traders (COT) report. Computed on a gross long and gross short basis. For the main symbol but also allows to override it. Also allows to include options in consideration.
COT (Legacy): Largest 4 GrossPercents of Open Interest held by the largest four reportable traders from legacy commitment of traders (COT) report. Computed on a gross long and gross short basis. For the main symbol but also allows to override it. Also allows to include options in consideration.
COT (Legacy): Non-Reportable Interest PercentPercent in Open Interest for non reportable traders from legacy commitment of traders (COT) report. For the main symbol but also allows to override it. Also allows to include options in consideration.
COT (Legacy): Non-Reportable Interest ChangeChange in Open Interest for non reportable traders from legacy commitment of traders (COT) report. For the main symbol but also allows to override it. Also allows to include options in consideration.