TheDailyCalls.com Daily Notebook¶

This notebook contains the daily returns of the S&P500 sectors, VIX, 10-year Treasury Yield, 30-year Treasury Yield, and Crude Oil.

In [1]:
import yfinance as yf
import pandas as pd
import numpy as np
from wallstreet import get_moving_avg, get_dow_list, get_ytd_return, get_ytd_growth_percentage, get_spdr_sectors, get_daily_returns
from datetime import datetime
In [2]:
datetime.now()
Out[2]:
datetime.datetime(2023, 2, 3, 17, 23, 10, 961410)
In [3]:
pd.options.display.float_format = '{:.2f}%'.format

In [4]:
my_list = get_spdr_sectors()
my_list.append('CL=F')
my_list.append('^TNX')
my_list.append('^TYX')
my_list.append('^VIX')
my_list.append('VOOG')
my_list.append('VOOV')

Daily Percentage¶

In [5]:
pd.options.display.float_format = '{:.2f}'.format
t = get_daily_returns(my_list)
In [6]:
t = t.sort_values(by='percent change',ascending=False)
t.set_index('ticker')
Out[6]:
name previous_close current_price percent change today_volume previous_volume
ticker
^TNX 3.40 3.53 4.00 0.00 0.00
^TYX 3.56 3.63 2.05 0.00 0.00
XLF 36.66 36.59 -0.19 42.92 42.11
XLE 86.15 85.96 -0.22 22.68 24.90
XLV 133.08 132.69 -0.29 10.05 11.27
XLP 73.69 73.40 -0.39 12.86 12.24
XLI 103.39 102.85 -0.52 13.54 13.46
VOOG 227.99 226.43 -0.68 0.18 0.21
XLK 142.96 141.77 -0.83 8.01 9.41
VOOV 154.09 151.81 -1.48 0.10 0.12
XLB 84.94 83.41 -1.80 5.93 6.16
XLC 59.39 58.20 -2.00 7.83 9.44
XLRE 41.83 40.96 -2.08 7.46 7.01
XLU 69.36 67.91 -2.09 12.67 12.50
^VIX 18.73 18.33 -2.14 0.00 0.00
XLY 156.16 151.35 -3.08 6.79 7.02
CL=F 75.88 73.23 -3.49 0.39 0.36

In [7]:
spy_sectors = t[t['ticker'].str.startswith('X')]
In [8]:
spy_sectors.set_index('ticker')
Out[8]:
name previous_close current_price percent change today_volume previous_volume
ticker
XLF 36.66 36.59 -0.19 42.92 42.11
XLE 86.15 85.96 -0.22 22.68 24.90
XLV 133.08 132.69 -0.29 10.05 11.27
XLP 73.69 73.40 -0.39 12.86 12.24
XLI 103.39 102.85 -0.52 13.54 13.46
XLK 142.96 141.77 -0.83 8.01 9.41
XLB 84.94 83.41 -1.80 5.93 6.16
XLC 59.39 58.20 -2.00 7.83 9.44
XLRE 41.83 40.96 -2.08 7.46 7.01
XLU 69.36 67.91 -2.09 12.67 12.50
XLY 156.16 151.35 -3.08 6.79 7.02

Disclaimer: I am not a professional investment adviser and my opinions are based on my own technical analysis. Please consult an investment professional before making investment decisions.