Run my Python code and I can “Show you the money!”
World asset classes at a glance, the applicaton is really unlimted.
If you understand these codes…
you can simply apply the template to compare stock tickers in different sectors, ETF prices, even apply to business revenue/forecast by product per region, customer performance analysis, supply chain management inventory dynamics, and many more.
Let’s walk through it together. (Complete one page code at the end)
1. Plan the Plot
Let’s say we are interested to have a quick view on below categories of assets (total 6 of them):
- Stock indices
- Currency from different region: US/Canada, North Asia, SouthEast Asia
- Crypto Currencies
- Oil and Precious Metals
You can define each of the group in the dictionary below with the corresponding symbols which belongs to each group. This table will be used for us to make the subplot in the chart, one subplot per group. I hope this is straight forward.
{ asset class : [ list, of, symbols ] }
# assign different ticker in different segment
ticker_group_tbl = {
'World Stock': ['^GSPC', '^DJI', '^IXIC', '^N225', '^HSI'…