将数字转换为天

时间:2019-12-23 23:55:43

标签: python python-3.x

有人可以告诉我如何将x轴上的数字转换为从01/01/2018到03/01/2018的日期。

有下面的代码

t_intervals=60
iterations=10
daily_returns=np.exp(drift.values+stdev.values*norm.ppf(np.random.rand(t_intervals,iterations)))
S0=d.iloc[-1]
plist=np.zeros_like(daily_returns)
plist[0]=S0
for t in range(1,60):
    plist[t]=plist[t-1]*daily_returns[t]

plt.figure(figsize=(20,5))
plt.axhline(y=np.mean(plist),color='gray')
plt.axhline(y=np.median(plist),color='green')
plt.plot(plist)
plt.show()

谢谢

the link of the graph image is available here

0 个答案:

没有答案