fig, ax = plt.subplots(figsize=(17,6))
par1 = ax.twinx()
line, = ax.plot(pd.DataFrame(T10YFF),linewidth=0.4)
line.set_label('10-Year Treasury Constant Maturity Minus Federal Funds Rate')
ax.legend(loc='best', bbox_to_anchor=(0.5, 0., 0.5, 0.1))
line1, = par1.plot(np.log(GSPC_h['Close']),linewidth=0.7, color='red')
line1.set_label('S&P500')
par1.legend(loc='best', bbox_to_anchor=(0.5, 0., 0.5, 0.18))
plt.xlim(left=date(1962, 1, 1), right=date(2020, 3, 9))
plt.ylim(bottom=4)
ax.axvspan(date(2007, 12, 1), date(2009, 6, 1), alpha=0.3, color='grey')
ax.axvspan(date(2001, 3, 1), date(2001, 11, 1), alpha=0.3, color='grey')
ax.axvspan(date(1990, 8, 1), date(1991, 2, 1), alpha=0.3, color='grey')
ax.axvspan(date(1981, 7, 1), date(1982, 11, 1), alpha=0.3, color='grey')
ax.axvspan(date(1980, 1, 1), date(1980, 7, 1), alpha=0.3, color='grey')
ax.axvspan(date(1973, 12, 1), date(1975, 2, 1), alpha=0.3, color='grey')
ax.axvspan(date(1969, 12, 1), date(1970, 11, 1), alpha=0.3, color='grey')
ax.axhline(linewidth=2, color='black', alpha=0.7)
plt.scatter(date(2019, 9, 1), 6.7, color='orange', s=500, marker='o', alpha=0.5)
plt.scatter(date(2007, 1, 1), 6.7, color='orange', s=500, marker='o', alpha=0.5)
plt.scatter(date(2000, 11, 1), 6.7, color='orange', s=500, marker='o', alpha=0.5)
plt.scatter(date(1998, 11, 1), 6.6, color='orange', s=500, marker='o', alpha=0.5)
plt.scatter(date(1989, 6, 1), 6.4, color='orange', s=500, marker='o', alpha=0.5)
plt.scatter(date(1973, 6, 1), 6.6, color='orange', s=500, marker='o', alpha=0.5)
plt.scatter(date(1981, 3, 1), 6.3, color='orange', s=500, marker='o', alpha=0.5)
plt.scatter(date(1979, 3, 1), 6.6, color='orange', s=500, marker='o', alpha=0.5)
plt.scatter(date(1969, 3, 1), 6.6, color='orange', s=500, marker='o', alpha=0.5)
plt.scatter(date(1967, 1, 1), 6.6, color='orange', s=500, marker='o', alpha=0.5)
ax.set_xlabel('')
ax.set_ylabel(' , %')
par1.set_ylabel('Log S&P500')
plt.show()