パンダデータフレームで対数リターン

df['pct_change'] = df.price.pct_change()
df['log_return'] = np.log(1 + df.pct_change)

pct_change:割合の変化

公開された128元の記事 ウォン称賛90 ビュー4884

おすすめ

転載: blog.csdn.net/weixin_45405128/article/details/102681492