Macroeconomic Artificial Neural Networks

This script was created by training 20 selected macroeconomic data to construct artificial neural networks on the S&P 500 index .
No technical analysis data were used.
The average error rate is 0. 01 .
In this respect, there is a strong relationship between the index and macroeconomic data.
Although it affects the whole world,I personally recommend using it under the following conditions: S&P 500 and related ETFs in 1W time-frame (TF = 1W SPX500USD , SP1! , SPY , SPX etc. )

Macroeconomic Parameters

Effective Federal Funds Rate ( FEDFUNDS )
Initial Claims ( ICSA )
Civilian Unemployment Rate ( UNRATE )
10 Year Treasury Constant Maturity Rate ( DGS10 )
Gross Domestic Product , 1 Decimal (GDP)
Trade Weighted US Dollar Index : Major Currencies ( DTWEXM )
Consumer Price Index For All Urban Consumers (CPIAUCSL)
M1 Money Stock ( M1 )
M2 Money Stock ( M2 )
2 - Year Treasury Constant Maturity Rate ( DGS2 )
30 Year Treasury Constant Maturity Rate (DGS30)
Industrial Production Index ( INDPRO )
5-Year Treasury Constant Maturity Rate ( FRED : DGS5 )
Light Weight Vehicle Sales: Autos and Light Trucks (ALTSALES)
Civilian Employment Population Ratio (EMRATIO)
Capacity Utilization (TOTAL INDUSTRY) (TCU)
Average (Mean) Duration Of Unemployment (UEMPMEAN)
Manufacturing Employment Index (MAN_EMPL)
Manufacturers' New Orders ( NEWORDER )
ISM Manufacturing Index (MAN : PMI)

Artificial Neural Network (ANN) Training Details :

Learning cycles: 16231
AutoSave cycles: 100


Input columns: 19
Output columns: 1
Excluded columns: 0

Training example rows: 998
Validating example rows: 0
Querying example rows: 0
Excluded example rows: 0
Duplicated example rows: 0


Input nodes connected: 19

Hidden layer 1 nodes: 2
Hidden layer 2 nodes: 0
Hidden layer 3 nodes: 0

Output nodes: 1


Learning rate: 0.1000
Momentum: 0.8000 (Optimized)
Target error: 0.0100

Training error: 0.010000

NOTE : Alerts added . The red histogram represents the bear market and the green histogram represents the bull market.
Bars subject to region changes are shown as background colors. (Teal = Bull , Maroon = Bear Market )

I hope it will be useful in your studies and analysis, regards.

Skrip open-source

Sejalan dengan semangat TradingView, penulis skrip ini telah mempublikasikannya secara open-source, sehingga para trader dapat memahami dan memverifikasinya. Salut untuk sang penulis! Anda dapat menggunakannya secara gratis, tetapi penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk dapat menggunakannya didalam sebuah chart.

Inggin menggunakan skrip ini pada chart?
Telegram : @BBN91
Chat : Tradingview Chat
Website :
E-mail :



Thank you. It is great contribution. I am trying to understand the logic.
1. you calculate the second derivative of each indicator, right?
2. what function does the "ActivationFunctionTanh"?
3. and how do you get the coeficientes for n_19 and n_20?
Albert Ac
+2 Jawab
Noldo jdalber
@jdalber, First of all thanks for your interest. You can find more information on my first Artificial Neural Network script :

jdalber Noldo
@Noldo, thanks
+1 Jawab
Noldo jdalber
@jdalber, Your welcome !
Hello, thanks for sharing! I want to choose an ANN indicator for Hang Seng Index Futures, do you think this one, or other SPX indicators can apply? And did you try other activation functions?
+1 Jawab
@MOMINCKS, BTW a great leading indicator, especially with high tf like 1M!
@MOMINCKS, Thanks a lot!
It may benefit Hang Seng, but indirectly.
While S&P is rising, all exchanges are major.
But it will fail in country-based problems.
Or vice-versa.
I have previously tried to train Hang Seng with the ANN method, but I have removed the error rate is too high.
In my spare time, I will try again with other methods.
+1 Jawab
@Noldo, That will be great! I am looking forward to it!
could U make btc version of this?))
+1 Jawab
Beranda Penyaring Saham Penyaring Forex Penyaring Crypto Kalender Ekonomi Bagaimana Cara Kerjanya Fitur-Fitur Chart Harga Akun Refer seorang teman Tata Tertib Pusat Bantuan Solusi Website & Broker Widget-Widget Solusi Charting Perpustakaan Charting Ringan Blog & Berita Twitter
Profil Pengaturan Profil Akun dan Penagihan Teman yang di refer Koin Tiket Dukungan Saya Pusat Bantuan Pesan Pribadi Obrolan Keluar