1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

df_treasury_yield_eua = pd.read_csv('daily_treasury_yield_curve_rates_usa.csv', encoding = "utf-8", delimiter=';', index_col=0, parse_dates=True)

print(df_treasury_yield_eua)

sns.set_style('whitegrid')
plt.title('USA Treasury Yield Curve Rates')
df_treasury_yield_eua['3 Mo'].plot(label='3 meses')
df_treasury_yield_eua['2 Yr'].plot(label='2 anos')
df_treasury_yield_eua['10 Yr'].plot(label='10 anos')
df_treasury_yield_eua['30 Yr'].plot(label='30 anos')
plt.legend(loc=7)
plt.xlabel('Date')
plt.ylabel('Treasury Yield Curve Rates')
plt.show()