- Signal2Noise (S2N) News
- Posts
- Financial Market Dashboard Python Code
Financial Market Dashboard Python Code
Performance Dashboard
The main objective of the Signal2Noise site is to provide a way for traders and investors to consume as much relevant information as possible in a snapshot.
The first thing you need is a table that produces returns over different time periods and presents them in a way that visually highlights a price move that is not a normal move. I use Z-Scores for colour coding, which I explain below.

Data Sourced & Presented
I use the symbol tickers from Yahoo Finance, a free resource, and the full name description. As you can see, I include the last traded price. I think it is always good to have a feel for the actual price of the symbol, but the most important information is the percentage return. I stay away from the point change, as it can be very deceptive. A 1,000-point move on the Dow sounds like a lot, which the financial media like to use, but it is only a 2% move at the current index price.
There are two main problems when looking at % returns:
The first issue is not knowing whether the move over a particular time period is a big or small move relative to its history. For example, the EURUSD moved 1% over the previous day. You think 1% is not a big deal, but in fact, a 1% move for EURUSD is a relatively big move.
When you look at % returns in relation to other symbols, you cannot judge a 1% return as the same for all symbols. For example, a 1% move with EURUSD may be considered a big move, but a 1% move with Bitcoin is average.
To overcome these issues, we use the z-score signal to help us work out the signal 2 noise.
Z-Score Signal
To overcome these issues, among a few others, we use the Z-Score to highlight whether there is a % return that is worth highlighting, what I call a signal.
The Z-Score formula is = (return – mean) / standard deviation
The parameters I have used for the calculation of the table are as follows:
lookback period for the calculation of the mean and standard deviation is 5 years.
+ 0.5 Z-Score is light green.
– 0.5 Z-Score is light coral.
+ 1 Z-Score is dark green
– 1 Z-Score is dark red.
The Code
In order to run the code you will need to have Python on your computer and the libraries I have included in the code block. They are all available via pip install.
I need to point out that when downloading certain data on exchanges in different time zones, Yahoo Finance has a built in function to download the data using UTC time according to the exchange location.
I am running the data from Sydney, Australia, and it works fine as UTC doesn’t care.
If you have any issues email me: [email protected]
The post Financial Market Dashboard Python Code appeared first on Signal2Noise.